[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa sw/source
Attila Bakos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 14 17:54:41 UTC 2020
sw/qa/extras/ooxmlexport/data/tdf133035.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 8 ++++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 5b02df1b12b0d66df98528dd43abc69561a134c0
Author: Attila Bakos <bakos.attilakaroly at nisz.hu>
AuthorDate: Thu May 14 12:38:28 2020 +0200
Commit: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Tue Jul 14 19:53:50 2020 +0200
tdf#133035 DOCX export: fix position of unnamed OLE
Position export depended on OLE object names, instead of the
type of anchoring.
Follow-up of commit 2150fdc7d0f63288ac56c33cb898589512057642
(tdf#131539 DOCX export: fix position of OLE objects).
Co-authored-by: Tibor Nagy (NISZ)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94190
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 45fe51bca2ab534cfe1139b734d839728225d6d9)
Change-Id: Ib98a19cb012047f37a5830c81541ef00c55589dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98761
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133035.docx b/sw/qa/extras/ooxmlexport/data/tdf133035.docx
new file mode 100644
index 000000000000..c28c119dbccc
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133035.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 0f5b5f827743..fa22174fc0e5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -203,6 +203,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf92472, "tdf92472.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:rPr/w:szCs", "val", "20");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(Tdf133035, "tdf133035.docx")
+{
+ auto pxml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pxml);
+ OUString aXmlVal = getXPath(pxml, "/w:document/w:body/w:p[1]/w:r[1]/w:object/v:shape", "style");
+ CPPUNIT_ASSERT(aXmlVal.indexOf("margin-left:186.6pt") > -1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
{
// tdf#120315 cells of the second column weren't vertically merged
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index fed20324b4dd..782343dbd6ab 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5522,7 +5522,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
//This string will store the relative position for aPos
OString aAnch;
- if (!rFlyFrameFormat->GetName().isEmpty())
+ if (rFlyFrameFormat && rFlyFrameFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
{
//Get the horizontal alignment of the OLE via the frame format, to aHAlign
OString aHAlign = convertToOOXMLHoriOrient(rFlyFrameFormat->GetHoriOrient().GetHoriOrient(),
More information about the Libreoffice-commits
mailing list