Kaydet (Commit) f1de38b5 authored tarafından August Sodora's avatar August Sodora

SvStringsDtor->std::vector

üst 5b12914f
......@@ -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: */
......@@ -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)" )),
......
......@@ -1167,7 +1167,7 @@ String SwDocInfoField::GetFieldName() const
break;
default:
aStr += *ViewShell::GetShellRes()
aStr += ViewShell::GetShellRes()
->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
break;
}
......
......@@ -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);
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment