diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-11 11:48:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-12 08:01:33 +0200 |
commit | aeeef71b9850b77b7de468a9748c441314e3fa6e (patch) | |
tree | f2864c80ea4ded6020122858cd33ade4d331b854 | |
parent | f6a4b3dff1066559631882548e130eb731aad7bf (diff) |
svtools: boost::ptr_vector->std::vector
Change-Id: If03ab05ff90585285063705bf56527c6138e22fd
-rw-r--r-- | include/svtools/fontsubstconfig.hxx | 4 | ||||
-rw-r--r-- | svtools/source/config/fontsubstconfig.cxx | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/svtools/fontsubstconfig.hxx b/include/svtools/fontsubstconfig.hxx index 15493ae45cab..ed2357cd5f47 100644 --- a/include/svtools/fontsubstconfig.hxx +++ b/include/svtools/fontsubstconfig.hxx @@ -27,8 +27,8 @@ struct SvtFontSubstConfig_Impl; struct SubstitutionStruct { - OUString sFont; - OUString sReplaceBy; + OUString sFont; + OUString sReplaceBy; bool bReplaceAlways; bool bReplaceOnScreenOnly; }; diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 347df644fc58..e25836e43360 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -24,7 +24,7 @@ #include <tools/debug.hxx> #include <vcl/outdev.hxx> -#include <boost/ptr_container/ptr_vector.hpp> +#include <vector> using namespace utl; using namespace com::sun::star; @@ -40,7 +40,7 @@ const sal_Char cSubstituteFont[]= "SubstituteFont"; const sal_Char cOnScreenOnly[] = "OnScreenOnly"; const sal_Char cAlways[] = "Always"; -typedef boost::ptr_vector<SubstitutionStruct> SubstitutionStructArr; +typedef std::vector<SubstitutionStruct> SubstitutionStructArr; struct SvtFontSubstConfig_Impl { @@ -80,12 +80,12 @@ SvtFontSubstConfig::SvtFontSubstConfig() : nName = 0; for(nNode = 0; nNode < aNodeNames.getLength(); nNode++) { - SubstitutionStruct* pInsert = new SubstitutionStruct; - pNodeValues[nName++] >>= pInsert->sFont; - pNodeValues[nName++] >>= pInsert->sReplaceBy; - pInsert->bReplaceAlways = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); - pInsert->bReplaceOnScreenOnly = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); - pImpl->aSubstArr.push_back(pInsert); + SubstitutionStruct aInsert; + pNodeValues[nName++] >>= aInsert.sFont; + pNodeValues[nName++] >>= aInsert.sReplaceBy; + aInsert.bReplaceAlways = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); + aInsert.bReplaceOnScreenOnly = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); + pImpl->aSubstArr.push_back(aInsert); } } @@ -160,7 +160,7 @@ const SubstitutionStruct* SvtFontSubstConfig::GetSubstitution(sal_Int32 nPos) void SvtFontSubstConfig::AddSubstitution(const SubstitutionStruct& rToAdd) { - pImpl->aSubstArr.push_back(new SubstitutionStruct(rToAdd)); + pImpl->aSubstArr.push_back(rToAdd); } void SvtFontSubstConfig::Apply() |