LibreOffice Module connectivity (master) 1
formattedcolumnvalue.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_CONNECTIVITY_FORMATTEDCOLUMNVALUE_HXX
21#define INCLUDED_CONNECTIVITY_FORMATTEDCOLUMNVALUE_HXX
22
24#include <rtl/ustring.hxx>
25#include <memory>
26
27namespace com::sun::star::beans { class XPropertySet; }
28namespace com::sun::star::sdbc { class XRowSet; }
29namespace com::sun::star::sdb { class XColumn; }
30namespace com::sun::star::uno { class XComponentContext; }
31namespace com::sun::star::uno { template <typename > class Reference; }
32namespace com::sun::star::util { class XNumberFormatter; }
33
34namespace dbtools
35{
36 struct FormattedColumnValue_Data;
37
38 //= FormattedColumnValue
39
44 {
45 public:
58 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
59 const css::uno::Reference< css::sdbc::XRowSet >& _rxRowSet,
60 const css::uno::Reference< css::beans::XPropertySet >& _rxColumn
61 );
62
72 const css::uno::Reference< css::util::XNumberFormatter >& i_rNumberFormatter,
73 const css::uno::Reference< css::beans::XPropertySet >& i_rColumn
74 );
75
77
78 // access to the details of the formatting we determined
79 sal_Int16 getKeyType() const;
80 const css::uno::Reference< css::sdb::XColumn >&
81 getColumn() const;
82
83 bool setFormattedValue( const OUString& _rFormattedStringValue ) const;
84 OUString getFormattedValue() const;
85
86 private:
89 std::unique_ptr< FormattedColumnValue_Data > m_pData;
90 };
91
92
93} // namespace dbtools
94
95
96#endif // INCLUDED_CONNECTIVITY_FORMATTEDCOLUMNVALUE_HXX
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
a class which helps retrieving and setting the value of a database column as formatted string.
std::unique_ptr< FormattedColumnValue_Data > m_pData
FormattedColumnValue(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet, const css::uno::Reference< css::beans::XPropertySet > &_rxColumn)
constructs an instance
FormattedColumnValue(const css::uno::Reference< css::util::XNumberFormatter > &i_rNumberFormatter, const css::uno::Reference< css::beans::XPropertySet > &i_rColumn)
constructs an instance
FormattedColumnValue(const FormattedColumnValue &)=delete
FormattedColumnValue & operator=(const FormattedColumnValue &)=delete
#define OOO_DLLPUBLIC_DBTOOLS
B2DTuple getColumn(const B2DHomMatrix &rMatrix, sal_uInt16 nCol)
class SAL_NO_VTABLE XPropertySet
OOO_DLLPUBLIC_DBTOOLS OUString getFormattedValue(const css::uno::Reference< css::beans::XPropertySet > &_xColumn, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const css::lang::Locale &_rLocale, const css::util::Date &rNullDate)
Reference