From 1538e78227b6fb6c8676dbfa951f583d985ba053 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 7 Jun 2013 11:49:10 +0200 Subject: bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style property Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a (cherry picked from commit a22ef599bd3fdcf0bd5c3616aa566a5922624ff3) --- sw/qa/extras/ooxmlimport/data/n820788.docx | Bin 0 -> 10267 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 sw/qa/extras/ooxmlimport/data/n820788.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlimport/data/n820788.docx b/sw/qa/extras/ooxmlimport/data/n820788.docx new file mode 100755 index 000000000000..759c4085d6e4 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n820788.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index bd85ca23334e..7eb556cfc76d 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -124,6 +125,7 @@ public: void testWatermark(); void testPageBorderShadow(); void testN820509(); + void testN820788(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -198,6 +200,7 @@ void Test::run() {"watermark.docx", &Test::testWatermark}, {"page-border-shadow.docx", &Test::testPageBorderShadow}, {"n820509.docx", &Test::testN820509}, + {"n820788.docx", &Test::testN820788}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1246,6 +1249,16 @@ void Test::testN820509() CPPUNIT_ASSERT_EQUAL(sal_Int16(8), getProperty(xPropertySet, "DateFormat")); } +void Test::testN820788() +{ + // The problem was that AutoSize was not enabled for the text frame. + uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + // This was text::SizeType::FIX. + CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty(xFrame, "SizeType")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit