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 ...@@ -74,10 +74,10 @@ struct SW_DLLPUBLIC ShellResource : public Resource
String aHyperlinkClick; String aHyperlinkClick;
SvStringsDtor aDocInfoLst; std::vector<String> aDocInfoLst;
// The autoFormat-Redline comments. // The autoFormat-Redline comments.
inline const SvStringsDtor& GetAutoFmtNameLst() const; inline const std::vector<String>& GetAutoFmtNameLst() const;
enum PageNameMode enum PageNameMode
{ {
...@@ -95,20 +95,19 @@ struct SW_DLLPUBLIC ShellResource : public Resource ...@@ -95,20 +95,19 @@ struct SW_DLLPUBLIC ShellResource : public Resource
private: private:
void _GetAutoFmtNameLst() const; void _GetAutoFmtNameLst() const;
SvStringsDtor *pAutoFmtNameLst; std::vector<String> *pAutoFmtNameLst;
String sPageDescFirstName; String sPageDescFirstName;
String sPageDescFollowName; String sPageDescFollowName;
String sPageDescName; String sPageDescName;
}; };
inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const inline const std::vector<String>& ShellResource::GetAutoFmtNameLst() const
{ {
if( !pAutoFmtNameLst ) if( !pAutoFmtNameLst )
_GetAutoFmtNameLst(); _GetAutoFmtNameLst();
return *pAutoFmtNameLst; return *pAutoFmtNameLst;
} }
#endif //_SHELLRES_HXX #endif //_SHELLRES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -290,7 +290,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId ) ...@@ -290,7 +290,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
sal_uInt16 nSeqNo = 0; sal_uInt16 nSeqNo = 0;
if( STR_AUTOFMTREDL_END > nActionId ) if( STR_AUTOFMTREDL_END > nActionId )
{ {
sTxt = *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ]; sTxt = ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
switch( nActionId ) switch( nActionId )
{ {
case STR_AUTOFMTREDL_SET_NUMBULET: case STR_AUTOFMTREDL_SET_NUMBULET:
...@@ -1829,7 +1829,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) ...@@ -1829,7 +1829,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{ {
if( aFlags.bWithRedlining ) if( aFlags.bWithRedlining )
{ {
String sTxt( *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ String sTxt(ViewShell::GetShellRes()->GetAutoFmtNameLst()[
STR_AUTOFMTREDL_SET_TMPL_HEADLINE ] ); STR_AUTOFMTREDL_SET_TMPL_HEADLINE ] );
sTxt.SearchAndReplace( String::CreateFromAscii( sTxt.SearchAndReplace( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )), RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )),
......
...@@ -1167,8 +1167,8 @@ String SwDocInfoField::GetFieldName() const ...@@ -1167,8 +1167,8 @@ String SwDocInfoField::GetFieldName() const
break; break;
default: default:
aStr += *ViewShell::GetShellRes() aStr += ViewShell::GetShellRes()
->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ]; ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
break; break;
} }
if (IsFixed()) if (IsFixed())
......
...@@ -587,7 +587,7 @@ sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<String>& rToFill) ...@@ -587,7 +587,7 @@ sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<String>& rToFill)
if ( i == DI_CUSTOM ) if ( i == DI_CUSTOM )
pNew = String(SW_RES( STR_CUSTOM )); pNew = String(SW_RES( STR_CUSTOM ));
else else
pNew = *ViewShell::GetShellRes()->aDocInfoLst[i]; pNew = ViewShell::GetShellRes()->aDocInfoLst[i];
} }
else else
pNew = SW_RESSTR(aSwFlds[nPos].nSubTypeStart + i); pNew = SW_RESSTR(aSwFlds[nPos].nSubTypeStart + i);
......
...@@ -179,10 +179,7 @@ ShellResource::ShellResource() ...@@ -179,10 +179,7 @@ ShellResource::ShellResource()
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr ); aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
for(sal_uInt16 i = 0; i < nCount; ++i) for(sal_uInt16 i = 0; i < nCount; ++i)
{ aDocInfoLst.push_back(String(SW_RESSTR(FLD_DOCINFO_BEGIN + i)));
String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
}
FreeResource(); 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