[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - writerfilter/qa writerfilter/source

Caolán McNamara caolanm at redhat.com
Sat Jul 30 21:35:55 UTC 2016


 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf |binary
 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf |binary
 writerfilter/source/dmapper/DomainMapper.cxx                     |    9 +++++----
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                |    7 +++++--
 4 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 4b5a90d31c9e41a4f987e6306a1f4feab10b4266
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 29 21:24:26 2016 +0100

    fftester: another empty table manager stack
    
    Change-Id: If3148cb6e16cff4aad28c4f86467c66ed04bcd05
    (cherry picked from commit d00fc303bca7765762a602531b7d3b40ce8f1740)
    Reviewed-on: https://gerrit.libreoffice.org/27703
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf
new file mode 100644
index 0000000..58328ed
Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf differ
diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf
new file mode 100644
index 0000000..9fd5892
Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf differ
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 7a91ecf..8a6cf50 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -213,7 +213,7 @@ DomainMapper::~DomainMapper()
 
 void DomainMapper::lcl_attribute(Id nName, Value & val)
 {
-    if (m_pImpl->getTableManager().attribute(nName, val))
+    if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().attribute(nName, val))
         return;
 
     static const int nSingleLineSpacing = 240;
@@ -414,7 +414,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                 else
                     aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100( nIntValue ));
 
-                if( m_pImpl->getTableManager().isInCell() )
+                if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInCell())
                 {
                     // direct formatting is applied for table cell data
                     TablePropertyMapPtr pTblCellWithDirectFormatting(new TablePropertyMap);
@@ -443,7 +443,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                         aSpacing.Mode = style::LineSpacingMode::FIX;
                     }
 
-                if( m_pImpl->getTableManager().isInCell() )
+                if (m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInCell())
                 {
                     // If the table manager got the line rule after
                     // ooxml::CT_Spacing_line, then it should get the rule
@@ -2927,7 +2927,8 @@ void DomainMapper::lcl_endShape( )
         // empty paragraph at the end of the shape text will cause problems: if
         // the shape text ends with a table, the extra paragraph will be
         // handled as an additional row of the ending table.
-        m_pImpl->getTableManager().endTable();
+        if (m_pImpl->hasTableManager())
+            m_pImpl->getTableManager().endTable();
 
         lcl_endParagraphGroup();
         m_pImpl->PopShapeContext( );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ac8ea02..5959f6a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2017,8 +2017,11 @@ void DomainMapper_Impl::UpdateEmbeddedShapeProps(const uno::Reference< drawing::
 
 void DomainMapper_Impl::PopShapeContext()
 {
-    getTableManager().endLevel();
-    popTableManager();
+    if (hasTableManager())
+    {
+        getTableManager().endLevel();
+        popTableManager();
+    }
     if ( m_aAnchoredStack.size() > 0 )
     {
         // For OLE object replacement shape, the text append context was already removed


More information about the Libreoffice-commits mailing list