1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_COLUMNSETTINGS_HXX
21 #define INCLUDED_DBACCESS_SOURCE_CORE_INC_COLUMNSETTINGS_HXX
23 #include <com/sun/star/beans/XPropertySet.hpp>
28 // TODO: move the following to comphelper/propertycontainerhelper.hxx
29 class IPropertyContainer
32 virtual void registerProperty(
33 const OUString
& _rName
,
35 sal_Int32 _nAttributes
,
36 void* _pPointerToMember
,
37 const css::uno::Type
& _rMemberType
40 virtual void registerMayBeVoidProperty(
41 const OUString
& _rName
,
43 sal_Int32 _nAttributes
,
44 css::uno::Any
* _pPointerToMember
,
45 const css::uno::Type
& _rExpectedType
49 ~IPropertyContainer() {}
56 css::uno::Any m_aWidth
; // sal_Int32 or void
57 css::uno::Any m_aFormatKey
; // sal_Int32 or void
58 css::uno::Any m_aRelativePosition
; // sal_Int32 or void
59 css::uno::Any m_aAlignment
; // sal_Int32 (css::awt::TextAlign) or void
60 css::uno::Any m_aHelpText
; // the description of the column which is visible in the helptext of the column
61 css::uno::Any m_aControlDefault
; // the default value which should be displayed as by a control when moving to a new row
62 css::uno::Reference
< css::beans::XPropertySet
>
68 virtual ~OColumnSettings();
74 void registerProperties( IPropertyContainer
& _rPropertyContainer
);
76 /** determines whether the property with the given handle is handled by the class
78 static bool isColumnSettingProperty( const sal_Int32 _nPropertyHandle
);
79 static bool isDefaulted( const sal_Int32 _nPropertyHandle
, const css::uno::Any
& _rPropertyValue
);
82 /** check if the persistent settings have their default value
84 static bool hasDefaultSettings( const css::uno::Reference
< css::beans::XPropertySet
>& _rxColumn
);
87 } // namespace dbaccess
89 #endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_COLUMNSETTINGS_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */