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(-)
New commits: commit c0e458bda89ba0022cfe75dcc4e632498fa7fa26 Author: Chr. Rossmanith <[email protected]> Date: Tue Jun 11 09:48:09 2013 +0200 Replace String with OUString (sd) Change-Id: I6916e81828ef7225f9f70217cbeac83b3a70b9b3 Reviewed-on: https://gerrit.libreoffice.org/4221 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 6afdf37..5ca9322 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<String>::const_iterator pIter = + std::vector<OUString>::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<String>::const_iterator pIter = + OUString aToken( aString.getToken( nToken, (sal_Unicode)',' ) ); + std::vector<OUString>::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 a7be864..784d782 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<String> maSlideNameList; + std::vector<OUString> 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 38e2d7a..2129ea0 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 fe412a0..158dca8 100644 --- a/sd/source/filter/ppt/propread.hxx +++ b/sd/source/filter/ppt/propread.hxx @@ -100,7 +100,7 @@ // ------------------------------------------------------------------------ -typedef std::map<String,sal_uInt32> Dictionary; +typedef std::map<OUString,sal_uInt32> Dictionary; struct PropEntry { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
