diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-15 18:34:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-15 19:05:23 +0200 |
commit | 8bfbfc06fefb418269734cfb17c70a5ae5a42d2a (patch) | |
tree | 50fe21f8a5d8df2068ec8c26c682be08dbde8955 /sw/qa | |
parent | 177903cf0f0d5c6bf00f6bd732eff8efab235f5e (diff) |
DOCX import: fix chart size when it's inside a TextFrame
Change-Id: I3edb253238db182054b7688061916a2432b687b5
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/chart-size.docx | bin | 0 -> 18128 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/chart-size.docx b/sw/qa/extras/ooxmlimport/data/chart-size.docx Binary files differnew file mode 100644 index 000000000000..da5d144438a3 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/chart-size.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 7c4e14b60e51..3ffe132a90bd 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/text/XTextFieldsSupplier.hpp> #include <com/sun/star/text/XTextFrame.hpp> #include <com/sun/star/text/XTextFramesSupplier.hpp> +#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp> #include <com/sun/star/text/XTextViewCursorSupplier.hpp> #include <com/sun/star/style/BreakType.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> @@ -2108,6 +2109,15 @@ DECLARE_OOXMLIMPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx" CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6e4])); } +DECLARE_OOXMLIMPORT_TEST(testChartSize, "chart-size.docx") +{ + // When chart was in a TextFrame, its size was too large. + uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY); + // This was 10954. + CPPUNIT_ASSERT_EQUAL(sal_Int32(6008), getProperty<sal_Int32>(xEmbeddedObjects->getByIndex(0), "Width")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |