summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-20 16:13:00 +0200
committerNoel Grandin <noel@peralex.com>2013-08-22 10:49:31 +0200
commit563e228fd3ae975a1c4e8e2279daa18a260df3c3 (patch)
treef82375c550ef152b47cfaacef7c207e4ea1107ee /svtools
parentbe8d43651ee2356de8074b026e48ceb2a83b8ea3 (diff)
convert svtools/source/graphic/* from String to OUString
Change-Id: Ic56bc8c61aa85c4a9d2f5a7355aeed31a20d6138
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/descriptor.cxx2
-rw-r--r--svtools/source/graphic/grfcache.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx6
-rw-r--r--svtools/source/graphic/provider.cxx10
4 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index e6c22c2261f1..1f6515a5e143 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -160,7 +160,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
if( graphic::GraphicType::EMPTY != cType )
{
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();
maSize100thMM = aDescriptor.GetSize_100TH_MM();
mnBitsPerPixel = aDescriptor.GetBitsPerPixel();
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index f0d462967ca5..f91b0fd09979 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -264,7 +264,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
const Size aPrefSize( rSubstitute.GetPrefSize() );
const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() );
const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() );
- const String aDocFileName( rSubstitute.GetDocFileName() );
+ const OUString aDocFileName( rSubstitute.GetDocFileName() );
const sal_uLong nDocFilePos = rSubstitute.GetDocFilePos();
const GraphicType eOldType = rSubstitute.GetType();
const bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 18d1090cc5aa..85f0d0b84f56 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1129,8 +1129,8 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL )
{
- const String aURL( rURL ), aPrefix( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) );
- if( aURL.Search( aPrefix ) == 0 )
+ const OUString aURL( rURL ), aPrefix( UNO_NAME_GRAPHOBJ_URLPREFIX );
+ if( aURL.indexOf( aPrefix ) == 0 )
{
// graphic manager url
OString aUniqueID(OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX) - 1), RTL_TEXTENCODING_UTF8));
@@ -1139,7 +1139,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL )
else
{
Graphic aGraphic;
- if ( aURL.Len() )
+ if ( !aURL.isEmpty() )
{
SvStream* pStream = utl::UcbStreamHelper::CreateStream( aURL, STREAM_READ );
if( pStream )
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 9bc54b915211..9a5fa4e8576f 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -151,7 +151,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( co
if( rResourceURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
{
// 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,
RTL_TEXTENCODING_UTF8));
GraphicObject aGrafObj(aUniqueID);
@@ -194,7 +194,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage(
if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:graphicrepository" ) ) )
{
- String sPathName( rResourceURL.copy( nIndex ) );
+ OUString sPathName( rResourceURL.copy( nIndex ) );
BitmapEx aBitmap;
if ( ::vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) )
{
@@ -427,7 +427,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< ::graphic::XGraphic > xRet;
- String aPath;
+ OUString aPath;
SvStream* pIStm = NULL;
uno::Reference< io::XInputStream > xIStm;
@@ -487,7 +487,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
{
pIStm = ::utl::UcbStreamHelper::CreateStream( xIStm );
}
- else if( aPath.Len() )
+ else if( !aPath.isEmpty() )
{
xRet = implLoadMemory( aPath );
@@ -770,7 +770,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
SvStream* pOStm = NULL;
- String aPath;
+ OUString aPath;
sal_Int32 i;
for( i = 0; ( i < rMediaProperties.getLength() ) && !pOStm; ++i )