summaryrefslogtreecommitdiff
path: root/sw/qa/extras/htmlexport/htmlexport.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-22 23:34:40 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-07-23 07:58:38 +0000
commite934df1c0702c37a6fcee956f75250e8b736c3c5 (patch)
tree4ca9f9e79d53857370d6e8e853f84a43474dfc65 /sw/qa/extras/htmlexport/htmlexport.cxx
parent0d5d8c22f7be41d408d8ee4012ef1a6f4368423e (diff)
fdo#81276: sw: HTML import: fix inverted test in CSS import
(regression from 5089bdb234a93bcb62b597c18b8ab66048246b13) Change-Id: I5b45c4c47ba66385b2b528b5a3039bda37b060d6 (cherry picked from commit 7dff37c65e08985b80ac79e13f5571819a8e739d) Reviewed-on: https://gerrit.libreoffice.org/10477 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa/extras/htmlexport/htmlexport.cxx')
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index fc0caf48a3e9..5fd15abd5c02 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -72,6 +72,19 @@ private:
#define DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, HtmlExportTest)
+DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo81276, "fdo81276.html")
+{
+ uno::Reference<container::XNameAccess> xPageStyles(getStyles("PageStyles"));
+ uno::Reference<beans::XPropertySet> xStyle(xPageStyles->getByName("HTML"), uno::UNO_QUERY);
+ // some rounding going on here?
+ CPPUNIT_ASSERT(abs(sal_Int32(29700) - getProperty<sal_Int32>(xStyle, "Width")) < 10);
+ CPPUNIT_ASSERT(abs(sal_Int32(21006) - getProperty<sal_Int32>(xStyle, "Height")) < 10);
+ CPPUNIT_ASSERT(abs(sal_Int32(500) - getProperty<sal_Int32>(xStyle, "LeftMargin")) < 10);
+ CPPUNIT_ASSERT(abs(sal_Int32(500) - getProperty<sal_Int32>(xStyle, "RightMargin")) < 10);
+ CPPUNIT_ASSERT(abs(sal_Int32(2000) - getProperty<sal_Int32>(xStyle, "TopMargin")) < 10);
+ CPPUNIT_ASSERT(abs(sal_Int32(500) - getProperty<sal_Int32>(xStyle, "BottomMargin")) < 10);
+}
+
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo62336, "fdo62336.docx")
{
// The problem was essentially a crash during table export as docx/rtf/html