Kaydet (Commit) 5c57c9b6 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

writerfilter: remove code duplication

Change-Id: I55dfeb9b0505bb5f46d5bcf98b10bd2ba7b187f9
üst f2cdf884
...@@ -240,20 +240,6 @@ sal_Int32 convertEMUToMM100(sal_Int32 _t) ...@@ -240,20 +240,6 @@ sal_Int32 convertEMUToMM100(sal_Int32 _t)
return _t / 360; return _t / 360;
} }
/*-------------------------------------------------------------------------
contains a color from 0xTTRRGGBB to 0xTTRRGGBB
-----------------------------------------------------------------------*/
sal_Int32 ConvertColor(sal_Int32 nWordColor)
{
sal_uInt8
r(static_cast<sal_uInt8>(nWordColor&0xFF)),
g(static_cast<sal_uInt8>(((nWordColor)>>8)&0xFF)),
b(static_cast<sal_uInt8>((nWordColor>>16)&0xFF)),
t(static_cast<sal_uInt8>((nWordColor>>24)&0xFF));
sal_Int32 nRet = (t<<24) + (r<<16) + (g<<8) + b;
return nRet;
}
sal_Int16 convertTableJustification( sal_Int32 nIntValue ) sal_Int16 convertTableJustification( sal_Int32 nIntValue )
{ {
sal_Int16 nOrient = text::HoriOrientation::LEFT_AND_WIDTH; sal_Int16 nOrient = text::HoriOrientation::LEFT_AND_WIDTH;
......
...@@ -46,7 +46,6 @@ namespace ConversionHelper{ ...@@ -46,7 +46,6 @@ namespace ConversionHelper{
sal_Int32 convertTwipToMM100(sal_Int32 _t); sal_Int32 convertTwipToMM100(sal_Int32 _t);
// probably the most useless unit in the world - English Metric Units (EMU) 360 000 EMU == 1cm // probably the most useless unit in the world - English Metric Units (EMU) 360 000 EMU == 1cm
sal_Int32 convertEMUToMM100(sal_Int32 _t); sal_Int32 convertEMUToMM100(sal_Int32 _t);
sal_Int32 ConvertColor(sal_Int32 nWordColor );
sal_Int16 convertTableJustification( sal_Int32 nIntValue ); sal_Int16 convertTableJustification( sal_Int32 nIntValue );
sal_Int16 ConvertNumberingType(sal_Int32 nFmt); sal_Int16 ConvertNumberingType(sal_Int32 nFmt);
......
...@@ -1709,8 +1709,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType ...@@ -1709,8 +1709,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
// the following are not part of the official documentation // the following are not part of the official documentation
case 0x6870: //TxtForeColor case 0x6870: //TxtForeColor
{ {
//contains a color as 0xTTRRGGBB while SO uses 0xTTRRGGBB sal_Int32 nColor = msfilter::util::BGRToRGB(nIntValue);
sal_Int32 nColor = ConversionHelper::ConvertColor(nIntValue);
rContext->Insert(PROP_CHAR_COLOR, uno::makeAny( nColor ) ); rContext->Insert(PROP_CHAR_COLOR, uno::makeAny( nColor ) );
} }
break; break;
......
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