[Libreoffice-commits] .: sw/source
Lubos Lunak
llunak at kemper.freedesktop.org
Wed May 25 05:18:34 PDT 2011
sw/source/filter/ww8/docxexport.cxx | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 8607eca026061fbda4b7f89066813149c2230db9
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed May 25 14:17:35 2011 +0200
implement w:numStart (17.11.20)
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 59e8007..00bb541 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -697,21 +697,25 @@ void DocxExport::WriteSettings()
if( m_pAttrOutput->HasFootnotes())
{
- if( const char* fmt = numberingTypeToNumFmt( pDoc->GetFtnInfo().aFmt.GetNumberingType()))
- {
- pFS->startElementNS( XML_w, XML_footnotePr, FSEND );
+ const SwFtnInfo& ftnInfo = pDoc->GetFtnInfo();
+ pFS->startElementNS( XML_w, XML_footnotePr, FSEND );
+ if( const char* fmt = numberingTypeToNumFmt( ftnInfo.aFmt.GetNumberingType()))
pFS->singleElementNS( XML_w, XML_numFmt, FSNS( XML_w, XML_val ), fmt, FSEND );
- pFS->endElementNS( XML_w, XML_footnotePr );
- }
+ if( ftnInfo.nFtnOffset != 0 )
+ pFS->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ),
+ rtl::OString::valueOf( ftnInfo.nFtnOffset + 1 ).getStr(), FSEND );
+ pFS->endElementNS( XML_w, XML_footnotePr );
}
if( m_pAttrOutput->HasEndnotes())
{
- if( const char* fmt = numberingTypeToNumFmt( pDoc->GetEndNoteInfo().aFmt.GetNumberingType()))
- {
- pFS->startElementNS( XML_w, XML_endnotePr, FSEND );
+ const SwEndNoteInfo& endnoteInfo = pDoc->GetEndNoteInfo();
+ pFS->startElementNS( XML_w, XML_endnotePr, FSEND );
+ if( const char* fmt = numberingTypeToNumFmt( endnoteInfo.aFmt.GetNumberingType()))
pFS->singleElementNS( XML_w, XML_numFmt, FSNS( XML_w, XML_val ), fmt, FSEND );
- pFS->endElementNS( XML_w, XML_endnotePr );
- }
+ if( endnoteInfo.nFtnOffset != 0 )
+ pFS->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ),
+ rtl::OString::valueOf( endnoteInfo.nFtnOffset + 1 ).getStr(), FSEND );
+ pFS->endElementNS( XML_w, XML_endnotePr );
}
pFS->endElementNS( XML_w, XML_settings );
More information about the Libreoffice-commits
mailing list