docx export: always write tblInd attribute (even when equal to 0)

Otherwise when opening the docx in Office table may get misplaced.

Change-Id: Ic1df8d941c72a224d2db189ededfc5e134e5683a
Reviewed-on: https://gerrit.libreoffice.org/718
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2012-09-28 09:58:44 +02:00
committed by Miklos Vajna
parent 9a5eb5f51d
commit 559a1a5d28

View File

@@ -1813,12 +1813,11 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
TableBidi( pTableTextNodeInfoInner );
// Table indent
if ( nIndent != 0 )
m_pSerializer->singleElementNS( XML_w, XML_tblInd,
FSNS( XML_w, XML_w ), OString::valueOf( nIndent ).getStr( ),
FSNS( XML_w, XML_type ), "dxa",
FSEND );
// Table indent (need to get written even if == 0)
m_pSerializer->singleElementNS( XML_w, XML_tblInd,
FSNS( XML_w, XML_w ), OString::valueOf( nIndent ).getStr( ),
FSNS( XML_w, XML_type ), "dxa",
FSEND );
// Merge the marks for the ordered elements
m_pSerializer->mergeTopMarks( );