summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-04 13:39:38 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-11 10:19:05 +0000
commit84272d115da1165ac5f7cf4ae53875855d762b25 (patch)
treefa97d5319616492e230ebe03a08e1f898c389d77 /sw/qa/extras/ooxmlimport
parent8568fec3b942e725a0114ff137a61b3292e079ed (diff)
Introduce twip/mm100 conversion functions instead of duplicated macros
Change-Id: Ib689e35b417e0e9016cd6a239c986e0603a99d62 Reviewed-on: https://gerrit.libreoffice.org/8837 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3c63f51f39c5..103a3db948f4 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -527,7 +527,7 @@ DECLARE_OOXMLIMPORT_TEST(testN766487, "n766487.docx")
xPropertySet.set(xParaEnum->nextElement(), uno::UNO_QUERY);
sal_Int32 nValue = 0;
xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue;
- CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(-360)), nValue);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-360)), nValue);
}
DECLARE_OOXMLIMPORT_TEST(testN693238, "n693238.docx")
@@ -1272,7 +1272,7 @@ DECLARE_OOXMLIMPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
CPPUNIT_ASSERT_EQUAL(COL_BLACK, sal_uInt32(aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
// w:sz="48" is in eights of a point, 1 pt is 20 twips.
- CPPUNIT_ASSERT_EQUAL(sal_Int16(TWIP_TO_MM100(48/8*20)), aShadow.ShadowWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(48/8*20)), aShadow.ShadowWidth);
}
DECLARE_OOXMLIMPORT_TEST(testN816593, "n816593.docx")
@@ -1343,7 +1343,7 @@ DECLARE_OOXMLIMPORT_TEST(testTableAutoColumnFixedSize, "table-auto-column-fixed-
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
// Width was not recognized during import when table size was 'auto'
- CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(3996)), getProperty<sal_Int32>(xTextTable, "Width"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(3996)), getProperty<sal_Int32>(xTextTable, "Width"));
}
DECLARE_OOXMLIMPORT_TEST(testFdo46361, "fdo46361.docx")
@@ -1934,9 +1934,9 @@ DECLARE_OOXMLIMPORT_TEST(testStrict, "strict.docx")
{
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
// This was only 127, pt suffix was ignored, so this got parsed as twips instead of points.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "BottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "BottomMargin"));
// This was only 1397, same issue
- CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(792 * 20)), getProperty<sal_Int32>(xPageStyle, "Height"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(792 * 20)), getProperty<sal_Int32>(xPageStyle, "Height"));
// Text was missing, due to not handling the strict namespaces.
getParagraph(1, "Hello world!");