summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfimport
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-10-31 11:59:09 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-04 09:20:47 +0000
commit9130627e21dd7c52c5eee1acc4b71f86eb9f3118 (patch)
tree12faff6c8dee6626ee941d27e4da9016326ad7c5 /sw/qa/extras/odfimport
parentc1ea561f6a01044357052789bbc6c8ec52061d41 (diff)
tdf#41542 globally allow padding without borders: layout
Styles with borders do not have a requirement for visible borders in order to apply padding in the ODF specs. This was only an implementation design, so remove that layout restriction. So, padding will be allowed now for any border (not just textframes/cells) and it will be allowed for any format (not only those marked with the compatibility setting AllowPaddingWithoutBorders - which is now redefined to indicate whether the UI allows creating borderless padding). The global UI implementation to allow creating these types of documents will come in 5.4. Allow the layout already in 5.3 to enhance compatibility between supported versions. Change-Id: I75bab7cbfff23bf70406123f8531e2fea352ddda Reviewed-on: https://gerrit.libreoffice.org/30434 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/odfimport')
-rwxr-xr-xsw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odtbin0 -> 15669 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx6
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt
new file mode 100755
index 000000000000..9585041de3b2
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 90f1da1f96f2..9c21cad377b7 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -242,6 +242,12 @@ DECLARE_ODFIMPORT_TEST(testOdtBorders, "borders_ooo33.odt")
} while(xParaEnum->hasMoreElements());
}
+DECLARE_ODFIMPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPadding.odt")
+{
+ // the page style's borderless padding should force this to 3 pages, not 1
+ CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
DECLARE_ODFIMPORT_TEST(testPageStyleLayoutDefault, "hello.odt")
{
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);