summaryrefslogtreecommitdiff
path: root/sd
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 /sd
parentdc06576d8809760b79f771831bed3122878e0505 (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 'sd')
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx2
-rw-r--r--sd/source/core/TransitionPreset.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
4 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 3cc45984e16e..9ac81d682214 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -326,7 +326,7 @@ void CustomAnimationPresets::importEffects()
for( sal_Int32 i=0; i<aFiles.getLength(); ++i )
{
rtl::OUString aURL = aFiles[i];
- if( aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( EXPAND_PROTOCOL )) == 0 )
+ if( aURL.startsWith( EXPAND_PROTOCOL ) )
{
// cut protocol
rtl::OUString aMacro( aURL.copy( sizeof ( EXPAND_PROTOCOL ) -1 ) );
diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx
index 3c9f408a635d..127b3027bdb4 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -176,7 +176,7 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList )
for( sal_Int32 i=0; i<aFiles.getLength(); ++i )
{
rtl::OUString aURL = aFiles[i];
- if( aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( EXPAND_PROTOCOL )) == 0 )
+ if( aURL.startsWith( EXPAND_PROTOCOL ) )
{
// cut protocol
rtl::OUString aMacro( aURL.copy( sizeof ( EXPAND_PROTOCOL ) -1 ) );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 2ed65bf02be6..192169da1fd5 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2246,7 +2246,7 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen
{
nCommand = EffectCommands::PLAY;
}
- else if( aParam.compareToAscii( RTL_CONSTASCII_STRINGPARAM("playFrom") ) == 0 )
+ else if( aParam.startsWith( "playFrom" ) )
{
const OUString aMediaTime( aParam.copy( 9, aParam.getLength() - 10 ) );
rtl_math_ConversionStatus eStatus;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 5625097ea2db..03b11bd7c2c0 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -110,7 +110,7 @@ enum WID_PAGE
#endif
#endif
-static sal_Char sEmptyPageName[sizeof("page")] = "page";
+static sal_Char const sEmptyPageName[sizeof("page")] = "page";
/** this function stores the property maps for draw pages in impress and draw */
const SvxItemPropertySet* ImplGetDrawPagePropertySet( sal_Bool bImpress, PageKind ePageKind )
@@ -2256,7 +2256,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
if(GetPage() && GetPage()->GetPageKind() != PK_NOTES)
{
// check if this is the default 'page1234' name
- if(aName.compareToAscii( sEmptyPageName, sizeof( sEmptyPageName ) - 1 ) == 0)
+ if(aName.startsWith( sEmptyPageName ))
{
// ok, it maybe is, first get the number part after 'page'
OUString aNumber( aName.copy( sizeof( sEmptyPageName ) - 1 ) );