[Libreoffice-commits] core.git: sw/qa writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 8 07:02:24 UTC 2018


 sw/qa/core/data/ooxml/pass/tdf119136.docx         |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    4 +++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b9a739e0d3909e0fa4b76d5c0087d92a505e95fa
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Tue Aug 7 21:10:59 2018 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Wed Aug 8 09:02:00 2018 +0200

    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/58705
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/core/data/ooxml/pass/tdf119136.docx b/sw/qa/core/data/ooxml/pass/tdf119136.docx
new file mode 100644
index 000000000000..2baa624bbb53
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/tdf119136.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 636153e8633f..48b43aa52849 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -713,7 +713,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?");
 


More information about the Libreoffice-commits mailing list