odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
| 10 --
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
| 12 +-
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
| 10 --
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
| 50 --
odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
|8 -
odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
| 50 --
odk/examples/DevelopersGuide/Forms/ButtonOperator.java
| 14 --
odk/examples/java/ToDo/ToDo.java
|2
8 files changed, 72 insertions(+), 84 deletions(-)
New commits:
commit 693332c0b4a8e340b8350f548dce07456975531a
Author: Stephan Bergmann
Date: Tue Dec 11 18:05:45 2012 +0100
Fix SDK examples
Change-Id: I0a3153bc3fa8338a1a0865db2fbe65a56ae064a4
diff --git
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
index fb35eed..8fac616 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
#include
#include
-#include
-#include
#include
#include
#include
@@ -45,12 +43,12 @@
#include
#include
#include
+#include
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 );
}
//##
diff --git
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
index f2e4a0f..9568aea 100644
---
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
+++
b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
@@ -57,6 +57,10 @@ namespace com
{
class XToolkit;
}
+namespace uno
+{
+class XComponentContext;
+}
}
}
}
@@ -70,13 +74,13 @@ class Addon : public cppu::WeakImplHelper4
>
{
private:
-::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext
> mxContext;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
mxFrame;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >
mxToolkit;
public:
-Addon( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
-: mxMSF( rxMSF ) {}
+Addon( const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > &rxContext)
+: mxContext( rxContext ) {}
// XDispatchProvider
virtual ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatch >
@@ -120,7 +124,7 @@ sal_Bool SAL_CALL Addon_supportsService( const
::rtl::OUString& ServiceName )
throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL Addon_createInstance( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
+SAL_CALL Addon_createInstance( const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & rContext)
throw ( ::com::sun::star::uno::Exception );
#endif // _Addon_HXX
diff --git
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/c