summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-08-17 21:47:22 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-08-17 23:11:15 +0200
commitc0cc02e2934aeb12dda44818955e5964496c186a (patch)
tree16f450bbe38e14d336bdbac3220b642b9a302a87 /sw/qa/extras/ooxmlimport
parent8c0cc5cd7befffc6e8e6361ba67807a799cc997f (diff)
tdf#50097: DOCX: export form controls as MSO ActiveX controls
* Use the same structure for export what MSO uses ** Position and size information are exported as VML shape properties ** Different handling of inline and floating controls (pict or object) ** Do some changes on VML shape export to match how MSO exports these controls ** Write out activeX.xml and activeX.bin to store control properties ** Use persistStorage storage type defined in activeX.xml * Drop grabbaging of activex.XML and activeX.bin * Cleanup control related test code Change-Id: I38bb2b2ffd2676c5459b61ec2549c31348bab41c Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/41256 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/activex_checkbox.docxbin13851 -> 0 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx28
2 files changed, 0 insertions, 28 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/activex_checkbox.docx b/sw/qa/extras/ooxmlimport/data/activex_checkbox.docx
deleted file mode 100755
index d7415ef5a5c6..000000000000
--- a/sw/qa/extras/ooxmlimport/data/activex_checkbox.docx
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2c2da5e9e7f3..e44d41f26d03 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -61,7 +61,6 @@
#include <unotools/streamwrap.hxx>
#include <comphelper/propertysequence.hxx>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
-#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/awt/CharSet.hpp>
#include <test/mtfxmldump.hxx>
@@ -1464,33 +1463,6 @@ DECLARE_OOXMLIMPORT_TEST(testGroupShapeFontName, "groupshape-fontname.docx")
CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(getRun(getParagraphOfText(1, xText), 1), "CharFontNameAsian"));
}
-DECLARE_OOXMLIMPORT_TEST( testActiveXCheckbox, "activex_checkbox.docx" )
-{
- uno::Reference<drawing::XControlShape> xControlShape( getShape(1), uno::UNO_QUERY );
- CPPUNIT_ASSERT( xControlShape.is() );
-
- // Check control type
- uno::Reference<beans::XPropertySet> xPropertySet( xControlShape->getControl(), uno::UNO_QUERY );
- uno::Reference<lang::XServiceInfo> xServiceInfo( xPropertySet, uno::UNO_QUERY );
- CPPUNIT_ASSERT_EQUAL( true, bool( xServiceInfo->supportsService( "com.sun.star.form.component.CheckBox" ) ) );
-
- // Check custom label
- CPPUNIT_ASSERT_EQUAL( OUString( "Custom Caption" ), getProperty<OUString>(xPropertySet, "Label") );
-
- // Check background color (highlight system color)
- CPPUNIT_ASSERT_EQUAL( sal_Int32( 0x316AC5 ), getProperty<sal_Int32>(xPropertySet, "BackgroundColor") );
-
- // Check Text color (active border system color)
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD4D0C8), getProperty<sal_Int32>(xPropertySet, "TextColor"));
-
- // Check state of the checkbox
- CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPropertySet, "State"));
-
- // Check anchor type
- uno::Reference<beans::XPropertySet> xPropertySet2(xControlShape, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
-}
-
DECLARE_OOXMLIMPORT_TEST(testTdf111550, "tdf111550.docx")
{
// The test document has following ill-formed structure: