summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-06-29 17:42:19 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-06-29 21:13:13 +0200
commit210f2345c2eea2c52b673e2327a2ed096d9a888a (patch)
tree4a0ff76abda90780df05d1d3df52f820f27427a8 /svgio/source
parentc48e810f1a856d392b2ffce6b343082406644ab8 (diff)
svgio: simplify code
Change-Id: I18c4179c36c052cc0ed5b416125e72d542cb7407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153749 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx4
-rw-r--r--svgio/source/svgreader/svgtools.cxx9
2 files changed, 6 insertions, 7 deletions
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index d0e821a52092..fa7cbe675a13 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -141,7 +141,7 @@ namespace svgio::svgreader
if(nLen)
{
- readImageLink(aContent, maXLink, maUrl, maMimeType, maData);
+ readImageLink(aContent, maXLink, maUrl, maData);
}
break;
}
@@ -204,7 +204,7 @@ namespace svgio::svgreader
const basegfx::B2DRange aTarget(fX, fY, fX + fWidth, fY + fHeight);
basegfx::B2DRange aViewBox(aTarget);
- if(!maMimeType.isEmpty() && !maData.isEmpty())
+ if(!maData.isEmpty())
{
// use embedded base64 encoded data
css::uno::Sequence< sal_Int8 > aPass;
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index c45f4c5e9c61..9539fcf618b9 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -1354,11 +1354,10 @@ namespace svgio::svgreader
return !rSvgStringVector.empty();
}
- void readImageLink(const OUString& rCandidate, OUString& rXLink, OUString& rUrl, OUString& rMimeType, OUString& rData)
+ void readImageLink(const OUString& rCandidate, OUString& rXLink, OUString& rUrl, OUString& rData)
{
rXLink.clear();
rUrl.clear();
- rMimeType.clear();
rData.clear();
if(!readLocalLink(rCandidate, rXLink))
@@ -1376,11 +1375,11 @@ namespace svgio::svgreader
skip_char(rCandidate, ' ', nPos, nLen);
copyToLimiter(rCandidate, ';', nPos, aBuffer, nLen);
skip_char(rCandidate, ' ', ';', nPos, nLen);
- rMimeType = aBuffer.makeStringAndClear();
+ const OUString aMimeType = aBuffer.makeStringAndClear();
- if(!rMimeType.isEmpty() && nPos < nLen)
+ if(!aMimeType.isEmpty() && nPos < nLen)
{
- if(rMimeType.startsWith("image"))
+ if(aMimeType.startsWith("image"))
{
// image data
std::u16string_view aData(rCandidate.subView(nPos));