summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-31 16:22:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-03 21:22:35 +0200
commitcf5b61967ef8647db663a1f0d699169b017916a7 (patch)
treee3ea4b3bc0cb3a41ebc107fff6ed7496029a558a /sw
parent723487f415d8d0474f1de7d9f01eab2aa3db947e (diff)
Resolves: tdf#112145 pdf export of editengine highlight color fails sometimes
When setting a fill or line color on the outputdevice, put it back to its previous setting when finished with the record, PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D was the one in this case but protect the other similar ones here too Change-Id: Ifb9b182d72bb6c48a9d9480270fde4384be6291e Reviewed-on: https://gerrit.libreoffice.org/41761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 30bb7462b725..475f29017104 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1281,10 +1281,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx")
xmlDocPtr pXmlDoc = dumper.dumpAndParse(rMetaFile);
// Get first polyline rightside x coordinate
- sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/polyline[1]/point[2]", "x").toInt32();
+ sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[1]/polyline[1]/point[2]", "x").toInt32();
// Get last stroke x coordinate
- sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/polyline[last()]/point[2]", "x").toInt32();
+ sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[last()]/polyline[last()]/point[2]", "x").toInt32();
// Assert that the difference is less than half point.
CPPUNIT_ASSERT_MESSAGE("Shape line width does not match", abs(nFirstEnd - nSecondEnd) < 10);
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 198b71443e10..e36ca6eb6da0 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1492,10 +1492,10 @@ void SwUiWriterTest::testFdo87448()
// The first polyline in the document has a number of points to draw arcs,
// the last one jumps back to the start, so we call "end" the last but one.
- sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/polyline[1]/point[last()-1]", "x").toInt32();
+ sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[2]/polyline[1]/point[last()-1]", "x").toInt32();
// The second polyline has a different start point, but the arc it draws
// should end at the ~same position as the first polyline.
- sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/polyline[2]/point[last()]", "x").toInt32();
+ sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[5]/polyline[1]/point[last()]", "x").toInt32();
// nFirstEnd was 6023 and nSecondEnd was 6648, now they should be much closer, e.g. nFirstEnd = 6550, nSecondEnd = 6548
OString aMsg = "nFirstEnd is " + OString::number(nFirstEnd) + ", nSecondEnd is " + OString::number(nSecondEnd);