1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
24 #include <command.hxx>
26 class SvMetaSlot
: public SvMetaAttribute
28 SvMetaTypeRef aSlotType
;
29 SvMetaAttributeRef aMethod
;
30 SvIdentifier aGroupId
;
32 SvIdentifier aConfigId
;
33 SvIdentifier aExecMethod
;
34 SvIdentifier aStateMethod
;
35 SvIdentifier aDefault
;
40 SvBOOL aCachable
; // exclusive
45 SvBOOL aSynchron
; // exclusive
48 SvBOOL aRecordPerItem
;// exclusive
52 SvBOOL aRecordAbsolute
;
56 SvBOOL aToolBoxConfig
;
57 SvBOOL aStatusBarConfig
;
61 SvBOOL aImageRotation
;
62 SvBOOL aImageReflection
;
63 SvIdentifier aPseudoPrefix
;
64 SvString aDisableFlags
;
65 SvMetaSlot
* pLinkedSlot
;
66 SvMetaSlot
* pNextSlot
;
68 SvMetaEnumValue
* pEnumValue
;
71 void WriteSlot( const OString
& rShellName
,
72 sal_uInt16 nCount
, const OString
& rSlotId
,
73 SvSlotElementList
&rList
,
75 const OString
& rPrefix
,
76 SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
77 virtual void Write( SvIdlDataBase
& rBase
,
78 SvStream
& rOutStm
, sal_uInt16 nTab
,
79 WriteType
, WriteAttribute
= 0 );
81 void SetEnumValue(SvMetaEnumValue
*p
)
84 void SetCachable( sal_Bool bSet
)
88 aVolatile
= sal_False
;
90 void SetVolatile( sal_Bool bSet
)
94 aCachable
= sal_False
;
96 void SetToggle( sal_Bool bSet
)
100 void SetAutoUpdate( sal_Bool bSet
)
105 void SetSynchron( sal_Bool bSet
)
109 aAsynchron
= sal_False
;
111 void SetAsynchron( sal_Bool bSet
)
115 aSynchron
= sal_False
;
118 void SetRecordPerItem( sal_Bool bSet
)
120 aRecordPerItem
= bSet
;
122 aRecordPerSet
= aRecordManual
= aNoRecord
= sal_False
;
124 void SetRecordPerSet( sal_Bool bSet
)
126 aRecordPerSet
= bSet
;
128 aRecordPerItem
= aRecordManual
= aNoRecord
= sal_False
;
130 void SetRecordManual( sal_Bool bSet
)
132 aRecordManual
= bSet
;
134 aRecordPerItem
= aRecordPerSet
= aNoRecord
= sal_False
;
136 void SetNoRecord( sal_Bool bSet
)
140 aRecordPerItem
= aRecordPerSet
= aRecordManual
= sal_False
;
142 void SetRecordAbsolute( sal_Bool bSet
)
143 { aRecordAbsolute
= bSet
; }
144 void SetHasDialog( sal_Bool bSet
)
145 { aHasDialog
= bSet
; }
146 void SetMenuConfig( sal_Bool bSet
)
147 { aMenuConfig
= bSet
; }
148 void SetToolBoxConfig( sal_Bool bSet
)
149 { aToolBoxConfig
= bSet
; }
150 void SetStatusBarConfig( sal_Bool bSet
)
151 { aStatusBarConfig
= bSet
; }
152 void SetAccelConfig( sal_Bool bSet
)
153 { aAccelConfig
= bSet
; }
154 void SetAllConfig( sal_Bool bSet
)
157 aToolBoxConfig
= bSet
;
158 aStatusBarConfig
= bSet
;
161 void SetFastCall( sal_Bool bSet
)
162 { aFastCall
= bSet
; }
163 void SetContainer( sal_Bool bSet
)
164 { aContainer
= bSet
; }
165 void SetImageRotation( sal_Bool bSet
)
166 { aImageRotation
= bSet
; }
167 void SetImageReflection( sal_Bool bSet
)
168 { aImageReflection
= bSet
; }
171 SV_DECL_META_FACTORY1( SvMetaSlot
, SvMetaReference
, 11 )
172 SvMetaObject
* MakeClone() const;
173 SvMetaSlot
*Clone() const { return (SvMetaSlot
*)MakeClone(); }
176 SvMetaSlot( SvMetaType
* pType
);
178 virtual sal_Bool
IsVariable() const;
179 virtual sal_Bool
IsMethod() const;
180 virtual OString
GetMangleName( sal_Bool bVariable
) const;
182 SvMetaAttribute
* GetMethod() const;
183 SvMetaType
* GetSlotType() const;
184 sal_Bool
GetHasCoreId() const;
185 const OString
& GetGroupId() const;
186 const OString
& GetConfigId() const;
187 const OString
& GetExecMethod() const;
188 const OString
& GetStateMethod() const;
189 const OString
& GetDefault() const;
190 const OString
& GetDisableFlags() const;
191 sal_Bool
GetPseudoSlots() const;
192 sal_Bool
GetCachable() const;
193 sal_Bool
GetVolatile() const;
194 sal_Bool
GetToggle() const;
195 sal_Bool
GetAutoUpdate() const;
197 sal_Bool
GetSynchron() const;
198 sal_Bool
GetAsynchron() const;
200 sal_Bool
GetRecordPerItem() const;
201 sal_Bool
GetRecordPerSet() const;
202 sal_Bool
GetRecordManual() const;
203 sal_Bool
GetNoRecord() const;
204 sal_Bool
GetRecordAbsolute() const;
206 sal_Bool
GetHasDialog() const;
207 const OString
& GetPseudoPrefix() const;
208 const OString
& GetUnoName() const;
209 sal_Bool
GetMenuConfig() const;
210 sal_Bool
GetToolBoxConfig() const;
211 sal_Bool
GetStatusBarConfig() const;
212 sal_Bool
GetAccelConfig() const;
213 sal_Bool
GetFastCall() const;
214 sal_Bool
GetContainer() const;
215 sal_Bool
GetImageRotation() const;
216 sal_Bool
GetImageReflection() const;
217 SvMetaSlot
* GetLinkedSlot() const
218 { return pLinkedSlot
; }
219 SvMetaSlot
* GetNextSlot() const
220 { return pNextSlot
; }
221 sal_uLong
GetListPos() const
223 void SetListPos(sal_uLong n
)
225 void ResetSlotPointer()
226 { pNextSlot
= pLinkedSlot
= 0; }
228 SvMetaEnumValue
* GetEnumValue() const
229 { return pEnumValue
; }
230 virtual sal_Bool
Test( SvIdlDataBase
&, SvTokenStream
& rInStm
);
231 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
232 SvTokenStream
& rInStm
);
233 virtual void WriteAttributesSvIdl( SvIdlDataBase
& rBase
,
234 SvStream
& rOutStm
, sal_uInt16 nTab
);
235 virtual sal_Bool
ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
);
236 virtual void WriteSvIdl( SvIdlDataBase
& rBase
,
237 SvStream
& rOutStm
, sal_uInt16 nTab
);
238 virtual void Insert( SvSlotElementList
&, const OString
& rPrefix
,
240 void WriteSlotStubs( const OString
& rShellName
,
241 ByteStringList
& rList
,
242 SvStream
& rOutStm
);
243 sal_uInt16
WriteSlotMap( const OString
& rShellName
,
248 SvIdlDataBase
& rBase
,
249 SvStream
& rOutStm
);
250 sal_uInt16
WriteSlotParamArray( SvIdlDataBase
& rBase
,
251 SvStream
& rOutStm
);
252 virtual void WriteHelpId( SvIdlDataBase
& rBase
, SvStream
& rOutStm
,
253 HelpIdTable
& rIdTable
);
254 virtual void WriteCSV( SvIdlDataBase
&, SvStream
& );
256 SV_DECL_IMPL_REF(SvMetaSlot
)
258 class SvMetaSlotMemberList
: public SvDeclPersistList
<SvMetaSlot
*> {};
262 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */