xref: /trunk/main/sw/inc/ccoll.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CCOLL_HXX
24 #define _CCOLL_HXX
25 
26 #include <svl/poolitem.hxx>
27 #include <tools/string.hxx>
28 #include <sfx2/tabdlg.hxx>
29 
30 #ifndef _FIXED_HXX //autogen
31 #include <vcl/fixed.hxx>
32 #endif
33 
34 #ifndef _BUTTON_HXX //autogen
35 #include <vcl/button.hxx>
36 #endif
37 #include <svtools/svtabbx.hxx>
38 
39 #ifndef _LSTBOX_HXX //autogen
40 #include <vcl/lstbox.hxx>
41 #endif
42 #include <tools/resary.hxx>
43 #include "swdllapi.h"
44 #include "cmdid.h"
45 
46 #include <rtl/string.hxx>
47 
48 //***********************************************************
49 
50 struct CollName {
51 //		const char* pStr;
52 		sal_uLong nCnd;
53 		sal_uLong nSubCond;
54 	};
55 
56 //***********************************************************
57 
58 #define COND_COMMAND_COUNT 28
59 
60 struct CommandStruct
61 {
62 	sal_uLong nCnd;
63 	sal_uLong nSubCond;
64 };
65 
66 //***********************************************************
67 
68 sal_Int16       GetCommandContextIndex( const rtl::OUString &rContextName );
69 rtl::OUString   GetCommandContextByIndex( sal_Int16 nIndex );
70 
71 //***********************************************************
72 
73 class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
74 {
75 	static CommandStruct		aCmds[COND_COMMAND_COUNT];
76 
77 	String 						sStyles[COND_COMMAND_COUNT];
78 
79 public:
80 	SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
81 	~SwCondCollItem();
82 
83 								TYPEINFO();
84 
85 	virtual SfxPoolItem*    	Clone( SfxItemPool *pPool = 0 ) const;
86 	virtual int             	operator==( const SfxPoolItem& ) const;
87 
88 	static const CommandStruct*	GetCmds();
89 
90 	const String&				GetStyle(sal_uInt16 nPos) const;
91 	void						SetStyle( const String* pStyle, sal_uInt16 nPos);
92 
93 };
94 
95 #endif
96 
97