diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-06-07 11:49:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-07 13:01:00 +0200 |
commit | 1538e78227b6fb6c8676dbfa951f583d985ba053 (patch) | |
tree | 4bac6bf7fd4abfa2c930f0e52c81680bad8bf4e4 /sw | |
parent | d04ef1f208d6a32ffa3bdb56b951f85854bca897 (diff) |
bnc#820788 VML import of v:textbox's mso-fit-shape-to-text style property
Change-Id: I74a0ecd50ca61a4f5bf7ebdbf12743dc1fd9368a
(cherry picked from commit a22ef599bd3fdcf0bd5c3616aa566a5922624ff3)
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/n820788.docx | bin | 0 -> 10267 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n820788.docx b/sw/qa/extras/ooxmlimport/data/n820788.docx Binary files differnew file mode 100755 index 000000000000..759c4085d6e4 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n820788.docx 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 <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> #include <com/sun/star/text/SetVariableType.hpp> +#include <com/sun/star/text/SizeType.hpp> #include <com/sun/star/text/TableColumnSeparator.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/VertOrientation.hpp> @@ -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<sal_Int16>(xPropertySet, "DateFormat")); } +void Test::testN820788() +{ + // The problem was that AutoSize was not enabled for the text frame. + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + // This was text::SizeType::FIX. + CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xFrame, "SizeType")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |