LibreOffice Module dbaccess (master) 1
CRowSetDataColumn.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#pragma once
20
21#include "datacolumn.hxx"
22#include "RowSetRow.hxx"
23#include <columnsettings.hxx>
24
27
28#include <functional>
29
30namespace dbaccess
31{
32 class ORowSetDataColumn;
33 typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetDataColumn> ORowSetDataColumn_PROP;
34
36 public OColumnSettings,
38 {
39 protected:
40 const std::function<const ::connectivity::ORowSetValue& (sal_Int32)> m_pGetValue;
41 css::uno::Any m_aOldValue;
42 OUString m_sLabel;
43 OUString m_aDescription; // description
44
45 virtual ~ORowSetDataColumn() override;
46 public:
47 ORowSetDataColumn(const css::uno::Reference < css::sdbc::XResultSetMetaData >& _xMetaData,
48 const css::uno::Reference < css::sdbc::XRow >& _xRow,
49 const css::uno::Reference < css::sdbc::XRowUpdate >& _xRowUpdate,
50 sal_Int32 _nPos,
51 const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxDBMeta,
52 OUString i_sDescription,
53 OUString i_sLabel,
54 std::function<const ::connectivity::ORowSetValue& (sal_Int32)> _getValue);
55
56
57 // css::lang::XTypeProvider
58 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
59 // comphelper::OPropertyArrayUsageHelper
60 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
61
62 // cppu::OPropertySetHelper
63 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
64
65 virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any & rConvertedValue,
66 css::uno::Any & rOldValue,
67 sal_Int32 nHandle,
68 const css::uno::Any& rValue ) override;
69 virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const override;
70 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const css::uno::Any& rValue ) override;
71
72 void fireValueChange(const ::connectivity::ORowSetValue& _rOldValue);
73 protected:
75 };
76
79 {
81 protected:
82 virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName) override;
83 virtual void impl_refresh() override;
84 public:
86 bool _bCase,
88 ::cppu::OWeakObject& _rParent,
89 ::osl::Mutex& _rMutex,
90 const std::vector< OUString> &_rVector
91 );
92 virtual ~ORowSetDataColumns() override;
93 // only the name is identical to ::cppu::OComponentHelper
94 virtual void disposing() override;
95 void assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const std::vector< OUString> &_rVector);
96 };
97}
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
const std::function< const ::connectivity::ORowSetValue &(sal_Int32)> m_pGetValue
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
void fireValueChange(const ::connectivity::ORowSetValue &_rOldValue)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual ~ORowSetDataColumn() override
ORowSetDataColumn(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_xMetaData, const css::uno::Reference< css::sdbc::XRow > &_xRow, const css::uno::Reference< css::sdbc::XRowUpdate > &_xRowUpdate, sal_Int32 _nPos, const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxDBMeta, OUString i_sDescription, OUString i_sLabel, std::function< const ::connectivity::ORowSetValue &(sal_Int32)> _getValue)
virtual connectivity::sdbcx::ObjectType createObject(const OUString &_rName) override
virtual void disposing() override
virtual ~ORowSetDataColumns() override
virtual void impl_refresh() override
ORowSetDataColumns(bool _bCase, ::rtl::Reference< ::connectivity::OSQLColumns > _xColumns, ::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex, const std::vector< OUString > &_rVector)
::rtl::Reference< ::connectivity::OSQLColumns > m_aColumns
void assign(const ::rtl::Reference< ::connectivity::OSQLColumns > &_rColumns, const std::vector< OUString > &_rVector)
css::uno::Reference< css::beans::XPropertySet > ObjectType
connectivity::sdbcx::OCollection ORowSetDataColumns_BASE
::comphelper::OPropertyArrayUsageHelper< ORowSetDataColumn > ORowSetDataColumn_PROP
unsigned char sal_Bool