summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-01-16 22:04:32 +0300
committerJustin Luth <justin_luth@sil.org>2017-01-18 04:43:38 +0000
commit34d32031ed2ab1969377abbc91981a056fe375b7 (patch)
tree63d365268058da83e600f4ef5ecfc1e679da85b6 /sw/qa
parentfa2eb4b43fc872c171129d477cfabe9fa29d78ce (diff)
tdf#92470 docxexport: add support for XML_numRestart
Although import handled whether footnote numbering restarted every page, chapter(section) or document, that information was not being exported in docx. Change-Id: If9e0a1d53c8610b18b949fd918c5dd7d7bd94682 Reviewed-on: https://gerrit.libreoffice.org/33183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docxbin0 -> 5154 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx b/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx
new file mode 100755
index 000000000000..b8746968b44a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index f93ace6ad4c3..e5e4880556c4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/Hatch.hpp>
+#include <ftninfo.hxx>
#include <string>
@@ -110,6 +111,14 @@ DECLARE_OOXMLEXPORT_TEST(testFdo68787, "fdo68787.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf92470_footnoteRestart, "tdf92470_footnoteRestart.docx")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT( pDoc );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote doesn't restart every Page", FTNNUM_PAGE, pDoc->GetFootnoteInfo().eNum );
+}
+
DECLARE_OOXMLEXPORT_TEST(testCharacterBorder, "charborder.odt")
{
uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY);