diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-24 12:49:20 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-27 08:30:19 +0100 |
commit | 5c57c9b6eb30265fe7312ff2b4d6ce7363cf2006 (patch) | |
tree | 70fe4214c1295bdd28492d29d54a46612639e1aa /writerfilter | |
parent | Remove visual noise from chart2 (diff) | |
download | core-5c57c9b6eb30265fe7312ff2b4d6ce7363cf2006.tar.gz core-5c57c9b6eb30265fe7312ff2b4d6ce7363cf2006.zip |
writerfilter: remove code duplication
Change-Id: I55dfeb9b0505bb5f46d5bcf98b10bd2ba7b187f9
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/ConversionHelper.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/dmapper/ConversionHelper.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 3 |
3 files changed, 1 insertions, 17 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index fb5071c68977..7f5e7602aecc 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -240,20 +240,6 @@ sal_Int32 convertEMUToMM100(sal_Int32 _t) 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 nOrient = text::HoriOrientation::LEFT_AND_WIDTH; diff --git a/writerfilter/source/dmapper/ConversionHelper.hxx b/writerfilter/source/dmapper/ConversionHelper.hxx index ff2fa7fecb1b..5b3b4fd3c3b5 100644 --- a/writerfilter/source/dmapper/ConversionHelper.hxx +++ b/writerfilter/source/dmapper/ConversionHelper.hxx @@ -46,7 +46,6 @@ namespace ConversionHelper{ sal_Int32 convertTwipToMM100(sal_Int32 _t); // probably the most useless unit in the world - English Metric Units (EMU) 360 000 EMU == 1cm sal_Int32 convertEMUToMM100(sal_Int32 _t); - sal_Int32 ConvertColor(sal_Int32 nWordColor ); sal_Int16 convertTableJustification( sal_Int32 nIntValue ); sal_Int16 ConvertNumberingType(sal_Int32 nFmt); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 7daac7745397..7a51057bcc42 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1709,8 +1709,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType // the following are not part of the official documentation case 0x6870: //TxtForeColor { - //contains a color as 0xTTRRGGBB while SO uses 0xTTRRGGBB - sal_Int32 nColor = ConversionHelper::ConvertColor(nIntValue); + sal_Int32 nColor = msfilter::util::BGRToRGB(nIntValue); rContext->Insert(PROP_CHAR_COLOR, uno::makeAny( nColor ) ); } break; |