Kaydet (Commit) 5564a31c authored tarafından Noel Grandin's avatar Noel Grandin

use less COLORDATA_RGB

part of removing ColorData

Change-Id: I5518cddeeefe66f70380367e1e3f78af0f3b5fbc
Reviewed-on: https://gerrit.libreoffice.org/50486Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9df0ce08
......@@ -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?
}
......
......@@ -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;
}
}
......
......@@ -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:
......
......@@ -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;
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment