From c0e458bda89ba0022cfe75dcc4e632498fa7fa26 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Tue, 11 Jun 2013 09:48:09 +0200 Subject: Replace String with OUString (sd) Change-Id: I6916e81828ef7225f9f70217cbeac83b3a70b9b3 Reviewed-on: https://gerrit.libreoffice.org/4221 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- sd/source/filter/ppt/pptin.cxx | 14 ++++++-------- sd/source/filter/ppt/pptin.hxx | 2 +- sd/source/filter/ppt/propread.cxx | 4 ++-- sd/source/filter/ppt/propread.hxx | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 6afdf370048c..5ca9322347f1 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -334,7 +334,7 @@ sal_Bool ImplSdPPTImport::Import() aString = OUString(); else { - std::vector::const_iterator pIter = + std::vector::const_iterator pIter = std::find(maSlideNameList.begin(),maSlideNameList.end(),aString); if (pIter != maSlideNameList.end()) @@ -449,8 +449,8 @@ sal_Bool ImplSdPPTImport::Import() { // second pass, searching for a SlideName for ( nToken = 0; nToken < nTokenCount; nToken++ ) { - String aToken( aString.getToken( nToken, (sal_Unicode)',' ) ); - std::vector::const_iterator pIter = + OUString aToken( aString.getToken( nToken, (sal_Unicode)',' ) ); + std::vector::const_iterator pIter = std::find(maSlideNameList.begin(),maSlideNameList.end(),aToken); if (pIter != maSlideNameList.end()) @@ -482,9 +482,7 @@ sal_Bool ImplSdPPTImport::Import() pHyperlink->aConvSubString = maSlideNameList[ nPageNumber ]; if ( pHyperlink->aConvSubString.isEmpty() ) { - pHyperlink->aConvSubString = OUString( SdResId( STR_PAGE ) ); - pHyperlink->aConvSubString += " "; - pHyperlink->aConvSubString += ( mpDoc->CreatePageNumValue( (sal_uInt16)nPageNumber + 1 ) ); + pHyperlink->aConvSubString = OUString( SdResId( STR_PAGE ) ) + " " + ( mpDoc->CreatePageNumValue( (sal_uInt16)nPageNumber + 1 ) ); } } } @@ -1177,10 +1175,10 @@ sal_Bool ImplSdPPTImport::Import() for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.size() ); i++ ) { SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD ); - String &aName = maSlideNameList[ i ]; + OUString &aName = maSlideNameList[ i ]; if ( pPage ) { - if ( aName.Len() ) + if ( !aName.isEmpty() ) pPage->SetName( aName ); else aName = pPage->GetName(); diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index a7be8648adfc..784d78231fd6 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -51,7 +51,7 @@ class ImplSdPPTImport : public SdrPowerPointImport SvStorage& mrStorage; // SvStream* mpPicStream; DffRecordHeader maDocHd; - std::vector maSlideNameList; + std::vector maSlideNameList; sal_Bool mbDocumentFound; sal_uInt32 mnFilterOptions; SdDrawDocument* mpDoc; diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index 38e2d7a87e3f..2129ea003665 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -282,7 +282,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict ) aStream >> nId >> nSize; if ( nSize ) { - String aString; + OUString aString; nPos = aStream.Tell(); try { @@ -305,7 +305,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict ) { OSL_FAIL( "sd Section::GetDictionary bad alloc" ); } - if ( !aString.Len() ) + if ( aString.isEmpty() ) break; rDict.insert( std::make_pair(aString,nId) ); } diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx index fe412a060828..158dca807230 100644 --- a/sd/source/filter/ppt/propread.hxx +++ b/sd/source/filter/ppt/propread.hxx @@ -100,7 +100,7 @@ // ------------------------------------------------------------------------ -typedef std::map Dictionary; +typedef std::map Dictionary; struct PropEntry { -- cgit v1.2.3