diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:54:52 +0100 |
commit | a3f32769fc4bb23c64168b412dd10ec769a3854d (patch) | |
tree | 92bb435946dcfc422c9816bc05c150069a2da3c3 /svx/source/tbxctrls | |
parent | WaE: C4701: potentially uninitialized local variable 'nIdx' used (diff) | |
download | core-a3f32769fc4bb23c64168b412dd10ec769a3854d.tar.gz core-a3f32769fc4bb23c64168b412dd10ec769a3854d.zip |
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 3fbce727ff2e..afd9b6a47fd7 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_PERCENT); SetDecimalDigits( 0 ); @@ -159,14 +159,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() ) |