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 <vmiklos@collabora.com>
This commit is contained in:
Paris Oplopoios 2022-11-04 12:52:27 +02:00 committed by Miklos Vajna
parent 363d45244b
commit 1230b88055
2 changed files with 9 additions and 7 deletions

View file

@ -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");
}

View file

@ -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;