summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-09-10 11:41:11 +0300
committerJustin Luth <justin_luth@sil.org>2015-10-19 04:35:55 +0000
commit664197d95becd516c3dac25a50439078ba61e051 (patch)
tree85199c219b30c973a1c151b360c490fcfd16bce3 /writerfilter
parent51df957e1a40d2f3511345c1600c05dd35f34b6b (diff)
tdf#36117 .docx preserve page vertical alignment after RT
Change-Id: I90174f7a98e9bd01f45ee668f127356ff3e0e4ed Reviewed-on: https://gerrit.libreoffice.org/18481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx25
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx1
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx1
3 files changed, 27 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 34b84654e929..4132d825d0bc 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -31,6 +31,7 @@
#include <oox/drawingml/drawingmltypes.hxx>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -2305,7 +2306,31 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
rContext->Insert(PROP_MIRROR_INDENTS, uno::makeAny( nIntValue != 0 ), true, PARA_GRAB_BAG);
break;
case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported
+ break;
case NS_ooxml::LN_EG_SectPrContents_vAlign:
+ {
+ OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
+ if( pSectionContext )
+ {
+ drawing::TextVerticalAdjust nVA = drawing::TextVerticalAdjust_TOP;
+ switch( nIntValue )
+ {
+ case NS_ooxml::LN_Value_ST_VerticalJc_center: //92367
+ nVA = drawing::TextVerticalAdjust_CENTER;
+ break;
+ case NS_ooxml::LN_Value_ST_VerticalJc_both: //92368 - justify
+ nVA = drawing::TextVerticalAdjust_BLOCK;
+ break;
+ case NS_ooxml::LN_Value_ST_VerticalJc_bottom: //92369
+ nVA = drawing::TextVerticalAdjust_BOTTOM;
+ break;
+ default:
+ break;
+ }
+ pSectionContext->Insert( PROP_TEXT_VERTICAL_ADJUST, uno::makeAny( nVA ), true, PARA_GRAB_BAG );
+ }
+ }
+ break;
case NS_ooxml::LN_EG_RPrBase_fitText:
break;
case NS_ooxml::LN_ffdata:
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index e8b85d745432..426987fb635c 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -277,6 +277,7 @@ OUString getPropertyName( PropertyIds eId )
case PROP_WIDTH_TYPE : sName = "WidthType"; break;
case PROP_TBL_LOOK : sName = "TblLook"; break;
case PROP_TEXT_RANGE: sName = "TextRange"; break;
+ case PROP_TEXT_VERTICAL_ADJUST : sName = "TextVerticalAdjust"; break;
case PROP_SERVICE_CHAR_STYLE : sName = "com.sun.star.style.CharacterStyle"; break;
case PROP_SERVICE_PARA_STYLE : sName = "com.sun.star.style.ParagraphStyle"; break;
case PROP_CHARACTER_STYLES : sName = "CharacterStyles"; break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 75a2a9b70ca0..cf3abe89ce97 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -286,6 +286,7 @@ enum PropertyIds
,PROP_TEXT
,PROP_TEXT_COLUMNS
,PROP_TEXT_RANGE
+ ,PROP_TEXT_VERTICAL_ADJUST
,PROP_TITLE
,PROP_TOKEN_CHAPTER_INFO
,PROP_TOKEN_HYPERLINK_END