diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-13 11:55:44 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-13 11:55:44 +0000 |
commit | 1b38e7bda335071e7c4ac6c92c907dfff44b11cd (patch) | |
tree | 152bbe658662e91bf94bc70098ce57de03876f06 /extensions/source/oooimprovement/corecontroller.cxx | |
parent | b0c0a556bce6ed79eff9e362fd5b806951c8cba6 (diff) |
CWS-TOOLING: integrate CWS oooimprovement2
2009-01-28 14:35:33 +0100 b_michaelsen r267059 : #i98555# fixed help url
2009-01-27 12:47:40 +0100 b_michaelsen r266982 : #159112# fixed enabling vcl part of usage tracking in an running session
2009-01-27 12:28:58 +0100 b_michaelsen r266980 : #159129# deiniting eventlogger in vcl if it was inited, not if it was enabled (the logger can be disabled inbetween
2009-01-27 12:22:45 +0100 b_michaelsen r266978 : whitespace fixes
2009-01-27 10:32:02 +0100 b_michaelsen r266962 : #i94949# disposing of uploader thread
2009-01-23 17:00:57 +0100 b_michaelsen r266839 : #159112# enabling/disabling of usage tracking takes effect without restart
2009-01-23 16:58:59 +0100 b_michaelsen r266837 : #159112# enabling/disabling of usage tracking takes effect without restart
2009-01-23 01:08:49 +0100 b_michaelsen r266761 : #159081# fixed buildid in oooimprovement
2009-01-22 22:51:16 +0100 b_michaelsen r266759 : #i90370# including build id
2009-01-22 15:37:05 +0100 b_michaelsen r266727 : #i90370# fixing precompiled headers for win32
2009-01-22 15:34:05 +0100 b_michaelsen r266722 : #i90370# initializing startup counter
2009-01-22 15:30:52 +0100 b_michaelsen r266720 : #i90370# enabling startup counter
2009-01-21 13:52:56 +0100 b_michaelsen r266666 : #i98143# adjusted smoketest for usage tracking
2009-01-20 18:34:12 +0100 b_michaelsen r266617 : #i90370#
2009-01-20 15:08:45 +0100 is r266587 : #i90370# new improvement feature
2009-01-20 14:42:39 +0100 b_michaelsen r266583 : #i90370# changing delivered job registration location
2009-01-20 12:35:31 +0100 is r266567 : #i90370# new improvement feature
2009-01-20 12:33:51 +0100 is r266566 : #i90370# new improvement feature
2009-01-20 12:33:20 +0100 is r266565 : #i90370# new improvement feature
2009-01-20 11:47:13 +0100 b_michaelsen r266559 : #i90370# updating Usage Tracking Info Url
2009-01-20 11:28:37 +0100 b_michaelsen r266558 : #i90370# packing Usage Tracking config schema (xcs)
2009-01-20 11:19:00 +0100 b_michaelsen r266557 : #i90370# adding Usage Tracking config schema (xcs)
2009-01-19 18:16:34 +0100 b_michaelsen r266518 : #i90370# adding job registration (xcu)
2009-01-19 17:26:02 +0100 b_michaelsen r266513 : #i90370# adding liboooimprovement
Diffstat (limited to 'extensions/source/oooimprovement/corecontroller.cxx')
-rw-r--r-- | extensions/source/oooimprovement/corecontroller.cxx | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/extensions/source/oooimprovement/corecontroller.cxx b/extensions/source/oooimprovement/corecontroller.cxx new file mode 100644 index 000000000000..79f7ce930bfa --- /dev/null +++ b/extensions/source/oooimprovement/corecontroller.cxx @@ -0,0 +1,104 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: corecontroller.cxx,v $ + * + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_extensions.hxx" + +#include "corecontroller.hxx" +#include "config.hxx" + + +using ::rtl::OUString; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; + + +namespace oooimprovement +{ + + CoreController::CoreController(const Reference<XComponentContext>& context) + : m_ServiceFactory(Reference<XMultiServiceFactory>( + context->getServiceManager()->createInstanceWithContext( + OUString::createFromAscii("com.sun.star.lang.XMultiServiceFactory"), context), + UNO_QUERY)) + { } + + CoreController::CoreController(const Reference<XMultiServiceFactory>& sf) + : m_ServiceFactory(sf) + { } + + CoreController::~CoreController() + { } + + sal_Bool SAL_CALL CoreController::enablingUiEventsLoggerAllowed(sal_Int16 version) throw(RuntimeException) + { + Config config(m_ServiceFactory); + if(version==1 && config.getShowedInvitation() && config.getInvitationAccepted()) + return true; + return false; + } + + sal_Bool SAL_CALL CoreController::showBuiltinOptionsPage(sal_Int16 version) throw(RuntimeException) + { + Config config(m_ServiceFactory); + if(version==1 && config.getShowedInvitation()) + return true; + return false; + } + + sal_Bool SAL_CALL CoreController::supportsService(const OUString& service_name) throw(RuntimeException) + { + const Sequence<OUString> service_names(getSupportedServiceNames()); + for (sal_Int32 idx = service_names.getLength()-1; idx>=0; --idx) + if(service_name == service_names[idx]) return sal_True; + return sal_False; + } + + OUString SAL_CALL CoreController::getImplementationName() throw(RuntimeException) + { return getImplementationName_static(); } + + Sequence<OUString> SAL_CALL CoreController::getSupportedServiceNames() throw(RuntimeException) + { return getSupportedServiceNames_static(); } + + OUString SAL_CALL CoreController::getImplementationName_static() + { return OUString::createFromAscii("com.sun.star.comp.extensions.oooimprovement.CoreController"); } + + Sequence<OUString> SAL_CALL CoreController::getSupportedServiceNames_static() + { + Sequence<OUString> aServiceNames(1); + aServiceNames[0] = OUString::createFromAscii("com.sun.star.oooimprovement.CoreController"); + return aServiceNames; + } + + Reference<XInterface> SAL_CALL CoreController::Create(const Reference<XComponentContext>& context) + { return *(new CoreController(context)); } + + Reference<XInterface> SAL_CALL CoreController::Create(const Reference<XMultiServiceFactory>& sm) + { return *(new CoreController(sm)); } +} |