[Libreoffice-commits] core.git: sd/source

Ivan Timofeev timofeev.i.s at gmail.com
Thu Sep 5 06:23:25 PDT 2013


 sd/source/filter/cgm/sdcgmfilter.cxx           |    2 
 sd/source/filter/eppt/eppt.cxx                 |   12 -
 sd/source/filter/eppt/eppt.hxx                 |   11 -
 sd/source/filter/eppt/epptbase.hxx             |   23 +--
 sd/source/filter/eppt/epptso.cxx               |  153 +++++++++----------------
 sd/source/filter/eppt/pptexsoundcollection.cxx |    1 
 sd/source/filter/eppt/pptx-epptbase.cxx        |   22 +--
 sd/source/filter/eppt/pptx-text.cxx            |   73 +++++------
 sd/source/filter/eppt/text.hxx                 |   12 -
 sd/source/filter/grf/sdgrffilter.cxx           |    4 
 sd/source/filter/ppt/pptin.cxx                 |   46 +++----
 sd/source/filter/ppt/pptin.hxx                 |    6 
 sd/source/filter/ppt/propread.cxx              |   10 -
 sd/source/filter/ppt/propread.hxx              |    4 
 sd/source/filter/xml/sdxmlwrp.cxx              |    4 
 15 files changed, 169 insertions(+), 214 deletions(-)

New commits:
commit 03730253464f4cd18e6acb90ed981a691ba97e81
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date:   Thu Sep 5 17:22:12 2013 +0400

    String->OUString
    
    Change-Id: I0298ff90654a5778621730801d0952b2ed3ee5e8

diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 7bf3d0a..1793453 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -98,7 +98,7 @@ sal_Bool SdCGMFilter::Import()
                 {
                     // set PageFill to given color
                     const Color aColor((sal_uInt8)(nRetValue >> 16), (sal_uInt8)(nRetValue >> 8), (sal_uInt8)(nRetValue >> 16));
-                    pSdPage->getSdrPageProperties().PutItem(XFillColorItem(String(), aColor));
+                    pSdPage->getSdrPageProperties().PutItem(XFillColorItem(OUString(), aColor));
                     pSdPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_SOLID));
                 }
             }
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 4debddf..3189a30 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -968,8 +968,8 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
         //          = 7 :    "         "      " " (PPT) text range
         //          = 8 :    "         "      " " (Project) task
 
-        sal_uInt32 nUrlLen = pIter->aURL.Len();
-        const sal_Unicode* pUrl = pIter->aURL.GetBuffer();
+        sal_Int32 nUrlLen = pIter->aURL.getLength();
+        const OUString& rUrl = pIter->aURL;
 
         sal_uInt32 nInfo = 7;
 
@@ -982,22 +982,22 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
             {
                 rStrm << (sal_uInt32)0x1f << (sal_uInt32)1 << (sal_uInt32)0;    // path
                 rStrm << (sal_uInt32)0x1f << (sal_uInt32)( nUrlLen + 1 );
-                for ( sal_uInt32 i = 0; i < nUrlLen; i++ )
+                for ( sal_Int32 i = 0; i < nUrlLen; i++ )
                 {
-                    rStrm << pUrl[ i ];
+                    rStrm << rUrl[ i ];
                 }
                 rStrm << (sal_uInt16)0;
             }
             break;
             case 2 :
             {
-                sal_uInt32 i;
+                sal_Int32 i;
 
                 rStrm   << (sal_uInt32)0x1f
                         << (sal_uInt32)( nUrlLen + 1 );
                 for ( i = 0; i < nUrlLen; i++ )
                 {
-                    rStrm << pUrl[ i ];
+                    rStrm << rUrl[ i ];
                 }
                 if ( ! ( i & 1 ) )
                     rStrm << (sal_uInt16)0;
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index 42f7226..4f2d3d9 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -26,7 +26,6 @@
 #include <sot/storage.hxx>
 #include <vcl/graph.hxx>
 #include <unotools/fontcvt.hxx>
-#include <tools/string.hxx>
 #include "pptexanimations.hxx"
 #include <pptexsoundcollection.hxx>
 
@@ -106,13 +105,13 @@
 
 struct EPPTHyperlink
 {
-    String      aURL;
+    OUString    aURL;
     sal_uInt32  nType;      // bit 0-7 : type       ( 1: click action to a slide )
                             //                      ( 2: hyperlink url )
                             // bit 8-23: index
                             // bit 31  : hyperlink is attached to a shape
 
-    EPPTHyperlink( const String rURL, sal_uInt32 nT ) :
+    EPPTHyperlink( const OUString& rURL, sal_uInt32 nT ) :
         aURL        ( rURL ),
         nType       ( nT ){};
 };
@@ -220,7 +219,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
         sal_uInt32          ImplMasterSlideListContainer( SvStream* pOutStrm = NULL );
 
     public:
-        static void         WriteCString( SvStream&, const String&, sal_uInt32 nInstance = 0 );
+        static void         WriteCString( SvStream&, const OUString&, sal_uInt32 nInstance = 0 );
 
     protected:
 
@@ -231,8 +230,8 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
         void                ImplCreateHeaderFooters( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPagePropSet );
         virtual sal_Bool        ImplCreateDocument();
         sal_Bool            ImplCreateHyperBlob( SvMemoryStream& rStream );
-        sal_uInt32          ImplInsertBookmarkURL( const String& rBookmark, const sal_uInt32 nType,
-            const String& rStringVer0, const String& rStringVer1, const String& rStringVer2, const String& rStringVer3 );
+        sal_uInt32          ImplInsertBookmarkURL( const OUString& rBookmark, const sal_uInt32 nType,
+            const OUString& rStringVer0, const OUString& rStringVer1, const OUString& rStringVer2, const OUString& rStringVer3 );
         virtual sal_Bool        ImplCreateMainNotes();
         sal_Bool            ImplCreateNotes( sal_uInt32 nPageNum );
         void                ImplWriteBackground( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXBackgroundPropSet );
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index 212e3e3..392cd72 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -24,7 +24,6 @@
 #include <boost/ptr_container/ptr_vector.hpp>
 
 #include <vcl/mapmod.hxx>
-#include <tools/string.hxx>
 #include <tools/stream.hxx>
 #include <tools/gen.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -103,14 +102,14 @@ class PropValue
         ::com::sun::star::uno::Any GetAny() { return mAny; }
 
         static sal_Bool GetPropertyValue(
-                ::com::sun::star::uno::Any& rAny,
-                    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
-                        const String& rPropertyName,
-                            sal_Bool bTestPropertyAvailability = sal_False );
+            ::com::sun::star::uno::Any& rAny,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
+            const OUString& rPropertyName,
+            sal_Bool bTestPropertyAvailability = sal_False );
 
         static ::com::sun::star::beans::PropertyState GetPropertyState(
-                    const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > &,
-                        const String& rPropertyName );
+            const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > &,
+            const OUString& rPropertyName );
 };
 
 class EscherGraphicProvider;
