summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-11 15:35:16 +0200
committerNoel Grandin <noel@peralex.com>2015-11-12 08:01:36 +0200
commit1998824899489a2e2c2f8519493fc9ad8dae8637 (patch)
treeb49db70ea520affb1fd937b8d95818cf592b5ae7 /sd
parentsd: remove the maLockedRedraws field (diff)
downloadcore-1998824899489a2e2c2f8519493fc9ad8dae8637.tar.gz
core-1998824899489a2e2c2f8519493fc9ad8dae8637.zip
sd: boost::ptr_vector->std::vector
Change-Id: I59ecb4a46c21ceb82beb28c65b1fb43b329567da
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/pch/precompiled_sd.hxx1
-rw-r--r--sd/inc/pch/precompiled_sdui.hxx1
-rw-r--r--sd/source/filter/html/pubdlg.cxx29
-rw-r--r--sd/source/ui/inc/pubdlg.hxx4
4 files changed, 15 insertions, 20 deletions
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 71e2db442a1c..6b13f777a75c 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -71,7 +71,6 @@
#include <boost/limits.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <canvas/canvastools.hxx>
#include <canvas/elapsedtime.hxx>
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 10a15b477353..fc39e592888c 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -28,7 +28,6 @@
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
-#include <boost/ptr_container/ptr_vector.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index d273e2275fa1..214d5bf816af 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -469,7 +469,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
pPage5_Buttons->SetLineCount( 4 );
pPage5_Buttons->SetExtraSpacing( 1 );
- boost::ptr_vector<SdPublishingDesign>::iterator it;
+ std::vector<SdPublishingDesign>::iterator it;
for( it = m_aDesignList.begin(); it != m_aDesignList.end(); ++it )
pPage1_Designs->InsertEntry(it->m_aDesignName);
@@ -988,7 +988,7 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, DesignDeleteHdl, Button*, void)
{
const sal_Int32 nPos = pPage1_Designs->GetSelectEntryPos();
- boost::ptr_vector<SdPublishingDesign>::iterator iter = m_aDesignList.begin()+nPos;
+ std::vector<SdPublishingDesign>::iterator iter = m_aDesignList.begin()+nPos;
DBG_ASSERT(iter != m_aDesignList.end(), "No Design? That's not allowed (CL)");
@@ -1116,21 +1116,21 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, SlideChgHdl, Button*, void)
IMPL_LINK_NOARG_TYPED(SdPublishingDlg, FinishHdl, Button*, void)
{
//End
- SdPublishingDesign* pDesign = new SdPublishingDesign();
- GetDesign(pDesign);
+ SdPublishingDesign aDesign;
+ GetDesign(&aDesign);
bool bSave = false;
if(pPage1_OldDesign->IsChecked() && m_pDesign)
{
// are there changes?
- if(!(*pDesign == *m_pDesign))
+ if(!(aDesign == *m_pDesign))
bSave = true;
}
else
{
SdPublishingDesign aDefaultDesign;
- if(!(aDefaultDesign == *pDesign))
+ if(!(aDefaultDesign == aDesign))
bSave = true;
}
@@ -1149,12 +1149,12 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, FinishHdl, Button*, void)
if ( aDlg->Execute() == RET_OK )
{
- pDesign->m_aDesignName = aDlg->GetDesignName();
+ aDesign.m_aDesignName = aDlg->GetDesignName();
- boost::ptr_vector<SdPublishingDesign>::iterator iter;
+ std::vector<SdPublishingDesign>::iterator iter;
for (iter = m_aDesignList.begin(); iter != m_aDesignList.end(); ++iter)
{
- if (iter->m_aDesignName == pDesign->m_aDesignName)
+ if (iter->m_aDesignName == aDesign.m_aDesignName)
break;
}
@@ -1170,17 +1170,14 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, FinishHdl, Button*, void)
if(!bRetry)
{
- m_aDesignList.push_back(pDesign);
+ m_aDesignList.push_back(aDesign);
m_bDesignListDirty = true;
- pDesign = nullptr;
}
}
}
while(bRetry);
}
- delete pDesign;
-
if(m_bDesignListDirty)
Save();
@@ -1557,10 +1554,10 @@ bool SdPublishingDlg::Load()
pStream->GetError() == SVSTREAM_OK && nIndex < nDesigns;
nIndex++ )
{
- SdPublishingDesign* pDesign = new SdPublishingDesign();
- *pStream >> *pDesign;
+ SdPublishingDesign aDesign;
+ *pStream >> aDesign;
- m_aDesignList.push_back(pDesign);
+ m_aDesignList.push_back(aDesign);
}
return( pStream->GetError() == SVSTREAM_OK );
diff --git a/sd/source/ui/inc/pubdlg.hxx b/sd/source/ui/inc/pubdlg.hxx
index 4136f4973aed..12db763eb268 100644
--- a/sd/source/ui/inc/pubdlg.hxx
+++ b/sd/source/ui/inc/pubdlg.hxx
@@ -32,7 +32,7 @@
#include "assclass.hxx"
#include <memory>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
class FixedText;
class RadioButton;
@@ -166,7 +166,7 @@ private:
void ChangePage();
void UpdatePage();
- boost::ptr_vector<SdPublishingDesign> m_aDesignList;
+ std::vector<SdPublishingDesign> m_aDesignList;
bool m_bDesignListDirty;
SdPublishingDesign* m_pDesign;
bool Load();