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