summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-04 21:35:53 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-05 09:12:09 +0100
commit209f2fe0304114409434a3bf5f1e08c6613d83c0 (patch)
treeb00d6a753d57719b013900a76b2d6b68cf879b86 /sw/qa
parentc394e6a5c850f750a98244291bfd0b00e72481d7 (diff)
tdf#121867 DOCX filter: handle page width zoom
And other non-fixed zoom types, similar to how DOC does it. Change-Id: Ie84340b4e662d2329b5d3918900adfd0c3e9b8e9 Reviewed-on: https://gerrit.libreoffice.org/67378 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121867.odtbin0 -> 7856 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121867.odt b/sw/qa/extras/ooxmlexport/data/tdf121867.odt
new file mode 100644
index 000000000000..361121d23b61
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121867.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 3a38655c3781..a67ced7ed730 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -20,6 +20,8 @@
#include <sfx2/docfilt.hxx>
#include <svx/xfillit0.hxx>
+#include <editsh.hxx>
+
class Test : public SwModelTestBase
{
public:
@@ -86,6 +88,14 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, "empty-date-control.odt")
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", u" ");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf121867, "tdf121867.odt")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwEditShell* pEditShell = pTextDoc->GetDocShell()->GetEditShell();
+ // Without the accompanying fix in place, this test would have failed with
+ // 'Expected: 3; Actual : 0', i.e. page width zoom was lost on export.
+ CPPUNIT_ASSERT_EQUAL(SvxZoomType::PAGEWIDTH, pEditShell->GetViewOptions()->GetZoomType());
+}
DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt")
{