Kaydet (Commit) 3c058338 authored tarafından Miklos Vajna's avatar Miklos Vajna

DOCX drawingML import: handle paragraph top margin

Change-Id: I4a69647af5b068c35bea0a5f9665a5e68eb76293
üst db850d67
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp>
#include <svx/unopage.hxx>
#include "oox/drawingml/colorchoicecontext.hxx" #include "oox/drawingml/colorchoicecontext.hxx"
#include "oox/drawingml/textcharacterpropertiescontext.hxx" #include "oox/drawingml/textcharacterpropertiescontext.hxx"
#include "oox/drawingml/fillproperties.hxx" #include "oox/drawingml/fillproperties.hxx"
...@@ -259,6 +261,19 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -259,6 +261,19 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
} }
} }
break; 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; return this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment