Kaydet (Commit) 563e228f authored tarafından Noel Grandin's avatar Noel Grandin

convert svtools/source/graphic/* from String to OUString

Change-Id: Ic56bc8c61aa85c4a9d2f5a7355aeed31a20d6138
üst be8d4365
...@@ -160,7 +160,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) ...@@ -160,7 +160,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
if( graphic::GraphicType::EMPTY != cType ) if( graphic::GraphicType::EMPTY != cType )
{ {
meType = ( ( graphic::GraphicType::PIXEL == cType ) ? GRAPHIC_BITMAP : GRAPHIC_GDIMETAFILE ); meType = ( ( graphic::GraphicType::PIXEL == cType ) ? GRAPHIC_BITMAP : GRAPHIC_GDIMETAFILE );
maMimeType = String( pMimeType, RTL_TEXTENCODING_ASCII_US ); maMimeType = OUString( pMimeType, strlen(pMimeType), RTL_TEXTENCODING_ASCII_US );
maSizePixel = aDescriptor.GetSizePixel(); maSizePixel = aDescriptor.GetSizePixel();
maSize100thMM = aDescriptor.GetSize_100TH_MM(); maSize100thMM = aDescriptor.GetSize_100TH_MM();
mnBitsPerPixel = aDescriptor.GetBitsPerPixel(); mnBitsPerPixel = aDescriptor.GetBitsPerPixel();
......
...@@ -264,7 +264,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) ...@@ -264,7 +264,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
const Size aPrefSize( rSubstitute.GetPrefSize() ); const Size aPrefSize( rSubstitute.GetPrefSize() );
const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() ); const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() );
const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() ); const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() );
const String aDocFileName( rSubstitute.GetDocFileName() ); const OUString aDocFileName( rSubstitute.GetDocFileName() );
const sal_uLong nDocFilePos = rSubstitute.GetDocFilePos(); const sal_uLong nDocFilePos = rSubstitute.GetDocFilePos();
const GraphicType eOldType = rSubstitute.GetType(); const GraphicType eOldType = rSubstitute.GetType();
const bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT ); const bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
......
...@@ -1129,8 +1129,8 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) ...@@ -1129,8 +1129,8 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL ) GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL )
{ {
const String aURL( rURL ), aPrefix( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) ); const OUString aURL( rURL ), aPrefix( UNO_NAME_GRAPHOBJ_URLPREFIX );
if( aURL.Search( aPrefix ) == 0 ) if( aURL.indexOf( aPrefix ) == 0 )
{ {
// graphic manager url // graphic manager url
OString aUniqueID(OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX) - 1), RTL_TEXTENCODING_UTF8)); OString aUniqueID(OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX) - 1), RTL_TEXTENCODING_UTF8));
...@@ -1139,7 +1139,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL ) ...@@ -1139,7 +1139,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL )
else else
{ {
Graphic aGraphic; Graphic aGraphic;
if ( aURL.Len() ) if ( !aURL.isEmpty() )
{ {
SvStream* pStream = utl::UcbStreamHelper::CreateStream( aURL, STREAM_READ ); SvStream* pStream = utl::UcbStreamHelper::CreateStream( aURL, STREAM_READ );
if( pStream ) if( pStream )
......
...@@ -151,7 +151,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( co ...@@ -151,7 +151,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( co
if( rResourceURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) if( rResourceURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
{ {
// graphic manager url // graphic manager url
String aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) ); OUString aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) );
OString aUniqueID(OUStringToOString(aTmpStr, OString aUniqueID(OUStringToOString(aTmpStr,
RTL_TEXTENCODING_UTF8)); RTL_TEXTENCODING_UTF8));
GraphicObject aGrafObj(aUniqueID); GraphicObject aGrafObj(aUniqueID);
...@@ -194,7 +194,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage( ...@@ -194,7 +194,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage(
if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:graphicrepository" ) ) ) if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:graphicrepository" ) ) )
{ {
String sPathName( rResourceURL.copy( nIndex ) ); OUString sPathName( rResourceURL.copy( nIndex ) );
BitmapEx aBitmap; BitmapEx aBitmap;
if ( ::vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) ) if ( ::vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) )
{ {
...@@ -427,7 +427,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co ...@@ -427,7 +427,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{ {
uno::Reference< ::graphic::XGraphic > xRet; uno::Reference< ::graphic::XGraphic > xRet;
String aPath; OUString aPath;
SvStream* pIStm = NULL; SvStream* pIStm = NULL;
uno::Reference< io::XInputStream > xIStm; uno::Reference< io::XInputStream > xIStm;
...@@ -487,7 +487,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co ...@@ -487,7 +487,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
{ {
pIStm = ::utl::UcbStreamHelper::CreateStream( xIStm ); pIStm = ::utl::UcbStreamHelper::CreateStream( xIStm );
} }
else if( aPath.Len() ) else if( !aPath.isEmpty() )
{ {
xRet = implLoadMemory( aPath ); xRet = implLoadMemory( aPath );
...@@ -770,7 +770,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG ...@@ -770,7 +770,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{ {
SvStream* pOStm = NULL; SvStream* pOStm = NULL;
String aPath; OUString aPath;
sal_Int32 i; sal_Int32 i;
for( i = 0; ( i < rMediaProperties.getLength() ) && !pOStm; ++i ) for( i = 0; ( i < rMediaProperties.getLength() ) && !pOStm; ++i )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment