summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-13 18:05:49 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-13 22:21:03 -0500
commit5b12914f96ef0891c7e20f6edc63d58dc6cc1e17 (patch)
tree45f0a088f1de97c13de94f7a76d811ee268e897d
parentc0d93b267f56d06cd464f3e49af368164e6cd164 (diff)
SvStringsDtor->std::vector
-rw-r--r--sw/inc/swmodule.hxx3
-rw-r--r--sw/source/ui/app/swmodul1.cxx14
-rw-r--r--sw/source/ui/app/swmodule.cxx2
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index df7f34bd7338..70cae0f5008d 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -41,7 +41,6 @@
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
#include <editeng/svxenum.hxx>
-class SvStringsDtor;
class Color;
class SfxItemSet;
class SfxRequest;
@@ -107,7 +106,7 @@ class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::C
SwView* pView;
// List of all Redline-authors.
- SvStringsDtor* pAuthorNames;
+ std::vector<String>* pAuthorNames;
// DictionaryList listener to trigger spellchecking or hyphenation
::com::sun::star::uno::Reference<
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index ccd38e170456..3998e422dd16 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -434,23 +434,23 @@ void SwModule::SetRedlineAuthor(const String &rAuthor)
const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos)
{
- OSL_ENSURE(nPos<pAuthorNames->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
- while (!(nPos<pAuthorNames->Count()))
+ OSL_ENSURE(nPos < pAuthorNames->size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
+ while(!(nPos < pAuthorNames->size()))
{
InsertRedlineAuthor(String(RTL_CONSTASCII_USTRINGPARAM("nn")));
};
- return *pAuthorNames->GetObject(nPos);
+ return (*pAuthorNames)[nPos];
}
sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
{
sal_uInt16 nPos = 0;
- while (nPos < pAuthorNames->Count() && *pAuthorNames->GetObject(nPos) != rAuthor)
- nPos++;
+ while(nPos < pAuthorNames->size() && (*pAuthorNames)[nPos] != rAuthor)
+ ++nPos;
- if (nPos == pAuthorNames->Count())
- pAuthorNames->Insert(new String(rAuthor), nPos);
+ if (nPos == pAuthorNames->size())
+ pAuthorNames->push_back(rAuthor);
return nPos;
}
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 5881215f5090..bbaff8f75a53 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -200,7 +200,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
pStdFontConfig = new SwStdFontConfig;
- pAuthorNames = new SvStringsDtor(5, 1); // All Redlining-Authors
+ pAuthorNames = new std::vector<String>; // All Redlining-Authors
// replace SvxAutocorrect with SwAutocorrect
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();