summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBrad Sowden <code@sowden.org>2011-12-29 22:26:06 +1300
committerLuboš Luňák <l.lunak@suse.cz>2012-01-03 18:02:55 +0100
commit9e192c9fd1c0ddc0cd9b926a46f4144f1bf71526 (patch)
treec7e36927e64c9052ee283e443a44c38c716e650f /sw
parent8172646815db38744d8ba0dfd959b1afc089fb40 (diff)
Easyhack fdo#38831 remove SvStrings
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/SwXMLSectionList.hxx6
-rw-r--r--sw/inc/shellio.hxx6
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx9
-rw-r--r--sw/source/filter/basflt/shellio.cxx2
-rw-r--r--sw/source/filter/inc/fltini.hxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx12
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
7 files changed, 21 insertions, 28 deletions
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
index 046786473813..c59fda7120d0 100644
--- a/sw/inc/SwXMLSectionList.hxx
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -31,7 +31,7 @@
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmlimp.hxx>
-class SvStrings;
+class vector;
class SwXMLSectionList : public SvXMLImport
{
@@ -43,11 +43,11 @@ protected:
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > & xAttrList );
public:
- SvStrings & rSectionList;
+ std::vector<String*> &rSectionList;
SwXMLSectionList(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- SvStrings & rNewSectionList );
+ std::vector<String*> &rNewSectionList );
virtual ~SwXMLSectionList ( )
throw();
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 56cd0635f4f6..0b9180479ff0 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -56,7 +56,6 @@ class SfxItemSet;
class SfxMedium;
class SvPtrarr;
class SvStream;
-class SvStrings;
class SvxFontItem;
class SvxMacroTableDtor;
class SwCntntNode;
@@ -64,6 +63,7 @@ class SwCrsrShell;
class SwDoc;
class SwPaM;
class SwTextBlocks;
+class vector;
struct SwPosition;
struct Writer_Impl;
@@ -272,8 +272,8 @@ public:
// Read the sections of the document, which is equal to the medium.
// Returns the count of it
- virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const;
+ virtual size_t GetSectionList( SfxMedium& rMedium,
+ std::vector<String*>& rStrings ) const;
SotStorageRef getSotStorageRef() { return pStg; };
void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 1d00774da827..3a1adfdf0892 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -26,12 +26,11 @@
*
************************************************************************/
-#define _SVSTDARR_STRINGSDTOR
-#define _SVSTDARR_STRINGS
-#include <svl/svstdarr.hxx>
#include <SwXMLSectionList.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
+#include <tools/string.hxx>
+#include <vector>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -43,7 +42,7 @@ sal_Char const sXML_np__text[] = "_otext";
// #110680#
SwXMLSectionList::SwXMLSectionList(
const uno::Reference< lang::XMultiServiceFactory > xServiceFactory,
- SvStrings & rNewSectionList)
+ std::vector<String*> &rNewSectionList)
: SvXMLImport( xServiceFactory ),
rSectionList ( rNewSectionList )
{
@@ -121,7 +120,7 @@ SvXMLImportContext *SvXMLSectionListContext::CreateChildContext(
sName = rAttrValue;
}
if ( sName.Len() )
- rLocalRef.rSectionList.Insert ( new String(sName), rLocalRef.rSectionList.Count() );
+ rLocalRef.rSectionList.push_back( new String(sName) );
}
pContext = new SvXMLSectionListContext (rLocalRef, nPrefix, rLocalName, xAttrList);
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 3999f4707903..35f84095e853 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -682,7 +682,7 @@ void Reader::ResetFrmFmts( SwDoc& rDoc )
// read the sections of the document, which is equal to the medium.
// returns the count of it
-sal_uInt16 Reader::GetSectionList( SfxMedium&, SvStrings& ) const
+size_t Reader::GetSectionList( SfxMedium&, std::vector<String*>& ) const
{
return 0;
}
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index 5b546c031895..47e6cc1d191b 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -64,8 +64,8 @@ public:
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const;
+ virtual size_t GetSectionList( SfxMedium& rMedium,
+ std::vector<String*>& rStrings ) const;
};
// die speziellen Writer
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index b6684bdfda81..3f29d8c31808 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -27,10 +27,6 @@
************************************************************************/
-
-
-
-#define _SVSTDARR_STRINGS
#include <rsc/rscsfx.hxx>
#include <tools/urlobj.hxx>
#include <com/sun/star/embed/XStorage.hpp>
@@ -51,7 +47,6 @@
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/packages/WrongPasswordException.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-#include <svl/svstdarr.hxx>
#include <sfx2/docfile.hxx>
#include <svtools/sfxecode.hxx>
#include <svl/stritem.hxx>
@@ -1067,8 +1062,8 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
// read the sections of the document, which is equal to the medium.
// returns the count of it
-sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const
+size_t XMLReader::GetSectionList( SfxMedium& rMedium,
+ std::vector<String*>& rStrings ) const
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -1095,7 +1090,6 @@ sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
if( xXMLParser.is() )
{
// get filter
- // uno::Reference< xml::sax::XDocumentHandler > xFilter = new SwXMLSectionList( rStrings );
uno::Reference< xml::sax::XDocumentHandler > xFilter = new SwXMLSectionList( xServiceFactory, rStrings );
// connect parser and filter
@@ -1123,7 +1117,7 @@ sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
// re throw ?
}
}
- return rStrings.Count();
+ return rStrings.size();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 9f262d49ac2a..8c28df453cc6 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1494,16 +1494,16 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
uno::Reference < embed::XStorage > xStg;
if( rMedium.IsStorage() && (xStg = rMedium.GetStorage()).is() )
{
- SvStrings aArr( 10, 10 );
+ std::vector<String*> aArr;
sal_uInt32 nFormat = SotStorage::GetFormatID( xStg );
if ( nFormat == SOT_FORMATSTR_ID_STARWRITER_60 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_60 ||
nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8)
SwGetReaderXML()->GetSectionList( rMedium, aArr );
- for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
- rBox.InsertEntry( *aArr[ n ] );
-
- aArr.DeleteAndDestroy(0, aArr.Count());
+ for(std::vector<String*>::const_iterator it(aArr.begin()); it != aArr.end(); ++it) {
+ rBox.InsertEntry( **it );
+ delete *it;
+ }
}
}