diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-11 18:05:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-11 18:06:03 +0100 |
commit | 693332c0b4a8e340b8350f548dce07456975531a (patch) | |
tree | fc1d20db9047ad3a1fbc58f4fa851801cedec06f /odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx | |
parent | 1b6598c9e71cdabbdf73a15c5033c0f33d071be5 (diff) |
Fix SDK examples
Change-Id: I0a3153bc3fa8338a1a0865db2fbe65a56ae064a4
Diffstat (limited to 'odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx')
-rw-r--r-- | odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx index fb35eeda7321..8fac61698cca 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx +++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx @@ -36,8 +36,6 @@ #include <addon.hxx> #include <osl/diagnose.h> #include <rtl/ustring.hxx> -#include <comphelper/componentcontext.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XController.hpp> @@ -45,12 +43,12 @@ #include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/XMessageBox.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> using rtl::OUString; using namespace com::sun::star::uno; using namespace com::sun::star::frame; using namespace com::sun::star::awt; -using com::sun::star::lang::XMultiServiceFactory; using com::sun::star::beans::PropertyValue; using com::sun::star::util::URL; @@ -105,7 +103,7 @@ void SAL_CALL Addon::initialize( const Sequence< Any >& aArguments ) throw ( Exc } // Create the toolkit to have access to it later - mxToolkit = Reference< XToolkit >( Toolkit::create(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW ); + mxToolkit = Reference< XToolkit >( Toolkit::create(mxContext), UNO_QUERY_THROW ); } /** @@ -220,10 +218,10 @@ throw (RuntimeException) return aRet; } -Reference< XInterface > SAL_CALL Addon_createInstance( const Reference< XMultiServiceFactory > & rSMgr) +Reference< XInterface > SAL_CALL Addon_createInstance( const Reference< XComponentContext > & rContext) throw( Exception ) { - return (cppu::OWeakObject*) new Addon( rSMgr ); + return (cppu::OWeakObject*) new Addon( rContext ); } //################################################################################################## |