diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-16 16:57:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-22 13:31:57 +0200 |
commit | 60bc26354763fa3461db49a3e827da552484150d (patch) | |
tree | 5c66cee43f76f556f9a086a67fa8a6e88750c5d5 /cui | |
parent | 7867e1f1cdd726cb98a236245e3d08557cc3a313 (diff) |
new loplugin:conststringfield
Look for const string fields which can be static, and
mostly convert them to OUStringLiteral
And add a getLength() method to OUStringLiteral to make
the transition easier.
Remove dead code in XclExpRoot::GenerateDefaultEncryptionData,
default password is never empty.
Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091
Reviewed-on: https://gerrit.libreoffice.org/59204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index c928c0493e45..24a498238d2f 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1212,8 +1212,6 @@ public: private: OUString msTitle; - const OUString msColorKey; - const OUString msModeKey; Color mnColor; sal_Int16 mnMode; Reference<css::awt::XWindow> mxParent; @@ -1235,10 +1233,11 @@ Sequence< OUString > ColorPicker_getSupportedServiceNames() return seq; } +static const OUStringLiteral gsColorKey( "Color" ); +static const OUStringLiteral gsModeKey( "Mode" ); + ColorPicker::ColorPicker() : ColorPickerBase( m_aMutex ) - , msColorKey( "Color" ) - , msModeKey( "Mode" ) , mnColor( 0 ) , mnMode( 0 ) { @@ -1273,7 +1272,7 @@ Sequence< OUString > SAL_CALL ColorPicker::getSupportedServiceNames( ) Sequence< PropertyValue > SAL_CALL ColorPicker::getPropertyValues( ) { Sequence< PropertyValue > props(1); - props[0].Name = msColorKey; + props[0].Name = gsColorKey; props[0].Value <<= mnColor; return props; } @@ -1282,11 +1281,11 @@ void SAL_CALL ColorPicker::setPropertyValues( const Sequence< PropertyValue >& a { for( sal_Int32 n = 0; n < aProps.getLength(); n++ ) { - if( aProps[n].Name == msColorKey ) + if( aProps[n].Name == gsColorKey ) { aProps[n].Value >>= mnColor; } - else if( aProps[n].Name == msModeKey ) + else if( aProps[n].Name == gsModeKey ) { aProps[n].Value >>= mnMode; } |