[Libreoffice-commits] .: 2 commits - sw/source

Lubos Lunak llunak at kemper.freedesktop.org
Tue Dec 21 11:25:44 PST 2010


 sw/source/filter/ww8/docxattributeoutput.cxx |   52 +++++++++++++--------------
 1 file changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 92e71f8834ea3ff71066d8708ddbd000a7430df3
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Dec 20 18:32:31 2010 +0100

    proper order of items inside w:tcPr

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 071bb5d..c0753d4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1310,11 +1310,23 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
     DocxExport& rExport = dynamic_cast< DocxExport& >( GetExport() );
     bool bEcma = rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
 
-    // The cell borders
-    m_pSerializer->startElementNS( XML_w, XML_tcBorders, FSEND );
-    SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
-    impl_pageBorders( m_pSerializer, pFmt->GetBox( ), !bEcma );
-    m_pSerializer->endElementNS( XML_w, XML_tcBorders );
+    // Cell prefered width
+    SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() );
+    m_pSerializer->singleElementNS( XML_w, XML_tcW,
+           FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
+           FSNS( XML_w, XML_type ), "dxa",
+           FSEND );
+
+    // Horizontal spans
+    const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
+    SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
+    SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
+
+    USHORT nColSpan = pCell->GetColSpan();
+    if ( nColSpan > 1 )
+        m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
+                FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
+                FSEND );
 
     // Vertical merges
     long vSpan = pTblBox->getRowSpan( );
@@ -1331,26 +1343,14 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
                 FSEND );
     }
 
-    // Horizontal spans
-    const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
-    SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
-    SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
-
-    USHORT nColSpan = pCell->GetColSpan();
-    if ( nColSpan > 1 )
-        m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
-                FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
-                FSEND );
+    // The cell borders
+    m_pSerializer->startElementNS( XML_w, XML_tcBorders, FSEND );
+    SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
+    impl_pageBorders( m_pSerializer, pFmt->GetBox( ), !bEcma );
+    m_pSerializer->endElementNS( XML_w, XML_tcBorders );
 
     TableBackgrounds( pTableTextNodeInfoInner );
 
-    // Cell prefered width
-    SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() );
-    m_pSerializer->singleElementNS( XML_w, XML_tcW,
-           FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
-           FSNS( XML_w, XML_type ), "dxa",
-           FSEND );
-
     // Cell margins
     m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
     const SvxBoxItem& rBox = pFmt->GetBox( );
commit 15768f07caa5eab4be08c68b9da0e5254aee5696
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Dec 20 18:23:49 2010 +0100

    proper position of w:jc inside of w:tblPr

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a9c38b3..071bb5d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1500,10 +1500,6 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
                 FSNS( XML_w, XML_type ), "dxa",
                 FSEND );
 
-    // Output the table borders
-    TableDefaultBorders( pTableTextNodeInfoInner );
-    TableBidi( pTableTextNodeInfoInner );
-
     // Output the table alignement
     const SwTable *pTable = pTableTextNodeInfoInner->getTable();
     SwFrmFmt *pTblFmt = pTable->GetFrmFmt( );
@@ -1536,6 +1532,10 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
             FSNS( XML_w, XML_val ), pJcVal,
             FSEND );
 
+    // Output the table borders
+    TableDefaultBorders( pTableTextNodeInfoInner );
+    TableBidi( pTableTextNodeInfoInner );
+
     // Table indent
     if ( nIndent != 0 )
         m_pSerializer->singleElementNS( XML_w, XML_tblInd,


More information about the Libreoffice-commits mailing list