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 )
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();
......
......@@ -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 );
......
......@@ -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 )
......
......@@ -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 )
......
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