summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8glsy.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2002-07-01 12:55:16 +0000
committerCaolán McNamara <cmc@openoffice.org>2002-07-01 12:55:16 +0000
commite74160aafb19edfae715a08965dddebfd84119fe (patch)
treee1a275246a522b32b735115bfdbf332ceb4f6e8a /sw/source/filter/ww8/ww8glsy.cxx
parentc76af776fb8e60851772eaa5bebcdea77627cf89 (diff)
#100044# vectors scale better
Diffstat (limited to 'sw/source/filter/ww8/ww8glsy.cxx')
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx30
1 files changed, 12 insertions, 18 deletions
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 7f7df34d4ae5..fa825a29265f 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ww8glsy.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: cmc $ $Date: 2002-06-10 10:33:55 $
+ * last change: $Author: cmc $ $Date: 2002-07-01 13:55:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,10 +69,6 @@
#include <tools/urlobj.hxx>
#endif
-#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
-#endif
#ifndef SVTOOLS_URIHELPER_HXX
#include <svtools/urihelper.hxx>
#endif
@@ -150,9 +146,9 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
return bRet;
}
-bool WW8Glossary::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks,
- bool bSaveRelFile, SvStrings& rStrings,
- SvStrings& rExtra )
+bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
+ bool bSaveRelFile, const ::std::vector<String>& rStrings,
+ const ::std::vector<String>& rExtra)
{
// this code will be called after reading all text into the
// empty sections
@@ -217,13 +213,13 @@ bool WW8Glossary::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks,
// entry (== -1) otherwise the group indicates the group in the
// sttbfglsystyle list that this entry belongs to. Unused at the
// moment
- INT16 group = rExtra[nGlosEntry]->ToInt32() + 2;
+ INT16 group = rExtra[nGlosEntry].ToInt32() + 2;
if (group != -1)
{
rBlocks.ClearDoc();
- String sLNm( *rStrings[nGlosEntry] );
- if( rBlocks.BeginPutDoc( rBlocks.GetValidShortCut(sLNm,true),
- sLNm ))
+ const String &rLNm = rStrings[nGlosEntry];
+ if( rBlocks.BeginPutDoc( rBlocks.GetValidShortCut(rLNm,true),
+ rLNm ))
{
SwDoc* pGlDoc = rBlocks.GetDoc();
SwNodeIndex aIdx( pGlDoc->GetNodes().GetEndOfContent(),
@@ -255,7 +251,8 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
if( pGlossary->IsGlossaryFib() && rBlocks.StartPutMuchBlockEntries() )
{
//read the names of the autotext entries
- SvStrings aStrings( 0, 64 ), aExtra( 0, 64 );
+ ::std::vector<String> aStrings;
+ ::std::vector<String> aExtra;
rtl_TextEncoding eStructCharSet =
WW8Fib::GetFIBCharset(pGlossary->chseTables);
@@ -265,7 +262,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
rStrm->Seek(0);
- if (nStrings = aStrings.Count())
+ if (nStrings = aStrings.size())
{
SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
@@ -292,9 +289,6 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
}
xDocSh->DoClose();
rBlocks.EndPutMuchBlockEntries();
-
- aStrings.DeleteAndDestroy( 0, nStrings );
- aExtra.DeleteAndDestroy( 0, aExtra.Count() );
}
}
return bRet;