filter/source/svg/svgfontexport.cxx | 4 +--- filter/source/svg/svgwriter.cxx | 10 +++------- 2 files changed, 4 insertions(+), 10 deletions(-)
New commits: commit 08b0b260f52483090d94a6d5bd0b053bb1b51c9e Author: Mike Kaganski <[email protected]> AuthorDate: Sat Aug 16 23:25:13 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Aug 16 22:37:05 2025 +0200 Use OutputDevice::ScopedPush in filter Change-Id: I5bb80836a75402182c9bf04bcd43fe6c0fa0689b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189798 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index fdaaf58c4469..3a59b1052f76 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -87,7 +87,7 @@ void SVGFontExport::implCollectGlyphs() { const GDIMetaFile& rMtf = elem.GetRepresentation(); - pVDev->Push(); + auto popIt = pVDev->ScopedPush(); for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; ++i ) { @@ -165,8 +165,6 @@ void SVGFontExport::implCollectGlyphs() } } } - - pVDev->Pop(); } } } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 22ddfd20592c..3b1a7019cb13 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1498,7 +1498,7 @@ void SVGTextWriter::implWriteBulletChars() // <path d="..."> tools::PolyPolygon aPolyPolygon; OUString aStr(rInfo.cBulletChar); - mpVDev->Push(vcl::PushFlags::FONT); + auto popIt = mpVDev->ScopedPush(vcl::PushFlags::FONT); mpVDev->SetFont(rInfo.aFont); if (mpVDev->GetTextOutline(aPolyPolygon, aStr)) { @@ -1506,7 +1506,6 @@ void SVGTextWriter::implWriteBulletChars() mrExport.AddAttribute(u"d"_ustr, aPathString); SvXMLElementExport aPath(mrExport, u"path"_ustr, true, true); } - mpVDev->Pop(); } } // close aPositioningElem } @@ -2612,9 +2611,8 @@ void SVGActionWriter::ImplWriteMask(GDIMetaFile& rMtf, const Point& rDestPt, con pElemG.reset(new SvXMLElementExport(mrExport, aXMLElemG, true, true)); } - mpVDev->Push(); + auto popIt = mpVDev->ScopedPush(); ImplWriteActions( rMtf, nWriteFlags, u""_ustr ); - mpVDev->Pop(); } if (oTextOpacity) @@ -4150,7 +4148,7 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm, Fraction aFractionX( aMapMode.GetScaleX() ); Fraction aFractionY( aMapMode.GetScaleY() ); - mpVDev->Push(); + auto popIt = mpVDev->ScopedPush(); Size aSize( OutputDevice::LogicToLogic(rSize100thmm, MapMode(MapUnit::Map100thMM), aMapMode) ); aFractionX *= Fraction( aSize.Width(), aPrefSize.Width() ); @@ -4176,8 +4174,6 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm, ImplWriteShape( *mapCurShape ); mapCurShape.reset(); } - - mpVDev->Pop(); }
