LibreOffice Module dbaccess (master) 1
FieldDescriptions.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 <editeng/svxenum.hxx>
22#include "TypeInfo.hxx"
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/beans/XPropertySetInfo.hpp>
25
26namespace dbaui
27{
29 {
30 private:
31 css::uno::Any m_aControlDefault; // the value which the control inserts as default
32 css::uno::Any m_aWidth; // sal_Int32 or void
33 css::uno::Any m_aRelativePosition; // sal_Int32 or void
34
36
37 css::uno::Reference< css::beans::XPropertySet > m_xDest;
38 css::uno::Reference< css::beans::XPropertySetInfo > m_xDestInfo;
39
40 OUString m_sName;
41 OUString m_sTypeName;
43 OUString m_sHelpText;
44
46 sal_Int32 m_nType; // only used when m_pType is null
47 sal_Int32 m_nPrecision;
48 sal_Int32 m_nScale;
49 sal_Int32 m_nIsNullable;
50 sal_Int32 m_nFormatKey;
56
57 public:
59 OFieldDescription( const OFieldDescription& rDescr );
60 OFieldDescription(const css::uno::Reference< css::beans::XPropertySet >& _xAffectedCol
61 ,bool _bUseAsDest = false);
63
64 void SetName(const OUString& _rName);
65 void SetDescription(const OUString& _rDescription);
66 void SetHelpText(const OUString& _sHelptext);
67 void SetDefaultValue(const css::uno::Any& _rDefaultValue);
68 void SetControlDefault(const css::uno::Any& _rControlDefault);
69 void SetAutoIncrementValue(const OUString& _sAutoIncValue);
70 void SetType(const TOTypeInfoSP& _pType);
71 void SetTypeValue(sal_Int32 _nType);
72 void SetTypeName(const OUString& _sTypeName);
73 void SetPrecision(sal_Int32 _rPrecision);
74 void SetScale(sal_Int32 _rScale);
75 void SetIsNullable(sal_Int32 _rIsNullable);
76 void SetFormatKey(sal_Int32 _rFormatKey);
77 void SetHorJustify(const SvxCellHorJustify& _rHorJustify);
78 void SetAutoIncrement(bool _bAuto);
79 void SetPrimaryKey(bool _bPKey);
80 void SetCurrency(bool _bIsCurrency);
81
85 void copyColumnSettingsTo(const css::uno::Reference< css::beans::XPropertySet >& _rxColumn);
86
87 void FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce,bool _bReset);
88
89 OUString GetName() const;
90 OUString GetDescription() const;
91 OUString GetHelpText() const;
92 css::uno::Any GetControlDefault() const;
93 OUString GetAutoIncrementValue() const;
94 sal_Int32 GetType() const;
95 OUString GetTypeName() const;
96 sal_Int32 GetPrecision() const;
97 sal_Int32 GetScale() const;
98 sal_Int32 GetIsNullable() const;
99 sal_Int32 GetFormatKey() const;
101 const TOTypeInfoSP& getTypeInfo() const { return m_pType;}
103 bool IsAutoIncrement() const;
104 bool IsPrimaryKey() const { return m_bIsPrimaryKey;}
105 bool IsCurrency() const { return m_bIsCurrency;}
106 bool IsNullable() const;
107 };
108}
109
110
111/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetTypeValue(sal_Int32 _nType)
void SetHelpText(const OUString &_sHelptext)
void SetControlDefault(const css::uno::Any &_rControlDefault)
void SetTypeName(const OUString &_sTypeName)
void SetPrecision(sal_Int32 _rPrecision)
void SetIsNullable(sal_Int32 _rIsNullable)
const TOTypeInfoSP & getTypeInfo() const
void SetPrimaryKey(bool _bPKey)
void SetType(const TOTypeInfoSP &_pType)
css::uno::Reference< css::beans::XPropertySet > m_xDest
OFieldDescription(const css::uno::Reference< css::beans::XPropertySet > &_xAffectedCol, bool _bUseAsDest=false)
void SetAutoIncrementValue(const OUString &_sAutoIncValue)
void SetAutoIncrement(bool _bAuto)
void SetName(const OUString &_rName)
sal_Int32 GetFormatKey() const
void SetDescription(const OUString &_rDescription)
OUString GetAutoIncrementValue() const
void FillFromTypeInfo(const TOTypeInfoSP &_pType, bool _bForce, bool _bReset)
css::uno::Any GetControlDefault() const
SvxCellHorJustify GetHorJustify() const
sal_Int32 GetPrecision() const
void SetDefaultValue(const css::uno::Any &_rDefaultValue)
TOTypeInfoSP getSpecialTypeInfo() const
void SetCurrency(bool _bIsCurrency)
SvxCellHorJustify m_eHorJustify
sal_Int32 GetIsNullable() const
void SetScale(sal_Int32 _rScale)
void SetFormatKey(sal_Int32 _rFormatKey)
void copyColumnSettingsTo(const css::uno::Reference< css::beans::XPropertySet > &_rxColumn)
copies the content of the field description into the column
css::uno::Reference< css::beans::XPropertySetInfo > m_xDestInfo
void SetHorJustify(const SvxCellHorJustify &_rHorJustify)
std::shared_ptr< OTypeInfo > TOTypeInfoSP
Definition: TypeInfo.hxx:99
SvxCellHorJustify