merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / ccoll.hxx
blob5b6f9953e73ae5c26b8e8159d4a766c52857fff2
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: ccoll.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
30 #ifndef _CCOLL_HXX
31 #define _CCOLL_HXX
33 #include <svtools/poolitem.hxx>
34 #include <tools/string.hxx>
35 #include <sfx2/tabdlg.hxx>
37 #ifndef _FIXED_HXX //autogen
38 #include <vcl/fixed.hxx>
39 #endif
41 #ifndef _BUTTON_HXX //autogen
42 #include <vcl/button.hxx>
43 #endif
44 #include <svtools/svtabbx.hxx>
46 #ifndef _LSTBOX_HXX //autogen
47 #include <vcl/lstbox.hxx>
48 #endif
49 #include <tools/resary.hxx>
50 #include "swdllapi.h"
51 #include "cmdid.h"
53 #include <rtl/string.hxx>
55 //***********************************************************
57 struct CollName {
58 // const char* pStr;
59 ULONG nCnd;
60 ULONG nSubCond;
63 //***********************************************************
65 #define COND_COMMAND_COUNT 28
67 struct CommandStruct
69 ULONG nCnd;
70 ULONG nSubCond;
73 //***********************************************************
75 sal_Int16 GetCommandContextIndex( const rtl::OUString &rContextName );
76 rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex );
78 //***********************************************************
80 class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
82 static CommandStruct aCmds[COND_COMMAND_COUNT];
84 String sStyles[COND_COMMAND_COUNT];
86 public:
87 SwCondCollItem(USHORT nWhich = FN_COND_COLL);
88 ~SwCondCollItem();
90 TYPEINFO();
92 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
93 virtual int operator==( const SfxPoolItem& ) const;
95 static const CommandStruct* GetCmds();
97 const String& GetStyle(USHORT nPos) const;
98 void SetStyle( const String* pStyle, USHORT nPos);
102 #endif