Kaydet (Commit) e46d27a6 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

tdf#105381 ww8export: support footnote numbering per page

This is only for the benefit of MSOffice, LO already uses
Dop.rncFootnote for this, but MSO requires this section sprm.
LO import currently ignores sprmSRncFtn.

Endnotes in LO do not currently support .eNum, so we can't
support MSO's rncRstSect for sprmSRncEdn, leaving only
the default - so no use writing that out.

Change-Id: Iaff703e806d1cb62bc5990eb1cdfe323705bf7ee
Reviewed-on: https://gerrit.libreoffice.org/43622Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 00b28ffe
...@@ -183,7 +183,7 @@ public: ...@@ -183,7 +183,7 @@ public:
/// docx requires footnoteRef/endnoteRef tag at the beginning of each of them /// docx requires footnoteRef/endnoteRef tag at the beginning of each of them
virtual bool FootnoteEndnoteRefTag() { return false; }; virtual bool FootnoteEndnoteRefTag() { return false; };
/// for docx footnotePr/endnotePr inside sectPr /// for footnote/endnote section properties
virtual void SectFootnoteEndnotePr() {}; virtual void SectFootnoteEndnotePr() {};
/// for docx w:commentReference /// for docx w:commentReference
......
...@@ -1317,6 +1317,18 @@ void WW8AttributeOutput::StartSection() ...@@ -1317,6 +1317,18 @@ void WW8AttributeOutput::StartSection()
m_rWW8Export.pO->clear(); m_rWW8Export.pO->clear();
} }
void WW8AttributeOutput::SectFootnoteEndnotePr()
{
const SwFootnoteInfo& rInfo = m_rWW8Export.m_pDoc->GetFootnoteInfo();
m_rWW8Export.InsUInt16( NS_sprm::sprmSRncFtn );
switch( rInfo.eNum )
{
case FTNNUM_PAGE: m_rWW8Export.pO->push_back( (sal_uInt8) /*rncRstPage*/ 2 ); break;
case FTNNUM_CHAPTER: m_rWW8Export.pO->push_back( (sal_uInt8) /*rncRstSect*/ 1 ); break;
default: m_rWW8Export.pO->push_back( (sal_uInt8) /*rncCont*/ 0 ); break;
}
}
void WW8AttributeOutput::SectionFormProtection( bool bProtected ) void WW8AttributeOutput::SectionFormProtection( bool bProtected )
{ {
//If the document is to be exported as protected, then if a segment //If the document is to be exported as protected, then if a segment
......
...@@ -153,6 +153,9 @@ public: ...@@ -153,6 +153,9 @@ public:
/// Start of the section properties. /// Start of the section properties.
virtual void StartSection() override; virtual void StartSection() override;
// footnote / endnote section properties
virtual void SectFootnoteEndnotePr() override;
/// End of the section properties. /// End of the section properties.
/// ///
/// No-op for binary filters. /// No-op for binary filters.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment