emfio/qa/cppunit/emf/EmfImportTest.cxx |   15 +++++++++------
 emfio/source/reader/mtftools.cxx       |    1 -
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 1230b88055c7389d2c376c316f91549e4aaef8aa
Author:     Paris Oplopoios <paris.oplopo...@collabora.com>
AuthorDate: Fri Nov 4 12:52:27 2022 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Nov 8 15:48:53 2022 +0100

    Make EMR_SAVEDC not UpdateClipRegion
    
    EMR_SAVEDC would call UpdateClipRegion which would break the clip region
    sometimes before drawing the text causing it to not be clipped
    
    This line was introduced in a i#964 related patch
    (https://bz.apache.org/ooo/show_bug.cgi?id=964)
    The document in that test seems to render the same and the test file
    from the changed test renders the same also before and after this patch
    
    Change-Id: Id515b90efc9e533e18a35030a9a677de4d4ea02d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142272
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 75f2b9001a08..3d77dd95e5a0 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -1019,16 +1019,19 @@ void Test::TestEmfPlusSave()
 
     assertXPath(pDocument, aXPathPrefix + "mask/polypolygon", "path", "m0 
0h33544v21311h-33544z");
 
-    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polypolygoncolor/polypolygon", "path",
+    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polypolygoncolor[1]/polypolygon", "path",
                 "m327.458333333333 
638.222222222222h437007.1875v295555.555555556h-437007.1875z");
-    assertXPath(pDocument, aXPathPrefix + "mask/group/mask/polypolygoncolor", 
"color", "#ff0cad");
+    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polypolygoncolor[1]", "color",
+                "#ff0cad");
 
-    assertXPath(pDocument, aXPathPrefix + "mask/polypolygoncolor/polypolygon", 
"path",
+    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polypolygoncolor[2]/polypolygon", "path",
                 "m10853.4145539602 
7321.41354709201h41952690v29630720h-41952690z");
-    assertXPath(pDocument, aXPathPrefix + "mask/polypolygoncolor", "color", 
"#00ffad");
+    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polypolygoncolor[2]", "color",
+                "#00ffad");
 
-    assertXPath(pDocument, aXPathPrefix + "mask/polygonstrokearrow/line", 
"color", "#000000");
-    assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstrokearrow/polygon",
+    assertXPath(pDocument, aXPathPrefix + 
"mask/group/mask/polygonstrokearrow/line", "color",
+                "#000000");
+    assertXPathContent(pDocument, aXPathPrefix + 
"mask/group/mask/polygonstrokearrow/polygon",
                        "10853.4145539602,7321.41354709201 
10853.4145539602,4907.54325697157 "
                        "12832.6557236512,4907.54325697157");
 }
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index b6e225bfd97c..02643b202ef8 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -2366,7 +2366,6 @@ namespace emfio
 
     void MtfTools::Push()                       // !! to be able to access the 
original ClipRegion it
     {                                               // is not allowed to use 
the MetaPushAction()
-        UpdateClipRegion();                         // (the original clip 
region is on top of the stack) (SJ)
         auto pSave = std::make_shared<SaveStruct>();
 
         pSave->aLineStyle = maLineStyle;

Reply via email to