diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2020-06-09 13:38:35 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-19 14:01:30 +0200 |
commit | a2113f5f46921c38a0c4929bb564183009a838e9 (patch) | |
tree | f2a77d2e1b98af3e975b4bf41af74442c1d8d163 /sw/source | |
parent | 833dd75c6956f5a0d395468575aa416a6853a1f9 (diff) |
tdf#133701 DOXC export: fix frame distance from text
Vertical and horizontal minimum distances of frame
and the text wrapping around the frame were not exported.
Note: different left/right, top/bottom values aren't
supported by OOXML hSpace, vSpace, so calculate
average values to keep the page layout.
Co-authored-by: Attila Bakos (NISZ)
Change-Id: Ieef999003bcc6b9bba0a932ee4dd2b5461380c17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96110
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
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() ); |