LibreOffice Module framework (master) 1
actiontriggercontainer.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
26
27using namespace cppu;
28using namespace com::sun::star::uno;
29using namespace com::sun::star::lang;
30using namespace com::sun::star::container;
31
32namespace framework
33{
34
36{
37}
38
40{
41}
42
43// XInterface
45{
46 Any a = ::cppu::queryInterface(
47 aType ,
48 static_cast< XMultiServiceFactory* >(this),
49 static_cast< XServiceInfo* >(this),
50 static_cast< XTypeProvider* >(this));
51
52 if( a.hasValue() )
53 {
54 return a;
55 }
56
58}
59
61{
63}
64
66{
68}
69
70// XMultiServiceFactory
71Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const OUString& aServiceSpecifier )
72{
73 if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGER )
74 return static_cast<OWeakObject *>( new ActionTriggerPropertySet());
75 else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERCONTAINER )
76 return static_cast<OWeakObject *>( new ActionTriggerContainer());
77 else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR )
78 return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet());
79 else
80 throw css::uno::RuntimeException("Unknown service specifier!", static_cast<OWeakObject *>(this) );
81}
82
83Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
84{
85 return createInstance( ServiceSpecifier );
86}
87
89{
93
94 return aSeq;
95}
96
97// XServiceInfo
99{
101}
102
103sal_Bool SAL_CALL ActionTriggerContainer::supportsService( const OUString& ServiceName )
104{
106}
107
109{
111 return seqServiceNames;
112}
113
114// XTypeProvider
116{
117 // Create a static typecollection ...
118 static ::cppu::OTypeCollection ourTypeCollection(
123
124 return ourTypeCollection.getTypes();
125}
126
128{
129 return css::uno::Sequence<sal_Int8>();
130}
131
132}
133
134/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral SERVICENAME_ACTIONTRIGGERCONTAINER
constexpr OUStringLiteral IMPLEMENTATIONNAME_ACTIONTRIGGERCONTAINER
constexpr OUStringLiteral SERVICENAME_ACTIONTRIGGER
constexpr OUStringLiteral SERVICENAME_ACTIONTRIGGERSEPARATOR
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void SAL_CALL release() noexcept override
uno_Any a
Sequence< sal_Int8 > aSeq
Type
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool