[Libreoffice-commits] core.git: Branch 'feature/textbox' - 2 commits - sw/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Wed May 14 07:25:09 PDT 2014


 sw/source/core/doc/textboxhelper.cxx              |    4 ++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    3 +++
 2 files changed, 7 insertions(+)

New commits:
commit 356c059eddab6ec72f259f4bbbc45adbf3329c4a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 16:06:13 2014 +0200

    SwTextBoxHelper::syncProperty(): avoid crash on not-yet-inserted shape
    
    Change-Id: Ic5d6a62ec3ba2e096e9257ab7d30004cf3213069

diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index ec27548..9937778 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -105,6 +105,10 @@ uno::Any SwTextBoxHelper::getXTextAppend(SwFrmFmt* pShape, const uno::Type& rTyp
 
 void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, const OUString& rPropertyName, const css::uno::Any& rValue)
 {
+    // No shape yet? Then nothing to do, initial properties are set by create().
+    if (!pShape)
+        return;
+
     uno::Any aValue(rValue);
     nMemberId &= ~CONVERT_TWIPS;
 
commit df5d8624b7dfd68e206cd484d46723af4b91b441
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 14:52:19 2014 +0200

    DomainMapper_Impl::AddDummyParaForTableInSection: shapes can't have sections
    
    Change-Id: I9f90b515171ce4b498de49c2381b7324002e3c20

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 410b064..248c436 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -300,6 +300,9 @@ void DomainMapper_Impl::RemoveDummyParaForTableInSection()
 }
 void DomainMapper_Impl::AddDummyParaForTableInSection()
 {
+    // Shapes can't have sections.
+    if (IsInShape())
+        return;
 
     if (!m_aTextAppendStack.empty())
     {


More information about the Libreoffice-commits mailing list