tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / dbaccess / source / core / dataaccess / commanddefinition.hxx
blobed348a8899b8114ad6c206c747bbf400960ef073
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 #pragma once
22 #include <commandbase.hxx>
23 #include <apitools.hxx>
24 #include <com/sun/star/container/XNameAccess.hpp>
25 #include <com/sun/star/sdbcx/XRename.hpp>
26 #include <com/sun/star/sdb/XQueryDefinition.hpp>
27 #include <datasettings.hxx>
28 #include <ContentHelper.hxx>
29 #include "ComponentDefinition.hxx"
31 #include <comphelper/proparrhlp.hxx>
32 #include <comphelper/uno3.hxx>
33 #include <cppuhelper/implbase2.hxx>
35 namespace dbaccess
38 // OCommandDefinition - a database "document" which describes a query
39 class OCommandDefinition_Impl : public OComponentDefinition_Impl
40 ,public OCommandBase
42 public:
45 typedef ::cppu::ImplHelper2 < css::sdbcx::XRename,
46 css::sdb::XQueryDefinition
47 > OCommandDefinition_Base;
48 class OCommandDefinition;
49 typedef ::comphelper::OPropertyArrayUsageHelper< OCommandDefinition >
50 OCommandDefinition_PROP;
52 class OCommandDefinition : public OComponentDefinition
53 ,public OCommandDefinition_Base
54 ,public OCommandDefinition_PROP
56 protected:
57 virtual ~OCommandDefinition() override;
59 public:
60 OCommandDefinition(const css::uno::Reference< css::uno::XComponentContext >& ,
61 const css::uno::Reference< css::uno::XInterface >& _xParentContainer,
62 const TContentPtr& _pImpl);
64 OCommandDefinition(
65 const css::uno::Reference< css::uno::XInterface >& _rxContainer
66 ,const OUString& _rElementName
67 ,const css::uno::Reference< css::uno::XComponentContext >&
68 ,const TContentPtr& _pImpl
71 virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override;
72 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override;
74 // css::uno::XInterface
75 DECLARE_XINTERFACE( )
77 // css::lang::XServiceInfo
78 virtual OUString SAL_CALL getImplementationName( ) override;
79 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
81 // XRename
82 virtual void SAL_CALL rename( const OUString& newName ) override;
84 // overrides to resolve ambiguity
85 virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) override
86 { OComponentDefinition::setPropertyValue(p1, p2); }
87 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p1) override
88 { return OComponentDefinition::getPropertyValue(p1); }
89 virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
90 { OComponentDefinition::addPropertyChangeListener(p1, p2); }
91 virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
92 { OComponentDefinition::removePropertyChangeListener(p1, p2); }
93 virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
94 { OComponentDefinition::addVetoableChangeListener(p1, p2); }
95 virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
96 { OComponentDefinition::removeVetoableChangeListener(p1, p2); }
97 virtual css::uno::Reference<css::ucb::XContentIdentifier> SAL_CALL getIdentifier() override
98 { return OComponentDefinition::getIdentifier(); }
99 virtual OUString SAL_CALL getContentType() override
100 { return OComponentDefinition::getContentType(); }
101 virtual void SAL_CALL addContentEventListener(const css::uno::Reference<css::ucb::XContentEventListener>& p1) override
102 { OComponentDefinition::addContentEventListener(p1); }
103 virtual void SAL_CALL removeContentEventListener(const css::uno::Reference<css::ucb::XContentEventListener>& p1) override
104 { OComponentDefinition::removeContentEventListener(p1); }
105 virtual void SAL_CALL dispose() override
106 { OComponentDefinition::dispose(); }
107 virtual void SAL_CALL addEventListener(const css::uno::Reference<css::lang::XEventListener>& p1) override
108 { OComponentDefinition::addEventListener(p1); }
109 virtual void SAL_CALL removeEventListener(const css::uno::Reference<css::lang::XEventListener>& p1) override
110 { OComponentDefinition::removeEventListener(p1); }
112 // OPropertySetHelper
113 virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override;
114 virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
115 virtual cppu::IPropertyArrayHelper* createArrayHelper() const override;
118 private:
119 // helper
120 void registerProperties();
123 } // namespace dbaccess
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */