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

SvStringsDtor->std::vector

üst cad9afa1
...@@ -46,7 +46,7 @@ SV_DECL_PTRARR( SwHTMLTxtFtns, SwTxtFtnPtr, 1, 1 ) ...@@ -46,7 +46,7 @@ SV_DECL_PTRARR( SwHTMLTxtFtns, SwTxtFtnPtr, 1, 1 )
struct SwHTMLFootEndNote_Impl struct SwHTMLFootEndNote_Impl
{ {
SwHTMLTxtFtns aTxtFtns; SwHTMLTxtFtns aTxtFtns;
SvStringsDtor aNames; std::vector<String> aNames;
String sName; String sName;
String sContent; // Infos fuer die letzte Fussnote String sContent; // Infos fuer die letzte Fussnote
...@@ -229,8 +229,7 @@ void SwHTMLParser::FinishFootEndNote() ...@@ -229,8 +229,7 @@ void SwHTMLParser::FinishFootEndNote()
pFootEndNoteImpl->aTxtFtns.Insert( pTxtFtn, pFootEndNoteImpl->aTxtFtns.Insert( pTxtFtn,
pFootEndNoteImpl->aTxtFtns.Count() ); pFootEndNoteImpl->aTxtFtns.Count() );
pFootEndNoteImpl->aNames.Insert( new String(pFootEndNoteImpl->sName), pFootEndNoteImpl->aNames.push_back(pFootEndNoteImpl->sName);
pFootEndNoteImpl->aNames.Count() );
} }
pFootEndNoteImpl->sName = aEmptyStr; pFootEndNoteImpl->sName = aEmptyStr;
pFootEndNoteImpl->sContent = aEmptyStr; pFootEndNoteImpl->sContent = aEmptyStr;
...@@ -256,18 +255,17 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName ) ...@@ -256,18 +255,17 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName )
if( pFootEndNoteImpl ) if( pFootEndNoteImpl )
{ {
String aName( rName ); String aName( rName );
// TODO: ToUpperAscii
aName.ToUpperAscii(); aName.ToUpperAscii();
sal_uInt16 nCount = pFootEndNoteImpl->aNames.Count(); size_t nCount = pFootEndNoteImpl->aNames.size();
for( sal_uInt16 i=0; i<nCount; i++ ) for(size_t i = 0; i < nCount; ++i)
{ {
if( *pFootEndNoteImpl->aNames[i] == aName ) if(pFootEndNoteImpl->aNames[i] == aName)
{ {
pStartNodeIdx = pFootEndNoteImpl->aTxtFtns[i]->GetStartNode(); pStartNodeIdx = pFootEndNoteImpl->aTxtFtns[i]->GetStartNode();
pFootEndNoteImpl->aNames.DeleteAndDestroy( i, 1 ); pFootEndNoteImpl->aNames.erase(pFootEndNoteImpl->aNames.begin() + i);
pFootEndNoteImpl->aTxtFtns.Remove( i, 1 ); pFootEndNoteImpl->aTxtFtns.Remove( i, 1 );
if( !pFootEndNoteImpl->aNames.Count() ) if(pFootEndNoteImpl->aNames.empty())
{ {
delete pFootEndNoteImpl; delete pFootEndNoteImpl;
pFootEndNoteImpl = 0; pFootEndNoteImpl = 0;
......
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