1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: datasettings.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBA_CORE_DATASETTINGS_HXX_
32 #define _DBA_CORE_DATASETTINGS_HXX_
34 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
35 #include <com/sun/star/uno/Sequence.hxx>
37 #ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
38 #include <com/sun/star/beans/Property.hpp>
40 #ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
41 #include <com/sun/star/awt/FontDescriptor.hpp>
43 #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
44 #include <com/sun/star/lang/IllegalArgumentException.hpp>
46 #ifndef _RTL_USTRING_HXX_
47 #include <rtl/ustring.hxx>
49 #ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
50 #include <comphelper/propertystatecontainer.hxx>
53 //........................................................................
56 //........................................................................
58 //==========================================================================
59 //= ODataSettings_Base - a base class which implements the property member
60 //= for an object implementing the sdb::DataSettings
62 //= the properties have to to be registered when used
63 //==========================================================================
64 class ODataSettings_Base
68 ::rtl::OUString m_sFilter
;
69 ::rtl::OUString m_sHavingClause
;
70 ::rtl::OUString m_sGroupBy
;
71 ::rtl::OUString m_sOrder
;
72 sal_Bool m_bApplyFilter
; // no BitField ! the base class needs a pointer to this member !
73 ::com::sun::star::awt::FontDescriptor m_aFont
;
74 ::com::sun::star::uno::Any m_aRowHeight
;
75 ::com::sun::star::uno::Any m_aTextColor
;
76 ::com::sun::star::uno::Any m_aTextLineColor
;
77 sal_Int16 m_nFontEmphasis
;
78 sal_Int16 m_nFontRelief
;
83 ODataSettings_Base(const ODataSettings_Base
& _rSource
);
85 //==========================================================================
86 //= ODataSettings - a base class which implements the property handling
87 //= for an object implementing the sdb::DataSettings
89 //==========================================================================
91 class ODataSettings
: public ::comphelper::OPropertyStateContainer
92 , public ODataSettings_Base
96 ODataSettings(::cppu::OBroadcastHelper
& _rBHelper
,sal_Bool _bQuery
= sal_False
);
97 virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle
, ::com::sun::star::uno::Any
& _rDefault
) const;
99 /** register the properties from the param given. The parameter instance must be alive as long as tis object live.
101 The database settings, can be <br>this</br>
103 void registerPropertiesFor(ODataSettings_Base
* _pItem
);
106 //........................................................................
107 } // namespace dbaccess
108 //........................................................................
110 #endif // _DBA_CORE_DATASETTINGS_HXX_