Branch data 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 _SLOT_HXX
21 : : #define _SLOT_HXX
22 : :
23 : : #include <types.hxx>
24 : : #include <command.hxx>
25 : :
26 [ + - ][ + - ]: 49052 : class SvMetaSlot : public SvMetaAttribute
[ - + ]
27 : : {
28 : : SvMetaTypeRef aSlotType;
29 : : SvMetaAttributeRef aMethod;
30 : : SvIdentifier aGroupId;
31 : : SvBOOL aHasCoreId;
32 : : SvIdentifier aConfigId;
33 : : SvIdentifier aExecMethod;
34 : : SvIdentifier aStateMethod;
35 : : SvIdentifier aDefault;
36 : : SvBOOL aPseudoSlots;
37 : : SvBOOL aGet;
38 : : SvBOOL aSet;
39 : :
40 : : SvBOOL aCachable; // exclusive
41 : : SvBOOL aVolatile;
42 : : SvBOOL aToggle;
43 : : SvBOOL aAutoUpdate;
44 : :
45 : : SvBOOL aSynchron; // exclusive
46 : : SvBOOL aAsynchron;
47 : :
48 : : SvBOOL aRecordPerItem;// exclusive
49 : : SvBOOL aRecordPerSet;
50 : : SvBOOL aRecordManual;
51 : : SvBOOL aNoRecord;
52 : : SvBOOL aRecordAbsolute;
53 : :
54 : : SvBOOL aHasDialog;
55 : : SvBOOL aMenuConfig;
56 : : SvBOOL aToolBoxConfig;
57 : : SvBOOL aStatusBarConfig;
58 : : SvBOOL aAccelConfig;
59 : : SvBOOL aFastCall;
60 : : SvBOOL aContainer;
61 : : SvBOOL aImageRotation;
62 : : SvBOOL aImageReflection;
63 : : SvIdentifier aPseudoPrefix;
64 : : SvString aDisableFlags;
65 : : SvMetaSlot* pLinkedSlot;
66 : : SvMetaSlot* pNextSlot;
67 : : sal_uLong nListPos;
68 : : SvMetaEnumValue* pEnumValue;
69 : : SvString aUnoName;
70 : :
71 : : void WriteSlot( const rtl::OString& rShellName,
72 : : sal_uInt16 nCount, const rtl::OString& rSlotId,
73 : : SvSlotElementList &rList,
74 : : size_t nStart,
75 : : const rtl::OString& rPrefix,
76 : : SvIdlDataBase & rBase, SvStream & rOutStm );
77 : : virtual void Write( SvIdlDataBase & rBase,
78 : : SvStream & rOutStm, sal_uInt16 nTab,
79 : : WriteType, WriteAttribute = 0 );
80 : :
81 : 136 : void SetEnumValue(SvMetaEnumValue *p)
82 : 136 : { pEnumValue = p; }
83 : : protected:
84 : 32226 : void SetCachable( sal_Bool bSet )
85 : : {
86 : 32226 : aCachable = bSet;
87 [ + - ]: 32226 : if( bSet )
88 : 32226 : aVolatile = sal_False;
89 : 32226 : }
90 : 0 : void SetVolatile( sal_Bool bSet )
91 : : {
92 : 0 : aVolatile = bSet;
93 [ # # ]: 0 : if( bSet )
94 : 0 : aCachable = sal_False;
95 : 0 : }
96 : 16008 : void SetToggle( sal_Bool bSet )
97 : : {
98 : 16008 : aToggle = bSet;
99 : 16008 : }
100 : 16030 : void SetAutoUpdate( sal_Bool bSet )
101 : : {
102 : 16030 : aAutoUpdate = bSet;
103 : 16030 : }
104 : :
105 : 12836 : void SetSynchron( sal_Bool bSet )
106 : : {
107 : 12836 : aSynchron = bSet;
108 [ + - ]: 12836 : if( bSet )
109 : 12836 : aAsynchron = sal_False;
110 : 12836 : }
111 : 3196 : void SetAsynchron( sal_Bool bSet )
112 : : {
113 : 3196 : aAsynchron = bSet;
114 [ + - ]: 3196 : if( bSet )
115 : 3196 : aSynchron = sal_False;
116 : 3196 : }
117 : :
118 : 1124 : void SetRecordPerItem( sal_Bool bSet )
119 : : {
120 : 1124 : aRecordPerItem = bSet;
121 [ + - ]: 1124 : if( bSet )
122 : 1124 : aRecordPerSet = aRecordManual = aNoRecord = sal_False;
123 : 1124 : }
124 : 14010 : void SetRecordPerSet( sal_Bool bSet )
125 : : {
126 : 14010 : aRecordPerSet = bSet;
127 [ + - ]: 14010 : if( bSet )
128 : 14010 : aRecordPerItem = aRecordManual = aNoRecord = sal_False;
129 : 14010 : }
130 : 362 : void SetRecordManual( sal_Bool bSet )
131 : : {
132 : 362 : aRecordManual = bSet;
133 [ + - ]: 362 : if( bSet )
134 : 362 : aRecordPerItem = aRecordPerSet = aNoRecord = sal_False;
135 : 362 : }
136 : 134 : void SetNoRecord( sal_Bool bSet )
137 : : {
138 : 134 : aNoRecord = bSet;
139 [ + - ]: 134 : if( bSet )
140 : 134 : aRecordPerItem = aRecordPerSet = aRecordManual = sal_False;
141 : 134 : }
142 : 15628 : void SetRecordAbsolute( sal_Bool bSet )
143 : 15628 : { 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 : 0 : void SetAllConfig( sal_Bool bSet )
155 : : {
156 : 0 : aMenuConfig = bSet;
157 : 0 : aToolBoxConfig = bSet;
158 : 0 : aStatusBarConfig = bSet;
159 : 0 : aAccelConfig = bSet;
160 : 0 : }
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; }
169 : :
170 : : public:
171 : 47302 : SV_DECL_META_FACTORY1( SvMetaSlot, SvMetaReference, 11 )
172 : : SvMetaObject * MakeClone() const;
173 : 136 : SvMetaSlot *Clone() const { return (SvMetaSlot *)MakeClone(); }
174 : :
175 : : SvMetaSlot();
176 : : SvMetaSlot( SvMetaType * pType );
177 : :
178 : : virtual sal_Bool IsVariable() const;
179 : : virtual sal_Bool IsMethod() const;
180 : : virtual rtl::OString GetMangleName( sal_Bool bVariable ) const;
181 : :
182 : : SvMetaAttribute * GetMethod() const;
183 : : SvMetaType * GetSlotType() const;
184 : : sal_Bool GetHasCoreId() const;
185 : : const rtl::OString& GetGroupId() const;
186 : : const rtl::OString& GetConfigId() const;
187 : : const rtl::OString& GetExecMethod() const;
188 : : const rtl::OString& GetStateMethod() const;
189 : : const rtl::OString& GetDefault() const;
190 : : const rtl::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;
196 : :
197 : : sal_Bool GetSynchron() const;
198 : : sal_Bool GetAsynchron() const;
199 : :
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;
205 : :
206 : : sal_Bool GetHasDialog() const;
207 : : const rtl::OString& GetPseudoPrefix() const;
208 : : const rtl::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 : 11100 : sal_uLong GetListPos() const
222 : 11100 : { return nListPos; }
223 : 10954 : void SetListPos(sal_uLong n)
224 : 10954 : { nListPos = n; }
225 : 10954 : void ResetSlotPointer()
226 : 10954 : { pNextSlot = pLinkedSlot = 0; }
227 : :
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 rtl::OString& rPrefix,
239 : : SvIdlDataBase& );
240 : : void WriteSlotStubs( const rtl::OString& rShellName,
241 : : ByteStringList & rList,
242 : : SvStream & rOutStm );
243 : : sal_uInt16 WriteSlotMap( const rtl::OString& rShellName,
244 : : sal_uInt16 nCount,
245 : : SvSlotElementList&,
246 : : size_t nStart,
247 : : const rtl::OString&,
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& );
255 : : };
256 [ + + - ]: 358402 : SV_DECL_IMPL_REF(SvMetaSlot)
[ + + ][ + + ]
[ + + ][ # # ]
[ # # ]
257 : :
258 : : class SvMetaSlotMemberList : public SvDeclPersistList<SvMetaSlot *> {};
259 : :
260 : : #endif // _SLOT_HXX
261 : :
262 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|