summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx12
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx12
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/items/textitem.cxx15
-rw-r--r--editeng/source/uno/unonrule.cxx2
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx10
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx9
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--filter/source/msfilter/svdfppt.cxx9
-rw-r--r--filter/source/msfilter/util.cxx6
-rw-r--r--forms/source/component/Grid.cxx4
-rw-r--r--forms/source/component/formcontrolfont.cxx8
-rw-r--r--forms/source/component/navigationbar.cxx8
-rw-r--r--forms/source/inc/formcontrolfont.hxx9
-rw-r--r--forms/source/richtext/richtextcontrol.cxx4
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx6
21 files changed, 66 insertions, 74 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 90859aac7a73..cbb1d51bb224 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1143,12 +1143,12 @@ namespace accessibility
sal_Int32 SAL_CALL AccessibleEditableTextPara::getBackground( )
{
// #104444# Added to XAccessibleComponent interface
- Color aColor( Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor() );
+ Color aColor( Application::GetSettings().GetStyleSettings().GetWindowColor() );
// the background is transparent
aColor.SetTransparency( 0xFF);
- return static_cast<sal_Int32>( aColor.GetColor() );
+ return static_cast<sal_Int32>( aColor );
}
// XAccessibleText
@@ -1470,7 +1470,7 @@ namespace accessibility
if (rRes.Name == "CharColor")
{
uno::Any &anyChar = rRes.Value;
- sal_uInt32 crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
+ Color crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
if (COL_AUTO == crChar )
{
uno::Reference< css::accessibility::XAccessibleComponent > xComponent(mxParent,uno::UNO_QUERY);
@@ -1485,7 +1485,7 @@ namespace accessibility
else
{
Color cr(xComponent->getBackground());
- crChar = sal_uInt32(cr.IsDark() ? COL_WHITE : COL_BLACK);
+ crChar = cr.IsDark() ? COL_WHITE : COL_BLACK;
anyChar <<= crChar;
}
}
@@ -1501,7 +1501,7 @@ namespace accessibility
if (rRes.Name == "CharUnderlineColor")
{
uno::Any &anyCharUnderLine = rRes.Value;
- sal_uInt32 crCharUnderLine = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved));
+ Color crCharUnderLine = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved));
if (COL_AUTO == crCharUnderLine )
{
uno::Reference< css::accessibility::XAccessibleComponent > xComponent(mxParent,uno::UNO_QUERY);
@@ -1516,7 +1516,7 @@ namespace accessibility
else
{
Color cr(xComponent->getBackground());
- crCharUnderLine = sal_uInt32(cr.IsDark() ? COL_WHITE : COL_BLACK);
+ crCharUnderLine = cr.IsDark() ? COL_WHITE : COL_BLACK;
anyCharUnderLine <<= crCharUnderLine;
}
}
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 5ab8259f92a7..38bacff7245b 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -334,12 +334,12 @@ namespace accessibility
{
// #104444# Added to XAccessibleComponent interface
- Color aColor( Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor() );
+ Color aColor( Application::GetSettings().GetStyleSettings().GetWindowColor() );
// the background is transparent
aColor.SetTransparency( 0xFF);
- return static_cast<sal_Int32>( aColor.GetColor() );
+ return static_cast<sal_Int32>( aColor );
}
OUString SAL_CALL AccessibleImageBullet::getImplementationName()
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index cbb8c2b3d3d9..5209c5b908dc 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3157,17 +3157,17 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
#if OSL_DEBUG_LEVEL > 2
if ( rTextPortion.GetKind() == PORTIONKIND_HYPHENATOR )
{
- aTmpFont.SetFillColor( COL_LIGHTGRAY );
+ aTmpFont.SetFillCOL_LIGHTGRAY );
aTmpFont.SetTransparent( sal_False );
}
if ( rTextPortion.GetRightToLeft() )
{
- aTmpFont.SetFillColor( COL_LIGHTGRAY );
+ aTmpFont.SetFillCOL_LIGHTGRAY );
aTmpFont.SetTransparent( sal_False );
}
else if ( GetI18NScriptType( EditPaM( pPortion->GetNode(), nIndex+1 ) ) == i18n::ScriptType::COMPLEX )
{
- aTmpFont.SetFillColor( COL_LIGHTCYAN );
+ aTmpFont.SetFillCOL_LIGHTCYAN );
aTmpFont.SetTransparent( sal_False );
}
#endif
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index f7a73d190229..46fac60bb578 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1080,7 +1080,7 @@ bool SvxShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
aShadow.Location = eSet;
aShadow.ShadowWidth = bConvert ? convertTwipToMm100(nWidth) : nWidth;
aShadow.IsTransparent = aShadowColor.GetTransparency() > 0;
- aShadow.Color = aShadowColor.GetColor();
+ aShadow.Color = sal_Int32(aShadowColor);
sal_Int8 nTransparence = rtl::math::round(float(aShadowColor.GetTransparency() * 100) / 255);
@@ -1132,7 +1132,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
Color aColor(aShadow.Color);
aColor.SetTransparency(rtl::math::round(float(nTransparence * 255) / 100));
- aShadow.Color = aColor.GetColor();
+ aShadow.Color = sal_Int32(aColor);
}
break;
}
@@ -1429,7 +1429,7 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, bool bC
table::BorderLine2 aLine;
if(pLine)
{
- aLine.Color = pLine->GetColor().GetColor() ;
+ aLine.Color = sal_Int32(pLine->GetColor());
aLine.InnerLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetInWidth() ): pLine->GetInWidth() );
aLine.OuterLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetOutWidth()): pLine->GetOutWidth() );
aLine.LineDistance = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetDistance()): pLine->GetDistance() );
@@ -2815,7 +2815,7 @@ bool SvxLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemId ) const
{
switch ( nMemId )
{
- case MID_FG_COLOR: rVal <<= sal_Int32(pLine->GetColor().GetColor()); break;
+ case MID_FG_COLOR: rVal <<= pLine->GetColor(); break;
case MID_OUTER_WIDTH: rVal <<= sal_Int32(pLine->GetOutWidth()); break;
case MID_INNER_WIDTH: rVal <<= sal_Int32(pLine->GetInWidth( )); break;
case MID_DISTANCE: rVal <<= sal_Int32(pLine->GetDistance()); break;
@@ -3180,10 +3180,10 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
switch( nMemberId)
{
case MID_BACK_COLOR:
- rVal <<= static_cast<sal_Int32>( aColor.GetColor() );
+ rVal <<= aColor;
break;
case MID_BACK_COLOR_R_G_B:
- rVal <<= static_cast<sal_Int32>( aColor.GetRGBColor() );
+ rVal <<= aColor.GetRGBColor();
break;
case MID_BACK_COLOR_TRANSPARENCY:
rVal <<= SvxBrushItem::TransparencyToPercent(aColor.GetTransparency());
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index c65c4e5f5e02..6b8a322a704c 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -295,7 +295,7 @@ void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverte
WritePair( rStream, aGraphicSize );
Color nTempColor = nBulletColor;
- if(COL_AUTO == nBulletColor.GetColor())
+ if(COL_AUTO == nBulletColor)
nTempColor = COL_BLACK;
WriteColor( rStream, nTempColor );
rStream.WriteUInt16( nBulletRelSize );
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ed64f8392891..7ef82e39ec98 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1168,7 +1168,7 @@ bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= static_cast<sal_Int16>(GetValue());
break;
case MID_TL_COLOR:
- rVal <<= static_cast<sal_Int32>( mColor.GetColor() );
+ rVal <<= mColor;
break;
case MID_TL_HASCOLOR:
rVal <<= !mColor.GetTransparency();
@@ -1628,7 +1628,7 @@ bool SvxBackgroundColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) c
}
default:
{
- rVal <<= static_cast<sal_Int32>(aColor.GetColor());
+ rVal <<= aColor;
break;
}
}
@@ -1703,18 +1703,13 @@ bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
- rVal <<= static_cast<sal_Int32>(mColor.GetColor());
+ rVal <<= mColor;
return true;
}
bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
- sal_Int32 nColor = 0;
- if(!(rVal >>= nColor))
- return false;
-
- mColor = nColor;
- return true;
+ return (rVal >>= mColor);
}
SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
@@ -1725,7 +1720,7 @@ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
if( VERSION_USEAUTOCOLOR == nItemVersion &&
- COL_AUTO == mColor.GetColor() )
+ COL_AUTO == mColor )
WriteColor( rStrm, COL_BLACK );
else
WriteColor( rStrm, mColor );
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 2d16b96242b4..84ac95dab8b1 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -252,7 +252,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
pArray[nIdx++] = beans::PropertyValue("SymbolTextDistance", -1, aVal, beans::PropertyState_DIRECT_VALUE);
- aVal <<= static_cast<sal_Int32>(rFmt.GetBulletColor().GetColor());
+ aVal <<= rFmt.GetBulletColor();
pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_BULLET_COLOR, -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal <<= static_cast<sal_Int16>(rFmt.GetBulletRelSize());
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 025389b345c2..8640edb213f7 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -241,7 +241,7 @@ namespace pcr
SvxUnderlineItem aUnderlineItem(eUnderline,CFID_UNDERLINE);
aUnderlineItem.SetColor(Color(nTextLineColor));
- SvxColorItem aSvxColorItem(nColor32,CFID_CHARCOLOR);
+ SvxColorItem aSvxColorItem(Color(nColor32),CFID_CHARCOLOR);
SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE);
// the 2 CJK props
@@ -372,10 +372,10 @@ namespace pcr
lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_UNDERLINE,makeAny(nUnderline));
// the text line color is transported in this item, too
- sal_Int32 nColor = rUnderlineItem.GetColor().GetColor();
+ Color nColor = rUnderlineItem.GetColor();
Any aUnoColor;
- if (COL_AUTO != static_cast<sal_uInt32>(nColor))
+ if (COL_AUTO != nColor)
aUnoColor <<= nColor;
lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTLINECOLOR, aUnoColor );
@@ -415,10 +415,10 @@ namespace pcr
const SvxColorItem& rColorItem =
static_cast<const SvxColorItem&>(_rSet.Get(CFID_CHARCOLOR));
- sal_Int32 nColor = rColorItem.GetValue().GetColor();
+ Color nColor = rColorItem.GetValue();
Any aUnoColor;
- if (COL_AUTO != static_cast<sal_uInt32>(nColor))
+ if (COL_AUTO != nColor)
aUnoColor <<= nColor;
lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTCOLOR, aUnoColor );
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 40fce9868229..a24eb5cf1868 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2847,9 +2847,8 @@ namespace pcr
bool FormComponentPropertyHandler::impl_dialogColorChooser_throw( sal_Int32 _nColorPropertyId, Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
- sal_Int32 nColor = 0;
- OSL_VERIFY( impl_getPropertyValue_throw( impl_getPropertyNameFromId_nothrow( _nColorPropertyId ) ) >>= nColor );
- ::Color aColor( nColor );
+ ::Color aColor;
+ OSL_VERIFY( impl_getPropertyValue_throw( impl_getPropertyNameFromId_nothrow( _nColorPropertyId ) ) >>= aColor );
SvColorDialog aColorDlg( impl_getDefaultDialogParent_nothrow() );
aColorDlg.SetColor( aColor );
@@ -2857,9 +2856,7 @@ namespace pcr
if ( !aColorDlg.Execute() )
return false;
- aColor = aColorDlg.GetColor();
- nColor = aColor.GetColor();
- _out_rNewValue <<= nColor;
+ _out_rNewValue <<= aColorDlg.GetColor();
return true;
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 2fdaf166fd27..4bd7c2055d47 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -657,7 +657,7 @@ namespace pcr
css::util::Color nColor = sal_uInt32(COL_TRANSPARENT);
if (_rValue.hasValue())
_rValue >>= nColor;
- getTypedControlWindow()->SelectEntry(::Color(sal_uInt32(nColor)));
+ getTypedControlWindow()->SelectEntry(nColor);
}
Any SAL_CALL OColorControl::getValue()
@@ -666,7 +666,7 @@ namespace pcr
::Color aRgbCol = getTypedControlWindow()->GetSelectEntryColor();
if (aRgbCol == COL_TRANSPARENT)
return aPropValue;
- aPropValue <<= static_cast<css::util::Color>(aRgbCol.GetColor());
+ aPropValue <<= aRgbCol;
return aPropValue;
}
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index a0c6951312d7..d807d4ac0dc2 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1290,7 +1290,7 @@ bool Writer::Impl_writePageField( Rectangle& rTextBounds )
aBits.writeUB( 0, 1 ); // UseOutlines
mpTag->addBits( aBits );
- Color aColor( COL_BLACK );
+ Color aCOL_BLACK );
mpTag->addRGB( aColor );
mpTag->addString( "PageNumber" );
mpTag->addString( "XXX" );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 4c6abe080894..17d630742a5f 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -342,12 +342,12 @@ sal_uInt32 EscherPropertyContainer::GetGradientColor(
if ( nStartColor & 1 )
{
nIntensity = pGradient->StartIntensity;
- aColor = pGradient->StartColor;
+ aColor = Color(pGradient->StartColor);
}
else
{
nIntensity = pGradient->EndIntensity;
- aColor = pGradient->EndColor;
+ aColor = Color(pGradient->EndColor);
}
}
sal_uInt32 nRed = ( aColor.GetRed() * nIntensity ) / 100;
@@ -1479,7 +1479,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
Color aBackColor;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillColor" ) )
{
- aBackColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny), false );
+ aBackColor = Color(ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny), false ));
}
bool bFillBackground = false;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBackground", true ) )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5cf0b9f90d8b..794aa8a4a59b 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1379,7 +1379,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
else
aReadColor = pRead->GetPixelFromData(pScanlineRead, x).GetColor();
- if (aReadColor.GetColor() == 0)
+ if (aReadColor == Color(0))
aResult.SetPixel(y, x, aCol2);
else
aResult.SetPixel(y, x, aCol1);
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 32061a83a7c6..21b335dadf53 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7424,8 +7424,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{
eFS = css::drawing::FillStyle_SOLID;
Color aFillColor( pObj->GetMergedItem( XATTR_FILLCOLOR ).GetColorValue() );
- sal_Int32 nFillColor( aFillColor.GetColor() );
- xPropSet->setPropertyValue( "FillColor", Any( nFillColor ) );
+ xPropSet->setPropertyValue( "FillColor", makeAny( aFillColor ) );
}
break;
case drawing::FillStyle_GRADIENT :
@@ -7435,8 +7434,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
css::awt::Gradient aGradient;
aGradient.Style = aXGradient.GetGradientStyle();
- aGradient.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor().GetColor());
- aGradient.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor().GetColor());
+ aGradient.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor());
+ aGradient.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor());
aGradient.Angle = static_cast<short>(aXGradient.GetAngle());
aGradient.Border = aXGradient.GetBorder();
aGradient.XOffset = aXGradient.GetXOffset();
@@ -7503,7 +7502,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable > const
case drawing::LineStyle_SOLID :
{
Color aLineColor( pLine->GetMergedItem( XATTR_LINECOLOR ).GetColorValue() );
- aBorderLine.Color = aLineColor.GetColor();
+ aBorderLine.Color = sal_Int32(aLineColor);
// Avoid width = 0, the min value should be 1.
sal_Int32 nLineWidth = std::max(sal_Int32(1), pLine->GetMergedItem(XATTR_LINEWIDTH) .GetValue() / 4);
aBorderLine.LineWidth = static_cast< sal_Int16 >( nLineWidth );
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index f0e3694176bb..cdb885bd9449 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -126,11 +126,11 @@ sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cChar,
}
-OString ConvertColor( const Color &rColor, bool bAutoColor )
+OString ConvertColor( const Color & rColor, bool bAutoColor )
{
OString color( "auto" );
- if (bAutoColor && rColor.GetColor() == OOXML_COLOR_AUTO)
+ if (bAutoColor && rColor == OOXML_COLOR_AUTO)
return color;
if ( rColor != COL_AUTO )
@@ -1297,7 +1297,7 @@ sal_uInt16 GetBestIndex(const BitmapPalette& rPalette, const BitmapColor& rBitma
sal_uInt8 TransColToIco( const Color& rCol )
{
sal_uInt8 nCol = 0; // ->Auto
- switch( rCol.GetColor() )
+ switch( sal_uInt32(rCol) )
{
case sal_uInt32(COL_BLACK): nCol = 1; break;
case sal_uInt32(COL_BLUE): nCol = 9; break;
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index db2a5b11dba8..41aef4c83fe6 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -843,7 +843,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeBoolean(getBOOL(m_aTabStop));
_rxOutStream->writeBoolean(m_bNavigation);
if (nAnyMask & TEXTCOLOR)
- _rxOutStream->writeLong( getTextColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextColor()) );
// new since version 6
_rxOutStream << m_sHelpText;
if (nAnyMask & FONTDESCRIPTOR)
@@ -965,7 +965,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
if (nAnyMask & TEXTCOLOR)
{
sal_Int32 nValue = _rxInStream->readLong();
- setTextColor( nValue );
+ setTextColor( ::Color(nValue) );
}
// new since version 6
if (nVersion > 5)
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index c23f598e3976..974f3984b202 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -170,17 +170,17 @@ namespace frm
}
- sal_Int32 FontControlModel::getTextColor( ) const
+ Color FontControlModel::getTextColor( ) const
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
m_aTextColor >>= nColor;
return nColor;
}
- sal_Int32 FontControlModel::getTextLineColor( ) const
+ Color FontControlModel::getTextLineColor( ) const
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
m_aTextLineColor >>= nColor;
return nColor;
}
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index 44133a8da799..99ac10ac19e8 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -218,11 +218,11 @@ namespace frm
}
if ( nNonVoids & PERSIST_TEXTCOLOR )
{
- _rxOutStream->writeLong( getTextColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextColor()) );
}
if ( nNonVoids & PERSIST_TEXTLINECOLOR )
{
- _rxOutStream->writeLong( getTextLineColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextLineColor()) );
}
}
@@ -276,12 +276,12 @@ namespace frm
m_aBackgroundColor.clear();
if ( nNonVoids & PERSIST_TEXTCOLOR )
- setTextColor( _rxInStream->readLong() );
+ setTextColor( ::Color(_rxInStream->readLong()) );
else
clearTextColor();
if ( nNonVoids & PERSIST_TEXTLINECOLOR )
- setTextLineColor( _rxInStream->readLong() );
+ setTextLineColor( ::Color(_rxInStream->readLong()) );
else
clearTextLineColor();
}
diff --git a/forms/source/inc/formcontrolfont.hxx b/forms/source/inc/formcontrolfont.hxx
index 67135d041a7f..5e4a49aae5a8 100644
--- a/forms/source/inc/formcontrolfont.hxx
+++ b/forms/source/inc/formcontrolfont.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <tools/color.hxx>
namespace cppu {
class OPropertySetHelper;
@@ -50,15 +51,15 @@ namespace frm
const css::awt::FontDescriptor& getFont() const { return m_aFont; }
void setFont( const css::awt::FontDescriptor& _rFont ) { m_aFont = _rFont; }
- void setTextColor( sal_Int32 _nColor ) { m_aTextColor <<= _nColor; }
+ void setTextColor( Color _nColor ) { m_aTextColor <<= _nColor; }
void clearTextColor( ) { m_aTextColor.clear(); }
bool hasTextColor( ) const { return m_aTextColor.hasValue(); }
- sal_Int32 getTextColor( ) const;
+ Color getTextColor( ) const;
- void setTextLineColor( sal_Int32 _nColor ) { m_aTextLineColor <<= _nColor; }
+ void setTextLineColor( Color _nColor ) { m_aTextLineColor <<= _nColor; }
void clearTextLineColor( ) { m_aTextLineColor.clear(); }
bool hasTextLineColor( ) const { return m_aTextLineColor.hasValue(); }
- sal_Int32 getTextLineColor( ) const;
+ Color getTextLineColor( ) const;
protected:
FontControlModel( bool _bToolkitCompatibleDefaults );
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 3939e1778160..16acff075a43 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -357,9 +357,9 @@ namespace frm
}
else
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
_rValue >>= nColor;
- pControl->SetBackgroundColor( Color( nColor ) );
+ pControl->SetBackgroundColor( nColor );
}
}
else if ( _rPropertyName == PROPERTY_HSCROLL )
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index e74d921a4b82..f7c569677899 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -271,7 +271,7 @@ namespace frm
bool bVoid = !_rValue.hasValue();
bool bBoolValue = false;
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
// TODO: more generic mechanisms for this (the grid control implementation,
// when used herein, will do the same stuff for lot of these)
@@ -346,11 +346,11 @@ namespace frm
if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
- aReturn <<= static_cast<sal_Int32>(pNavBar->GetControlBackground().GetColor());
+ aReturn <<= pNavBar->GetControlBackground();
}
else if ( _rPropertyName == PROPERTY_TEXTLINECOLOR )
{
- aReturn <<= static_cast<sal_Int32>(pNavBar->GetTextLineColor().GetColor());
+ aReturn <<= pNavBar->GetTextLineColor();
}
else if ( _rPropertyName == PROPERTY_ICONSIZE )
{