diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-18 13:41:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-18 16:03:49 +0100 |
commit | 3c058338fbd28fba3664651b9ecc7cfefa046ec3 (patch) | |
tree | 549dda55c23ab34d4d65370fe5ab4e5f8e96be3b /oox | |
parent | db850d677afe6f083c2d4f1789c9e219bc09e0eb (diff) |
DOCX drawingML import: handle paragraph top margin
Change-Id: I4a69647af5b068c35bea0a5f9665a5e68eb76293
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textparagraphpropertiescontext.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index aca1d787ba92..36860f08c02c 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -23,6 +23,8 @@ #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> +#include <svx/unopage.hxx> + #include "oox/drawingml/colorchoicecontext.hxx" #include "oox/drawingml/textcharacterpropertiescontext.hxx" #include "oox/drawingml/fillproperties.hxx" @@ -259,6 +261,19 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl } } break; + case OOX_TOKEN( doc, spacing ): + { + OptValue<OUString> oBefore = rAttribs.getString(OOX_TOKEN(doc, before)); + if (oBefore.has()) + { + TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin(); + rSpacing.nValue = TWIPS_TO_MM(oBefore.get().toInt32()); + rSpacing.bHasValue = true; + } + } + break; + default: + SAL_WARN("oox", "TextParagraphPropertiesContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); } return this; } |