summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-08-07 21:10:59 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-08-10 14:29:31 +0200
commita0bf275c37e9ac40597cc09fde8dc1fe3a04c858 (patch)
tree0cd6f521e431e0e809091137b582272ebd8609c4 /writerfilter
parentUpdate git submodules (diff)
downloadcore-a0bf275c37e9ac40597cc09fde8dc1fe3a04c858.tar.gz
core-a0bf275c37e9ac40597cc09fde8dc1fe3a04c858.zip
tdf#119136 GetPropertyFromStyleSheet infinite loop
So, apparently we accept a style that has no styleId and define it as such. Due to some reworkings, this function was called instead. Since we can "find" a style without a name, now every parentless style thought it inherited from this nameless style. Change-Id: I47b4119abd37ece94a39e636ddb7798b809ccb04 Reviewed-on: https://gerrit.libreoffice.org/58717 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a1b34dc42865..d2289c25fa9b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -681,7 +681,9 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
}
}
//search until the property is set or no parent is available
- StyleSheetEntryPtr pNewEntry = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
+ StyleSheetEntryPtr pNewEntry;
+ if ( !pEntry->sBaseStyleIdentifier.isEmpty() )
+ pNewEntry = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
SAL_WARN_IF( pEntry == pNewEntry, "writerfilter.dmapper", "circular loop in style hierarchy?");