summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-03-01 11:54:23 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-03-01 16:10:39 +0100
commitf0225de07ecac797cd7ceaf9edb7e1c36d1afc70 (patch)
tree88192bf8d5debef9a7ae52c4cfed1264630594f9
parent16d08e49a304fdc1bc046c51c860dd63b6e7fe0d (diff)
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 <xiscofauli@libreoffice.org>
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx5
-rw-r--r--svgio/source/svgreader/svgsymbolnode.cxx5
2 files changed, 2 insertions, 8 deletions
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));