diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-01 10:05:05 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-01 10:57:10 +0200 |
commit | f5a98e08e7f12453c469b277554b0e45f0c2310f (patch) | |
tree | 5df66f0f9754a182d77212f07ebe26974938a787 /test | |
parent | 12a35ec8905559a5f2e0e00f792489bbcf0095db (diff) |
test::BootstrapFixture: make GraphicConverter work
Change-Id: I566448db441eaa324cf619630a2e87cb8cbaeb99
Diffstat (limited to 'test')
-rw-r--r-- | test/Library_test.mk | 1 | ||||
-rw-r--r-- | test/inc/test/bootstrapfixture.hxx | 3 | ||||
-rw-r--r-- | test/source/bootstrapfixture.cxx | 9 |
3 files changed, 13 insertions, 0 deletions
diff --git a/test/Library_test.mk b/test/Library_test.mk index d641b9ca61d3..48ca6b01262b 100644 --- a/test/Library_test.mk +++ b/test/Library_test.mk @@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,test,\ cppuhelper \ i18nisolang1 \ sal \ + svt \ tl \ utl \ ucbhelper \ diff --git a/test/inc/test/bootstrapfixture.hxx b/test/inc/test/bootstrapfixture.hxx index feabafb2ea4c..4896d8a3dec1 100644 --- a/test/inc/test/bootstrapfixture.hxx +++ b/test/inc/test/bootstrapfixture.hxx @@ -31,6 +31,8 @@ #include <sal/config.h> #include <rtl/string.hxx> +#include <tools/link.hxx> +#include <vcl/salctype.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> @@ -55,6 +57,7 @@ class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase { bool m_bNeedUCB; bool m_bAssertOnDialog; + DECL_LINK( ImplInitFilterHdl, ConvertData* ); public: BootstrapFixture( bool bAssertOnDialog = true, bool bNeedUCB = true ); diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index edb7b63b30a0..86e2acbd4b35 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -41,6 +41,7 @@ #include <vcl/svapp.hxx> #include <tools/resmgr.hxx> +#include <svtools/filter.hxx> #include <unotools/syslocaleoptions.hxx> using namespace ::com::sun::star; @@ -103,6 +104,9 @@ void test::BootstrapFixture::setUp() if( m_bAssertOnDialog ) ErrorHandler::RegisterDisplay( aBasicErrorFunc ); + + // Make GraphicConverter work, normally done in desktop::Desktop::Main() + Application::SetFilterHdl( LINK( this, test::BootstrapFixture, ImplInitFilterHdl ) ); } void test::BootstrapFixture::tearDown() @@ -115,4 +119,9 @@ test::BootstrapFixture::~BootstrapFixture() { } +IMPL_LINK( test::BootstrapFixture, ImplInitFilterHdl, ConvertData*, pData ) +{ + return GraphicFilter::GetGraphicFilter().GetFilterCallback().Call( pData ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |