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

Caolán McNamara caolanm at redhat.com
Sat Jul 30 18:24:02 UTC 2016


 writerfilter/qa/cppunittests/rtftok/data/fail/topcontext-1.rtf |binary
 writerfilter/source/dmapper/DomainMapper.cxx                   |    7 ++++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 2acc9d06291b3f271c2a88bb4995d52d2d8d2152
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 30 19:22:15 2016 +0100

    fftester: context stack check
    
    Change-Id: I4a135a9f9ac2f16f9dab096f5c234ff1d6e5e853

diff --git a/writerfilter/qa/cppunittests/rtftok/data/fail/topcontext-1.rtf b/writerfilter/qa/cppunittests/rtftok/data/fail/topcontext-1.rtf
new file mode 100644
index 0000000..7cdb94a
Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/fail/topcontext-1.rtf differ
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 6ca8528..26eaee9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3225,14 +3225,15 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
                            && !bSingleParagraph
                            && !m_pImpl->GetIsDummyParaAddedForTableInSection()
                            && !m_pImpl->GetIsLastParagraphFramed();
-            if (bRemove)
+            PropertyMapPtr xContext = bRemove ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
+            if (xContext)
             {
                 // tdf#97417 delete numbering of the paragraph
                 // it will be deleted anyway, and the numbering would be copied
                 // to the next paragraph in sw SplitNode and then be applied to
                 // every following paragraph
-                m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_RULES);
-                m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_LEVEL);
+                xContext->Erase(PROP_NUMBERING_RULES);
+                xContext->Erase(PROP_NUMBERING_LEVEL);
             }
             m_pImpl->SetParaSectpr(false);
             m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH));


More information about the Libreoffice-commits mailing list