summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-06-11 09:48:09 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-12 08:49:42 +0000
commitc0e458bda89ba0022cfe75dcc4e632498fa7fa26 (patch)
treef284445714dccdfedb33090ae0850d11c4ad2e12
parenta591811d0883ffaf316209c86fe5a798532e25f6 (diff)
Replace String with OUString (sd)
Change-Id: I6916e81828ef7225f9f70217cbeac83b3a70b9b3 Reviewed-on: https://gerrit.libreoffice.org/4221 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--sd/source/filter/ppt/pptin.cxx14
-rw-r--r--sd/source/filter/ppt/pptin.hxx2
-rw-r--r--sd/source/filter/ppt/propread.cxx4
-rw-r--r--sd/source/filter/ppt/propread.hxx2
4 files changed, 10 insertions, 12 deletions
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<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 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<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 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<String,sal_uInt32> Dictionary;
+typedef std::map<OUString,sal_uInt32> Dictionary;
struct PropEntry
{