xref: /AOO42X/main/dbaccess/source/core/inc/datasettings.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _DBA_CORE_DATASETTINGS_HXX_
25cdf0e10cSrcweir #define _DBA_CORE_DATASETTINGS_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
28cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
31cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
34cdf0e10cSrcweir #include <com/sun/star/awt/FontDescriptor.hpp>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
37cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #ifndef _RTL_USTRING_HXX_
40cdf0e10cSrcweir #include <rtl/ustring.hxx>
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir #ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
43cdf0e10cSrcweir #include <comphelper/propertystatecontainer.hxx>
44cdf0e10cSrcweir #endif
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //........................................................................
47cdf0e10cSrcweir namespace dbaccess
48cdf0e10cSrcweir {
49cdf0e10cSrcweir //........................................................................
50cdf0e10cSrcweir 
51cdf0e10cSrcweir //==========================================================================
52cdf0e10cSrcweir //= ODataSettings_Base - a base class which implements the property member
53cdf0e10cSrcweir //=                 for an object implementing the sdb::DataSettings
54cdf0e10cSrcweir //=                 service
55cdf0e10cSrcweir //= the properties have to to be registered when used
56cdf0e10cSrcweir //==========================================================================
57cdf0e10cSrcweir class ODataSettings_Base
58cdf0e10cSrcweir {
59cdf0e10cSrcweir public:
60cdf0e10cSrcweir // <properties>
61cdf0e10cSrcweir     ::rtl::OUString                             m_sFilter;
62cdf0e10cSrcweir     ::rtl::OUString                             m_sHavingClause;
63cdf0e10cSrcweir     ::rtl::OUString                             m_sGroupBy;
64cdf0e10cSrcweir     ::rtl::OUString                             m_sOrder;
65cdf0e10cSrcweir     sal_Bool                                    m_bApplyFilter;     // no BitField ! the base class needs a pointer to this member !
66cdf0e10cSrcweir     ::com::sun::star::awt::FontDescriptor       m_aFont;
67cdf0e10cSrcweir     ::com::sun::star::uno::Any                  m_aRowHeight;
68cdf0e10cSrcweir     ::com::sun::star::uno::Any                  m_aTextColor;
69cdf0e10cSrcweir     ::com::sun::star::uno::Any                  m_aTextLineColor;
70cdf0e10cSrcweir     sal_Int16                                   m_nFontEmphasis;
71cdf0e10cSrcweir     sal_Int16                                   m_nFontRelief;
72cdf0e10cSrcweir // </properties>
73cdf0e10cSrcweir 
74cdf0e10cSrcweir protected:
75cdf0e10cSrcweir     ODataSettings_Base();
76cdf0e10cSrcweir     ODataSettings_Base(const ODataSettings_Base& _rSource);
77cdf0e10cSrcweir     ~ODataSettings_Base();
78cdf0e10cSrcweir };
79cdf0e10cSrcweir //==========================================================================
80cdf0e10cSrcweir //= ODataSettings - a base class which implements the property handling
81cdf0e10cSrcweir //=                 for an object implementing the sdb::DataSettings
82cdf0e10cSrcweir //=                 service
83cdf0e10cSrcweir //==========================================================================
84cdf0e10cSrcweir 
85cdf0e10cSrcweir class ODataSettings : public ::comphelper::OPropertyStateContainer
86cdf0e10cSrcweir                     , public ODataSettings_Base
87cdf0e10cSrcweir {
88cdf0e10cSrcweir     sal_Bool m_bQuery;
89cdf0e10cSrcweir protected:
90cdf0e10cSrcweir     ODataSettings(::cppu::OBroadcastHelper& _rBHelper,sal_Bool _bQuery = sal_False);
91cdf0e10cSrcweir     virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     /** register the properties from the param given. The parameter instance must be alive as long as tis object live.
94cdf0e10cSrcweir         @param  _pItem
95cdf0e10cSrcweir             The database settings, can be <br>this</br>
96cdf0e10cSrcweir     */
97cdf0e10cSrcweir     void registerPropertiesFor(ODataSettings_Base* _pItem);
98cdf0e10cSrcweir };
99cdf0e10cSrcweir 
100cdf0e10cSrcweir //........................................................................
101cdf0e10cSrcweir }   // namespace dbaccess
102cdf0e10cSrcweir //........................................................................
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #endif // _DBA_CORE_DATASETTINGS_HXX_
105