diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-20 13:02:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-20 13:05:35 +0100 |
commit | 2d9ce9191da681e4fd9f1d08933ca5117c56601b (patch) | |
tree | eecfa2690dcaffca064cc5712d7a5c9662a32b87 /toolkit | |
parent | dc06576d8809760b79f771831bed3122878e0505 (diff) |
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 'toolkit')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 40499e928dab..4dc26286e818 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -379,7 +379,7 @@ void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDes ( !aImageURL.isEmpty() )) { ::rtl::OUString absoluteUrl = aImageURL; - if ( aImageURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) != 0 ) + if ( !aImageURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) absoluteUrl = getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ), uno::makeAny( aImageURL ) ); @@ -608,7 +608,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang ( !aImageURL.isEmpty() )) { ::rtl::OUString absoluteUrl = aImageURL; - if ( aImageURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) != 0 ) + if ( !aImageURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) absoluteUrl = getPhysicalLocation( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DIALOGSOURCEURL )), uno::makeAny(aImageURL)); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index e98c6782e993..92d49df671d8 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -81,7 +81,7 @@ using namespace ::toolkit; uno::Reference< graphic::XGraphic > ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& xOutGraphicObj, const OUString& _rURL ) { - if( ( _rURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 ) ) + if ( _rURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) { // graphic manager uniqueid rtl::OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ); |