LibreOffice Module svx (master) 1
dataaccessdescriptor.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#ifndef INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
21#define INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
22
23#include <rtl/ustring.hxx>
24#include <svx/svxdllapi.h>
25#include <memory>
26
27namespace com::sun::star::beans { class XPropertySet; }
28namespace com::sun::star::beans { struct PropertyValue; }
29namespace com::sun::star::uno { class Any; }
30namespace com::sun::star::uno { template <class E> class Sequence; }
31namespace com::sun::star::uno { template <typename > class Reference; }
32
33namespace svx
34{
35 class ODADescriptorImpl;
36
37 //= DataAccessDescriptorProperty
39 {
44
45 Command,
48 Filter,
49 Cursor,
50
53
54 Selection,
56
58 };
59
60 //= ODataAccessDescriptor
61
65 {
66 std::unique_ptr<ODADescriptorImpl> m_pImpl;
67
68 public:
72 ODataAccessDescriptor( const css::uno::Reference< css::beans::XPropertySet >& _rValues );
73 ODataAccessDescriptor( const css::uno::Sequence< css::beans::PropertyValue >& _rValues );
74
75 // allows to construct a descriptor from an Any containing either an XPropertySet or a property value sequence
76 ODataAccessDescriptor( const css::uno::Any& _rValues );
77
78 ODataAccessDescriptor& operator=(const ODataAccessDescriptor& _rSource);
79 ODataAccessDescriptor& operator=(ODataAccessDescriptor&& _rSource) noexcept;
80
82
87 css::uno::Sequence< css::beans::PropertyValue > const &
88 createPropertyValueSequence();
89
94 void initializeFrom(
95 const css::uno::Sequence< css::beans::PropertyValue >& _rValues);
96
98 bool has(DataAccessDescriptorProperty _eWhich) const;
99
102 void erase(DataAccessDescriptorProperty _eWhich);
103
106 void clear();
107
109 const css::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich ) const;
110
114 css::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich );
115
118 OUString getDataSource() const;
119
124 void setDataSource(const OUString& _sDataSourceNameOrLocation);
125 };
126
127}
128
129#endif // INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
130
131/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
class encapsulating the css::sdb::DataAccessDescriptor service.
ODataAccessDescriptor(const css::uno::Reference< css::beans::XPropertySet > &_rValues)
ODataAccessDescriptor(const css::uno::Sequence< css::beans::PropertyValue > &_rValues)
std::unique_ptr< ODADescriptorImpl > m_pImpl
ODataAccessDescriptor(const css::uno::Any &_rValues)
class SAL_NO_VTABLE XPropertySet
Definition: xmlexchg.hxx:29
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
Reference
DataAccessDescriptorProperty
@ BookmarkSelection
selection (sequence< any >)
@ ConnectionResource
database file URL (string)
@ ColumnObject
column name (string)
@ ColumnName
the cursor (XResultSet)
@ EscapeProcessing
command type (long)
@ DatabaseLocation
data source name (string)
@ Connection
database driver URL (string)
@ Command
connection (XConnection)
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
::std::pair< MetaAction *, int > Component
#define SAL_WARN_UNUSED