[Libreoffice-commits] .: 2 commits - sw/source
Lubos Lunak
llunak at kemper.freedesktop.org
Mon Mar 21 10:09:53 PDT 2011
sw/source/filter/ww8/docxattributeoutput.cxx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 3947a4533391d5528c092ae18a2ffb38ce6bdad5
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 21 15:43:18 2011 +0100
write some lnNumType attributes only when non-default
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2bf9584..baf9879 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2448,12 +2448,15 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
- m_pSerializer->singleElementNS( XML_w, XML_lnNumType,
- FSNS( XML_w, XML_countBy ), OString::valueOf( rLnNumInfo.GetCountBy()).getStr(),
- FSNS( XML_w, XML_restart ), rLnNumInfo.IsRestartEachPage() ? "newPage" : "continuous",
- FSNS( XML_w, XML_distance ), OString::valueOf( rLnNumInfo.GetPosFromLeft()).getStr(),
- FSNS( XML_w, XML_start ), OString::valueOf( long( nRestartNo ? nRestartNo : 1 )).getStr(),
- FSEND );
+ FastAttributeList* pAttr = m_pSerializer->createAttrList();
+ pAttr->add( FSNS( XML_w, XML_countBy ), OString::valueOf( rLnNumInfo.GetCountBy()).getStr());
+ pAttr->add( FSNS( XML_w, XML_restart ), rLnNumInfo.IsRestartEachPage() ? "newPage" : "continuous" );
+ if( rLnNumInfo.GetPosFromLeft())
+ pAttr->add( FSNS( XML_w, XML_distance ), OString::valueOf( rLnNumInfo.GetPosFromLeft()).getStr());
+ if( nRestartNo )
+ pAttr->add( FSNS( XML_w, XML_start ), OString::valueOf( long( nRestartNo )).getStr());
+ XFastAttributeListRef xAttrs( pAttr );
+ m_pSerializer->singleElementNS( XML_w, XML_lnNumType, xAttrs );
}
void DocxAttributeOutput::SectionTitlePage()
commit 6b43a6061263efd72d22a0217a45049ce64ca52f
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 21 15:32:46 2011 +0100
implement lnNumType (bnc#593885)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 519f7bf..2bf9584 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -111,6 +111,7 @@
#include <frmatr.hxx>
#include <ftninfo.hxx>
#include <htmltbl.hxx>
+#include <lineinfo.hxx>
#include <ndgrf.hxx>
#include <ndtxt.hxx>
#include <node.hxx>
@@ -2445,10 +2446,14 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
FSNS( XML_w, XML_val ), "false", FSEND );
}
-void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
+void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
- // see 2.6.8 lnNumType (Line Numbering Settings)
- OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
+ m_pSerializer->singleElementNS( XML_w, XML_lnNumType,
+ FSNS( XML_w, XML_countBy ), OString::valueOf( rLnNumInfo.GetCountBy()).getStr(),
+ FSNS( XML_w, XML_restart ), rLnNumInfo.IsRestartEachPage() ? "newPage" : "continuous",
+ FSNS( XML_w, XML_distance ), OString::valueOf( rLnNumInfo.GetPosFromLeft()).getStr(),
+ FSNS( XML_w, XML_start ), OString::valueOf( long( nRestartNo ? nRestartNo : 1 )).getStr(),
+ FSEND );
}
void DocxAttributeOutput::SectionTitlePage()
More information about the Libreoffice-commits
mailing list