[Libreoffice-commits] .: Branch 'libreoffice-3-4-0' - sw/source
Noel Power
noelp at kemper.freedesktop.org
Thu May 19 02:05:31 PDT 2011
sw/source/filter/ww8/docxattributeoutput.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 83109f433e142fc4e5395331585a068843175030
Author: Noel Power <noel.power at novell.com>
Date: Wed May 18 16:13:20 2011 +0100
fix for fdo#36552
fix up exported column widths
Signed-off-by: Tor Lillqvist <tlillqvist at novell.com>
Signed-off-by: Cedric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 74af00c..9fd3150 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1478,6 +1478,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Cell prefered width
SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() );
+ if ( pTableTextNodeInfoInner->getCell() )
+ nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() - 1 );
m_pSerializer->singleElementNS( XML_w, XML_tcW,
FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
FSNS( XML_w, XML_type ), "dxa",
@@ -1712,12 +1714,16 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Write the table grid infos
m_pSerializer->startElementNS( XML_w, XML_tblGrid, FSEND );
-
+ sal_Int32 nPrv = 0;
ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner );
for ( ww8::GridCols::const_iterator it = pGridCols->begin(); it != pGridCols->end(); ++it )
+ {
+ sal_Int32 nWidth = sal_Int32( *it ) - nPrv;
m_pSerializer->singleElementNS( XML_w, XML_gridCol,
- FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( *it ) ).getStr( ),
+ FSNS( XML_w, XML_w ), OString::valueOf( nWidth ).getStr( ),
FSEND );
+ nPrv = sal_Int32( *it );
+ }
m_pSerializer->endElementNS( XML_w, XML_tblGrid );
}
More information about the Libreoffice-commits
mailing list