summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/textparagraphpropertiescontext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/textparagraphpropertiescontext.cxx')
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 4ec6b655fbeb..aca1d787ba92 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
#include "oox/drawingml/colorchoicecontext.hxx"
#include "oox/drawingml/textcharacterpropertiescontext.hxx"
@@ -153,6 +154,9 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
sal_Int16 nLevel = mrTextParagraphProperties.getLevel();
rPropertyMap[ PROP_NumberingLevel ] <<= nLevel;
rPropertyMap[ PROP_NumberingIsNumber ] <<= sal_True;
+
+ if( mrTextParagraphProperties.getParaAdjust() )
+ rPropertyMap[ PROP_ParaAdjust ] <<= mrTextParagraphProperties.getParaAdjust().get();
}
// --------------------------------------------------------------------
@@ -238,6 +242,23 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
return new TextTabStopListContext( *this, maTabList );
case A_TOKEN( defRPr ): // CT_TextCharacterProperties
return new TextCharacterPropertiesContext( *this, rAttribs, mrTextParagraphProperties.getTextCharacterProperties() );
+ case OOX_TOKEN( doc, jc ):
+ {
+ OptValue< OUString > oParaAdjust = rAttribs.getString( OOX_TOKEN(doc, val) );
+ if( oParaAdjust.has() && !oParaAdjust.get().isEmpty() )
+ {
+ const OUString& sParaAdjust = oParaAdjust.get();
+ if( sParaAdjust == "left" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_LEFT);
+ else if ( sParaAdjust == "right" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_RIGHT);
+ else if ( sParaAdjust == "center" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_CENTER);
+ else if ( sParaAdjust == "both" )
+ mrTextParagraphProperties.setParaAdjust(ParagraphAdjust_BLOCK);
+ }
+ }
+ break;
}
return this;
}