[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - 2 commits - writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 31 09:26:58 PDT 2012


 writerfilter/source/dmapper/DomainMapperTableManager.cxx |   14 ++++++++++++--
 writerfilter/source/dmapper/DomainMapperTableManager.hxx |    2 ++
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit f38ae978081536a148ef2d0ee7f0368963bf69cf
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Oct 31 14:41:14 2012 +0100

    n#785767 import NS_ooxml::LN_CT_TrPrBase_gridBefore
    
    Change-Id: Id7f1471b49af52e6f6b0515ccd1fe8e12c50d9b5

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index ea9f7a1..62d70bb 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -53,6 +53,7 @@ DomainMapperTableManager::DomainMapperTableManager(bool bOOXML, bool bImplicitMe
     m_nRow(0),
     m_nCell(),
     m_nGridSpan(1),
+    m_nGridBefore(0),
     m_nGridAfter(0),
     m_nCellBorderIndex(0),
     m_nHeaderRepeat(0),
@@ -319,6 +320,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
                     }
                 }
                 break;
+            case NS_ooxml::LN_CT_TrPrBase_gridBefore:
+                m_nGridBefore = nIntValue;
+                break;
             case NS_ooxml::LN_CT_TrPrBase_gridAfter:
                 m_nGridAfter = nIntValue;
                 break;
@@ -465,12 +469,12 @@ void DomainMapperTableManager::endOfRowAction()
     double nFullWidth = m_nTableWidth;
     //the positions have to be distibuted in a range of 10000
     const double nFullWidthRelative = 10000.;
-    if( pTableGrid->size() == ( nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 )
+    if( pTableGrid->size() == ( m_nGridBefore + nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 )
     {
         uno::Sequence< text::TableColumnSeparator > aSeparators( m_nCell.back( ) - 1 );
         text::TableColumnSeparator* pSeparators = aSeparators.getArray();
         sal_Int16 nLastRelPos = 0;
-        sal_uInt32 nBorderGridIndex = 0;
+        sal_uInt32 nBorderGridIndex = m_nGridBefore;
 
         ::std::vector< sal_Int32 >::const_iterator aSpansIter = pCurrentSpans->begin( );
         for( sal_uInt32 nBorder = 0; nBorder < m_nCell.back( ) - 1; ++nBorder )
@@ -534,7 +538,7 @@ void DomainMapperTableManager::endOfRowAction()
     m_nCellBorderIndex = 0;
     pCurrentSpans->clear();
 
-    m_nGridAfter = 0;
+    m_nGridBefore = m_nGridAfter = 0;
 
 #ifdef DEBUG_DOMAINMAPPER
     dmapper_logger->endElement();
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index ab6abb3..2c346fb 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -46,6 +46,7 @@ class DomainMapperTableManager : public DomainMapperTableManager_Base_t
     sal_uInt32      m_nRow;
     ::std::vector< sal_uInt32 > m_nCell;
     sal_uInt32      m_nGridSpan;
+    sal_uInt32      m_nGridBefore; ///< number of grid columns in the parent table's table grid which must be skipped before the contents of this table row are added to the parent table
     sal_uInt32      m_nGridAfter; ///< number of grid columns in the parent table's table grid which shall be left after the last cell in the table row
     sal_uInt32      m_nCellBorderIndex; //borders are provided for all cells and need counting
     sal_Int32       m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops
commit 05015db5b5f10ac3548e34b0dfb32ea469d60420
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Oct 31 11:35:40 2012 +0100

    n#785767 import NS_ooxml::LN_CT_TrPrBase_gridAfter
    
    Change-Id: I4cb64ae2b2f2dbf643e38c5208eb759f265acafd

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index f5129f1..ea9f7a1 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -53,6 +53,7 @@ DomainMapperTableManager::DomainMapperTableManager(bool bOOXML, bool bImplicitMe
     m_nRow(0),
     m_nCell(),
     m_nGridSpan(1),
+    m_nGridAfter(0),
     m_nCellBorderIndex(0),
     m_nHeaderRepeat(0),
     m_nTableWidth(0),
@@ -318,6 +319,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
                     }
                 }
                 break;
+            case NS_ooxml::LN_CT_TrPrBase_gridAfter:
+                m_nGridAfter = nIntValue;
+                break;
             default:
                 bRet = false;
 
@@ -461,7 +465,7 @@ void DomainMapperTableManager::endOfRowAction()
     double nFullWidth = m_nTableWidth;
     //the positions have to be distibuted in a range of 10000
     const double nFullWidthRelative = 10000.;
-    if( pTableGrid->size() == nGrids && m_nCell.back( ) > 0 )
+    if( pTableGrid->size() == ( nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 )
     {
         uno::Sequence< text::TableColumnSeparator > aSeparators( m_nCell.back( ) - 1 );
         text::TableColumnSeparator* pSeparators = aSeparators.getArray();
@@ -530,6 +534,8 @@ void DomainMapperTableManager::endOfRowAction()
     m_nCellBorderIndex = 0;
     pCurrentSpans->clear();
 
+    m_nGridAfter = 0;
+
 #ifdef DEBUG_DOMAINMAPPER
     dmapper_logger->endElement();
 #endif
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index 0435cb9..ab6abb3 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -46,6 +46,7 @@ class DomainMapperTableManager : public DomainMapperTableManager_Base_t
     sal_uInt32      m_nRow;
     ::std::vector< sal_uInt32 > m_nCell;
     sal_uInt32      m_nGridSpan;
+    sal_uInt32      m_nGridAfter; ///< number of grid columns in the parent table's table grid which shall be left after the last cell in the table row
     sal_uInt32      m_nCellBorderIndex; //borders are provided for all cells and need counting
     sal_Int32       m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops
     sal_Int32       m_nTableWidth; //might be set directly or has to be calculated from the column positions


More information about the Libreoffice-commits mailing list