LibreOffice Module dbaccess (master) 1
columnsettings.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 <com/sun/star/beans/XPropertySet.hpp>
23
24namespace dbaccess
25{
26
27 // TODO: move the following to comphelper/propertycontainerhelper.hxx
29 {
30 public:
31 virtual void registerProperty(
32 const OUString& _rName,
33 sal_Int32 _nHandle,
34 sal_Int32 _nAttributes,
35 void* _pPointerToMember,
36 const css::uno::Type& _rMemberType
37 ) = 0;
38
40 const OUString& _rName,
41 sal_Int32 _nHandle,
42 sal_Int32 _nAttributes,
43 css::uno::Any* _pPointerToMember,
44 const css::uno::Type& _rExpectedType
45 ) = 0;
46
47 protected:
49 };
50
51 // OColumnSettings
53 {
54 // <properties>
55 css::uno::Any m_aWidth; // sal_Int32 or void
56 css::uno::Any m_aFormatKey; // sal_Int32 or void
57 css::uno::Any m_aRelativePosition; // sal_Int32 or void
58 css::uno::Any m_aAlignment; // sal_Int32 (css::awt::TextAlign) or void
59 css::uno::Any m_aHelpText; // the description of the column which is visible in the helptext of the column
60 css::uno::Any m_aControlDefault; // the default value which should be displayed as by a control when moving to a new row
61 css::uno::Reference< css::beans::XPropertySet >
64 // </properties>
65
66 protected:
67 virtual ~OColumnSettings();
68
69 public:
71
72 protected:
73 void registerProperties( IPropertyContainer& _rPropertyContainer );
74
77 static bool isColumnSettingProperty( const sal_Int32 _nPropertyHandle );
78 static bool isDefaulted( const sal_Int32 _nPropertyHandle, const css::uno::Any& _rPropertyValue );
79
80 public:
83 static bool hasDefaultSettings( const css::uno::Reference< css::beans::XPropertySet >& _rxColumn );
84 };
85
86} // namespace dbaccess
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void registerMayBeVoidProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)=0
virtual void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)=0
css::uno::Reference< css::beans::XPropertySet > m_xControlModel
void registerProperties(IPropertyContainer &_rPropertyContainer)
css::uno::Any m_aRelativePosition
static bool isDefaulted(const sal_Int32 _nPropertyHandle, const css::uno::Any &_rPropertyValue)
static bool hasDefaultSettings(const css::uno::Reference< css::beans::XPropertySet > &_rxColumn)
check if the persistent settings have their default value
static bool isColumnSettingProperty(const sal_Int32 _nPropertyHandle)
determines whether the property with the given handle is handled by the class