From 547ac0aa23a25f03a17014cb474eedc1fd88017f Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Wed, 20 Apr 2022 19:44:05 +0200 Subject: [PATCH] tdf#55058 tdf#143875 EMF+ Fix display of dashed lines and line joints With previous implementation, empty spaces between dashes were too long. Additionally line joints were not working correctly, after EMF+ reworking: tdf#111486 This commit fixes all these issues and additionally it is covering it with tests. Change-Id: I9404e566d2d7d3405ab817268ad9b1f538c200eb Change-Id: I523f92a928ab592ff175d0d01c1ad1a3bc22e324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133207 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek (cherry picked from commit 80c856336668e35837667323957fa3ad4172f3c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133152 --- compilerplugins/clang/redundantfcast.cxx | 3 + drawinglayer/source/tools/emfpcustomlinecap.cxx | 9 --- drawinglayer/source/tools/emfpcustomlinecap.hxx | 2 - drawinglayer/source/tools/emfphelperdata.cxx | 62 +++--------------- drawinglayer/source/tools/emfppen.cxx | 70 ++++++++++++++++----- drawinglayer/source/tools/emfppen.hxx | 5 +- drawinglayer/source/tools/primitive2dxmldump.cxx | 32 ++++++---- emfio/qa/cppunit/emf/EmfImportTest.cxx | 34 ++++++++++ .../emf/data/TestEmfPlusDrawLineWithDash.emf | Bin 0 -> 9636 bytes svx/qa/unit/svdraw.cxx | 3 +- 10 files changed, 127 insertions(+), 93 deletions(-) create mode 100644 emfio/qa/cppunit/emf/data/TestEmfPlusDrawLineWithDash.emf diff --git a/compilerplugins/clang/redundantfcast.cxx b/compilerplugins/clang/redundantfcast.cxx index 67ff2c56edef..85386eb4ea8e 100644 --- a/compilerplugins/clang/redundantfcast.cxx +++ b/compilerplugins/clang/redundantfcast.cxx @@ -334,6 +334,9 @@ public: // tdf#145203: FIREBIRD cannot create a table if (fn == SRCDIR "/connectivity/source/drivers/firebird/DatabaseMetaData.cxx") return false; + // false positive during using contructor drawinglayer::attribute::StrokeAttribute({ 3 * pw, pw }) + if (fn == SRCDIR "/drawinglayer/source/tools/emfppen.cxx") + return false; return true; } diff --git a/drawinglayer/source/tools/emfpcustomlinecap.cxx b/drawinglayer/source/tools/emfpcustomlinecap.cxx index e24cbcc32cb1..49cc912ed33c 100644 --- a/drawinglayer/source/tools/emfpcustomlinecap.cxx +++ b/drawinglayer/source/tools/emfpcustomlinecap.cxx @@ -43,15 +43,6 @@ namespace emfplushelper { } - void EMFPCustomLineCap::SetAttributes(rendering::StrokeAttributes& aAttributes) - { - aAttributes.StartCapType = EMFPPen::lcl_convertStrokeCap(strokeStartCap); - aAttributes.EndCapType = EMFPPen::lcl_convertStrokeCap(strokeEndCap); - aAttributes.JoinType = EMFPPen::lcl_convertLineJoinType(strokeJoin); - - aAttributes.MiterLimit = miterLimit; - } - void EMFPCustomLineCap::ReadPath(SvStream& s, EmfPlusHelperData const & rR, bool bFill) { sal_Int32 pathLength; diff --git a/drawinglayer/source/tools/emfpcustomlinecap.hxx b/drawinglayer/source/tools/emfpcustomlinecap.hxx index a42e0ab4ef46..e6202ae98179 100644 --- a/drawinglayer/source/tools/emfpcustomlinecap.hxx +++ b/drawinglayer/source/tools/emfpcustomlinecap.hxx @@ -19,7 +19,6 @@ #pragma once -#include #include "emfphelperdata.hxx" namespace emfplushelper @@ -34,7 +33,6 @@ namespace emfplushelper EMFPCustomLineCap(); - void SetAttributes(com::sun::star::rendering::StrokeAttributes& aAttributes); void ReadPath(SvStream& s, EmfPlusHelperData const & rR, bool bFill); void Read(SvStream& s, EmfPlusHelperData const & rR); }; diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 447686167837..79ced761e8a2 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -509,13 +509,6 @@ namespace emfplushelper if (!(pen && polygon.count())) return; - // we need a line join attribute - basegfx::B2DLineJoin lineJoin = basegfx::B2DLineJoin::Round; - if (pen->penDataFlags & EmfPlusPenDataJoin) // additional line join information - { - lineJoin = static_cast(EMFPPen::lcl_convertLineJoinType(pen->lineJoin)); - } - // we need a line cap attribute css::drawing::LineCap lineCap = css::drawing::LineCap_BUTT; if (pen->penDataFlags & EmfPlusPenDataStartCap) // additional line cap information @@ -527,57 +520,16 @@ namespace emfplushelper const double transformedPenWidth = maMapTransform.get(0, 0) * pen->penWidth; drawinglayer::attribute::LineAttribute lineAttribute(pen->GetColor().getBColor(), transformedPenWidth, - lineJoin, - lineCap); - - drawinglayer::attribute::StrokeAttribute aStrokeAttribute; - if (pen->penDataFlags & EmfPlusPenDataLineStyle && pen->dashStyle != EmfPlusLineStyleCustom) // pen has a predefined line style - { - // short writing - const double pw = maMapTransform.get(1, 1) * pen->penWidth; - // taken from the old cppcanvas implementation and multiplied with pen width - const std::vector dash = { 3*pw, 3*pw }; - const std::vector dot = { pw, 3*pw }; - const std::vector dashdot = { 3*pw, 3*pw, pw, 3*pw }; - const std::vector dashdotdot = { 3*pw, 3*pw, pw, 3*pw, pw, 3*pw }; - - switch (pen->dashStyle) - { - case EmfPlusLineStyleSolid: // do nothing special, use default stroke attribute - break; - case EmfPlusLineStyleDash: - aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(std::vector(dash)); - break; - case EmfPlusLineStyleDot: - aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(std::vector(dot)); - break; - case EmfPlusLineStyleDashDot: - aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(std::vector(dashdot)); - break; - case EmfPlusLineStyleDashDotDot: - aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(std::vector(dashdotdot)); - break; - } - } - else if (pen->penDataFlags & EmfPlusPenDataDashedLine) // pen has a custom dash line - { - // StrokeAttribute needs a double vector while the pen provides a float vector - std::vector aPattern(pen->dashPattern.size()); - for (size_t i=0; ipenWidth * pen->dashPattern[i]; - } - aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(std::move(aPattern)); - } - + pen->GetLineJoinType(), + lineCap, + basegfx::deg2rad(15.0)); // TODO Add MiterLimit support if (!pen->GetColor().IsTransparent()) { mrTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( polygon, lineAttribute, - aStrokeAttribute)); + pen->GetStrokeAttribute(maMapTransform.get(1, 1)))); } else { @@ -585,7 +537,7 @@ namespace emfplushelper new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( polygon, lineAttribute, - aStrokeAttribute)); + pen->GetStrokeAttribute(maMapTransform.get(1, 1)))); mrTargetHolders.Current().append( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( @@ -634,7 +586,7 @@ namespace emfplushelper new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( startCapPolygon, lineAttribute, - aStrokeAttribute)); + pen->GetStrokeAttribute(maMapTransform.get(1, 1)))); } } @@ -679,7 +631,7 @@ namespace emfplushelper new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( endCapPolygon, lineAttribute, - aStrokeAttribute)); + pen->GetStrokeAttribute(maMapTransform.get(1, 1)))); } } diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx index d41dca676d4e..f348391b0519 100644 --- a/drawinglayer/source/tools/emfppen.cxx +++ b/drawinglayer/source/tools/emfppen.cxx @@ -18,7 +18,6 @@ */ #include -#include #include #include #include @@ -179,27 +178,70 @@ namespace emfplushelper { switch (nEmfStroke) { - case EmfPlusLineCapTypeSquare: return rendering::PathCapType::SQUARE; - case EmfPlusLineCapTypeRound: return rendering::PathCapType::ROUND; + case EmfPlusLineCapTypeSquare: + return rendering::PathCapType::SQUARE; + // we have no mapping for EmfPlusLineCapTypeTriangle, + // but it is similar to Round + case EmfPlusLineCapTypeTriangle: // fall-through + case EmfPlusLineCapTypeRound: + return rendering::PathCapType::ROUND; } - // we have no mapping for EmfPlusLineCapTypeTriangle = 0x00000003, - // so return BUTT always return rendering::PathCapType::BUTT; } - sal_Int8 EMFPPen::lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin) + basegfx::B2DLineJoin EMFPPen::GetLineJoinType() const { - switch (nEmfLineJoin) + if (penDataFlags & EmfPlusPenDataJoin) // additional line join information { - case EmfPlusLineJoinTypeMiter: // fall-through - case EmfPlusLineJoinTypeMiterClipped: return rendering::PathJoinType::MITER; - case EmfPlusLineJoinTypeBevel: return rendering::PathJoinType::BEVEL; - case EmfPlusLineJoinTypeRound: return rendering::PathJoinType::ROUND; + switch (lineJoin) + { + case EmfPlusLineJoinTypeMiter: // fall-through + case EmfPlusLineJoinTypeMiterClipped: + return basegfx::B2DLineJoin::Miter; + case EmfPlusLineJoinTypeBevel: + return basegfx::B2DLineJoin::Bevel; + case EmfPlusLineJoinTypeRound: + return basegfx::B2DLineJoin::Round; + } } + // If nothing set, then miter applied with no limit + return basegfx::B2DLineJoin::Miter; + } - assert(false); // Line Join type isn't in specification. - return 0; + drawinglayer::attribute::StrokeAttribute + EMFPPen::GetStrokeAttribute(const double aTransformation) const + { + if (penDataFlags & EmfPlusPenDataLineStyle // pen has a predefined line style + && dashStyle != EmfPlusLineStyleCustom) + { + const double pw = aTransformation * penWidth; + switch (dashStyle) + { + case EmfPlusLineStyleDash: + return drawinglayer::attribute::StrokeAttribute({ 3 * pw, pw }); + case EmfPlusLineStyleDot: + return drawinglayer::attribute::StrokeAttribute({ pw, pw }); + case EmfPlusLineStyleDashDot: + return drawinglayer::attribute::StrokeAttribute({ 3 * pw, pw, pw, pw }); + case EmfPlusLineStyleDashDotDot: + return drawinglayer::attribute::StrokeAttribute({ 3 * pw, pw, pw, pw, pw, pw }); + } + } + else if (penDataFlags & EmfPlusPenDataDashedLine) // pen has a custom dash line + { + const double pw = aTransformation * penWidth; + // StrokeAttribute needs a double vector while the pen provides a float vector + std::vector aPattern(dashPattern.size()); + for (size_t i = 0; i < aPattern.size(); i++) + { + // convert from float to double and multiply with the adjusted pen width + aPattern[i] = pw * dashPattern[i]; + } + return drawinglayer::attribute::StrokeAttribute(std::move(aPattern)); + } + // EmfPlusLineStyleSolid: - do nothing special, use default stroke attribute + return drawinglayer::attribute::StrokeAttribute(); } void EMFPPen::Read(SvStream& s, EmfPlusHelperData const & rR) @@ -249,7 +291,7 @@ namespace emfplushelper if (penDataFlags & PenDataJoin) { s.ReadInt32(lineJoin); - SAL_WARN("drawinglayer.emf", "EMF+\t\tTODO PenDataJoin: " << LineJoinTypeToString(lineJoin) << " (0x" << std::hex << lineJoin << ")"); + SAL_WARN("drawinglayer.emf", "EMF+\t\t LineJoin: " << LineJoinTypeToString(lineJoin) << " (0x" << std::hex << lineJoin << ")"); } else { diff --git a/drawinglayer/source/tools/emfppen.hxx b/drawinglayer/source/tools/emfppen.hxx index 05b2fc376d7d..29ece63ecf5d 100644 --- a/drawinglayer/source/tools/emfppen.hxx +++ b/drawinglayer/source/tools/emfppen.hxx @@ -19,6 +19,7 @@ #pragma once +#include #include "emfpbrush.hxx" #include @@ -26,6 +27,7 @@ namespace emfplushelper { const sal_uInt32 EmfPlusLineCapTypeSquare = 0x00000001; const sal_uInt32 EmfPlusLineCapTypeRound = 0x00000002; + const sal_uInt32 EmfPlusLineCapTypeTriangle = 0x00000003; const sal_uInt32 EmfPlusLineJoinTypeMiter = 0x00000000; const sal_uInt32 EmfPlusLineJoinTypeBevel = 0x00000001; @@ -122,7 +124,8 @@ namespace emfplushelper void Read(SvStream& s, EmfPlusHelperData const & rR); static sal_Int8 lcl_convertStrokeCap(sal_uInt32 nEmfStroke); - static sal_Int8 lcl_convertLineJoinType(sal_uInt32 nEmfLineJoin); + drawinglayer::attribute::StrokeAttribute GetStrokeAttribute(const double aTransformation) const; + basegfx::B2DLineJoin GetLineJoinType() const; }; } diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx index 2e2bb887a3d4..a1fddf900543 100644 --- a/drawinglayer/source/tools/primitive2dxmldump.cxx +++ b/drawinglayer/source/tools/primitive2dxmldump.cxx @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -132,6 +133,24 @@ void writePolyPolygon(::tools::XmlWriter& rWriter, const basegfx::B2DPolyPolygon rWriter.endElement(); } +void writeStrokeAttribute(::tools::XmlWriter& rWriter, + const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute) +{ + if (!rStrokeAttribute.getDotDashArray().empty()) + { + rWriter.startElement("stroke"); + + OUString sDotDash; + for (double fDotDash : rStrokeAttribute.getDotDashArray()) + { + sDotDash += OUString::number(round(100.0 * fDotDash)) + " "; + } + rWriter.attribute("dotDashArray", sDotDash); + rWriter.attribute("fullDotDashLength", rStrokeAttribute.getFullDotDashLen()); + rWriter.endElement(); + } +} + void writeLineAttribute(::tools::XmlWriter& rWriter, const drawinglayer::attribute::LineAttribute& rLineAttribute) { @@ -718,14 +737,7 @@ void Primitive2dXmlDump::decomposeAndWrite( rWriter.endElement(); writeLineAttribute(rWriter, rPolygonStrokePrimitive2D.getLineAttribute()); - - rWriter.startElement("stroke"); - const drawinglayer::attribute::StrokeAttribute& aStrokeAttribute - = rPolygonStrokePrimitive2D.getStrokeAttribute(); - rWriter.attribute("fulldotdashlen", aStrokeAttribute.getFullDotDashLen()); - //rWriter.attribute("dotdasharray", aStrokeAttribute.getDotDashArray()); - rWriter.endElement(); - + writeStrokeAttribute(rWriter, rPolygonStrokePrimitive2D.getStrokeAttribute()); rWriter.endElement(); } break; @@ -736,9 +748,7 @@ void Primitive2dXmlDump::decomposeAndWrite( rWriter.startElement("polypolygonstroke"); writeLineAttribute(rWriter, rPolyPolygonStrokePrimitive2D.getLineAttribute()); - - //getStrokeAttribute() - + writeStrokeAttribute(rWriter, rPolyPolygonStrokePrimitive2D.getStrokeAttribute()); writePolyPolygon(rWriter, rPolyPolygonStrokePrimitive2D.getB2DPolyPolygon()); rWriter.endElement(); diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index 799f8eef9c46..63661c9c73c2 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -52,6 +52,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools, public unotest: void TestDrawStringTransparent(); void TestDrawStringWithBrush(); void TestDrawLine(); + void TestDrawLineWithDash(); void TestLinearGradient(); void TestTextMapMode(); void TestEnglishMapMode(); @@ -95,6 +96,7 @@ public: CPPUNIT_TEST(TestDrawStringTransparent); CPPUNIT_TEST(TestDrawStringWithBrush); CPPUNIT_TEST(TestDrawLine); + CPPUNIT_TEST(TestDrawLineWithDash); CPPUNIT_TEST(TestLinearGradient); CPPUNIT_TEST(TestTextMapMode); CPPUNIT_TEST(TestEnglishMapMode); @@ -390,6 +392,38 @@ void Test::TestDrawLine() assertXPath(pDocument, aXPathPrefix + "polypolygonstroke/line", "width", "33"); } +void Test::TestDrawLineWithDash() +{ + // EMF+ with records: DrawLine + // The lines with different dash styles + Primitive2DSequence aSequence + = parseEmf(u"/emfio/qa/cppunit/emf/data/TestEmfPlusDrawLineWithDash.emf"); + CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength())); + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument + = dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence)); + CPPUNIT_ASSERT(pDocument); + + // check correct import of the DrawLine: color and width of the line + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke", 10); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[1]/line", "color", "#000000"); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[1]/line", "width", "132"); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[1]/stroke", 0); + + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[2]/line", "width", "132"); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[2]/stroke", "dotDashArray", + "13225 13225 "); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[3]/stroke", "dotDashArray", + "39674 13225 "); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[4]/stroke", "dotDashArray", + "39674 13225 13225 13225 "); + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[5]/stroke", "dotDashArray", + "39674 13225 13225 13225 13225 13225 "); + //TODO polypolygonstroke[6-9]/stroke add support for PenDataDashedLineOffset + assertXPath(pDocument, aXPathPrefix + "polypolygonstroke[10]/stroke", "dotDashArray", + "66124 26450 198372 52899 "); +} + void Test::TestLinearGradient() { // EMF+ file with LinearGradient brush diff --git a/emfio/qa/cppunit/emf/data/TestEmfPlusDrawLineWithDash.emf b/emfio/qa/cppunit/emf/data/TestEmfPlusDrawLineWithDash.emf new file mode 100644 index 0000000000000000000000000000000000000000..dc5af59e3f66b07caf7070f226b77ca0a046166b GIT binary patch literal 9636 zcwWugJ!~Us9mnx!#&6@7*yGr7CgRQ99byrjWF(3R3EdpxptwT}#fd>6Z3GlsoP?zl z!V-7f4aH3F-y<6ACv$5&zqaS;3uy-_g2ff;TvE7s&k(E-KU)UDQ_>i_dhOc z&i#Q`{*{j}d+&eS-+xqdfBQ$tv4Q&>hG4tTda>s|$~uG}W`DE~yV|q&P4U+LeS_Hf zBi66%-`Dn?-Zso*cjxsyZcbtsM=Vy(_ zc}(xj`}%uL@2zc*NACI8YR~a^ozuLB=lBcz_dh(B^V>b=v47a}-sic)^W6FGpT|>A zpBK-2+#n%vLwd zN1h9_3G*Rt8fI%4<|7xvY{GmkW)o%;=ELyBFk8zoA2}0d6Xt6(n=qR&A6&;UTiY-n zc`nQ*%!fEM%+@i?M=pffg!#J6Cd?+xhvBJVwyt45awg0s%-3T!VK!ktxV~Ywo?$-n zT$oLm5Am5{w!UFLav{tn%r{^*VK!kt49^X-4Gi;FD?Y;;32!7@s{`~)6 zN?hQ_o=N@0nZTcs3rSh0$|FDUhb5D;PL;>xOj6dVa##+0S1~E;R5>Bfh5aS)Hz=wm zWt}RIYJoo$_Lsn4Aqz~(I#mwqfqy0JFM+?nykSz-sq%&#Hx2tYQso(W+A>^MGgV%Z zhbM;pTdDGxeAPBw*Ga0pAiIuX|8}aJkmJyBU7b{UMlOW?g=_1w|Eb}+x~cM*oC*62 z*VbeIzTvuhsd7S|3;PS#hT_a{UHw#fG~l{~{e^2oc5b+?L8=@^T$ixFaBWB~4A&K< z%ExeDmk;~gdtblGef{cD+}E4^ef=4?`#Sh}UVa?EbPwN)FG|8`6MJUM{cWCcPe0@S zHe1$P<&po)pURf?R(XZ2WVWog%3=ALeWIvZQ%8MzQTh29pOLZ{G+?8MO7+A4=_ zI)zT57p`OIY;TnlavT~uJ6q)$xez*q-Y%U&r_hV+)X>@8Du+Efg-)Rtu5akMhR(pyOI`?_LT`gkp;PE>(kXNby%@C&olQe8d3<8%Y#DmVVcXDoV(29=gifKi zL#NOw^oDc_okA~0T|;MR=p~O&4V_&>FFEWPI!_I~fHF6+npQV zaL00PJT1><&6#1ImN$q!vu3?ko{@{C*vokDMo&cM)FTPu&rnb0Zp*69>FgI%-%1kD#C&~p@zL~I|C=W}IDr1?jo+xJs%VxrQqI^Y8DrUlZqC6*WgifKiN~h2% z^kP*rbXF(I!+=hqQ|LulH*^LQXLF)FJfTzQ z6nYW14V@NUYhF`w_ ze0a?H@c3xXhths+|6cKZ_u-!piOaeFO;k;s$vGEt?tc?iXOdS&eqNbMR2@mqS&?)9 zo2a_-P0qQHbN`#D8cJSSz*S6CU6f7ESwUyj&{;9`k_(|z=&jKybPB!50z+rb&|9Zd z=oEV48ivlgp_d#t4V?``FS!sph29pOLZ{G+?8MO7GW53T6gq`oxQ?N-ZRjP(p`o*5 z=p`3Ir_kG_Q|J_Wk)0YkyN2E#okFM33)eSv_6)t`_{`ARH}sMVp;PD`&?$5Zy~xfD zodZK}M5oXx^uk>jIwO<6u=C*^xBGdM!};(Px4TDgf5yZ+eDplF-^=fIbz^&7`bT<#76nytsyqvW+VIq*tW)KTJU%xm>r{CW@o^U>Wt}R&h|hz!-0uH65078(pPR$u yH{^-4e;5A!o!3rZd;a?QkC)u8?}mqc-W`7K$v*G=`1U$n+wK1E)$QMI>wf_vT<`?| literal 0 HcwPel00001 diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index cab6b56b0ae7..ae673af298b3 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -338,7 +338,8 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) assertXPathContent(pXmlDoc, aBasePath + "/polygon", "49.5,99 0,99 0,0 99,0 99,99"); - assertXPath(pXmlDoc, aBasePath + "/stroke", "fulldotdashlen", "0"); + // If solid line, then there is no line stroke information + assertXPath(pXmlDoc, aBasePath + "/stroke", 0); pPage->RemoveObject(0); -- 2.11.4.GIT