summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 12:47:37 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 12:49:29 +0200
commit363cc397172f2b0a94d9c4dc44fc8d95072795a3 (patch)
tree16a23a796e2db536d7af3f0144bce8fd01570e26 /toolkit
parent02a2203580226766c4b3b8778430774ff76f90e9 (diff)
convert equalsAsciiL calls to startWith calls where possible
Simplify code like: aStr.equalsAsciiL( "%", 1 ) to aStr.startsWith( "%" ) Change-Id: Iee0e4e60b0ae6d567fa8f72db5d616fffbec3c00
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx2
-rw-r--r--toolkit/source/controls/unocontrol.cxx14
2 files changed, 8 insertions, 8 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 712f2d296c92..5e0bdb201a6c 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -599,7 +599,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang
const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
- if ( bOwnModel && rEvt.PropertyName.equalsAsciiL( "ImageURL", 8 ))
+ if ( bOwnModel && rEvt.PropertyName.startsWith( "ImageURL" ))
{
OUString aImageURL;
Reference< graphic::XGraphic > xGraphic;
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index f597c6457dfb..bf34bec5d964 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -269,12 +269,12 @@ void UnoControl::ImplSetPeerProperty( const OUString& rPropName, const Any& rVal
{
// We now support a mapping for language dependent properties. This is the
// central method to implement it.
- if (( rPropName.equalsAsciiL( "Text", 4 )) ||
- ( rPropName.equalsAsciiL( "Label", 5 )) ||
- ( rPropName.equalsAsciiL( "Title", 5 )) ||
- ( rPropName.equalsAsciiL( "HelpText", 8 )) ||
- ( rPropName.equalsAsciiL( "CurrencySymbol", 14 )) ||
- ( rPropName.equalsAsciiL( "StringItemList", 14 )) )
+ if (( rPropName.startsWith( "Text" )) ||
+ ( rPropName.startsWith( "Label" )) ||
+ ( rPropName.startsWith( "Title" )) ||
+ ( rPropName.startsWith( "HelpText" )) ||
+ ( rPropName.startsWith( "CurrencySymbol" )) ||
+ ( rPropName.startsWith( "StringItemList" )) )
{
OUString aValue;
uno::Sequence< OUString > aSeqValue;
@@ -505,7 +505,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// Detect changes on our resource resolver which invalidates
// automatically some language dependent properties.
- if ( pEvents->PropertyName.equalsAsciiL( "ResourceResolver", 16 ))
+ if ( pEvents->PropertyName.startsWith( "ResourceResolver" ))
{
Reference< resource::XStringResourceResolver > xStrResolver;
if ( pEvents->NewValue >>= xStrResolver )