summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-12 18:39:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-15 08:37:54 +0200
commitb52f309f2b9037ee53ab8ac2d66967c012ba82f1 (patch)
tree4a4ace081c742af0cef50909e06394d9aef80345 /toolkit
parent897493fbd34a1bd10320767b48cbf04d422f89b3 (diff)
improve loplugin simplifyconstruct
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx12
-rw-r--r--toolkit/source/awt/vclxwindows.cxx10
-rw-r--r--toolkit/source/helper/accessibilityclient.cxx3
3 files changed, 12 insertions, 13 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 55a61ac36307..4442f1714727 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1155,7 +1155,7 @@ void VCLXWindow::setBackground( sal_Int32 nColor )
if ( GetWindow() )
{
- Color aColor = Color(nColor);
+ Color aColor(nColor);
GetWindow()->SetBackground( aColor );
GetWindow()->SetControlBackground( aColor );
@@ -1631,7 +1631,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0;
if ( Value >>= nColor )
{
- Color aColor = Color( nColor );
+ Color aColor( nColor );
pWindow->SetControlBackground( aColor );
pWindow->SetBackground( aColor );
switch ( eWinType )
@@ -1661,7 +1661,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0;
if ( Value >>= nColor )
{
- Color aColor = Color( nColor );
+ Color aColor( nColor );
pWindow->SetTextColor( aColor );
pWindow->SetControlForeground( aColor );
}
@@ -1677,7 +1677,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0;
if ( Value >>= nColor )
{
- Color aColor = Color( nColor );
+ Color aColor( nColor );
pWindow->SetTextLineColor( aColor );
}
}
@@ -1690,7 +1690,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0;
if ( Value >>= nColor )
{
- Color aColor = Color( nColor );
+ Color aColor( nColor );
pWindow->SetFillColor( aColor );
}
}
@@ -1703,7 +1703,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0;
if ( Value >>= nColor )
{
- Color aColor = Color( nColor );
+ Color aColor( nColor );
pWindow->SetLineColor( aColor );
}
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index b25cdce8acba..e13b535ea4d0 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -123,7 +123,7 @@ namespace toolkit
// for the real background (everything except the buttons and the thumb),
// use an average between the desired color and "white"
Color aWhite( COL_WHITE );
- Color aBackground = Color( nBackgroundColor );
+ Color aBackground( nBackgroundColor );
aBackground.SetRed( ( aBackground.GetRed() + aWhite.GetRed() ) / 2 );
aBackground.SetGreen( ( aBackground.GetGreen() + aWhite.GetGreen() ) / 2 );
aBackground.SetBlue( ( aBackground.GetBlue() + aWhite.GetBlue() ) / 2 );
@@ -132,19 +132,19 @@ namespace toolkit
sal_Int32 nBackgroundLuminance = Color( nBackgroundColor ).GetLuminance();
sal_Int32 nWhiteLuminance = COL_WHITE.GetLuminance();
- Color aLightShadow = Color( nBackgroundColor );
+ Color aLightShadow( nBackgroundColor );
aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
aStyleSettings.SetLightBorderColor( aLightShadow );
- Color aLight = Color( nBackgroundColor );
+ Color aLight( nBackgroundColor );
aLight.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
aStyleSettings.SetLightColor( aLight );
- Color aShadow = Color( nBackgroundColor );
+ Color aShadow( nBackgroundColor );
aShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 1 / 3 ) );
aStyleSettings.SetShadowColor( aShadow );
- Color aDarkShadow = Color( nBackgroundColor );
+ Color aDarkShadow( nBackgroundColor );
aDarkShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 2 / 3 ) );
aStyleSettings.SetDarkShadowColor( aDarkShadow );
}
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index b9dff4bfee53..fbd29c4efa4f 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -172,8 +172,7 @@ namespace toolkit
s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
if ( s_hAccessibleImplementationModule != nullptr )
{
- const OUString sFactoryCreationFunc =
- OUString("getStandardAccessibleFactory");
+ const OUString sFactoryCreationFunc("getStandardAccessibleFactory");
s_pAccessibleFactoryFunc = reinterpret_cast<GetStandardAccComponentFactory>(
osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData ));