summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-18 09:36:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-18 09:43:18 +0100
commit093df487b40ec38bb334180a874fcd314d6dad81 (patch)
tree2ad69e917c68abb72529c41d8ea524ec95c22c78
parent31052b36be1dbf39263ecf23496a5c041a805884 (diff)
Access safe data members directly
Change-Id: If0acaa04b61a72f47b70cbbfc37c615c909d0c18
-rw-r--r--framework/inc/dispatch/servicehandler.hxx9
-rw-r--r--framework/source/dispatch/servicehandler.cxx17
2 files changed, 4 insertions, 22 deletions
diff --git a/framework/inc/dispatch/servicehandler.hxx b/framework/inc/dispatch/servicehandler.hxx
index df66c867fcbd..c699d4d7bc10 100644
--- a/framework/inc/dispatch/servicehandler.hxx
+++ b/framework/inc/dispatch/servicehandler.hxx
@@ -24,7 +24,6 @@
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
-#include <threadhelp/threadhelpbase.hxx>
#include <general.h>
#include <stdtypes.h>
@@ -49,18 +48,12 @@ namespace framework{
service must be hold his self alive. Such mechanism can be useful for UI components
(e.g. Dialogs, Wizards) only.
- @base ThreadHelpBase
- exports a lock member to guarantee right initialize value of it
@base OWeakObject
provides XWeak and ref count mechanism
@devstatus ready to use
*/
-class ServiceHandler : // baseclasses
- // Order is necessary for right initialization!
- private ThreadHelpBase ,
- // interfaces
- public ::cppu::WeakImplHelper3<
+class ServiceHandler : public ::cppu::WeakImplHelper3<
css::lang::XServiceInfo ,
css::frame::XDispatchProvider ,
css::frame::XNotifyingDispatch > // => XDispatch
diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
index 66a7c99d84c6..17145248ace4 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -18,7 +18,6 @@
*/
#include <dispatch/servicehandler.hxx>
-#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
@@ -60,10 +59,7 @@ DEFINE_INIT_SERVICE(ServiceHandler,
reference to uno servicemanager for creation of new services
*/
ServiceHandler::ServiceHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
- // Init baseclasses first
- : ThreadHelpBase( &Application::GetSolarMutex() )
- // Init member
- , m_xFactory ( xFactory )
+ : m_xFactory ( xFactory )
{
}
@@ -75,7 +71,6 @@ ServiceHandler::ServiceHandler( const css::uno::Reference< css::lang::XMultiServ
*/
ServiceHandler::~ServiceHandler()
{
- m_xFactory = NULL;
}
@@ -199,13 +194,7 @@ void SAL_CALL ServiceHandler::dispatchWithNotification( const css::util::URL&
css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( const css::util::URL& aURL ,
const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/ ) throw( css::uno::RuntimeException )
{
- /* SAFE */
- Guard aReadLock( m_aLock );
- css::uno::Reference< css::lang::XMultiServiceFactory > xFactory = m_xFactory;
- aReadLock.unlock();
- /* SAFE */
-
- if (!xFactory.is())
+ if (!m_xFactory.is())
return css::uno::Reference< css::uno::XInterface >();
// extract service name and may optional given parameters from given URL
@@ -237,7 +226,7 @@ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( con
try
{
// => a) a service starts running inside his own ctor and we create it only
- xService = xFactory->createInstance(sServiceName);
+ xService = m_xFactory->createInstance(sServiceName);
// or b) he implements the right interface and starts there (may with optional parameters)
css::uno::Reference< css::task::XJobExecutor > xExecuteable(xService, css::uno::UNO_QUERY);
if (xExecuteable.is())