@@ -136,16 +135,16 @@ class PPTExBulletProvider
 
 struct FontCollectionEntry
 {
-        String                  Name;
+        OUString                Name;
         double                  Scaling;
         sal_Int16               Family;
         sal_Int16               Pitch;
         sal_Int16               CharSet;
 
-        String                  Original;
+        OUString                Original;
         sal_Bool                bIsConverted;
 
-        FontCollectionEntry( const String& rName, sal_Int16 nFamily, sal_Int16 nPitch, sal_Int16 nCharSet ) :
+        FontCollectionEntry( const OUString& rName, sal_Int16 nFamily, sal_Int16 nPitch, sal_Int16 nCharSet ) :
                             Scaling ( 1.0 ),
                             Family  ( nFamily ),
                             Pitch   ( nPitch ),
@@ -155,7 +154,7 @@ struct FontCollectionEntry
                                 ImplInit( rName );
                             };
 
-        FontCollectionEntry( const String& rName ) :
+        FontCollectionEntry( const OUString& rName ) :
                             Scaling ( 1.0 ),
                             Original( rName )
                             {
@@ -167,7 +166,7 @@ struct FontCollectionEntry
 
         FontCollectionEntry() {};
 
-        void ImplInit( const String& rName );
+        void ImplInit( const OUString& rName );
 };
 
 class VirtualDevice;
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 9b7bf43..c518453 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -380,8 +380,8 @@ sal_uInt32 PPTWriter::ImplMasterSlideListContainer( SvStream* pStrm )
 
 // ---------------------------------------------------------------------------------------------
 
-sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const String& rBookmarkURL, const sal_uInt32 nType,
-    const String& rStringVer0, const String& rStringVer1, const String& rStringVer2, const String& rStringVer3 )
+sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const OUString& rBookmarkURL, const sal_uInt32 nType,
+    const OUString& rStringVer0, const OUString& rStringVer1, const OUString& rStringVer2, const OUString& rStringVer3 )
 {
     sal_uInt32 nHyperId = ++mnExEmbed;
 
@@ -406,43 +406,11 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const String& rBookmarkURL, const s
                 << (sal_uInt32)4
                 << nHyperId;
 
-    sal_uInt16 i, nStringLen;
-    nStringLen = rStringVer0.Len();
-    if ( nStringLen )
-    {
-        *mpExEmbed << (sal_uInt32)( EPP_CString << 16 ) << (sal_uInt32)( nStringLen * 2 );
-        for ( i = 0; i < nStringLen; i++ )
-        {
-            *mpExEmbed << rStringVer0.GetChar( i );
-        }
-    }
-    nStringLen = rStringVer1.Len();
-    if ( nStringLen )
-    {
-        *mpExEmbed << (sal_uInt32)( ( EPP_CString << 16 ) | 0x10 ) << (sal_uInt32)( nStringLen * 2 );
-        for ( i = 0; i < nStringLen; i++ )
-        {
-            *mpExEmbed << rStringVer1.GetChar( i );
-        }
-    }
-    nStringLen = rStringVer2.Len();
-    if ( nStringLen )
-    {
-        *mpExEmbed << (sal_uInt32)( ( EPP_CString << 16 ) | 0x20 ) << (sal_uInt32)( nStringLen * 2 );
-        for ( i = 0; i < nStringLen; i++ )
-        {
-            *mpExEmbed << rStringVer2.GetChar( i );
-        }
-    }
-    nStringLen = rStringVer3.Len();
-    if ( nStringLen )
-    {
-        *mpExEmbed << (sal_uInt32)( ( EPP_CString << 16 ) | 0x30 ) << (sal_uInt32)( nStringLen * 2 );
-        for ( i = 0; i < nStringLen; i++ )
-        {
-            *mpExEmbed << rStringVer3.GetChar( i );
-        }
-    }
+    PPTWriter::WriteCString( *mpExEmbed, rStringVer0, 0 );
+    PPTWriter::WriteCString( *mpExEmbed, rStringVer1, 1 );
+    PPTWriter::WriteCString( *mpExEmbed, rStringVer2, 2 );
+    PPTWriter::WriteCString( *mpExEmbed, rStringVer3, 3 );
+
     nHyperSize = mpExEmbed->Tell() - nHyperStart;
     mpExEmbed->SeekRel( - ( (sal_Int32)nHyperSize + 4 ) );
     *mpExEmbed  << nHyperSize;
@@ -528,14 +496,14 @@ sal_Bool PPTWriter::ImplCloseDocument()
         {
             mpPptEscherEx->AddAtom( 68, EPP_FontEnityAtom, 0, i );
             const FontCollectionEntry* pDesc = maFontCollection.GetById( i );
-            sal_uInt32 nFontLen = pDesc->Name.Len();
+            sal_Int32 nFontLen = pDesc->Name.getLength();
             if ( nFontLen > 31 )
                 nFontLen = 31;
-            for ( sal_uInt16 n = 0; n < 32; n++ )
+            for ( sal_Int32 n = 0; n < 32; n++ )
             {
                 sal_Unicode nUniCode = 0;
                 if ( n < nFontLen )
-                    nUniCode = pDesc->Name.GetChar( n );
+                    nUniCode = pDesc->Name[n];
                 *mpStrm << nUniCode;
             }
             sal_uInt8   lfCharSet = ANSI_CHARSET;
@@ -615,9 +583,9 @@ sal_Bool PPTWriter::ImplCloseDocument()
 
 sal_Bool PropValue::GetPropertyValue(
     ::com::sun::star::uno::Any& rAny,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
-            const String& rString,
-                    sal_Bool bTestPropertyAvailability )
+    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+    const OUString& rString,
+    sal_Bool bTestPropertyAvailability )
 {
     sal_Bool bRetValue = sal_True;
     if ( bTestPropertyAvailability )
@@ -655,7 +623,7 @@ sal_Bool PropValue::GetPropertyValue(
 
 ::com::sun::star::beans::PropertyState PropValue::GetPropertyState(
     const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
-        const String& rPropertyName )
+    const OUString& rPropertyName )
 {
     ::com::sun::star::beans::PropertyState eRetValue = ::com::sun::star::beans::PropertyState_AMBIGUOUS_VALUE;
     try
@@ -1203,10 +1171,9 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
                         case 4 :
                         {
                             sal_uInt32 nPageIndex = 0;
-                            String aPageUrl;
-                            String aEmpty;
-                            String aFile( pFieldEntry->aFieldUrl );
-                            String aTarget( pFieldEntry->aFieldUrl );
+                            OUString aPageUrl;
+                            OUString aFile( pFieldEntry->aFieldUrl );
+                            OUString aTarget( pFieldEntry->aFieldUrl );
                             INetURLObject aUrl( pFieldEntry->aFieldUrl );
                             if ( INET_PROT_FILE == aUrl.GetProtocol() )
                                 aFile = aUrl.PathToFileName();
@@ -1214,33 +1181,32 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
                             {
                                 // Convert smb notation to '\\' and skip the 'smb:' part
                                 aFile = aUrl.GetMainURL(INetURLObject::NO_DECODE).copy(4);
-                                aFile.SearchAndReplaceAll( '/', '\\' );
+                                aFile = aFile.replaceAll( "/", "\\" );
                                 aTarget = aFile;
                             }
-                            else if ( pFieldEntry->aFieldUrl.GetChar( 0 ) == '#' )
+                            else if ( pFieldEntry->aFieldUrl[0] == '#' )
                             {
-                                String aPage( INetURLObject::decode( pFieldEntry->aFieldUrl, '%', INetURLObject::DECODE_WITH_CHARSET ) );
-                                aPage.Erase( 0, 1 );
+                                OUString aPage( INetURLObject::decode( pFieldEntry->aFieldUrl, '%', INetURLObject::DECODE_WITH_CHARSET ) );
+                                aPage = aPage.copy( 1 );
 
-                                OUString aUPage(aPage);
                                 std::vector<OUString>::const_iterator pIter = std::find(
-                                            maSlideNameList.begin(),maSlideNameList.end(),aUPage);
+                                            maSlideNameList.begin(),maSlideNameList.end(),aPage);
 
                                 if ( pIter != maSlideNameList.end() )
                                 {
                                     nPageIndex = pIter - maSlideNameList.begin();
                                     aPageUrl = OUString::number(256 + nPageIndex);
-                                    aPageUrl.Append( OUString( "," ) );
-                                    aPageUrl.Append( OUString::number( nPageIndex + 1 ) );
-                                    aPageUrl.Append( OUString( ",Slide " ) );
-                                    aPageUrl.Append( OUString::number( nPageIndex + 1 ) );
+                                    aPageUrl += ",";
+                                    aPageUrl += OUString::number(nPageIndex + 1);
+                                    aPageUrl += ",Slide ";
+                                    aPageUrl += OUString::number(nPageIndex + 1);
                                 }
                             }
                             sal_uInt32 nHyperId(0);
-                            if ( aPageUrl.Len() )
-                                nHyperId = ImplInsertBookmarkURL( aPageUrl, 1 | ( nPageIndex << 8 ) | ( 1 << 31 ), pFieldEntry->aRepresentation, aEmpty, aEmpty, aPageUrl );
+                            if ( !aPageUrl.isEmpty() )
+                                nHyperId = ImplInsertBookmarkURL( aPageUrl, 1 | ( nPageIndex << 8 ) | ( 1 << 31 ), pFieldEntry->aRepresentation, "", "", aPageUrl );
                             else
-                                nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, aTarget, aEmpty, aEmpty );
+                                nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, aTarget, "", "" );
 
                             rOut << (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) << (sal_uInt32)24
                                  << (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) << (sal_uInt32)16
@@ -1993,7 +1959,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
                             // Bit 3: CustomShowReturn. If 1, and this is a jump to custom show, then return to this slide after custom show.
     sal_uInt8   nHyperLinkType = 0;// HyperlinkType a value from the LinkTo enum, such as LT_URL (only valid when action == HyperlinkAction).
 
-    String  aFile;
+    OUString aFile;
 
     /*
         Action Table:       Action Value
@@ -2069,13 +2035,12 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
                         nAction = 4;
                         nHyperLinkType = 7;
 
-                        String aEmpty;
-                        String aHyperString = OUString::number(256 + nIndex);
-                        aHyperString.Append( OUString( "," ) );
-                        aHyperString.Append( OUString::number( nIndex + 1 ) );
-                        aHyperString.Append( OUString( ",Slide " ) );
-                        aHyperString.Append( OUString::number( nIndex + 1 ) );
-                        nHyperLinkID = ImplInsertBookmarkURL( aHyperString, 1 | ( nIndex << 8 ) | ( 1 << 31 ), aBookmark, aEmpty, aEmpty, aHyperString );
+                        OUString aHyperString = OUString::number(256 + nIndex);
+                        aHyperString += ",";
+                        aHyperString += OUString::number(nIndex + 1);
+                        aHyperString += ",Slide ";
+                        aHyperString += OUString::number(nIndex + 1);
+                        nHyperLinkID = ImplInsertBookmarkURL( aHyperString, 1 | ( nIndex << 8 ) | ( 1 << 31 ), aBookmark, "", "", aHyperString );
                     }
                 }
             }
@@ -2086,18 +2051,17 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
         {
             if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) )
             {
-                String aBookmark( *(OUString*)mAny.getValue() );
-                if ( aBookmark.Len() )
+                OUString aBookmark( *(OUString*)mAny.getValue() );
+                if ( !aBookmark.isEmpty() )
                 {
                     nAction = 4;
                     nHyperLinkType = 8;
 
-                    String aEmpty;
-                    String aBookmarkFile( aBookmark );
+                    OUString aBookmarkFile( aBookmark );
                     INetURLObject aUrl( aBookmark );
                     if ( INET_PROT_FILE == aUrl.GetProtocol() )
                         aBookmarkFile = aUrl.PathToFileName();
-                    nHyperLinkID = ImplInsertBookmarkURL( aBookmark, (sal_uInt32)(2 | ( 1 << 31 )), aBookmarkFile, aBookmark, aEmpty, aEmpty );
+                    nHyperLinkID = ImplInsertBookmarkURL( aBookmark, (sal_uInt32)(2 | ( 1 << 31 )), aBookmarkFile, aBookmark, "", "" );
                 }
             }
         }
@@ -2113,7 +2077,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
 
     sal_uInt32 nContainerSize = 24;
     if ( nAction == 2 )
-        nContainerSize += ( aFile.Len() * 2 ) + 8;
+        nContainerSize += ( aFile.getLength() * 2 ) + 8;
     rSt << (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) << (sal_uInt32)nContainerSize
         << (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) << (sal_uInt32)16
         << nSoundRef
@@ -2126,10 +2090,10 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
 
     if ( nAction == 2 )     // run program Action
     {
-        sal_uInt16 i, nLen = aFile.Len();
+        sal_Int32 nLen = aFile.getLength();
         rSt << (sal_uInt32)( ( EPP_CString << 16 ) | 0x20 ) << (sal_uInt32)( nLen * 2 );
-        for ( i = 0; i < nLen; i++ )
-            rSt << aFile.GetChar( i );
+        for ( sal_Int32 i = 0; i < nLen; i++ )
+            rSt << aFile[i];
     }
 
     rSt << (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0x1f ) << (sal_uInt32)24   // Mouse Over Action
@@ -2592,9 +2556,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                 SvStorageRef    xTemp( new SvStorage( new SvMemoryStream(), sal_True ) );
                 if ( oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xTemp, aXControlModel, aSize, aControlName ) )
                 {
-                    String  aUserName( xTemp->GetUserName() );
-                    String  aOleIdentifier;
-                    if ( aUserName.Len() )
+                    OUString aUserName( xTemp->GetUserName() );
+                    OUString aOleIdentifier;
+                    if ( !aUserName.isEmpty() )
                     {
                         SvStorageStreamRef xCompObj = xTemp->OpenSotStream(
                             OUString( "\1CompObj" ),
@@ -2627,12 +2591,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                         }
                     }
 
-                    if ( !aControlName.isEmpty() )
-                        PPTWriter::WriteCString( *mpExEmbed, aControlName, 1 );
-                    if ( aOleIdentifier.Len() )
-                        PPTWriter::WriteCString( *mpExEmbed, aOleIdentifier, 2 );
-                    if ( aUserName.Len() )
-                        PPTWriter::WriteCString( *mpExEmbed, aUserName, 3 );
+                    PPTWriter::WriteCString( *mpExEmbed, aControlName, 1 );
+                    PPTWriter::WriteCString( *mpExEmbed, aOleIdentifier, 2 );
+                    PPTWriter::WriteCString( *mpExEmbed, aUserName, 3 );
                 }
                 nSize = mpExEmbed->Tell() - nOldPos;
                 mpExEmbed->Seek( nOldPos - 4 );
@@ -2681,9 +2642,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
 
                 mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
                 ImplCreateShape( nSpType, nSpFlags, aSolverContainer );
-
-                // #119459# for connector shape, the start point and end point is fixed, and should not be rotated.
-                mnAngle = 0;
+
+                // #119459# for connector shape, the start point and end point is fixed, and should not be rotated.
+                mnAngle = 0;
             }
             else if ( mType == "drawing.Measure" )
             {
@@ -3650,15 +3611,15 @@ sal_Int32 GetCellBottom( sal_Int32 nRow,
     return nBottom;
 }
 
-void PPTWriter::WriteCString( SvStream& rSt, const String& rString, sal_uInt32 nInstance )
+void PPTWriter::WriteCString( SvStream& rSt, const OUString& rString, sal_uInt32 nInstance )
 {
-    sal_uInt32 i, nLen = rString.Len();
+    sal_Int32 nLen = rString.getLength();
     if ( nLen )
     {
         rSt << (sal_uInt32)( ( nInstance << 4 ) | ( EPP_CString << 16 ) )
             << (sal_uInt32)( nLen << 1 );
-        for ( i = 0; i < nLen; i++ )
-            rSt << rString.GetChar( (sal_uInt16)i );
+        for ( sal_Int32 i = 0; i < nLen; i++ )
+            rSt << rString[i];
     }
 }
 
diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx
index 8f02c29..5978dc8 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.cxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.cxx
@@ -20,7 +20,6 @@
 #include <pptexsoundcollection.hxx>
 #include "epptdef.hxx"
 #include <tools/urlobj.hxx>
-#include <tools/string.hxx>
 #include <ucbhelper/content.hxx>
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/proptypehlp.hxx>
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index d19dad7..e89d00c 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -384,7 +384,7 @@ sal_Bool PPTWriterBase::CreateSlide( sal_uInt32 nPageNum )
         nMode &=~4;
 
 /* sj: Don't know what's IsBackgroundVisible for, have to ask cl
-    if ( GetPropertyValue( aAny, mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundVisible" ) ) ) )
+    if ( GetPropertyValue( aAny, mXPagePropSet, OUString( "IsBackgroundVisible" ) ) )
     {
         sal_Bool bBackgroundVisible;
         if ( aAny >>= bBackgroundVisible )
@@ -570,37 +570,37 @@ sal_Bool PPTWriterBase::GetStyleSheets()
         {
             for ( nInstance = EPP_TEXTTYPE_Title; nInstance <= EPP_TEXTTYPE_CenterTitle; nInstance++ )
             {
-                String aStyle;
-                String aFamily;
+                OUString aStyle;
+                OUString aFamily;
                 switch ( nInstance )
                 {
                     case EPP_TEXTTYPE_CenterTitle :
                     case EPP_TEXTTYPE_Title :
                     {
-                        aStyle = OUString( "title" );
+                        aStyle = "title";
                         aFamily = aXNamed->getName();
                     }
                     break;
                     case EPP_TEXTTYPE_Body :
                     {
-                        aStyle = OUString( "outline1" );      // SD_LT_SEPARATOR
+                        aStyle = "outline1";      // SD_LT_SEPARATOR
                         aFamily = aXNamed->getName();
                     }
                     break;
                     case EPP_TEXTTYPE_Other :
                     {
-                        aStyle = OUString( "standard" );
-                        aFamily = OUString( "graphics" );
+                        aStyle = "standard";
+                        aFamily = "graphics";
                     }
                     break;
                     case EPP_TEXTTYPE_CenterBody :
                     {
-                        aStyle = OUString( "subtitle" );
+                        aStyle = "subtitle";
                         aFamily = aXNamed->getName();
                     }
                     break;
                 }
-                if ( aStyle.Len() && aFamily.Len() )
+                if ( !aStyle.isEmpty() && !aFamily.isEmpty() )
                 {
                     try
                     {
@@ -629,8 +629,8 @@ sal_Bool PPTWriterBase::GetStyleSheets()
                                             {
                                                 if ( nInstance == EPP_TEXTTYPE_Body )
                                                 {
-                                                    sal_Unicode cTemp = aStyle.GetChar( aStyle.Len() - 1 );
-                                                    aStyle.SetChar( aStyle.Len() - 1, ++cTemp );
+                                                    sal_Unicode cTemp = aStyle[aStyle.getLength() - 1];
+                                                    aStyle = aStyle.copy(0, aStyle.getLength() - 1) + OUString(++cTemp);
                                                     if ( aXFamily->hasByName( aStyle ) )
                                                     {
                                                         aXFamily->getByName( aStyle ) >>= xStyle;
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 94ceab4..c67799b 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -76,11 +76,11 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
     mpText                  ( NULL ),
     mpFieldEntry            ( NULL )
 {
-    String aString( rXTextRange->getString() );
-    String aURL;
+    OUString aString( rXTextRange->getString() );
+    OUString aURL;
     sal_Bool bRTL_endingParen = sal_False;
 
-    mnTextSize = aString.Len();
+    mnTextSize = aString.getLength();
     if ( bLast )
         mnTextSize++;
 
@@ -127,19 +127,18 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
         }
         else
         {
-            const sal_Unicode* pText = aString.GetBuffer();
             // For i39516 - a closing parenthesis that ends an RTL string is displayed backwards by PPT
             // Solution: add a Unicode Right-to-Left Mark, following the method described in i18024
-            if ( bLast && pText[ aString.Len() - 1 ] == sal_Unicode(')') && rFontCollection.GetScriptDirection( aString ) == com::sun::star::i18n::ScriptDirection::RIGHT_TO_LEFT )
+            if ( bLast && aString[ aString.getLength() - 1 ] == ')' && rFontCollection.GetScriptDirection( aString ) == com::sun::star::i18n::ScriptDirection::RIGHT_TO_LEFT )
             {
                 mnTextSize++;
                 bRTL_endingParen = sal_True;
             }
             mpText = new sal_uInt16[ mnTextSize ];
             sal_uInt16 nChar;
-            for ( int i = 0; i < aString.Len(); i++ )
+            for ( sal_Int32 i = 0; i < aString.getLength(); i++ )
             {
-                nChar = (sal_uInt16)pText[ i ];
+                nChar = (sal_uInt16)aString[ i ];
                 if ( nChar == 0xa )
                     nChar++;
                 else if ( !bSymbol )
@@ -473,7 +472,7 @@ sal_uInt32 PortionObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPositi
 //     23->     PPT Textfield needs a placeholder
 
 sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & ,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, String& rURL )
+    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, OUString& rURL )
 {
     sal_uInt32 nRetValue = 0;
     sal_Int32 nFormat;
@@ -526,7 +525,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
                             else if ( aFieldKind == "URL" )
                             {
                                 if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "URL" ) ), sal_True )
-                                    rURL = String( *(OUString*)aAny.getValue() );
+                                    rURL = *(OUString*)aAny.getValue();
                                 nRetValue = 4 << 28;
                             }
                             else if ( aFieldKind == "Page" )
@@ -773,7 +772,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                 nBulletRealSize = 100;
                 nMappedNumType = 0;
 
-                String aGraphicURL;
+                OUString aGraphicURL;
                 for ( sal_Int32 i = 0; i < nPropertyCount; i++ )
                 {
                     const void* pValue = pPropValue[ i ].Value.getValue();
@@ -849,17 +848,17 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                     }
                 }
 
-                if ( aGraphicURL.Len() )
+                if ( !aGraphicURL.isEmpty() )
                 {
                     if ( aBuGraSize.Width() && aBuGraSize.Height() )
                     {
-                        xub_StrLen nIndex = aGraphicURL.Search( (sal_Unicode)':', 0 );
-                        if ( nIndex != STRING_NOTFOUND )
+                        sal_Int32 nIndex = aGraphicURL.indexOf(':');
+                        if ( nIndex != -1 )
                         {
                             nIndex++;
-                            if ( aGraphicURL.Len() > nIndex  )
+                            if ( nIndex < aGraphicURL.getLength() )
                             {
-                                OString aUniqueId(OUStringToOString(aGraphicURL.Copy(nIndex, aGraphicURL.Len() - nIndex), RTL_TEXTENCODING_UTF8));
+                                OString aUniqueId(OUStringToOString(aGraphicURL.copy(nIndex), RTL_TEXTENCODING_UTF8));
                                 if ( !aUniqueId.isEmpty() )
                                 {
                                     nBulletId = rBuProv.GetId( aUniqueId, aBuGraSize );
@@ -926,9 +925,9 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 case SVX_NUM_CHARS_UPPER_LETTER :
                                 case SVX_NUM_CHARS_UPPER_LETTER_N :
                                 {
-                                    if ( sSuffix == String( ")" ) )
+                                    if ( sSuffix == ")" )
                                     {
-                                        if ( sPrefix == String( "(" ) )
+                                        if ( sPrefix == "(" )
                                             nMappedNumType = 0xa0001;   // (A)
                                         else
                                             nMappedNumType = 0xb0001;   // A)
@@ -940,9 +939,9 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 case SVX_NUM_CHARS_LOWER_LETTER :
                                 case SVX_NUM_CHARS_LOWER_LETTER_N :
                                 {
-                                    if ( sSuffix == String( ")" ) )
+                                    if ( sSuffix == ")" )
                                     {
-                                        if ( sPrefix == String( "(" ) )
+                                        if ( sPrefix == "(" )
                                             nMappedNumType = 0x80001;   // (a)
                                         else
                                             nMappedNumType = 0x90001;   // a)
@@ -953,9 +952,9 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_ROMAN_UPPER :
                                 {
-                                    if ( sSuffix == String( ")" ) )
+                                    if ( sSuffix == ")" )
                                     {
-                                        if ( sPrefix == String( "(" ) )
+                                        if ( sPrefix == "(" )
                                             nMappedNumType = 0xe0001;   // (I)
                                         else
                                             nMappedNumType = 0xf0001;   // I)
@@ -966,9 +965,9 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_ROMAN_LOWER :
                                 {
-                                    if ( sSuffix == String( ")" ) )
+                                    if ( sSuffix == ")" )
                                     {
-                                        if ( sPrefix == String( "(" ) )
+                                        if ( sPrefix == "(" )
                                             nMappedNumType = 0x40001;   // (i)
                                         else
                                             nMappedNumType = 0x50001;   // i)
@@ -979,16 +978,16 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_ARABIC :
                                 {
-                                    if ( sSuffix == String( ")" ) )
+                                    if ( sSuffix == ")" )
                                     {
-                                        if ( sPrefix == String( "(" ) )
+                                        if ( sPrefix == "(" )
                                             nMappedNumType = 0xc0001;   // (1)
                                         else
                                             nMappedNumType = 0x20001;   // 1)
                                     }
                                     else
                                     {
-                                        if ( ! ( sSuffix.Len() + sPrefix.Len() ) )
+                                        if ( sSuffix.isEmpty() && sPrefix.isEmpty() )
                                             nMappedNumType = 0xd0001;   // 1
                                         else
                                             nMappedNumType = 0x30001;   // 1.
@@ -997,7 +996,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_NUMBER_UPPER_ZH :
                                 {
-                                    if ( sSuffix.Len() )
+                                    if ( !sSuffix.isEmpty() )
                                         nMappedNumType = 0x110001;   // Simplified Chinese with single-byte period.
                                     else
                                         nMappedNumType = 0x100001;   // Simplified Chinese.
@@ -1010,7 +1009,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_NUMBER_UPPER_ZH_TW :
                                 {
-                                    if ( sSuffix.Len() )
+                                    if ( !sSuffix.isEmpty() )
                                         nMappedNumType = 0x160001;   // Traditional Chinese with single-byte period.
                                     else
                                         nMappedNumType = 0x150001;   // Traditional Chinese.
@@ -1020,7 +1019,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 {
                                     if ( sSuffix == OUString( sal_Unicode(0xff0e)) )
                                         nMappedNumType = 0x260001;   // Japanese with double-byte period.
-                                    else if ( sSuffix.Len() )
+                                    else if ( !sSuffix.isEmpty() )
                                         nMappedNumType = 0x1B0001;   // Japanese/Korean with single-byte period.
                                     else
                                         nMappedNumType = 0x1A0001;   // Japanese/Korean.
@@ -1028,7 +1027,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 break;
                                 case SVX_NUM_FULL_WIDTH_ARABIC :
                                 {
-                                    if ( sSuffix.Len() )
+                                    if ( !sSuffix.isEmpty() )
                                         nMappedNumType = 0x1D0001;   // Double-byte Arabic numbers with double-byte period.
                                     else
                                         nMappedNumType = 0x1C0001;   // Double-byte Arabic numbers.
@@ -1054,13 +1053,11 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
 
 void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue )
 {
-    static String sNumberingLevel( "NumberingLevel" );
-
     ::com::sun::star::uno::Any aAny;
-    if ( GetPropertyValue( aAny, mXPropSet, sNumberingLevel, sal_True ) )
+    if ( GetPropertyValue( aAny, mXPropSet, "NumberingLevel", sal_True ) )
     {
         if ( bGetPropStateValue )
-            meBullet = GetPropertyState( mXPropSet, sNumberingLevel );
+            meBullet = GetPropertyState( mXPropSet, "NumberingLevel" );
         nDepth = *( (sal_Int16*)aAny.getValue() );
 
         if ( nDepth < 0 )
@@ -1320,10 +1317,10 @@ FontCollectionEntry::~FontCollectionEntry()
 {
 }
 
-void FontCollectionEntry::ImplInit( const String& rName )
+void FontCollectionEntry::ImplInit( const OUString& rName )
 {
-    String aSubstName( GetSubsFontName( rName, SUBSFONT_ONLYONE | SUBSFONT_MS ) );
-    if ( aSubstName.Len() )
+    OUString aSubstName( GetSubsFontName( rName, SUBSFONT_ONLYONE | SUBSFONT_MS ) );
+    if ( !aSubstName.isEmpty() )
     {
         Name = aSubstName;
         bIsConverted = sal_True;
@@ -1357,7 +1354,7 @@ short FontCollection::GetScriptDirection( const OUString& rString ) const
 
 sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry )
 {
-    if( rEntry.Name.Len() )
+    if( !rEntry.Name.isEmpty() )
     {
         const sal_uInt32 nFonts = maFonts.size();
 
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index 06bc4e0..c734995 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -41,9 +41,9 @@ struct SOParagraph
     sal_Bool                bExtendedParameters;
     sal_uInt32              nParaFlags;
     sal_Int16               nBulletFlags;
-    String                  sPrefix;
-    String                  sSuffix;
-    String                  sGraphicUrl;            // String to a graphic
+    OUString                sPrefix;
+    OUString                sSuffix;
+    OUString                sGraphicUrl;            // String to a graphic
     Size                    aBuGraSize;
     sal_uInt32              nNumberingType;         // this is actually a SvxEnum
     sal_uInt32              nHorzAdjust;
@@ -92,8 +92,8 @@ struct FieldEntry
     sal_uInt32  nFieldType;
     sal_uInt32  nFieldStartPos;
     sal_uInt32  nFieldEndPos;
-    String      aRepresentation;
-    String      aFieldUrl;
+    OUString    aRepresentation;
+    OUString    aFieldUrl;
 
     FieldEntry( sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd )
     {
@@ -113,7 +113,7 @@ class PortionObj : public PropStateValue
         void            ImplClear();
         void            ImplConstruct( const PortionObj& rPortionObj );
         sal_uInt32      ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL );
+                            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, OUString& rURL );
         sal_uInt32      ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
         void            ImplGetPortionValues( FontCollection& rFontCollection, sal_Bool bGetPropStateValue = sal_False );
 
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 6794c96..a2a7582 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -193,7 +193,7 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n
 sal_Bool SdGRFFilter::Import()
 {
     Graphic         aGraphic;
-    const String    aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
+    const OUString  aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
     GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
     const sal_uInt16 nFilter = rGraphicFilter.GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
     sal_Bool        bRet = sal_False;
@@ -284,7 +284,7 @@ sal_Bool SdGRFFilter::Export()
             SfxItemSet* pSet = mrMedium.GetItemSet();
             if ( pSet && xSource.is() )
             {
-                const String aTypeName( mrMedium.GetFilter()->GetTypeName() );
+                const OUString aTypeName( mrMedium.GetFilter()->GetTypeName() );
                 GraphicFilter &rGraphicFilter = GraphicFilter::GetGraphicFilter();
                 const sal_uInt16 nFilter = rGraphicFilter.GetExportFormatNumberForTypeName( aTypeName );
                 if ( nFilter != GRFILTER_FORMAT_NOTFOUND )
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 0da1ee5..d9fd7c6 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -99,7 +99,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto
     sal_uInt32 nImportFlags = 0;
 
 #ifdef DBG_UTIL
-    PropRead* pSummaryInformation = new PropRead( rStorage, String( "\005SummaryInformation"  ) );
+    PropRead* pSummaryInformation = new PropRead( rStorage, OUString( "\005SummaryInformation"  ) );
     if ( pSummaryInformation->IsValid() )
     {
         pSummaryInformation->Read();
@@ -601,7 +601,7 @@ sal_Bool ImplSdPPTImport::Import()
                     // create layoutstylesheets, set layoutname and stylesheet
                     // (only on standard and not pages)
                     ///////////////////////////////////////////////////////////
-                    String aLayoutName( SdResId( STR_LAYOUT_DEFAULT_NAME ) );
+                    OUString aLayoutName( SD_RESSTR( STR_LAYOUT_DEFAULT_NAME ) );
                     if ( nMasterNum > 2 )
                     {
                         if ( ePgKind == PK_STANDARD )
@@ -614,7 +614,7 @@ sal_Bool ImplSdPPTImport::Import()
                             aLayoutName = ( (SdPage*)mpDoc->GetMasterPage( nMasterNum - 1 ) )->GetName();
                     }
                     pPage->SetName( aLayoutName );
-                    aLayoutName.AppendAscii( SD_LT_SEPARATOR );
+                    aLayoutName += SD_LT_SEPARATOR;
                     aLayoutName += SD_RESSTR( STR_LAYOUT_OUTLINE );
                     pPage->SetLayoutName( aLayoutName );
 
@@ -724,7 +724,7 @@ sal_Bool ImplSdPPTImport::Import()
                 pSdrModel->InsertMasterPage( pNotesClone, nAktPageNum );
                 if ( pNotesClone )
                 {
-                    String aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
+                    OUString aLayoutName( ((SdPage*)pSdrModel->GetMasterPage( nAktPageNum - 1 ))->GetLayoutName() );
                     ((SdPage*)pNotesClone)->SetPresentationLayout( aLayoutName, sal_False, sal_False, sal_False );
                     ((SdPage*)pNotesClone)->SetLayoutName( aLayoutName );
                 }
@@ -1300,7 +1300,7 @@ sal_Bool ImplSdPPTImport::Import()
             }
         }
         // this is defaulted, maybe there is no SSDocInfoAtom
-        String      aCustomShow;
+        OUStringBuffer aCustomShow;
         sal_uInt32  nFlags = 1;                 // Bit 0:   Auto advance
         sal_uInt16  nStartSlide = 0;
 
@@ -1321,7 +1321,7 @@ sal_Bool ImplSdPPTImport::Import()
             {
                 rStCtrl >> nChar;
                 if ( nChar )
-                    aCustomShow.Append( nChar );
+                    aCustomShow.append( nChar );
                 else
                 {
                     rStCtrl.SeekRel( ( 31 - i2 ) << 1 );
@@ -1331,15 +1331,16 @@ sal_Bool ImplSdPPTImport::Import()
             rStCtrl >> nFlags;
         }
         // set the current custom show
-        if ( aCustomShow.Len() )
+        if ( aCustomShow.getLength() )
         {
             SdCustomShowList* pList = mpDoc->GetCustomShowList( sal_False );
             if ( pList )
             {
                 SdCustomShow* pPtr = NULL;
+                OUString aCustomShowStr = aCustomShow.makeStringAndClear();
                 for( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
                 {
-                    if ( pPtr->GetName() == aCustomShow )
+                    if ( pPtr->GetName() == aCustomShowStr )
                         break;
                 }
                 if ( !pPtr )
@@ -1411,7 +1412,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide
                         pPage->NbcInsertObject( pObj, 0 );
                 }
             }
-            String aPlaceHolderString = pHFE->pPlaceholder[ i ];
+            OUString aPlaceHolderString = pHFE->pPlaceholder[ i ];
 
             sd::HeaderFooterSettings rHeaderFooterSettings( pPage->getHeaderFooterSettings() );
             switch( i )
@@ -1768,7 +1769,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
                                 if ( nBuildFlags & 16 )
                                 {   // slide with sound effect
                                     pPage->SetSound( sal_True );
-                                    String aSoundFile( ReadSound( nSoundRef ) );
+                                    OUString aSoundFile( ReadSound( nSoundRef ) );
                                     pPage->SetSoundFile( aSoundFile );
                                 }
                                 if ( nBuildFlags & ( 1 << 6 ) )     // Loop until next sound
@@ -1852,7 +1853,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
 //
 ///////////////////////////////////////////////////////////////////////////
 
-String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
+OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
 {
     OUString aRetval;
     sal_uInt32 nPosMerk = rStCtrl.Tell();
@@ -1895,7 +1896,7 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
                     // Check if this sound file already exists.
                     // If not, it is exported to our local sound directory.
                     sal_Bool    bSoundExists = sal_False;
-                    ::std::vector< String > aSoundList;
+                    ::std::vector< OUString > aSoundList;
 
                     GalleryExplorer::FillObjList( GALLERY_THEME_SOUNDS, aSoundList );
                     GalleryExplorer::FillObjList( GALLERY_THEME_USERSOUNDS, aSoundList );
@@ -1919,8 +1920,9 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
                         DffRecordHeader aSoundDataRecHd;
                         if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd, 0 ) )
                         {
-                            String          aGalleryDir( SvtPathOptions().GetGalleryPath() );
-                            INetURLObject   aGalleryUserSound( aGalleryDir.GetToken( comphelper::string::getTokenCount(aGalleryDir, ';') - 1 ) );
+                            OUString aGalleryDir( SvtPathOptions().GetGalleryPath() );
+                            sal_Int32 nTokenCount = comphelper::string::getTokenCount(aGalleryDir, ';');
+                            INetURLObject aGalleryUserSound( aGalleryDir.getToken( nTokenCount - 1, ';' ) );
 
                             aGalleryUserSound.Append( aRetval );
                             sal_uInt32 nSoundDataLen = aSoundDataRecHd.nRecLen;
@@ -1961,7 +1963,7 @@ String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
 //
 //////////////////////////////////////////////////////////////////////////
 
-String ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
+OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
 {
     OUString aRetVal;
     DffRecordHeader* pHd( const_cast<ImplSdPPTImport*>(this)->aDocRecManager.GetRecordHeader( PPT_PST_ExObjList, SEEK_FROM_BEGINNING ) );
@@ -2031,7 +2033,7 @@ String ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
 //
 //////////////////////////////////////////////////////////////////////////
 
-void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, String aMacroName )
+void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName )
 {
     // set local information into pInfo
     if( pIAtom->nSoundRef )
@@ -2098,7 +2100,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
                             ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
                             if ( pDocShell )
                             {
-                                String aBaseURL = pDocShell->GetMedium()->GetBaseURL();
+                                OUString aBaseURL = pDocShell->GetMedium()->GetBaseURL();
                                 OUString aBookmarkURL( pInfo->GetBookmark() );
                                 INetURLObject aURL( pPtr->aTarget );
                                 if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
@@ -2147,7 +2149,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
 
     PresObjKind ePresKind = PRESOBJ_NONE;
     PptOEPlaceholderAtom* pPlaceHolder = pTextObj->GetOEPlaceHolderAtom();
-    String aPresentationText;
+    OUString aPresentationText;
     if ( pPlaceHolder )
     {
         switch( pPlaceHolder->nPlaceholderId )
@@ -2281,7 +2283,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                 SdrOutliner* pOutl = NULL;
                 if ( pTextObj->GetInstance() == TSS_TYPE_NOTES )
                     pOutl = GetDrawOutliner( pText );
-                if ( aPresentationText.Len() )
+                if ( !aPresentationText.isEmpty() )
                     pPage->SetObjText( (SdrTextObj*)pText, pOutl, ePresKind, aPresentationText );
 
                 if ( pPage->GetPageKind() != PK_NOTES && pPage->GetPageKind() != PK_HANDOUT)
@@ -2643,10 +2645,10 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
                                     {
                                         sal_uInt32 nRef;
                                         rSt >> nRef;
-                                        String aMediaURL( ReadMedia( nRef ) );
-                                        if ( !aMediaURL.Len() )
+                                        OUString aMediaURL( ReadMedia( nRef ) );
+                                        if ( aMediaURL.isEmpty() )
                                             aMediaURL = ReadSound( nRef );
-                                        if ( aMediaURL.Len() )
+                                        if ( !aMediaURL.isEmpty() )
                                         {
                                             SdrMediaObj* pMediaObj = new SdrMediaObj( pObj->GetSnapRect() );
                                             pMediaObj->SetModel( pObj->GetModel() );
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index 784d782..e5bb8e9 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -63,7 +63,7 @@ class ImplSdPPTImport : public SdrPowerPointImport
     void            SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist );
     void            ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed );
 
-    void            FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, String aMacroName );
+    void            FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName );
 
     virtual         SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj );
     virtual         SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPage* pPage,
@@ -71,8 +71,8 @@ class ImplSdPPTImport : public SdrPowerPointImport
 
 public:
 
-    String          ReadSound( sal_uInt32 nSoundRef ) const;
-    String          ReadMedia( sal_uInt32 nMediaRef ) const;
+    OUString        ReadSound( sal_uInt32 nSoundRef ) const;
+    OUString        ReadMedia( sal_uInt32 nMediaRef ) const;
 
     ImplSdPPTImport( SdDrawDocument* pDoc, SvStorage& rStorage, SfxMedium& rMed, PowerPointImportParam& );
     ~ImplSdPPTImport();
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 6798915..42fc3f8 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -63,15 +63,15 @@ void PropItem::Clear()
 
 //  -----------------------------------------------------------------------
 
-static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize)
+static sal_Int32 lcl_getMaxSafeStrLen(sal_uInt32 nSize)
 {
     nSize -= 1; //Drop NULL terminator
 
     //If it won't fit in a string, clip it to the max size that does
-    if (nSize > STRING_MAXLEN)
-        nSize = STRING_MAXLEN;
+    if (nSize > SAL_MAX_INT32)
+        nSize = SAL_MAX_INT32;
 
-    return static_cast< xub_StrLen >( nSize );
+    return static_cast< sal_Int32 >( nSize );
 }
 
 sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAlign )
@@ -522,7 +522,7 @@ Section& Section::operator=( const Section& rSection )
 
 //  -----------------------------------------------------------------------
 
-PropRead::PropRead( SvStorage& rStorage, const String& rName ) :
+PropRead::PropRead( SvStorage& rStorage, const OUString& rName ) :
         mbStatus            ( sal_False ),
         mnByteOrder         ( 0xfffe ),
         mnFormat            ( 0 ),
diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx
index 158dca8..c5d600f 100644
--- a/sd/source/filter/ppt/propread.hxx
+++ b/sd/source/filter/ppt/propread.hxx
@@ -28,8 +28,6 @@
 #include <sot/storage.hxx>
 #include <tools/stream.hxx>
 
-#include <tools/string.hxx>
-
 // SummaryInformation
 #define PID_TITLE               0x02
 #define PID_SUBJECT             0x03
@@ -172,7 +170,7 @@ class PropRead
         void                    AddSection( Section& rSection );
 
     public:
-                                PropRead( SvStorage& rSvStorage, const String& rName );
+                                PropRead( SvStorage& rSvStorage, const OUString& rName );
 
         PropRead&               operator=( const PropRead& rPropRead );
         const Section*          GetSection( const sal_uInt8* pFMTID );
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 69bca65..ba216c8 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -269,8 +269,8 @@ sal_Int32 ReadThroughComponent(
         SAL_WARN( "sd.filter", "SAX parse exception caught while importing:" << r.Message);
 #endif
 
-        String sErr( OUString::number( r.LineNumber ));
-        sErr += ',';
+        OUString sErr( OUString::number( r.LineNumber ));
+        sErr += ",";
         sErr += OUString::number( r.ColumnNumber );
 
         if( rStreamName.Len() )


More information about the Libreoffice-commits mailing list