summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-13 18:14:36 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-13 22:21:05 -0500
commitf1de38b5441e082d80f663923a9ac713c8db172d (patch)
treed7d553d4cb67de6cc2d28a851693b08232068777
parent5b12914f96ef0891c7e20f6edc63d58dc6cc1e17 (diff)
SvStringsDtor->std::vector
-rw-r--r--sw/inc/shellres.hxx9
-rw-r--r--sw/source/core/edit/autofmt.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx4
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/utlui/initui.cxx5
5 files changed, 10 insertions, 14 deletions
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 2c7ccc246954..688fe084385c 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -74,10 +74,10 @@ struct SW_DLLPUBLIC ShellResource : public Resource
String aHyperlinkClick;
- SvStringsDtor aDocInfoLst;
+ std::vector<String> aDocInfoLst;
// The autoFormat-Redline comments.
- inline const SvStringsDtor& GetAutoFmtNameLst() const;
+ inline const std::vector<String>& GetAutoFmtNameLst() const;
enum PageNameMode
{
@@ -95,20 +95,19 @@ struct SW_DLLPUBLIC ShellResource : public Resource
private:
void _GetAutoFmtNameLst() const;
- SvStringsDtor *pAutoFmtNameLst;
+ std::vector<String> *pAutoFmtNameLst;
String sPageDescFirstName;
String sPageDescFollowName;
String sPageDescName;
};
-inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const
+inline const std::vector<String>& ShellResource::GetAutoFmtNameLst() const
{
if( !pAutoFmtNameLst )
_GetAutoFmtNameLst();
return *pAutoFmtNameLst;
}
-
#endif //_SHELLRES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 8cb70ce9ba02..34951a3eae40 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -290,7 +290,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
sal_uInt16 nSeqNo = 0;
if( STR_AUTOFMTREDL_END > nActionId )
{
- sTxt = *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
+ sTxt = ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
switch( nActionId )
{
case STR_AUTOFMTREDL_SET_NUMBULET:
@@ -1829,7 +1829,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{
if( aFlags.bWithRedlining )
{
- String sTxt( *ViewShell::GetShellRes()->GetAutoFmtNameLst()[
+ String sTxt(ViewShell::GetShellRes()->GetAutoFmtNameLst()[
STR_AUTOFMTREDL_SET_TMPL_HEADLINE ] );
sTxt.SearchAndReplace( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )),
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index ce8a06d18b93..8b0ecf0ec759 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1167,8 +1167,8 @@ String SwDocInfoField::GetFieldName() const
break;
default:
- aStr += *ViewShell::GetShellRes()
- ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
+ aStr += ViewShell::GetShellRes()
+ ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
break;
}
if (IsFixed())
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 7c27a5069859..54ec65298bf4 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -587,7 +587,7 @@ sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<String>& rToFill)
if ( i == DI_CUSTOM )
pNew = String(SW_RES( STR_CUSTOM ));
else
- pNew = *ViewShell::GetShellRes()->aDocInfoLst[i];
+ pNew = ViewShell::GetShellRes()->aDocInfoLst[i];
}
else
pNew = SW_RESSTR(aSwFlds[nPos].nSubTypeStart + i);
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 8f64d8a56729..dacbb6ebd711 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -179,10 +179,7 @@ ShellResource::ShellResource()
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
for(sal_uInt16 i = 0; i < nCount; ++i)
- {
- String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
- aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
- }
+ aDocInfoLst.push_back(String(SW_RESSTR(FLD_DOCINFO_BEGIN + i)));
FreeResource();
}