@@ -127,6 +127,103 @@ function multiPageHeaderFooterDocumentXml(): string {
127127` ;
128128}
129129
130+ function twoSectionFooterDocumentXml ( ) : string {
131+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
132+ <w:document xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
133+ <w:body>
134+ <w:p>
135+ <w:pPr><w:pStyle w:val="Heading1"/></w:pPr>
136+ <w:r><w:t>Section 1</w:t></w:r>
137+ </w:p>
138+ <w:p>
139+ <w:r><w:t>First section body content.</w:t></w:r>
140+ </w:p>
141+ <w:p>
142+ <w:pPr>
143+ <w:sectPr>
144+ <w:footerReference w:type="default" r:id="rId10"/>
145+ <w:type w:val="nextPage"/>
146+ <w:pgSz w:w="12240" w:h="15840"/>
147+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
148+ <w:cols w:space="720"/>
149+ <w:docGrid w:linePitch="360"/>
150+ </w:sectPr>
151+ </w:pPr>
152+ </w:p>
153+ <w:p>
154+ <w:pPr><w:pStyle w:val="Heading1"/></w:pPr>
155+ <w:r><w:t>Section 2</w:t></w:r>
156+ </w:p>
157+ <w:p>
158+ <w:r><w:t>Second section content lives on the next page.</w:t></w:r>
159+ </w:p>
160+ <w:sectPr>
161+ <w:footerReference w:type="default" r:id="rId9"/>
162+ <w:pgSz w:w="12240" w:h="15840"/>
163+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
164+ <w:cols w:space="720"/>
165+ <w:docGrid w:linePitch="360"/>
166+ </w:sectPr>
167+ </w:body>
168+ </w:document>
169+ ` ;
170+ }
171+
172+ function footerFootnoteTransitionDocumentXml ( ) : string {
173+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
174+ <w:document xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
175+ <w:body>
176+ <w:p>
177+ <w:r><w:t>Footer transition anchor</w:t></w:r>
178+ <w:r><w:rPr><w:rStyle w:val="FootnoteReference"/></w:rPr><w:footnoteReference w:id="1"/></w:r>
179+ <w:r><w:t>.</w:t></w:r>
180+ </w:p>
181+ <w:sectPr>
182+ <w:footerReference w:type="default" r:id="rId10"/>
183+ <w:pgSz w:w="12240" w:h="15840"/>
184+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
185+ <w:cols w:space="720"/>
186+ <w:docGrid w:linePitch="360"/>
187+ </w:sectPr>
188+ </w:body>
189+ </w:document>
190+ ` ;
191+ }
192+
193+ function simpleFootnotesXml ( ) : string {
194+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
195+ <w:footnotes xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
196+ <w:footnote w:type="separator" w:id="-1">
197+ <w:p><w:r><w:separator/></w:r></w:p>
198+ </w:footnote>
199+ <w:footnote w:type="continuationSeparator" w:id="0">
200+ <w:p><w:r><w:continuationSeparator/></w:r></w:p>
201+ </w:footnote>
202+ <w:footnote w:id="1">
203+ <w:p>
204+ <w:pPr><w:pStyle w:val="FootnoteText"/></w:pPr>
205+ <w:r><w:rPr><w:rStyle w:val="FootnoteReference"/></w:rPr><w:footnoteRef/></w:r>
206+ <w:r><w:t xml:space="preserve"> This is a simple footnote</w:t></w:r>
207+ </w:p>
208+ </w:footnote>
209+ </w:footnotes>
210+ ` ;
211+ }
212+
213+ function simpleFooterXml ( text : string ) : string {
214+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
215+ <w:ftr xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
216+ <w:p>
217+ <w:pPr>
218+ <w:pStyle w:val="Footer"/>
219+ <w:jc w:val="center"/>
220+ </w:pPr>
221+ <w:r><w:t>${ text } </w:t></w:r>
222+ </w:p>
223+ </w:ftr>
224+ ` ;
225+ }
226+
130227function complexFootnotesXml ( ) : string {
131228 return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
132229<w:footnotes xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
@@ -244,6 +341,23 @@ function trackedFooterXml(): string {
244341` ;
245342}
246343
344+ function inlinePageFieldFooterXml ( ) : string {
345+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
346+ <w:ftr xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
347+ <w:p>
348+ <w:pPr>
349+ <w:pStyle w:val="Footer"/>
350+ <w:jc w:val="center"/>
351+ </w:pPr>
352+ <w:r><w:t xml:space="preserve">Finance QA </w:t></w:r>
353+ <w:r><w:fldChar w:fldCharType="begin"/></w:r>
354+ <w:r><w:instrText xml:space="preserve"> PAGE </w:instrText></w:r>
355+ <w:r><w:fldChar w:fldCharType="end"/></w:r>
356+ </w:p>
357+ </w:ftr>
358+ ` ;
359+ }
360+
247361function trackedFootnotesXml ( ) : string {
248362 return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
249363<w:footnotes xmlns:w="${ NS_W } " xmlns:r="${ NS_R } ">
@@ -313,6 +427,27 @@ export const MULTI_PAGE_HEADER_FOOTER_DOC_PATH = ensureGeneratedFixture(
313427 'word/document.xml' : multiPageHeaderFooterDocumentXml ( ) ,
314428 } ,
315429) ;
430+ export const TWO_SECTION_FOOTER_DOC_PATH = ensureGeneratedFixture ( 'two-section-footer.docx' , 'h_f-normal.docx' , {
431+ 'word/document.xml' : twoSectionFooterDocumentXml ( ) ,
432+ 'word/footer1.xml' : simpleFooterXml ( 'Appendix footer' ) ,
433+ 'word/footer2.xml' : simpleFooterXml ( 'Main footer' ) ,
434+ } ) ;
435+ export const FOOTER_FOOTNOTE_TRANSITION_DOC_PATH = ensureGeneratedFixture (
436+ 'footer-footnote-transition.docx' ,
437+ 'h_f-normal.docx' ,
438+ {
439+ 'word/document.xml' : footerFootnoteTransitionDocumentXml ( ) ,
440+ 'word/footnotes.xml' : simpleFootnotesXml ( ) ,
441+ 'word/footer2.xml' : simpleFooterXml ( 'Transition footer' ) ,
442+ } ,
443+ ) ;
444+ export const FOOTER_INLINE_PAGE_FIELD_DOC_PATH = ensureGeneratedFixture (
445+ 'footer-inline-page-field.docx' ,
446+ 'h_f-normal.docx' ,
447+ {
448+ 'word/footer2.xml' : inlinePageFieldFooterXml ( ) ,
449+ } ,
450+ ) ;
316451export const STORY_ONLY_TRACKED_CHANGES_DOC_PATH = ensureGeneratedFixture (
317452 'story-only-tracked-changes.docx' ,
318453 'h_f-normal.docx' ,
0 commit comments