Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4221

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/21/4221/1

Replace String with OUString (sd)

Change-Id: I6916e81828ef7225f9f70217cbeac83b3a70b9b3
---
M sd/source/filter/ppt/pptin.cxx
M sd/source/filter/ppt/pptin.hxx
M sd/source/filter/ppt/propread.cxx
M sd/source/filter/ppt/propread.hxx
4 files changed, 10 insertions(+), 12 deletions(-)



diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 6afdf37..8a11113 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -334,7 +334,7 @@
                                         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 @@
                                             {   // 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 @@
                                                     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 @@
     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 @@
     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 @@
             aStream >> nId >> nSize;
             if ( nSize )
             {
-                String aString;
+                OUString aString;
                 nPos = aStream.Tell();
                 try
                 {
@@ -305,7 +305,7 @@
                 {
                     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
 {

-- 
To view, visit https://gerrit.libreoffice.org/4221
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6916e81828ef7225f9f70217cbeac83b3a70b9b3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith@web.de>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.