tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / framework / source / fwe / classes / actiontriggercontainer.cxx
blob81699bdf9fde33d6c7cb6af5624274008d6e2b63
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <classes/actiontriggercontainer.hxx>
21 #include <classes/actiontriggerpropertyset.hxx>
22 #include <classes/actiontriggerseparatorpropertyset.hxx>
23 #include <cppuhelper/queryinterface.hxx>
24 #include <cppuhelper/supportsservice.hxx>
25 #include <cppuhelper/typeprovider.hxx>
27 using namespace cppu;
28 using namespace com::sun::star::uno;
29 using namespace com::sun::star::lang;
30 using namespace com::sun::star::container;
32 namespace framework
35 ActionTriggerContainer::ActionTriggerContainer()
39 ActionTriggerContainer::~ActionTriggerContainer()
43 // XMultiServiceFactory
44 Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const OUString& aServiceSpecifier )
46 if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGER )
47 return static_cast<OWeakObject *>( new ActionTriggerPropertySet());
48 else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERCONTAINER )
49 return static_cast<OWeakObject *>( new ActionTriggerContainer());
50 else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR )
51 return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet());
52 else
53 throw css::uno::RuntimeException(u"Unknown service specifier!"_ustr, static_cast<OWeakObject *>(this) );
56 Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
58 return createInstance( ServiceSpecifier );
61 Sequence< OUString > SAL_CALL ActionTriggerContainer::getAvailableServiceNames()
63 Sequence< OUString > aSeq{ SERVICENAME_ACTIONTRIGGER,
64 SERVICENAME_ACTIONTRIGGERCONTAINER,
65 SERVICENAME_ACTIONTRIGGERSEPARATOR };
67 return aSeq;
70 // XServiceInfo
71 OUString SAL_CALL ActionTriggerContainer::getImplementationName()
73 return IMPLEMENTATIONNAME_ACTIONTRIGGERCONTAINER;
76 sal_Bool SAL_CALL ActionTriggerContainer::supportsService( const OUString& ServiceName )
78 return cppu::supportsService(this, ServiceName);
81 Sequence< OUString > SAL_CALL ActionTriggerContainer::getSupportedServiceNames()
83 Sequence< OUString > seqServiceNames { SERVICENAME_ACTIONTRIGGERCONTAINER };
84 return seqServiceNames;
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */