diff options
Diffstat (limited to 'unotest')
-rw-r--r-- | unotest/inc/unotest/macros_test.hxx | 4 | ||||
-rw-r--r-- | unotest/source/cpp/officeconnection.cxx | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/unotest/inc/unotest/macros_test.hxx b/unotest/inc/unotest/macros_test.hxx index a1c750f161d8..1a82b83fc48f 100644 --- a/unotest/inc/unotest/macros_test.hxx +++ b/unotest/inc/unotest/macros_test.hxx @@ -33,7 +33,7 @@ #include "unotest/detail/unotestdllapi.hxx" #include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/XDesktop2.hpp> struct TestMacroInfo { @@ -49,7 +49,7 @@ public: com::sun::star::uno::Reference< com::sun::star::lang::XComponent > loadFromDesktop(const rtl::OUString& rURL); protected: - com::sun::star::uno::Reference< com::sun::star::frame::XDesktop> mxDesktop; + com::sun::star::uno::Reference< com::sun::star::frame::XDesktop2> mxDesktop; }; } diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx index 69c28283edcd..4de06f66cc96 100644 --- a/unotest/source/cpp/officeconnection.cxx +++ b/unotest/source/cpp/officeconnection.cxx @@ -20,7 +20,7 @@ #include "com/sun/star/bridge/UnoUrlResolver.hpp" #include "com/sun/star/bridge/XUnoUrlResolver.hpp" #include "com/sun/star/connection/NoConnectException.hpp" -#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/Desktop.hpp" #include "com/sun/star/lang/DisposedException.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/XComponentContext.hpp" @@ -131,13 +131,7 @@ void OfficeConnection::setUp() { void OfficeConnection::tearDown() { if (process_ != 0) { if (context_.is()) { - css::uno::Reference< css::frame::XDesktop > desktop( - context_->getServiceManager()->createInstanceWithContext( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.frame.Desktop")), - context_), - css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XDesktop2 > desktop = css::frame::Desktop::create( context_ ); context_.clear(); try { CPPUNIT_ASSERT(desktop->terminate()); |