From c2485b4c38a574416dc3948fec85b0232109eb61 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 20 Feb 2014 16:32:23 +0100 Subject: DOCX export: handle wp14:sizeRelH/V relativeFrom=margin for shapes Change-Id: I913fe328376a246bf410512c4cfb018fc573094b --- sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 6 +++--- sw/source/filter/ww8/docxsdrexport.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 1a83cf7b7261..dc434a32e863 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2303,8 +2303,8 @@ DECLARE_OOXMLEXPORT_TEST(testDmlShapeRelsize, "dml-shape-relsize.docx") xmlDocPtr pXmlDoc = parseExport("word/document.xml"); if (!pXmlDoc) return; - // Relative size wasn't exported at all. - assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "page"); + // Relative size wasn't exported all, then relativeFrom was "page", not "margin". + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "margin"); } DECLARE_OOXMLEXPORT_TEST(testDmlGroupshapeRelsize, "dml-groupshape-relsize.docx") @@ -2313,7 +2313,7 @@ DECLARE_OOXMLEXPORT_TEST(testDmlGroupshapeRelsize, "dml-groupshape-relsize.docx" if (!pXmlDoc) return; // Relative size wasn't imported. - assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "page"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "margin"); } DECLARE_OOXMLEXPORT_TEST(testDmlGroupshapeParaspacing, "dml-groupshape-paraspacing.docx") diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 1211ef34d345..170be93f62ac 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -491,7 +491,7 @@ void DocxSdrExport::Impl::writeDMLDrawing(const SdrObject* pSdrObject, const SwF { // At the moment drawinglayer objects are always relative from page. pFS->startElementNS(XML_wp14, XML_sizeRelH, - XML_relativeFrom, "page", + XML_relativeFrom, (pSdrObject->GetRelativeWidthRelation() == text::RelOrientation::FRAME ? "margin" : "page"), FSEND); pFS->startElementNS(XML_wp14, XML_pctWidth, FSEND); pFS->writeEscaped(OUString::number(*pSdrObject->GetRelativeWidth() * 100 * oox::drawingml::PER_PERCENT)); @@ -501,7 +501,7 @@ void DocxSdrExport::Impl::writeDMLDrawing(const SdrObject* pSdrObject, const SwF if (pSdrObject->GetRelativeHeight()) { pFS->startElementNS(XML_wp14, XML_sizeRelV, - XML_relativeFrom, "page", + XML_relativeFrom, (pSdrObject->GetRelativeHeightRelation() == text::RelOrientation::FRAME ? "margin" : "page"), FSEND); pFS->startElementNS(XML_wp14, XML_pctHeight, FSEND); pFS->writeEscaped(OUString::number(*pSdrObject->GetRelativeHeight() * 100 * oox::drawingml::PER_PERCENT)); -- cgit option value='distro/collabora/co-24.04.7'>distro/collabora/co-24.04.7 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/test/source/sheet/xcalculatable.cxx
AgeCommit message (Expand)Author
2018-03-28tdf#45904 Move _XCalculatable Java test to C++Jens Carl