diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-03-31 15:04:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-03-31 18:43:21 +0200 |
commit | 8b7ff52ac87795881a4d86395885778f1da3d18b (patch) | |
tree | 8e0e132e24bad4d90d708274618d6d8b570dd084 /sw/qa | |
parent | 8da9f85abc508140b90e4f5be587aa05d4f1e5f4 (diff) |
tdf#140343 sw page rtl gutter margin: add DOC filter
The import's tokenizer was there since commit
3e13e053749e1bf19179bf83bdf0a18a9488b5e8 (#i2408# Import and export
set/ask references fields as set/input, change references to bookmarks
to show variable as appropiate, 2002-02-04), but it tried to read 2
bytes, not 1 byte, so it was broken. This did not cause problems in
practice till commit b897cc4dfc7111eb8dfd5d8aa8c970f21ab035d6
(consistently track amount of buffers remaining, 2017-04-10) started to
check for not reading past the end of the buffer.
The export was missing, since we previously tried to handle this at
import time, so the doc model didn't have the info anymore.
Change-Id: I0d15a16893de96104812b0cba4566c53f92673ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113415
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ww8export/data/rtl-gutter.doc | bin | 0 -> 22528 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/rtl-gutter.doc b/sw/qa/extras/ww8export/data/rtl-gutter.doc Binary files differnew file mode 100644 index 000000000000..37cbf8707ce6 --- /dev/null +++ b/sw/qa/extras/ww8export/data/rtl-gutter.doc diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index b2afbce478de..6364762be9b0 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -708,6 +708,23 @@ DECLARE_WW8EXPORT_TEST(testPresetDash, "tdf127166_prstDash_Word97.doc") } } +CPPUNIT_TEST_FIXTURE(Test, testRtlGutter) +{ + auto verify = [this]() { + uno::Reference<beans::XPropertySet> xStandard( + getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); + CPPUNIT_ASSERT(getProperty<bool>(xStandard, "RtlGutter")); + }; + + // Given a document with RTL gutter, when loading it: + load(mpTestDocumentPath, "rtl-gutter.doc"); + // Then make sure the section's gutter is still RTL: + // Without the accompanying fix in place, this test would have failed as the SPRM was missing. + verify(); + reload(mpFilter, "rtl-gutter.doc"); + verify(); +} + DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc") { CPPUNIT_ASSERT_EQUAL(1, getPages()); |