Kaydet (Commit) f5a98e08 authored tarafından Miklos Vajna's avatar Miklos Vajna

test::BootstrapFixture: make GraphicConverter work

Change-Id: I566448db441eaa324cf619630a2e87cb8cbaeb99
üst 12a35ec8
......@@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,test,\
cppuhelper \
i18nisolang1 \
sal \
svt \
tl \
utl \
ucbhelper \
......
......@@ -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 );
......
......@@ -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: */
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