diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-20 23:57:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-21 15:07:52 +0100 |
commit | c3f2401d49b1374431da54e799a23bc122c5def7 (patch) | |
tree | 81ea39989af360ca879c7a84e7b1643698255589 /sot | |
parent | 3d506e814719ecaa5862663bce467994ccf31a4d (diff) |
reduce scope and replace some String::CreateFromAscii
Change-Id: I8c375e3bfbcd3d7046a8bdb1968934b7d7ca96f8
Diffstat (limited to 'sot')
-rw-r--r-- | sot/inc/sot/object.hxx | 15 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgole.cxx | 4 | ||||
-rw-r--r-- | sot/source/sdstor/storinfo.cxx | 2 |
4 files changed, 9 insertions, 14 deletions
diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx index 239a4cd69d63..2e97cc23ae38 100644 --- a/sot/inc/sot/object.hxx +++ b/sot/inc/sot/object.hxx @@ -66,8 +66,7 @@ SotFactory * ClassName::ClassFactory() \ if( !*ppFactory ) \ { \ *ppFactory = new FactoryName( GlobalName, \ - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \ - ClassName::CreateInstance ); \ + rtl::OUString( #ClassName ), ClassName::CreateInstance ); \ } \ return *ppFactory; \ } \ @@ -103,8 +102,7 @@ SotFactory * ClassName::ClassFactory() \ if( !*ppFactory ) \ { \ *ppFactory = new FactoryName( GlobalName, \ - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \ - ClassName::CreateInstance ); \ + rtl::OUString( #ClassName ), ClassName::CreateInstance ); \ (*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \ } \ return *ppFactory; \ @@ -145,8 +143,7 @@ SotFactory * ClassName::ClassFactory() \ if( !*ppFactory ) \ { \ *ppFactory = new FactoryName( GlobalName, \ - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \ - ClassName::CreateInstance ); \ + rtl::OUString( #ClassName ), ClassName::CreateInstance ); \ (*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \ (*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \ } \ @@ -187,8 +184,7 @@ SotFactory * ClassName::ClassFactory() \ if( !*ppFactory ) \ { \ *ppFactory = new FactoryName( GlobalName, \ - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \ - ClassName::CreateInstance );\ + rtl::OUString( #ClassName ), ClassName::CreateInstance ); \ (*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \ (*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \ (*ppFactory)->PutSuperClass( Super3::ClassFactory() ); \ @@ -233,8 +229,7 @@ SotFactory * ClassName::ClassFactory() \ if( !*ppFactory ) \ { \ *ppFactory = new SotFactory( GlobalName, \ - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \ - ClassName::CreateInstance );\ + rtl::OUString( #ClassName ), ClassName::CreateInstance ); \ (*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \ (*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \ (*ppFactory)->PutSuperClass( Super3::ClassFactory() ); \ diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 7a69118569ef..da8d00ad9fd8 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -758,7 +758,7 @@ StgDirStrm::StgDirStrm( StgIo& r ) { StgEntry aRoot; aRoot.Init(); - aRoot.SetName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Root Entry" ) ) ); + aRoot.SetName( rtl::OUString("Root Entry") ); aRoot.SetType( STG_ROOT ); pRoot = new StgDirEntry( aRoot ); pRoot->SetDirty(); diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index 68a7a3a00c6f..b23280ccb14f 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -103,7 +103,7 @@ void StgInternalStream::Commit() ///////////////////////// class StgCompObjStream ///////////////////////// StgCompObjStream::StgCompObjStream( BaseStorage& rStg, sal_Bool bWr ) - : StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1CompObj" ) ), bWr ) + : StgInternalStream( rStg, rtl::OUString("\1CompObj"), bWr ) { memset( &aClsId, 0, sizeof( ClsId ) ); nCbFormat = 0; @@ -168,7 +168,7 @@ sal_Bool StgCompObjStream::Store() /////////////////////////// class StgOleStream /////////////////////////// StgOleStream::StgOleStream( BaseStorage& rStg, sal_Bool bWr ) - : StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ) ), bWr ) + : StgInternalStream( rStg, rtl::OUString("\1Ole"), bWr ) { nFlags = 0; } diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index d3a84809f423..b0be41e9a295 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -47,7 +47,7 @@ sal_uLong ReadClipboardFormat( SvStream & rStm ) sal_Char * p = new sal_Char[ nLen ]; if( rStm.Read( p, nLen ) == (sal_uLong) nLen ) { - nFormat = SotExchange::RegisterFormatName( String::CreateFromAscii( p, short(nLen-1) ) ); + nFormat = SotExchange::RegisterFormatName(rtl::OUString(p, nLen-1, RTL_TEXTENCODING_ASCII_US)); } else rStm.SetError( SVSTREAM_GENERALERROR ); |