summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-20 13:02:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-20 13:05:35 +0100
commit2d9ce9191da681e4fd9f1d08933ca5117c56601b (patch)
treeeecfa2690dcaffca064cc5712d7a5c9662a32b87 /svtools
parentTODO: Unclear whether comparisons against "Ruby" shall use == or startsWith (diff)
downloadcore-2d9ce9191da681e4fd9f1d08933ca5117c56601b.tar.gz
core-2d9ce9191da681e4fd9f1d08933ca5117c56601b.zip
Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)
...which is a confusing overload with unexpectedly different semantics from the one-parameter form. In preparation of marking it as deprecated. Change-Id: I4f176995546ae583fc570d770647ffc315eecc75
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx2
-rw-r--r--svtools/source/graphic/provider.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index cba578609be9..3d21da07c949 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1157,7 +1157,7 @@ GraphicObject::InspectForGraphicObjectImageURL( const Reference< XInterface >& x
{
rtl::OUString sURL;
xProps->getPropertyValue( sImageURL ) >>= sURL;
- if ( !sURL.isEmpty() && sURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 )
+ if ( !sURL.isEmpty() && sURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
rvEmbedImgUrls.push_back( sURL );
}
}
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 07817c818b8d..c8e98e20088d 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -147,7 +147,7 @@ uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( const ::rtl::OUString& rResourceURL ) const
{
uno::Reference< ::graphic::XGraphic > xRet;
- if( rResourceURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 )
+ if( rResourceURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
{
// graphic manager url
String aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) );