use more Color in toolkit

Change-Id: I88860e4180db2c46acda1739235c248a38bb068d
Reviewed-on: https://gerrit.libreoffice.org/50798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-03-06 10:47:05 +02:00
parent f02b1ba18d
commit a0a57a3567
6 changed files with 59 additions and 60 deletions

View File

@@ -132,15 +132,15 @@ namespace toolkit
const VclPtr<vcl::Window>& pWindow = i_rData.pOwningWindow->GetWindow(); const VclPtr<vcl::Window>& pWindow = i_rData.pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return (aStyleSettings.*i_pGetter)().GetColor(); return sal_Int32((aStyleSettings.*i_pGetter)());
} }
void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor ) void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void (StyleSettings::*i_pSetter)( Color const & ), sal_Int32 i_nColor )
{ {
VclPtr<vcl::Window> pWindow = i_rData.pOwningWindow->GetWindow(); VclPtr<vcl::Window> pWindow = i_rData.pOwningWindow->GetWindow();
AllSettings aAllSettings = pWindow->GetSettings(); AllSettings aAllSettings = pWindow->GetSettings();
StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
(aStyleSettings.*i_pSetter)( Color( i_nColor ) ); (aStyleSettings.*i_pSetter)( Color(i_nColor) );
aAllSettings.SetStyleSettings( aStyleSettings ); aAllSettings.SetStyleSettings( aStyleSettings );
pWindow->SetSettings( aAllSettings ); pWindow->SetSettings( aAllSettings );
} }
@@ -383,7 +383,7 @@ namespace toolkit
const VclPtr<vcl::Window>& pWindow = m_pData->pOwningWindow->GetWindow(); const VclPtr<vcl::Window>& pWindow = m_pData->pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return aStyleSettings.GetFaceGradientColor().GetColor(); return sal_Int32(aStyleSettings.GetFaceGradientColor());
} }
@@ -673,7 +673,7 @@ namespace toolkit
const VclPtr<vcl::Window>& pWindow = m_pData->pOwningWindow->GetWindow(); const VclPtr<vcl::Window>& pWindow = m_pData->pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return aStyleSettings.GetSeparatorColor().GetColor(); return sal_Int32(aStyleSettings.GetSeparatorColor());
} }

View File

@@ -720,12 +720,12 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
sal_Int32 nColor = 0; Color nColor;
VclPtr<vcl::Window> pWindow = GetWindow(); VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow ) if ( pWindow )
{ {
if ( pWindow->IsControlForeground() ) if ( pWindow->IsControlForeground() )
nColor = pWindow->GetControlForeground().GetColor(); nColor = pWindow->GetControlForeground();
else else
{ {
vcl::Font aFont; vcl::Font aFont;
@@ -733,31 +733,31 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( )
aFont = pWindow->GetControlFont(); aFont = pWindow->GetControlFont();
else else
aFont = pWindow->GetFont(); aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor(); nColor = aFont.GetColor();
// COL_AUTO is not very meaningful for AT // COL_AUTO is not very meaningful for AT
if ( nColor == sal_Int32(COL_AUTO)) if ( nColor == COL_AUTO)
nColor = pWindow->GetTextColor().GetColor(); nColor = pWindow->GetTextColor();
} }
} }
return nColor; return sal_Int32(nColor);
} }
sal_Int32 SAL_CALL VCLXAccessibleComponent::getBackground( ) sal_Int32 SAL_CALL VCLXAccessibleComponent::getBackground( )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
sal_Int32 nColor = 0; Color nColor;
VclPtr<vcl::Window> pWindow = GetWindow(); VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow ) if ( pWindow )
{ {
if ( pWindow->IsControlBackground() ) if ( pWindow->IsControlBackground() )
nColor = pWindow->GetControlBackground().GetColor(); nColor = pWindow->GetControlBackground();
else else
nColor = pWindow->GetBackground().GetColor().GetColor(); nColor = pWindow->GetBackground().GetColor();
} }
return nColor; return sal_Int32(nColor);
} }
// XAccessibleExtendedComponent // XAccessibleExtendedComponent

View File

