From 88d1e25d5c61d1d4ef12f0ac397db3c8b399564c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 14 May 2010 13:50:22 +0200 Subject: sb123: #i111598# OfficeConnection getFactory -> getComponentContext --- smoketestoo_native/smoketest.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index e2cb51127f47..57018f56a3bd 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -141,10 +141,12 @@ void Test::test() { css::uno::Reference< css::frame::XController >( css::uno::Reference< css::frame::XModel >( css::uno::Reference< css::frame::XComponentLoader >( - connection_.getFactory()->createInstance( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.frame.Desktop"))), + (connection_.getComponentContext()-> + getServiceManager()->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.frame.Desktop")), + connection_.getComponentContext())), css::uno::UNO_QUERY_THROW)->loadComponentFromURL( test::toAbsoluteFileUrl(doc), rtl::OUString( -- cgit From af5cef5b1e2f3d76f52340bbd2ea8bd93cb5185d Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 14 May 2010 16:22:06 +0200 Subject: sb123: #i111601# various additional test helper functionality --- smoketestoo_native/makefile.mk | 3 ++- smoketestoo_native/smoketest.cxx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk index 0337c748d914..ec0d6be313c8 100644 --- a/smoketestoo_native/makefile.mk +++ b/smoketestoo_native/makefile.mk @@ -49,7 +49,8 @@ ALLTAR : cpptest cpptest : $(SHL1TARGETN) $(BIN)/smoketestdoc.sxw -OOO_CPPTEST_ARGS = $(SHL1TARGETN) -env:arg-doc=$(BIN)/smoketestdoc.sxw +TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw +CPPTEST_LIBRARY = $(SHL1TARGETN) $(BIN)/smoketestdoc.sxw: data/smoketestdoc.sxw $(COPY) $< $@ diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index 57018f56a3bd..0d7e636f142b 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -53,7 +53,7 @@ #include "osl/diagnose.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" -#include "test/getargument.hxx" +#include "test/gettestargument.hxx" #include "test/officeconnection.hxx" #include "test/oustringostreaminserter.hxx" #include "test/toabsolutefileurl.hxx" @@ -121,8 +121,8 @@ void Test::tearDown() { void Test::test() { rtl::OUString doc; CPPUNIT_ASSERT( - test::getArgument( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("doc")), &doc)); + test::getTestArgument( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smoketest.doc")), &doc)); css::uno::Sequence< css::beans::PropertyValue > args(1); args[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode")); -- cgit From 0cb17600cd492deabe752815d3d84beda1908ed6 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 20 Sep 2010 11:01:23 +0200 Subject: sb123: #i112986# fixed merge conflict --- smoketestoo_native/smoketest.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index d1cf454c0e4c..a4e532123456 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -28,8 +28,8 @@ #include "sal/config.h" #include "boost/noncopyable.hpp" +#include "com/sun/star/awt/AsyncCallback.hpp" #include "com/sun/star/awt/XCallback.hpp" -#include "com/sun/star/awt/XRequestCallback.hpp" #include "com/sun/star/beans/PropertyState.hpp" #include "com/sun/star/beans/PropertyValue.hpp" #include "com/sun/star/document/MacroExecMode.hpp" @@ -186,11 +186,8 @@ void Test::test() { css::uno::UNO_QUERY_THROW); Result result; // Shifted to main thread to work around potential deadlocks (i112867): - css::uno::Reference< css::awt::XRequestCallback >( - connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))), - css::uno::UNO_QUERY_THROW)->addCallback( + com::sun::star::awt::AsyncCallback::create( + connection_.getComponentContext())->addCallback( new Callback( disp, url, css::uno::Sequence< css::beans::PropertyValue >(), new Listener(&result)), -- cgit