diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-29 10:24:53 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-29 11:27:34 +0200 |
commit | 8b949134441056a1455d67ddfdd7e0bc5f2ee682 (patch) | |
tree | ba258b0f7df5b3ae7b5fbc4cf484cebcf51f389a /writerfilter | |
parent | 1b0f6be2d06154f6ecab2f6ee930fa3c5a62f01d (diff) |
fdo#65403, fdo#65404 DOCX export/import of character highlight
Steps
-Add a new character attribute (RES_CHRATR_HIGHLIGHT)
-Get this character attribute via SwFont class just like
background
-If has highlight, then paint that, otherwise paint background
-Extend UNO API
-Implement DOCX export and import filter
Note: By now character highlight can't be set via UI.
It's a next step to add a highlight option.
Change-Id: I7f81e173744bf256891487f898d06dbf372a2f88
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.hxx | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 031993fd8839..1dfb58d4dc9d 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2011,8 +2011,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType case NS_sprm::LN_CHighlight: { sal_Int32 nColor = 0; - if(true ==( mbIsHighlightSet = getColorFromIndex(nIntValue, nColor))) - rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( nColor )); + if( (mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)) ) + rContext->Insert(PROP_CHAR_HIGHLIGHT, uno::makeAny( nColor )); else if (mnBackgroundColor) rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( mnBackgroundColor )); } diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 598f97e64c5f..f72b4d63be0f 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -114,6 +114,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_CHAR_TOP_BORDER_DISTANCE: sName = "CharTopBorderDistance";break; case PROP_CHAR_BOTTOM_BORDER_DISTANCE: sName = "CharBottomBorderDistance"; break; case PROP_CHAR_SHADOW_FORMAT: sName = "CharShadowFormat"; break; + case PROP_CHAR_HIGHLIGHT: sName = "CharHighLight"; break; case PROP_PARA_STYLE_NAME: sName = "ParaStyleName"; break; case PROP_PARA_ADJUST: sName = "ParaAdjust"; break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 059fc5e9f827..d6c25ffad73b 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -91,6 +91,7 @@ enum PropertyIds ,PROP_CHAR_HEIGHT_ASIAN ,PROP_CHAR_HEIGHT_COMPLEX ,PROP_CHAR_HIDDEN + ,PROP_CHAR_HIGHLIGHT ,PROP_CHAR_LOCALE ,PROP_CHAR_LOCALE_ASIAN ,PROP_CHAR_LOCALE_COMPLEX |