summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133701.docxbin0 -> 12392 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx10
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
3 files changed, 18 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133701.docx b/sw/qa/extras/ooxmlexport/data/tdf133701.docx
new file mode 100644
index 000000000000..dfef409c268c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133701.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 877594f9f2f2..df0ee671c9c1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -42,6 +42,16 @@ protected:
}
};
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133701, "tdf133701.docx")
+{
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ if (!pXmlDocument)
+ return;
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "hSpace", "567");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "vSpace", "284");
+}
+
DECLARE_OOXMLEXPORT_TEST(testDmlShapeTitle, "dml-shape-title.docx")
{
CPPUNIT_ASSERT_EQUAL(OUString("Title"), getProperty<OUString>(getShape(1), "Title"));
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d8479c410a37..0ebda68eed20 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -559,7 +559,6 @@ static void lcl_deleteAndResetTheLists( rtl::Reference<sax_fastparser::FastAttri
void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize)
{
-
sax_fastparser::FastAttributeList* attrList = FastSerializerHelper::createAttrList();
awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(), pFrameFormat->GetVertOrient().GetPos());
@@ -570,6 +569,14 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFor
attrList->add( FSNS( XML_w, XML_x), OString::number(aPos.X));
attrList->add( FSNS( XML_w, XML_y), OString::number(aPos.Y));
+ sal_Int16 nLeft = pFrameFormat->GetLRSpace().GetLeft();
+ sal_Int16 nRight = pFrameFormat->GetLRSpace().GetRight();
+ sal_Int16 nUpper = pFrameFormat->GetULSpace().GetUpper();
+ sal_Int16 nLower = pFrameFormat->GetULSpace().GetLower();
+
+ attrList->add(FSNS(XML_w, XML_hSpace), OString::number((nLeft + nRight) / 2));
+ attrList->add(FSNS(XML_w, XML_vSpace), OString::number((nUpper + nLower) / 2));
+
OString relativeFromH = convertToOOXMLHoriOrientRel( pFrameFormat->GetHoriOrient().GetRelationOrient() );
OString relativeFromV = convertToOOXMLVertOrientRel( pFrameFormat->GetVertOrient().GetRelationOrient() );