summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-10 13:15:58 +0200
committerNoel Grandin <noel@peralex.com>2015-11-10 15:30:02 +0200
commit13815efe3d92226155531e523cbd0cf1faaa8d54 (patch)
treef17d65d38cde16bd426d838ba8004f9a6717f5fa /cui
parentc83bf01e6ec3386e2dd1a97112ff4696881dc323 (diff)
cui: boost::ptr_vector->std::vector<unique_ptr>
Change-Id: Ieddd13abc6bb23904db10f303dfc85cd87cfaa03
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/numpages.hxx4
-rw-r--r--cui/source/tabpages/numpages.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 8d83f106dfb4..8e7194cf5299 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -20,7 +20,7 @@
#define INCLUDED_CUI_SOURCE_INC_NUMPAGES_HXX
#include <vector>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <memory>
#include <sfx2/tabdlg.hxx>
#include <vcl/group.hxx>
@@ -76,7 +76,7 @@ struct SvxNumSettings_Impl
{}
};
-typedef boost::ptr_vector<SvxNumSettings_Impl> SvxNumSettingsArr_Impl;
+typedef std::vector<std::unique_ptr<SvxNumSettings_Impl> > SvxNumSettingsArr_Impl;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4456e89799bd..e032500967e3 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -213,7 +213,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent,
for(sal_Int32 i = 0; i < nLength; i++)
{
SvxNumSettings_Impl* pNew = lcl_CreateNumSettingsPtr(pValuesArr[i]);
- aNumSettingsArr.push_back(pNew);
+ aNumSettingsArr.push_back(std::unique_ptr<SvxNumSettings_Impl>(pNew));
}
}
catch(const Exception&)
@@ -336,7 +336,7 @@ IMPL_LINK_NOARG_TYPED(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, voi
DBG_ASSERT(aNumSettingsArr.size() > nIdx, "wrong index");
if(aNumSettingsArr.size() <= nIdx)
return;
- SvxNumSettings_Impl* _pSet = &aNumSettingsArr[nIdx];
+ SvxNumSettings_Impl* _pSet = aNumSettingsArr[nIdx].get();
sal_Int16 eNewType = _pSet->nNumberType;
const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix[0] : 0;
const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix[0] : 0;
@@ -580,7 +580,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent,
Sequence<PropertyValue> aLevelProps;
aValueAny >>= aLevelProps;
SvxNumSettings_Impl* pNew = lcl_CreateNumSettingsPtr(aLevelProps);
- rItemArr.push_back( pNew );
+ rItemArr.push_back( std::unique_ptr<SvxNumSettings_Impl>(pNew) );
}
}
}
@@ -710,7 +710,7 @@ IMPL_LINK_NOARG_TYPED(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(rItemArr.size() > i)
- pLevelSettings = &rItemArr[i];
+ pLevelSettings = rItemArr[i].get();
if(!pLevelSettings)
break;
SvxNumberFormat aFmt(pActNum->GetLevel(i));