diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-05-25 16:04:57 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-05-25 16:06:09 +0200 |
commit | 0d10b204876f050e7d2b204b00e925eb68e424f7 (patch) | |
tree | 5ea5ddfb0773a9fccfa004c774ac344444e8090e /sw | |
parent | d2de415599ed2e820eb9f53f104cfd3519e213de (diff) |
write special footnote/endnote list (17.11.3/8)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 4 |
3 files changed, 14 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index eeb3ca0830d3..87e55eb32f55 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3406,6 +3406,8 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) m_pSerializer->endElementNS( XML_w, XML_p ); m_pSerializer->endElementNS( XML_w, nItem ); + // if new special ones are added, update also WriteFootnoteEndnotePr() + // footnotes/endnotes themselves for ( FootnotesVector::const_iterator i = rVector.begin(); i != rVector.end(); ++i, ++nIndex ) { @@ -3428,7 +3430,8 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) } -void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info ) +void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, + const SwEndNoteInfo& info, int listtag ) { fs->startElementNS( XML_w, tag, FSEND ); const char* fmt = NULL; @@ -3467,15 +3470,20 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr if( info.nFtnOffset != 0 ) fs->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ), rtl::OString::valueOf( info.nFtnOffset + 1 ).getStr(), FSEND ); + if( listtag != 0 ) // we are writting to settings.xml, write also special footnote/endnote list + { // there are currently only two hardcoded ones ( see FootnotesEndnotes()) + fs->singleElementNS( XML_w, listtag, FSNS( XML_w, XML_id ), "0", FSEND ); + fs->singleElementNS( XML_w, listtag, FSNS( XML_w, XML_id ), "1", FSEND ); + } fs->endElementNS( XML_w, tag ); } void DocxAttributeOutput::SectFootnoteEndnotePr() { if( HasFootnotes()) - WriteFootnoteEndnotePr( m_pSerializer, XML_footnotePr, m_rExport.pDoc->GetFtnInfo()); + WriteFootnoteEndnotePr( m_pSerializer, XML_footnotePr, m_rExport.pDoc->GetFtnInfo(), 0 ); if( HasEndnotes()) - WriteFootnoteEndnotePr( m_pSerializer, XML_endnotePr, m_rExport.pDoc->GetEndNoteInfo()); + WriteFootnoteEndnotePr( m_pSerializer, XML_endnotePr, m_rExport.pDoc->GetEndNoteInfo(), 0 ); } void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti ) diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index eadd27328ea1..b3a3a26bf79d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -608,7 +608,7 @@ public: void FootnotesEndnotes( bool bFootnotes ); /// writes the footnotePr/endnotePr (depending on tag) section - void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info ); + void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); }; #endif // _DOCXATTRIBUTEOUTPUT_HXX_ diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 06e29437fa7d..84a0aefdcf69 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -669,9 +669,9 @@ void DocxExport::WriteSettings() pFS->singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND ); if( m_pAttrOutput->HasFootnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_footnotePr, pDoc->GetFtnInfo()); + m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_footnotePr, pDoc->GetFtnInfo(), XML_footnote ); if( m_pAttrOutput->HasEndnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_endnotePr, pDoc->GetEndNoteInfo()); + m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_endnotePr, pDoc->GetEndNoteInfo(), XML_endnote ); pFS->endElementNS( XML_w, XML_settings ); } |