svgio/source/svgreader/svgsvgnode.cxx | 5 +---- svgio/source/svgreader/svgsymbolnode.cxx | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
New commits: commit f0225de07ecac797cd7ceaf9edb7e1c36d1afc70 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Mar 1 11:54:23 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Mar 1 16:10:39 2024 +0100 svgio: simplify a bit By default, preserveAspectRatio is already xMidYMid meet Change-Id: I37d85979728e9382c9b21b3219f3ad79eeec536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164188 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 09c081069859..7d2b935b544e 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -421,10 +421,7 @@ namespace svgio::svgreader else { // create mapping - // #i122610 SVG 1.1 defines in section 5.1.2 that if the attribute preserveAspectRatio is not specified, - // then the effect is as if a value of 'xMidYMid meet' were specified. - SvgAspectRatio aRatioDefault(SvgAlign::xMidYMid,true); - const SvgAspectRatio& rRatio = getSvgAspectRatio().isSet()? getSvgAspectRatio() : aRatioDefault; + const SvgAspectRatio& rRatio = getSvgAspectRatio(); // let mapping be created from SvgAspectRatio const basegfx::B2DHomMatrix aEmbeddingTransform( diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx index 2f226b841e82..f2d25c330316 100644 --- a/svgio/source/svgreader/svgsymbolnode.cxx +++ b/svgio/source/svgreader/svgsymbolnode.cxx @@ -135,10 +135,7 @@ namespace svgio::svgreader if(getViewBox()) { // create mapping - // #i122610 SVG 1.1 defines in section 5.1.2 that if the attribute preserveAspectRatio is not specified, - // then the effect is as if a value of 'xMidYMid meet' were specified. - SvgAspectRatio aRatioDefault(SvgAlign::xMidYMid, true); - const SvgAspectRatio& rRatio = getSvgAspectRatio().isSet()? getSvgAspectRatio() : aRatioDefault; + const SvgAspectRatio& rRatio = getSvgAspectRatio(); const double fX(maX.solve(*this, NumberType::xcoordinate)); const double fY(maY.solve(*this, NumberType::ycoordinate));