Line data Source code
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 : #ifndef _DBA_CORE_DATASETTINGS_HXX_
21 : #define _DBA_CORE_DATASETTINGS_HXX_
22 :
23 : #include <com/sun/star/uno/Sequence.hxx>
24 : #include <com/sun/star/beans/Property.hpp>
25 : #include <com/sun/star/awt/FontDescriptor.hpp>
26 : #include <com/sun/star/lang/IllegalArgumentException.hpp>
27 : #include <rtl/ustring.hxx>
28 : #include <comphelper/propertystatecontainer.hxx>
29 :
30 : namespace dbaccess
31 : {
32 :
33 : //==========================================================================
34 : //= ODataSettings_Base - a base class which implements the property member
35 : //= for an object implementing the sdb::DataSettings
36 : //= service
37 : //= the properties have to to be registered when used
38 : //==========================================================================
39 : class ODataSettings_Base
40 : {
41 : public:
42 : // <properties>
43 : OUString m_sFilter;
44 : OUString m_sHavingClause;
45 : OUString m_sGroupBy;
46 : OUString m_sOrder;
47 : sal_Bool m_bApplyFilter; // no BitField ! the base class needs a pointer to this member !
48 : ::com::sun::star::awt::FontDescriptor m_aFont;
49 : ::com::sun::star::uno::Any m_aRowHeight;
50 : ::com::sun::star::uno::Any m_aTextColor;
51 : ::com::sun::star::uno::Any m_aTextLineColor;
52 : sal_Int16 m_nFontEmphasis;
53 : sal_Int16 m_nFontRelief;
54 : // </properties>
55 :
56 : protected:
57 : ODataSettings_Base();
58 : ODataSettings_Base(const ODataSettings_Base& _rSource);
59 : ~ODataSettings_Base();
60 : };
61 : //==========================================================================
62 : //= ODataSettings - a base class which implements the property handling
63 : //= for an object implementing the sdb::DataSettings
64 : //= service
65 : //==========================================================================
66 :
67 47 : class ODataSettings : public ::comphelper::OPropertyStateContainer
68 : , public ODataSettings_Base
69 : {
70 : sal_Bool m_bQuery;
71 : protected:
72 : ODataSettings(::cppu::OBroadcastHelper& _rBHelper,sal_Bool _bQuery = sal_False);
73 : virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const;
74 :
75 : /** register the properties from the param given. The parameter instance must be alive as long as tis object live.
76 : @param _pItem
77 : The database settings, can be <br>this</br>
78 : */
79 : void registerPropertiesFor(ODataSettings_Base* _pItem);
80 : };
81 :
82 : } // namespace dbaccess
83 :
84 : #endif // _DBA_CORE_DATASETTINGS_HXX_
85 :
86 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|