LibreOffice Module dbaccess (master) 1
commanddefinition.hxx
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
20#pragma once
21
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>
30
32#include <comphelper/uno3.hxx>
34
35namespace dbaccess
36{
37
38// OCommandDefinition - a database "document" which describes a query
40 ,public OCommandBase
41 {
42 public:
43 };
44
45typedef ::cppu::ImplHelper2 < css::sdbcx::XRename,
46 css::sdb::XQueryDefinition
49typedef ::comphelper::OPropertyArrayUsageHelper< OCommandDefinition >
51
55{
56protected:
57 virtual ~OCommandDefinition() override;
58
59public:
60 OCommandDefinition(const css::uno::Reference< css::uno::XComponentContext >& ,
61 const css::uno::Reference< css::uno::XInterface >& _xParentContainer,
62 const TContentPtr& _pImpl);
63
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
69 );
70
71 virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override;
72 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override;
73
74// css::uno::XInterface
76
77// css::lang::XServiceInfo
78 virtual OUString SAL_CALL getImplementationName( ) override;
79 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
80
81 // XRename
82 virtual void SAL_CALL rename( const OUString& newName ) override;
83
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
99 virtual OUString SAL_CALL getContentType() override
101 virtual void SAL_CALL addContentEventListener(const css::uno::Reference<css::ucb::XContentEventListener>& p1) override
103 virtual void SAL_CALL removeContentEventListener(const css::uno::Reference<css::ucb::XContentEventListener>& p1) override
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); }
111
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;
116
117
118private:
119 // helper
120 void registerProperties();
121};
122
123} // namespace dbaccess
124
125/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL dispose() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &p1, const css::uno::Reference< css::beans::XPropertyChangeListener > &p2) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &p1, const css::uno::Reference< css::beans::XPropertyChangeListener > &p2) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier() override
virtual ~OCommandDefinition() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL addContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &p1) override
virtual cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual void SAL_CALL setPropertyValue(const OUString &p1, const css::uno::Any &p2) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &p1, const css::uno::Reference< css::beans::XVetoableChangeListener > &p2) override
virtual void SAL_CALL rename(const OUString &newName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
OCommandDefinition(const css::uno::Reference< css::uno::XComponentContext > &, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, const TContentPtr &_pImpl)
virtual OUString SAL_CALL getContentType() override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &p1, const css::uno::Reference< css::beans::XVetoableChangeListener > &p2) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &p1) override
virtual void SAL_CALL removeContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &p1) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &p1) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &p1) override
OCommandDefinition(const css::uno::Reference< css::uno::XInterface > &_rxContainer, const OUString &_rElementName, const css::uno::Reference< css::uno::XComponentContext > &, const TContentPtr &_pImpl)
virtual cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL addContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
virtual void SAL_CALL removeContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier() override
virtual OUString SAL_CALL getContentType() override
std::shared_ptr< OContentHelper_Impl > TContentPtr
::cppu::ImplHelper2< css::sdbcx::XRename, css::sdb::XQueryDefinition > OCommandDefinition_Base
::comphelper::OPropertyArrayUsageHelper< OCommandDefinition > OCommandDefinition_PROP
#define DECLARE_XINTERFACE()