summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-10-21 09:54:38 +0200
committersb <sb@openoffice.org>2010-10-21 09:54:38 +0200
commitf3d57a8a9d6e65113d1a9b8b96d8e51d3f0b219e (patch)
treeb29f36c2371a30a310e125f816d1d3f280d495ac /smoketestoo_native
parent1db538b98f4661e5af4a6f40a29d7ac7bf297a77 (diff)
parent203320d1ce64e2844353dc36098f24eaf3fd405b (diff)
sb132: merged in DEV300_m90
Diffstat (limited to 'smoketestoo_native')
-rw-r--r--smoketestoo_native/makefile.mk3
-rw-r--r--smoketestoo_native/smoketest.cxx25
2 files changed, 14 insertions, 14 deletions
diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk
index e954549fdca9..18f3a42b789f 100644
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -56,7 +56,8 @@ ALLTAR : cpptest
cpptest : $(SHL1TARGETN)
-OOO_CPPTEST_ARGS = $(SHL1TARGETN) -env:arg-doc=$(BIN)/smoketestdoc.sxw
+TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw
+CPPTEST_LIBRARY = $(SHL1TARGETN)
.IF "$(OS)" != "WNT"
$(installationtest_instpath).flag : $(shell ls \
diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx
index fd283327c738..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"
@@ -58,7 +58,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"
@@ -149,8 +149,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"));
@@ -168,10 +168,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(
@@ -184,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)),