From 2f8f63f15a5a93781e4feceddeee18df74dc326a Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Mon, 6 Aug 2012 11:43:44 +0200 Subject: don't write out empty , not allowed by the .docx spec Change-Id: I30a24da0e6a568ed57d936fe769d47ea8465096d --- sw/source/filter/ww8/docxattributeoutput.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 3cb9d85e469f..8a93e1d0b6ee 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3752,9 +3752,19 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop ) const SfxPoolItem* pLR = m_rExport.HasItem( RES_LR_SPACE ); long nCurrentLeft = pLR ? ((const SvxLRSpaceItem*)pLR)->GetTxtLeft() : 0; + sal_uInt16 nCount = rTabStop.Count(); + + // must contain at least one , so don't write it empty + if( nCount == 0 ) + return; + if( nCount == 1 && rTabStop[ 0 ].GetAdjustment() == SVX_TAB_ADJUST_DEFAULT ) + { + GetExport().setDefaultTabStop( rTabStop[ 0 ].GetTabPos()); + return; + } + m_pSerializer->startElementNS( XML_w, XML_tabs, FSEND ); - sal_uInt16 nCount = rTabStop.Count(); for (sal_uInt16 i = 0; i < nCount; i++ ) { if( rTabStop[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT ) -- cgit