summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-21 10:31:19 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-23 04:19:33 +0000
commit418f712d6e59a2142125ed7815143496bfb5ea81 (patch)
tree7ca29e71d74059ce1c17bf799ae919d192bb260a /sw/qa
parent34d278a5e6c40dd812480c09754fa1bcc53a71d6 (diff)
fdo#43641 testcase
Change-Id: I3426c7c23eb23fa7f91320ac036b0eb565bbc330 (cherry picked from commit abfcf7b958afb16a0e68525cefca5813ce7135eb) Reviewed-on: https://gerrit.libreoffice.org/4424 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlimport/data/fdo43641.docxbin0 -> 11966 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo43641.docx b/sw/qa/extras/ooxmlimport/data/fdo43641.docx
new file mode 100644
index 000000000000..90622f817776
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo43641.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index c895db206558..a398d91b8714 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -43,6 +43,7 @@
#include <bordertest.hxx>
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define EMU_TO_MM100(EMU) (EMU / 360)
class Test : public SwModelTestBase
{
@@ -120,6 +121,7 @@ public:
void testN820509();
void testN820788();
void testN820504();
+ void testFdo43641();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -207,6 +209,7 @@ void Test::run()
{"n820509.docx", &Test::testN820509},
{"n820788.docx", &Test::testN820788},
{"n820504.docx", &Test::testN820504},
+ {"fdo43641.docx", &Test::testFdo43641},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1469,6 +1472,16 @@ void Test::testN820504()
CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty<sal_Int32>(xStyle, "CharColor"));
}
+void Test::testFdo43641()
+{
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xGroupShape(xDraws->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xLine(xGroupShape->getByIndex(1), uno::UNO_QUERY);
+ // This was 2200, not 2579 in mm100, i.e. the size of the line shape was incorrect.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(928694)), xLine->getSize().Width);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();