@@ -192,28 +192,28 @@ void VCLXGraphics::setTextColor( sal_Int32 nColor )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
maTextColor = Color( static_cast<sal_uInt32>(nColor) ); maTextColor = Color( nColor );
} }
void VCLXGraphics::setTextFillColor( sal_Int32 nColor ) void VCLXGraphics::setTextFillColor( sal_Int32 nColor )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
maTextFillColor = Color( static_cast<sal_uInt32>(nColor) ); maTextFillColor = Color( nColor );
} }
void VCLXGraphics::setLineColor( sal_Int32 nColor ) void VCLXGraphics::setLineColor( sal_Int32 nColor )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
maLineColor = Color( static_cast<sal_uInt32>(nColor) ); maLineColor = Color( nColor );
} }
void VCLXGraphics::setFillColor( sal_Int32 nColor ) void VCLXGraphics::setFillColor( sal_Int32 nColor )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
maFillColor = Color( static_cast<sal_uInt32>(nColor) ); maFillColor = Color( nColor );
} }
void VCLXGraphics::setRasterOp( awt::RasterOperation eROP ) void VCLXGraphics::setRasterOp( awt::RasterOperation eROP )
@@ -459,7 +459,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_
if( mpOutputDevice ) if( mpOutputDevice )
{ {
InitOutputDevice( InitOutDevFlags::COLORS ); InitOutputDevice( InitOutDevFlags::COLORS );
Gradient aGradient(static_cast<GradientStyle>(rGradient.Style), rGradient.StartColor, rGradient.EndColor); Gradient aGradient(static_cast<GradientStyle>(rGradient.Style), Color(rGradient.StartColor), Color(rGradient.EndColor));
aGradient.SetAngle(rGradient.Angle); aGradient.SetAngle(rGradient.Angle);
aGradient.SetBorder(rGradient.Border); aGradient.SetBorder(rGradient.Border);
aGradient.SetOfsX(rGradient.XOffset); aGradient.SetOfsX(rGradient.XOffset);

View File

@@ -1157,7 +1157,7 @@ void VCLXWindow::setBackground( sal_Int32 nColor )
if ( GetWindow() ) if ( GetWindow() )
{ {
Color aColor( static_cast<sal_uInt32>(nColor) ); Color aColor = Color(nColor);
GetWindow()->SetBackground( aColor ); GetWindow()->SetBackground( aColor );
GetWindow()->SetControlBackground( aColor ); GetWindow()->SetControlBackground( aColor );
@@ -1231,8 +1231,7 @@ void VCLXWindow::setForeground( sal_Int32 nColor )
if ( GetWindow() ) if ( GetWindow() )
{ {
Color aColor( static_cast<sal_uInt32>(nColor) ); GetWindow()->SetControlForeground( Color(nColor) );
GetWindow()->SetControlForeground( aColor );
} }
} }
@@ -1257,15 +1256,15 @@ void VCLXWindow::getStyles( sal_Int16 nType, css::awt::FontDescriptor& Font, sal
case css::awt::Style::FRAME: case css::awt::Style::FRAME:
{ {
Font = VCLUnoHelper::CreateFontDescriptor( rStyleSettings.GetAppFont() ); Font = VCLUnoHelper::CreateFontDescriptor( rStyleSettings.GetAppFont() );
ForegroundColor = rStyleSettings.GetWindowTextColor().GetColor(); ForegroundColor = sal_Int32(rStyleSettings.GetWindowTextColor());
BackgroundColor = rStyleSettings.GetWindowColor().GetColor(); BackgroundColor = sal_Int32(rStyleSettings.GetWindowColor());
} }
break; break;
case css::awt::Style::DIALOG: case css::awt::Style::DIALOG:
{ {
Font = VCLUnoHelper::CreateFontDescriptor( rStyleSettings.GetAppFont() ); Font = VCLUnoHelper::CreateFontDescriptor( rStyleSettings.GetAppFont() );
ForegroundColor = rStyleSettings.GetDialogTextColor().GetColor(); ForegroundColor = sal_Int32(rStyleSettings.GetDialogTextColor());
BackgroundColor = rStyleSettings.GetDialogColor().GetColor(); BackgroundColor = sal_Int32(rStyleSettings.GetDialogColor());
} }
break; break;
default: OSL_FAIL( "VCLWindow::getStyles() - unknown Type" ); default: OSL_FAIL( "VCLWindow::getStyles() - unknown Type" );
@@ -1281,7 +1280,7 @@ namespace toolkit
{ {
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( !( _rValue >>= nColor ) ) if ( !( _rValue >>= nColor ) )
nColor = (Application::GetSettings().GetStyleSettings().*pGetter)().GetColor(); nColor = sal_Int32((Application::GetSettings().GetStyleSettings().*pGetter)());
AllSettings aSettings = _pWindow->GetSettings(); AllSettings aSettings = _pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings();
@@ -1638,7 +1637,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( Value >>= nColor ) if ( Value >>= nColor )
{ {
Color aColor( nColor ); Color aColor = Color( nColor );
pWindow->SetControlBackground( aColor ); pWindow->SetControlBackground( aColor );
pWindow->SetBackground( aColor ); pWindow->SetBackground( aColor );
switch ( eWinType ) switch ( eWinType )
@@ -1668,7 +1667,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( Value >>= nColor ) if ( Value >>= nColor )
{ {
Color aColor( nColor ); Color aColor = Color( nColor );
pWindow->SetTextColor( aColor ); pWindow->SetTextColor( aColor );
pWindow->SetControlForeground( aColor ); pWindow->SetControlForeground( aColor );
} }
@@ -1684,7 +1683,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( Value >>= nColor ) if ( Value >>= nColor )
{ {
Color aColor( nColor ); Color aColor = Color( nColor );
pWindow->SetTextLineColor( aColor ); pWindow->SetTextLineColor( aColor );
} }
} }
@@ -1697,7 +1696,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( Value >>= nColor ) if ( Value >>= nColor )
{ {
Color aColor( nColor ); Color aColor = Color( nColor );
pWindow->SetFillColor( aColor ); pWindow->SetFillColor( aColor );
} }
} }
@@ -1710,7 +1709,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int32 nColor = 0; sal_Int32 nColor = 0;
if ( Value >>= nColor ) if ( Value >>= nColor )
{ {
Color aColor( nColor ); Color aColor = Color( nColor );
pWindow->SetLineColor( aColor ); pWindow->SetLineColor( aColor );
} }
} }
@@ -2021,10 +2020,10 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
} }
break; break;
case BASEPROPERTY_BACKGROUNDCOLOR: case BASEPROPERTY_BACKGROUNDCOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetControlBackground().GetColor()); aProp <<= GetWindow()->GetControlBackground();
break; break;
case BASEPROPERTY_DISPLAYBACKGROUNDCOLOR: case BASEPROPERTY_DISPLAYBACKGROUNDCOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetDisplayBackground().GetColor().GetColor()); aProp <<= GetWindow()->GetDisplayBackground().GetColor();
break; break;
case BASEPROPERTY_FONTRELIEF: case BASEPROPERTY_FONTRELIEF:
aProp <<= static_cast<sal_Int16>(GetWindow()->GetControlFont().GetRelief()); aProp <<= static_cast<sal_Int16>(GetWindow()->GetControlFont().GetRelief());
@@ -2033,16 +2032,16 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
aProp <<= static_cast<sal_Int16>(GetWindow()->GetControlFont().GetEmphasisMark()); aProp <<= static_cast<sal_Int16>(GetWindow()->GetControlFont().GetEmphasisMark());
break; break;
case BASEPROPERTY_TEXTCOLOR: case BASEPROPERTY_TEXTCOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetControlForeground().GetColor()); aProp <<= GetWindow()->GetControlForeground();
break; break;
case BASEPROPERTY_TEXTLINECOLOR: case BASEPROPERTY_TEXTLINECOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetTextLineColor().GetColor()); aProp <<= GetWindow()->GetTextLineColor();
break; break;
case BASEPROPERTY_FILLCOLOR: case BASEPROPERTY_FILLCOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetFillColor().GetColor()); aProp <<= GetWindow()->GetFillColor();
break; break;
case BASEPROPERTY_LINECOLOR: case BASEPROPERTY_LINECOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetLineColor().GetColor()); aProp <<= GetWindow()->GetLineColor();
break; break;
case BASEPROPERTY_BORDER: case BASEPROPERTY_BORDER:
{ {
@@ -2139,11 +2138,11 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
break; break;
case BASEPROPERTY_SYMBOL_COLOR: case BASEPROPERTY_SYMBOL_COLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor()); aProp <<= GetWindow()->GetSettings().GetStyleSettings().GetButtonTextColor();
break; break;
case BASEPROPERTY_BORDERCOLOR: case BASEPROPERTY_BORDERCOLOR:
aProp <<= static_cast<sal_Int32>(GetWindow()->GetSettings().GetStyleSettings().GetMonoColor().GetColor()); aProp <<= GetWindow()->GetSettings().GetStyleSettings().GetMonoColor();
break; break;
} }
} }

