summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-07-05 14:36:06 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-07-05 17:15:25 +0200
commite6ab906ebe9995fb813db7b66df4f9b2def76a1c (patch)
tree8fa8805d73996fbfd267d45c91c6d60ed209d6e2 /svgio/source
parenta67675e7e248e056637be8b70d620379cdfb682e (diff)
tdf#156168: do nothing when there is no concatenation
Regression from: tdf#156034: check for css style further up in the hierarchy Change-Id: I92c6673f1249cc4a273c490cdc0496474ce1f0c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153498 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Change-Id: Ie699f40ea813d2ba5dc031008d56e2fce73a5715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154056 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgnode.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 992aaf72bce0..4f82a16ebf1e 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -120,7 +120,7 @@ namespace {
addCssStyle(rDocument, aNewConcatenated);
// look further up in the hierarchy
- if(pParent && pParent->getId())
+ if(!aConcatenated.isEmpty() && pParent && pParent->getId())
{
const OUString& rParentId = pParent->getId().value();
addCssStyle(rDocument, "#" + rParentId + aConcatenated);
@@ -140,7 +140,7 @@ namespace {
addCssStyle(rDocument, aNewConcatenated);
// look further up in the hierarchy
- if(pParent)
+ if(!aConcatenated.isEmpty() && pParent)
{
std::vector <OUString> aParentClasses = parseClass(*pParent);
for(const auto &aParentClass : aParentClasses)