summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-21 15:53:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-01-21 16:01:07 +0000
commit523ad9696c9135a29393a0c4d147ab206b6de4f5 (patch)
treefe30ff35cc11890a2345d75495c455f792a4bf56 /svx/source
parent7713dfc9b50b88cf2548d49e65b099a6a81e9d65 (diff)
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to startsWith calls" should rather have converted to oprator ==. (cherry picked from commit a3f32769fc4bb23c64168b412dd10ec769a3854d) Conflicts: sc/source/ui/unoobj/nameuno.cxx sc/source/ui/unoobj/styleuno.cxx sfx2/source/appl/sfxhelp.cxx stoc/source/security/permissions.cxx sw/source/core/unocore/unocrsrhelper.cxx (None of those bogus startsWith calls seem problematic enough to warrant backporting also to libreoffice-4-2-0.) Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21 Reviewed-on: https://gerrit.libreoffice.org/7578 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/form/fmdpage.cxx4
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/items/galleryitem.cxx10
-rw-r--r--svx/source/sidebar/nbdtmg.cxx12
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx16
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx10
-rw-r--r--svx/source/unodraw/unopage.cxx4
-rw-r--r--svx/source/unodraw/unoshap2.cxx2
9 files changed, 32 insertions, 32 deletions
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
index db03d581c88f..70ff3e985407 100644
--- a/svx/source/form/fmdpage.cxx
+++ b/svx/source/form/fmdpage.cxx
@@ -85,8 +85,8 @@ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Referen
{
OUString aShapeType( xDescr->getShapeType() );
- if ( aShapeType.startsWith( "com.sun.star.drawing.ShapeControl" ) // compatibility
- || aShapeType.startsWith( "com.sun.star.drawing.ControlShape" )
+ if ( aShapeType == "com.sun.star.drawing.ShapeControl" // compatibility
+ || aShapeType == "com.sun.star.drawing.ControlShape"
)
return new FmFormObj();
else
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 972822aef10c..109e77a4f0d0 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4115,7 +4115,7 @@ FormController::interceptedQueryDispatch( const URL& aURL,
Reference< XDispatch > xReturn;
// dispatches handled by ourself
if ( ( aURL.Complete == FMURL_CONFIRM_DELETION )
- || ( ( aURL.Complete.startsWith( "private:/InteractionHandler" ) )
+ || ( ( aURL.Complete == "private:/InteractionHandler" )
&& ensureInteractionHandler()
)
)
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 2767816cfd42..915844b3e271 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -178,14 +178,14 @@ void SAL_CALL GalleryThemePopup::statusChanged(
throw ( css::uno::RuntimeException )
{
const OUString &rURL = rEvent.FeatureURL.Complete;
- if ( rURL.startsWith( CMD_SID_GALLERY_ENABLE_ADDCOPY ) )
+ if ( rURL == CMD_SID_GALLERY_ENABLE_ADDCOPY )
{
if ( !rEvent.IsEnabled )
{
maPopupMenu.EnableItem( MN_ADD, sal_False );
}
}
- else if ( rURL.startsWith( CMD_SID_GALLERY_BG_BRUSH ) )
+ else if ( rURL == CMD_SID_GALLERY_BG_BRUSH )
{
maBackgroundPopup.Clear();
if ( rEvent.IsEnabled )
diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx
index c07ed06c17dc..69113942a165 100644
--- a/svx/source/items/galleryitem.cxx
+++ b/svx/source/items/galleryitem.cxx
@@ -87,27 +87,27 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
const css::beans::PropertyValue *pEnd = pProp + aSeq.getLength();
for ( ; pProp != pEnd; pProp++ )
{
- if ( pProp->Name.startsWith( SVXGALLERYITEM_TYPE ) )
+ if ( pProp->Name == SVXGALLERYITEM_TYPE )
{
bAllConverted &= bIsSetType = ( pProp->Value >>= nType );
++nConverted;
}
- else if ( pProp->Name.startsWith( SVXGALLERYITEM_URL ) )
+ else if ( pProp->Name == SVXGALLERYITEM_URL )
{
bAllConverted &= ( pProp->Value >>= aURL );
++nConverted;
}
- else if ( pProp->Name.startsWith( SVXGALLERYITEM_FILTER ) )
+ else if ( pProp->Name == SVXGALLERYITEM_FILTER )
{
bAllConverted &= ( pProp->Value >>= aFilterName );
++nConverted;
}
- else if ( pProp->Name.startsWith( SVXGALLERYITEM_DRAWING ) )
+ else if ( pProp->Name == SVXGALLERYITEM_DRAWING )
{
bAllConverted &= ( pProp->Value >>= xDrawing );
++nConverted;
}
- else if ( pProp->Name.startsWith( SVXGALLERYITEM_GRAPHIC ) )
+ else if ( pProp->Name == SVXGALLERYITEM_GRAPHIC )
{
bAllConverted &= ( pProp->Value >>= xGraphic );
++nConverted;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 4a14f4663fdc..5ae6b73682bb 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -114,17 +114,17 @@ NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>
NumSettings_ImplPtr pNew = new NumSettings_Impl;
for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
{
- if(pValues[j].Name.startsWith(sNumberingType))
+ if(pValues[j].Name == sNumberingType)
pValues[j].Value >>= pNew->nNumberType;
- else if(pValues[j].Name.startsWith(sPrefix))
+ else if(pValues[j].Name == sPrefix)
pValues[j].Value >>= pNew->sPrefix;
- else if(pValues[j].Name.startsWith(sSuffix))
+ else if(pValues[j].Name == sSuffix)
pValues[j].Value >>= pNew->sSuffix;
- else if(pValues[j].Name.startsWith(sParentNumbering))
+ else if(pValues[j].Name == sParentNumbering)
pValues[j].Value >>= pNew->nParentNumbering;
- else if(pValues[j].Name.startsWith(sBulletChar))
+ else if(pValues[j].Name == sBulletChar)
pValues[j].Value >>= pNew->sBulletChar;
- else if(pValues[j].Name.startsWith(sBulletFontName))
+ else if(pValues[j].Name == sBulletFontName)
pValues[j].Value >>= pNew->sBulletFont;
}
const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix[0] : 0;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 59b7a31eb6f7..4a3fe6b1a1ef 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -128,7 +128,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const OUString& rCmd,
}
else
{
- const long nMinVal = maCommand.startsWith( ".uno:GrafTransparence" ) ? 0 : -100;
+ const long nMinVal = maCommand == ".uno:GrafTransparence" ? 0 : -100;
SetUnit( FUNIT_CUSTOM );
SetCustomUnitText( OUString(" %") );
@@ -160,14 +160,14 @@ IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl)
// Convert value to an any to be usable with dispatch API
Any a;
- if ( maCommand.startsWith( ".uno:GrafRed" ) ||
- maCommand.startsWith( ".uno:GrafGreen" ) ||
- maCommand.startsWith( ".uno:GrafBlue" ) ||
- maCommand.startsWith( ".uno:GrafLuminance" ) ||
- maCommand.startsWith( ".uno:GrafContrast" ))
+ if ( maCommand == ".uno:GrafRed" ||
+ maCommand == ".uno:GrafGreen" ||
+ maCommand == ".uno:GrafBlue" ||
+ maCommand == ".uno:GrafLuminance" ||
+ maCommand == ".uno:GrafContrast" )
a = makeAny( sal_Int16( nVal ));
- else if ( maCommand.startsWith( ".uno:GrafGamma" ) ||
- maCommand.startsWith( ".uno:GrafTransparence" ))
+ else if ( maCommand == ".uno:GrafGamma" ||
+ maCommand == ".uno:GrafTransparence" )
a = makeAny( sal_Int32( nVal ));
if ( a.hasValue() )
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 0c83a677b248..6d4d484e21b1 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -521,15 +521,15 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto
{
pValues->Value >>= rSettings.mxInteractionHandler;
}
- else if( pValues->Name.startsWith( "Width" ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name == "Width" ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mnWidth;
}
- else if( pValues->Name.startsWith( "Height" ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name == "Height" ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mnHeight;
}
- else if( pValues->Name.startsWith( "ExportOnlyBackground" ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name == "ExportOnlyBackground" ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mbExportOnlyBackground;
}
@@ -558,12 +558,12 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto
{
pDataValues->Value >>= rSettings.mnHeight;
}
- else if( pDataValues->Name.startsWith( "Width" ) ) // for compatibility reasons, deprecated
+ else if( pDataValues->Name == "Width" ) // for compatibility reasons, deprecated
{
pDataValues->Value >>= rSettings.mnWidth;
pDataValues->Name = "PixelWidth";
}
- else if( pDataValues->Name.startsWith( "Height" ) ) // for compatibility reasons, deprecated
+ else if( pDataValues->Name == "Height" ) // for compatibility reasons, deprecated
{
pDataValues->Value >>= rSettings.mnHeight;
pDataValues->Name = "PixelHeight";
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 771f8e80b115..f23ab2ade122 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -532,8 +532,8 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
if( nTempType == UHASHMAP_NOTFOUND )
{
- if( aName.startsWith("com.sun.star.drawing.TableShape") ||
- aName.startsWith("com.sun.star.presentation.TableShape") )
+ if( aName == "com.sun.star.drawing.TableShape" ||
+ aName == "com.sun.star.presentation.TableShape" )
{
rInventor = SdrInventor;
rType = OBJ_TABLE;
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 774b87d6b0bb..0909e4777ff1 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1924,7 +1924,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c
::SolarMutexGuard aGuard;
SdrObject* pObject = mpObj.get();
- bool bCustomShapeGeometry = pObject && aPropertyName.startsWith( "CustomShapeGeometry" );
+ bool bCustomShapeGeometry = pObject && aPropertyName == "CustomShapeGeometry";
sal_Bool bMirroredX = sal_False;
sal_Bool bMirroredY = sal_False;