Kaydet (Commit) 595cfbc4 authored tarafından Tamás Zolnai's avatar Tamás Zolnai

Add ActiveX control tests

Change-Id: I26e5ea3a5c3711139d88476b435a3a0b50dd9cb3
Reviewed-on: https://gerrit.libreoffice.org/41074Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst bfdd81f7
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,sd_activex_controls_tests))
$(eval $(call gb_CppunitTest_use_externals,sd_activex_controls_tests,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_add_exception_objects,sd_activex_controls_tests, \
sd/qa/unit/activex-controls-tests \
))
$(eval $(call gb_CppunitTest_use_libraries,sd_activex_controls_tests, \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
basegfx \
comphelper \
cppu \
cppuhelper \
drawinglayer \
editeng \
for \
forui \
i18nlangtag \
msfilter \
oox \
sal \
salhelper \
sax \
sd \
sfx \
sot \
svl \
svt \
svx \
svxcore \
test \
tl \
tk \
ucbhelper \
unotest \
utl \
vcl \
xo \
))
$(eval $(call gb_CppunitTest_set_include,sd_activex_controls_tests,\
-I$(SRCDIR)/sd/source/ui/inc \
-I$(SRCDIR)/sd/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sd_activex_controls_tests))
$(eval $(call gb_CppunitTest_use_ure,sd_activex_controls_tests))
$(eval $(call gb_CppunitTest_use_vcl,sd_activex_controls_tests))
$(eval $(call gb_CppunitTest_use_components,sd_activex_controls_tests,\
animations/source/animcore/animcore \
basic/util/sb \
chart2/source/chartcore \
chart2/source/controller/chartcontroller \
comphelper/util/comphelp \
configmgr/source/configmgr \
dbaccess/util/dba \
desktop/source/deployment/deployment \
embeddedobj/util/embobj \
emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/odfflatxml/odfflatxml \
filter/source/svg/svgfilter \
filter/source/xmlfilteradaptor/xmlfa \
filter/source/xmlfilterdetect/xmlfd \
forms/util/frm \
framework/util/fwk \
i18npool/util/i18npool \
linguistic/source/lng \
oox/util/oox \
package/source/xstor/xstor \
package/util/package2 \
sax/source/expatwrap/expwrap \
sd/util/sd \
sd/util/sdfilt \
sd/util/sdd \
$(if $(ENABLE_PDFIMPORT),sdext/source/pdfimport/pdfimport) \
sfx2/util/sfx \
sot/util/sot \
svl/source/fsstor/fsstorage \
svtools/util/svt \
svx/util/svxcore \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/expand/ucpexpand1 \
ucb/source/ucp/file/ucpfile1 \
ucb/source/ucp/package/ucppkg1 \
ucb/source/ucp/tdoc/ucptdoc1 \
unotools/util/utl \
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
uui/util/uui \
xmloff/util/xo \
xmlsecurity/util/xmlsecurity \
))
$(eval $(call gb_CppunitTest_use_configuration,sd_activex_controls_tests))
# vim: set noet sw=4 ts=4:
\ No newline at end of file
...@@ -36,6 +36,7 @@ $(eval $(call gb_Module_add_check_targets,sd,\ ...@@ -36,6 +36,7 @@ $(eval $(call gb_Module_add_check_targets,sd,\
CppunitTest_sd_filters_test \ CppunitTest_sd_filters_test \
CppunitTest_sd_misc_tests \ CppunitTest_sd_misc_tests \
CppunitTest_sd_html_export_tests \ CppunitTest_sd_html_export_tests \
CppunitTest_sd_activex_controls_tests \
)) ))
endif endif
......
This diff is collapsed.
...@@ -167,7 +167,6 @@ public: ...@@ -167,7 +167,6 @@ public:
void testSmartArtChildren(); void testSmartArtChildren();
void testSmartArtText(); void testSmartArtText();
void testTdf109223(); void testTdf109223();
void testActiveXCheckbox();
void testTdf109187(); void testTdf109187();
bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
...@@ -243,7 +242,6 @@ public: ...@@ -243,7 +242,6 @@ public:
CPPUNIT_TEST(testSmartArtChildren); CPPUNIT_TEST(testSmartArtChildren);
CPPUNIT_TEST(testSmartArtText); CPPUNIT_TEST(testSmartArtText);
CPPUNIT_TEST(testTdf109223); CPPUNIT_TEST(testTdf109223);
CPPUNIT_TEST(testActiveXCheckbox);
CPPUNIT_TEST(testTdf109187); CPPUNIT_TEST(testTdf109187);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
...@@ -2350,40 +2348,6 @@ void SdImportTest::testTdf109223() ...@@ -2350,40 +2348,6 @@ void SdImportTest::testTdf109223()
xDocShRef->DoClose(); xDocShRef->DoClose();
} }
void SdImportTest::testActiveXCheckbox()
{
// ActiveX controls were imported as images
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_checkbox.pptx"), PPTX);
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
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
OUString sLabel;
xPropertySet->getPropertyValue("Label") >>= sLabel;
CPPUNIT_ASSERT_EQUAL(OUString("Custom Caption"), sLabel);
// Check background color (highlight system color)
sal_Int32 nColor;
xPropertySet->getPropertyValue("BackgroundColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x316AC5), nColor);
// Check Text color (active border system color)
xPropertySet->getPropertyValue("TextColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD4D0C8), nColor);
// Check state of the checkbox
sal_Int16 nState;
xPropertySet->getPropertyValue("State") >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nState);
xDocShRef->DoClose();
}
void SdImportTest::testTdf109187() void SdImportTest::testTdf109187()
{ {
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf109187.pptx"), PPTX); sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf109187.pptx"), PPTX);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment