summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-08 10:44:40 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-08 11:23:45 +0200
commitcfc64c7e895d990023400573d8416ce80cf0da29 (patch)
tree1483f50e7717b4cb1c24341c668ac293fd1ff033 /writerfilter
parentb94b1fe936ddc4a9b86fbeb9c9c6ab0fca52f0bc (diff)
CharBrd 9.2: DOCX filters
- Modify HasTextItem() method to able to get character attributes during export. (in this case RES_CHARTR_SHADOW) - Only one side of the border can be exported. Selecting order: (top, left, bottom, right) - During import set all four side and use the Word default shadow type (back, bottom-right, border width wide) Change-Id: I3e1e27a2ef2d77b397f2ca8efe578e09271bcf8c
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx27
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx9
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx9
3 files changed, 44 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 0dc46675992f..4652a40d3636 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2933,10 +2933,35 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
GetStyleSheetTable()->sprm( rSprm );
break;
+ case NS_ooxml::LN_EG_RPrBase_bdr:
+ {
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if( pProperties.get())
+ {
+ BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
+ pProperties->resolve(*pBorderHandler);
+
+ rContext->Insert( PROP_CHAR_TOP_BORDER, uno::makeAny( pBorderHandler->getBorderLine()));
+ rContext->Insert( PROP_CHAR_BOTTOM_BORDER, uno::makeAny( pBorderHandler->getBorderLine()));
+ rContext->Insert( PROP_CHAR_LEFT_BORDER, uno::makeAny( pBorderHandler->getBorderLine()));
+ rContext->Insert( PROP_CHAR_RIGHT_BORDER, uno::makeAny( pBorderHandler->getBorderLine()));
+
+ rContext->Insert( PROP_CHAR_TOP_BORDER_DISTANCE, uno::makeAny( pBorderHandler->getLineDistance()));
+ rContext->Insert( PROP_CHAR_BOTTOM_BORDER_DISTANCE, uno::makeAny( pBorderHandler->getLineDistance()));
+ rContext->Insert( PROP_CHAR_LEFT_BORDER_DISTANCE, uno::makeAny( pBorderHandler->getLineDistance()));
+ rContext->Insert( PROP_CHAR_RIGHT_BORDER_DISTANCE, uno::makeAny( pBorderHandler->getLineDistance()));
+
+ if( pBorderHandler->getShadow() )
+ {
+ table::ShadowFormat aFormat = rContext->getShadowFromBorder(pBorderHandler->getBorderLine());
+ rContext->Insert(PROP_CHAR_SHADOW_FORMAT, uno::makeAny(aFormat));
+ }
+ }
+ }
+ break;
case NS_ooxml::LN_CT_PPr_sectPr:
case NS_ooxml::LN_EG_RPrBase_color:
case NS_ooxml::LN_EG_RPrBase_rFonts:
- case NS_ooxml::LN_EG_RPrBase_bdr:
case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
case NS_ooxml::LN_EG_RPrBase_u:
case NS_ooxml::LN_EG_RPrBase_lang:
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 27ebabc0a8d7..598f97e64c5f 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -105,6 +105,15 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
case PROP_CHAR_ROTATION: sName = "CharRotation"; break;
case PROP_CHAR_ROTATION_IS_FIT_TO_LINE: sName = "CharRotationIsFitToLine"; break;
case PROP_CHAR_FLASH: sName = "CharFlash"; break;
+ case PROP_CHAR_LEFT_BORDER: sName = "CharLeftBorder";break;
+ case PROP_CHAR_RIGHT_BORDER: sName = "CharRightBorder";break;
+ case PROP_CHAR_TOP_BORDER: sName = "CharTopBorder";break;
+ case PROP_CHAR_BOTTOM_BORDER: sName = "CharBottomBorder";break;
+ case PROP_CHAR_LEFT_BORDER_DISTANCE: sName = "CharLeftBorderDistance"; break;
+ case PROP_CHAR_RIGHT_BORDER_DISTANCE: sName = "CharRightBorderDistance"; break;
+ 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_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 f35cdfdc0f00..059fc5e9f827 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -60,6 +60,14 @@ enum PropertyIds
,PROP_CHAR_COMBINE_PREFIX
,PROP_CHAR_COMBINE_SUFFIX
,PROP_CHAR_CONTOURED
+ ,PROP_CHAR_LEFT_BORDER
+ ,PROP_CHAR_RIGHT_BORDER
+ ,PROP_CHAR_TOP_BORDER
+ ,PROP_CHAR_BOTTOM_BORDER
+ ,PROP_CHAR_LEFT_BORDER_DISTANCE
+ ,PROP_CHAR_RIGHT_BORDER_DISTANCE
+ ,PROP_CHAR_TOP_BORDER_DISTANCE
+ ,PROP_CHAR_BOTTOM_BORDER_DISTANCE
,PROP_CHAR_EMPHASIS
,PROP_CHAR_ESCAPEMENT
,PROP_CHAR_ESCAPEMENT_HEIGHT
@@ -95,6 +103,7 @@ enum PropertyIds
,PROP_CHAR_RELIEF
,PROP_CHAR_ROTATION
,PROP_CHAR_ROTATION_IS_FIT_TO_LINE
+ ,PROP_CHAR_SHADOW_FORMAT
,PROP_CHAR_SCALE_WIDTH
,PROP_CHAR_SHADOWED
,PROP_CHAR_STRIKEOUT