View File

@@ -117,12 +117,12 @@ namespace toolkit
{ {
sal_Int32 nBackgroundColor = 0; sal_Int32 nBackgroundColor = 0;
_rColorValue >>= nBackgroundColor; _rColorValue >>= nBackgroundColor;
aStyleSettings.SetFaceColor( nBackgroundColor ); aStyleSettings.SetFaceColor( Color(nBackgroundColor) );
// for the real background (everything except the buttons and the thumb), // for the real background (everything except the buttons and the thumb),
// use an average between the desired color and "white" // use an average between the desired color and "white"
Color aWhite( COL_WHITE ); Color aWhite( COL_WHITE );
Color aBackground( nBackgroundColor ); Color aBackground = Color( nBackgroundColor );
aBackground.SetRed( ( aBackground.GetRed() + aWhite.GetRed() ) / 2 ); aBackground.SetRed( ( aBackground.GetRed() + aWhite.GetRed() ) / 2 );
aBackground.SetGreen( ( aBackground.GetGreen() + aWhite.GetGreen() ) / 2 ); aBackground.SetGreen( ( aBackground.GetGreen() + aWhite.GetGreen() ) / 2 );
aBackground.SetBlue( ( aBackground.GetBlue() + aWhite.GetBlue() ) / 2 ); aBackground.SetBlue( ( aBackground.GetBlue() + aWhite.GetBlue() ) / 2 );
@@ -131,19 +131,19 @@ namespace toolkit
sal_Int32 nBackgroundLuminance = Color( nBackgroundColor ).GetLuminance(); sal_Int32 nBackgroundLuminance = Color( nBackgroundColor ).GetLuminance();
sal_Int32 nWhiteLuminance = COL_WHITE.GetLuminance(); sal_Int32 nWhiteLuminance = COL_WHITE.GetLuminance();
Color aLightShadow( nBackgroundColor ); Color aLightShadow = Color( nBackgroundColor );
aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) ); aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
aStyleSettings.SetLightBorderColor( aLightShadow ); aStyleSettings.SetLightBorderColor( aLightShadow );
Color aLight( nBackgroundColor ); Color aLight = Color( nBackgroundColor );
aLight.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) ); aLight.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
aStyleSettings.SetLightColor( aLight ); aStyleSettings.SetLightColor( aLight );
Color aShadow( nBackgroundColor ); Color aShadow = Color( nBackgroundColor );
aShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 1 / 3 ) ); aShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 1 / 3 ) );
aStyleSettings.SetShadowColor( aShadow ); aStyleSettings.SetShadowColor( aShadow );
Color aDarkShadow( nBackgroundColor ); Color aDarkShadow = Color( nBackgroundColor );
aDarkShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 2 / 3 ) ); aDarkShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 2 / 3 ) );
aStyleSettings.SetDarkShadowColor( aDarkShadow ); aStyleSettings.SetDarkShadowColor( aDarkShadow );
} }
@@ -154,8 +154,8 @@ namespace toolkit
Any getButtonLikeFaceColor( const vcl::Window* _pWindow ) Any getButtonLikeFaceColor( const vcl::Window* _pWindow )
{ {
sal_Int32 nBackgroundColor = _pWindow->GetSettings().GetStyleSettings().GetFaceColor().GetColor(); Color nBackgroundColor = _pWindow->GetSettings().GetStyleSettings().GetFaceColor();
return makeAny( nBackgroundColor ); return makeAny( sal_Int32(nBackgroundColor) );
} }
static void adjustBooleanWindowStyle( const Any& _rValue, vcl::Window* _pWindow, WinBits _nBits, bool _bInverseSemantics ) static void adjustBooleanWindowStyle( const Any& _rValue, vcl::Window* _pWindow, WinBits _nBits, bool _bInverseSemantics )
@@ -2394,7 +2394,7 @@ void SAL_CALL VCLXDialog::setProperty(
} }
else if ( bVoid || !xGraphic.is() ) else if ( bVoid || !xGraphic.is() )
{ {
Color aColor = pDialog->GetControlBackground().GetColor(); Color aColor = pDialog->GetControlBackground();
if ( aColor == COL_AUTO ) if ( aColor == COL_AUTO )
aColor = pDialog->GetSettings().GetStyleSettings().GetDialogColor(); aColor = pDialog->GetSettings().GetStyleSettings().GetDialogColor();
@@ -2551,7 +2551,7 @@ void SAL_CALL VCLXMultiPage::setProperty(
} }
else if ( bVoid || !xGraphic.is() ) else if ( bVoid || !xGraphic.is() )
{ {
Color aColor = pTabControl->GetControlBackground().GetColor(); Color aColor = pTabControl->GetControlBackground();
if ( aColor == COL_AUTO ) if ( aColor == COL_AUTO )
aColor = pTabControl->GetSettings().GetStyleSettings().GetDialogColor(); aColor = pTabControl->GetSettings().GetStyleSettings().GetDialogColor();
@@ -2776,7 +2776,7 @@ void SAL_CALL VCLXTabPage::setProperty(
} }
else if ( bVoid || !xGraphic.is() ) else if ( bVoid || !xGraphic.is() )
{ {
Color aColor = pTabPage->GetControlBackground().GetColor(); Color aColor = pTabPage->GetControlBackground();
if ( aColor == COL_AUTO ) if ( aColor == COL_AUTO )
aColor = pTabPage->GetSettings().GetStyleSettings().GetDialogColor(); aColor = pTabPage->GetSettings().GetStyleSettings().GetDialogColor();

View File

@@ -303,11 +303,11 @@ namespace toolkit
OContextEntryGuard aGuard( this ); OContextEntryGuard aGuard( this );
VclPtr< vcl::Window > pWindow = implGetWindow(); VclPtr< vcl::Window > pWindow = implGetWindow();
sal_Int32 nColor = 0; Color nColor;
if ( pWindow ) if ( pWindow )
{ {
if ( pWindow->IsControlForeground() ) if ( pWindow->IsControlForeground() )
nColor = pWindow->GetControlForeground().GetColor(); nColor = pWindow->GetControlForeground();
else else
{ {
vcl::Font aFont; vcl::Font aFont;
@@ -315,10 +315,10 @@ namespace toolkit
aFont = pWindow->GetControlFont(); aFont = pWindow->GetControlFont();
else else
aFont = pWindow->GetFont(); aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor(); nColor = aFont.GetColor();
} }
} }
return nColor; return sal_Int32(nColor);
} }
@@ -329,16 +329,16 @@ namespace toolkit
OContextEntryGuard aGuard( this ); OContextEntryGuard aGuard( this );
VclPtr< vcl::Window > pWindow = implGetWindow(); VclPtr< vcl::Window > pWindow = implGetWindow();
sal_Int32 nColor = 0; Color nColor;
if ( pWindow ) if ( pWindow )
{ {
if ( pWindow->IsControlBackground() ) if ( pWindow->IsControlBackground() )
nColor = pWindow->GetControlBackground().GetColor(); nColor = pWindow->GetControlBackground();
else else
nColor = pWindow->GetBackground().GetColor().GetColor(); nColor = pWindow->GetBackground().GetColor();
} }
return nColor; return sal_Int32(nColor);
} }