diff options
author | Brad Sowden <code@sowden.org> | 2011-12-29 22:26:57 +1300 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-01-03 18:02:55 +0100 |
commit | 3fb612cb206a989c0749ac509b173ec01eb3f49e (patch) | |
tree | c062d03d2948a1489cfb47260875f8bcfc40203c /sw | |
parent | 9e192c9fd1c0ddc0cd9b926a46f4144f1bf71526 (diff) |
Easyhack fdo#38831 remove SvStrings
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 6b0ddc7ccbe9..2e4785fbe7fc 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -85,7 +85,6 @@ #include <tools/datetime.hxx> #include <tools/urlobj.hxx> #include <svx/dataaccessdescriptor.hxx> -#define _SVSTDARR_STRINGS #include <svl/svstdarr.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -95,6 +94,7 @@ #include <fmtmeta.hxx> // MetaFieldManager #include <switerator.hxx> #include <rtl/strbuf.hxx> +#include <vector> using ::rtl::OUString; using namespace ::com::sun::star; @@ -2539,32 +2539,30 @@ uno::Sequence< OUString > SwXTextFieldMasters::getElementNames(void) const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes(); sal_uInt16 nCount = pFldTypes->Count(); - SvStrings aFldNames; + std::vector<String*> aFldNames; String* pString = new String(); - sal_uInt16 i; - for( i = 0; i < nCount; i++) + for( sal_uInt16 i = 0; i < nCount; i++) { SwFieldType& rFldType = *((*pFldTypes)[i]); if (SwXTextFieldMasters::getInstanceName(rFldType, *pString)) { - aFldNames.Insert(pString, aFldNames.Count()); + aFldNames.push_back(pString); pString = new String(); } } delete pString; - uno::Sequence< OUString > aSeq(aFldNames.Count()); + uno::Sequence< OUString > aSeq( static_cast<sal_uInt16>(aFldNames.size()) ); OUString* pArray = aSeq.getArray(); - for(i = 0; i < aFldNames.Count();i++) + for(sal_uInt16 i = 0; i < aFldNames.size();i++) { - pArray[i] = *aFldNames.GetObject(i); + pArray[i] = *aFldNames[i]; + delete aFldNames[i]; } - aFldNames.DeleteAndDestroy(0, aFldNames.Count()); return aSeq; - } sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::RuntimeException ) |