diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-13 21:55:34 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-14 01:02:57 +0200 |
commit | 3bf6ec92379a14ac97ccfff5c6d0ca14b70d7b7e (patch) | |
tree | b13d5318835eb5c1b806c0724927cee1744a50ad /svgio/source/svgreader/svgcharacternode.cxx | |
parent | a177a4474b8c31f44741e2834df2c76ea8074aa3 (diff) |
svgio: remove redundant check
Change-Id: Ie507fb1bf06f75e2fd673864a9ee9046aeb19377
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154401
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source/svgreader/svgcharacternode.cxx')
-rw-r--r-- | svgio/source/svgreader/svgcharacternode.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index e62d21528d96..e9b719afc946 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -263,31 +263,27 @@ namespace svgio::svgreader // prepare TextArray ::std::vector< double > aTextArray(rSvgTextPosition.getX()); - if(!aTextArray.empty() && aTextArray.size() < nLength) { const sal_uInt32 nArray(aTextArray.size()); - if(nArray < nLength) - { - double fStartX(0.0); + double fStartX(0.0); - if(rSvgTextPosition.getParent() && rSvgTextPosition.getParent()->getAbsoluteX()) - { - fStartX = rSvgTextPosition.getParent()->getPosition().getX(); - } - else - { - fStartX = aTextArray[nArray - 1]; - } + if(rSvgTextPosition.getParent() && rSvgTextPosition.getParent()->getAbsoluteX()) + { + fStartX = rSvgTextPosition.getParent()->getPosition().getX(); + } + else + { + fStartX = aTextArray[nArray - 1]; + } - ::std::vector< double > aExtendArray(aTextLayouterDevice.getTextArray(getText(), nArray, nLength - nArray)); - aTextArray.reserve(nLength); + ::std::vector< double > aExtendArray(aTextLayouterDevice.getTextArray(getText(), nArray, nLength - nArray)); + aTextArray.reserve(nLength); - for(const auto &a : aExtendArray) - { - aTextArray.push_back(a + fStartX); - } + for(const auto &a : aExtendArray) + { + aTextArray.push_back(a + fStartX); } } |