Kaydet (Commit) aeeef71b authored tarafından Noel Grandin's avatar Noel Grandin

svtools: boost::ptr_vector->std::vector

Change-Id: If03ab05ff90585285063705bf56527c6138e22fd
üst f6a4b3df
...@@ -27,8 +27,8 @@ struct SvtFontSubstConfig_Impl; ...@@ -27,8 +27,8 @@ struct SvtFontSubstConfig_Impl;
struct SubstitutionStruct struct SubstitutionStruct
{ {
OUString sFont; OUString sFont;
OUString sReplaceBy; OUString sReplaceBy;
bool bReplaceAlways; bool bReplaceAlways;
bool bReplaceOnScreenOnly; bool bReplaceOnScreenOnly;
}; };
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
using namespace utl; using namespace utl;
using namespace com::sun::star; using namespace com::sun::star;
...@@ -40,7 +40,7 @@ const sal_Char cSubstituteFont[]= "SubstituteFont"; ...@@ -40,7 +40,7 @@ const sal_Char cSubstituteFont[]= "SubstituteFont";
const sal_Char cOnScreenOnly[] = "OnScreenOnly"; const sal_Char cOnScreenOnly[] = "OnScreenOnly";
const sal_Char cAlways[] = "Always"; const sal_Char cAlways[] = "Always";
typedef boost::ptr_vector<SubstitutionStruct> SubstitutionStructArr; typedef std::vector<SubstitutionStruct> SubstitutionStructArr;
struct SvtFontSubstConfig_Impl struct SvtFontSubstConfig_Impl
{ {
...@@ -80,12 +80,12 @@ SvtFontSubstConfig::SvtFontSubstConfig() : ...@@ -80,12 +80,12 @@ SvtFontSubstConfig::SvtFontSubstConfig() :
nName = 0; nName = 0;
for(nNode = 0; nNode < aNodeNames.getLength(); nNode++) for(nNode = 0; nNode < aNodeNames.getLength(); nNode++)
{ {
SubstitutionStruct* pInsert = new SubstitutionStruct; SubstitutionStruct aInsert;
pNodeValues[nName++] >>= pInsert->sFont; pNodeValues[nName++] >>= aInsert.sFont;
pNodeValues[nName++] >>= pInsert->sReplaceBy; pNodeValues[nName++] >>= aInsert.sReplaceBy;
pInsert->bReplaceAlways = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); aInsert.bReplaceAlways = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue());
pInsert->bReplaceOnScreenOnly = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue()); aInsert.bReplaceOnScreenOnly = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue());
pImpl->aSubstArr.push_back(pInsert); pImpl->aSubstArr.push_back(aInsert);
} }
} }
...@@ -160,7 +160,7 @@ const SubstitutionStruct* SvtFontSubstConfig::GetSubstitution(sal_Int32 nPos) ...@@ -160,7 +160,7 @@ const SubstitutionStruct* SvtFontSubstConfig::GetSubstitution(sal_Int32 nPos)
void SvtFontSubstConfig::AddSubstitution(const SubstitutionStruct& rToAdd) void SvtFontSubstConfig::AddSubstitution(const SubstitutionStruct& rToAdd)
{ {
pImpl->aSubstArr.push_back(new SubstitutionStruct(rToAdd)); pImpl->aSubstArr.push_back(rToAdd);
} }
void SvtFontSubstConfig::Apply() void SvtFontSubstConfig::Apply()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment