summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx3
-rw-r--r--accessibility/source/standard/vclxaccessibleedit.cxx2
-rw-r--r--editeng/source/items/frmitems.cxx9
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx2
-rw-r--r--sc/source/filter/excel/xechart.cxx5
5 files changed, 8 insertions, 13 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index a4de8a27c67a..4c5309795867 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -2352,8 +2352,7 @@ void Document::disposeParagraphs()
// static
css::uno::Any Document::mapFontColor(::Color const & rColor)
{
- return css::uno::Any(
- static_cast< ::sal_Int32 >(COLORDATA_RGB(rColor.GetColor())));
+ return css::uno::makeAny(rColor.GetRGBColor());
// FIXME keep transparency?
}
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx
index 17146ae2518c..f1959b9dc980 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -319,7 +319,7 @@ Sequence< PropertyValue > VCLXAccessibleEdit::getCharacterAttributes( sal_Int32
{
if (aValue.Name == "CharColor")
{
- aValue.Value <<= static_cast< sal_Int32 >(COLORDATA_RGB(pFontColor->GetColor().GetColor()));
+ aValue.Value <<= pFontColor->GetColor().GetRGBColor();
break;
}
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 040f1a53fe09..5d3f3370bbde 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3243,15 +3243,14 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_BACK_COLOR:
case MID_BACK_COLOR_R_G_B:
{
- sal_Int32 nCol = 0;
- if ( !( rVal >>= nCol ) )
+ Color aNewCol;
+ if ( !( rVal >>= aNewCol ) )
return false;
if(MID_BACK_COLOR_R_G_B == nMemberId)
{
- nCol = COLORDATA_RGB( nCol );
- nCol += aColor.GetColor() & 0xff000000;
+ aNewCol.SetTransparency(aColor.GetTransparency());
}
- aColor = Color( nCol );
+ aColor = aNewCol;
}
break;
case MID_BACK_COLOR_TRANSPARENCY:
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 327e666fde9d..28ec385b2f3e 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -224,7 +224,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
// the color value is given as #rrggbb and used the hexadecimal system!!
sal_uInt32 nColor = aColor.copy( 1 ).toUInt32( 16 );
- m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
+ m_pImages->aMaskColor = Color( nColor );
}
}
break;
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index b0d0837214f9..e864d192e617 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -706,10 +706,7 @@ sal_uInt32 XclExpChEscherFormat::RegisterColor( sal_uInt16 nPropId )
if( maData.mxEscherSet && maData.mxEscherSet->GetOpt( nPropId, nBGRValue ) )
{
// swap red and blue
- Color aColor( Color(
- COLORDATA_BLUE( nBGRValue ),
- COLORDATA_GREEN( nBGRValue ),
- COLORDATA_RED( nBGRValue ) ) );
+ Color aColor( nBGRValue & 0xff, (nBGRValue >> 8) & 0xff, (nBGRValue >> 16) & 0xff );
return GetPalette().InsertColor( aColor, EXC_COLOR_CHARTAREA );
}
return XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWBACK );