merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_sch / schopt.hxx
blob04f14fb0fc0d39f52b2eb0c00a0237f15a88afc4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: schopt.hxx,v $
10 * $Revision: 1.6 $
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 _SCH_SCHOPT_HXX
32 #define _SCH_SCHOPT_HXX
34 // header for TYPEINFO
35 #ifndef _RTTI_HXX
36 #include <tools/rtti.hxx>
37 #endif
38 // header for ConfigItem
39 #ifndef _UTL_CONFIGITEM_HXX_
40 #include <unotools/configitem.hxx>
41 #endif
42 // header for SfxPoolItem
43 #ifndef _SFXPOOLITEM_HXX
44 #include <bf_svtools/poolitem.hxx>
45 #endif
46 // header for Color
47 #ifndef _TOOLS_COLOR_HXX
48 #include <tools/color.hxx>
49 #endif
50 // header for Table
51 #ifndef _TOOLS_TABLE_HXX
52 #include <tools/table.hxx>
53 #endif
54 // header for XColorEntry
55 #ifndef _XTABLE_HXX
56 #include <bf_svx/xtable.hxx> //STRIP002
57 #endif
58 namespace binfilter {
60 // --------------------
61 // default colors
62 // --------------------
63 class SchColorTable : private Table
65 public:
66 SchColorTable();
67 virtual ~SchColorTable() {}
70 // make public
71 Table::Count;
73 // specialized methods from Table
74 void ClearAndDestroy();
76 BOOL Insert( ULONG nKey, XColorEntry* );
77 XColorEntry* Get( ULONG nKey ) const;
79 Color GetColor( ULONG nKey ) const;
80 ColorData GetColorData( ULONG nKey ) const;
82 BOOL operator ==( const SchColorTable& rCol ) const
83 { return Table::operator ==( rCol ); }
84 BOOL operator !=( const SchColorTable& rCol ) const
85 { return Table::operator !=( rCol ); }
88 // ====================
89 // all options
90 // ====================
91 class SchOptions : public ::utl::ConfigItem
93 private:
94 SchColorTable maDefColors;
95 BOOL mbIsInitialized;
96 ::com::sun::star::uno::Sequence< ::rtl::OUString > maPropertyNames;
98 ::com::sun::star::uno::Sequence< ::rtl::OUString > GetPropertyNames() const
99 { return maPropertyNames; }
100 BOOL RetrieveOptions();
102 public:
103 SchOptions();
104 virtual ~SchOptions();
106 const SchColorTable& GetDefaultColors();
110 // ====================
111 // items
112 // ====================
114 } //namespace binfilter
115 #endif // _SCH_SCHOPT_HXX