xref: /trunk/main/toolkit/inc/toolkit/controls/unocontrols.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _TOOLKIT_HELPER_UNOCONTROLS_HXX_
29 #define _TOOLKIT_HELPER_UNOCONTROLS_HXX_
30 
31 #include <toolkit/dllapi.h>
32 #include <com/sun/star/awt/XTextComponent.hpp>
33 #include <com/sun/star/awt/XTextListener.hpp>
34 #include <com/sun/star/awt/XLayoutConstrains.hpp>
35 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
36 #include <com/sun/star/awt/XButton.hpp>
37 #include <com/sun/star/awt/XToggleButton.hpp>
38 #include <com/sun/star/awt/XRadioButton.hpp>
39 #include <com/sun/star/awt/XItemListener.hpp>
40 #include <com/sun/star/awt/XCheckBox.hpp>
41 #include <com/sun/star/awt/XFixedHyperlink.hpp>
42 #include <com/sun/star/awt/XFixedText.hpp>
43 #include <com/sun/star/awt/XListBox.hpp>
44 #include <com/sun/star/awt/XComboBox.hpp>
45 #include <com/sun/star/awt/XDateField.hpp>
46 #include <com/sun/star/awt/XSpinField.hpp>
47 #include <com/sun/star/awt/XTimeField.hpp>
48 #include <com/sun/star/awt/XNumericField.hpp>
49 #include <com/sun/star/awt/XCurrencyField.hpp>
50 #include <com/sun/star/awt/XPatternField.hpp>
51 #include <com/sun/star/awt/XProgressBar.hpp>
52 #include <com/sun/star/awt/XItemList.hpp>
53 #include <com/sun/star/graphic/XGraphicObject.hpp>
54 #include <toolkit/controls/unocontrolmodel.hxx>
55 #include <toolkit/controls/unocontrolbase.hxx>
56 #include <toolkit/helper/macros.hxx>
57 #include <toolkit/helper/servicenames.hxx>
58 #include <vcl/bitmapex.hxx>
59 #include <cppuhelper/implbase5.hxx>
60 #include <cppuhelper/implbase4.hxx>
61 #include <cppuhelper/implbase2.hxx>
62 #include <cppuhelper/implbase1.hxx>
63 #include <comphelper/uno3.hxx>
64 
65 #include <list>
66 #include <vector>
67 
68 #include <boost/scoped_ptr.hpp>
69 #include <boost/optional.hpp>
70 
71 #define UNO_NAME_GRAPHOBJ_URLPREFIX                             "vnd.sun.star.GraphicObject:"
72 #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX                  "vnd.sun.star.Package:"
73 
74 
75 //  ----------------------------------------------------
76 //  class UnoControlEditModel
77 //  ----------------------------------------------------
78 class UnoControlEditModel : public UnoControlModel
79 {
80 protected:
81     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
82     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
83 
84 public:
85                         UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
86                         UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;}
87 
88     UnoControlModel*    Clone() const { return new UnoControlEditModel( *this ); }
89 
90     // ::com::sun::star::io::XPersistObject
91     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
92 
93     // ::com::sun::star::beans::XMultiPropertySet
94     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
95 
96 
97     // XServiceInfo
98     DECLIMPL_SERVICEINFO_DERIVED( UnoControlEditModel, UnoControlModel, szServiceName2_UnoControlEditModel )
99 };
100 
101 //  ----------------------------------------------------
102 //  class UnoEditControl
103 //  ----------------------------------------------------
104 typedef ::cppu::ImplHelper4  <   ::com::sun::star::awt::XTextComponent
105                              ,   ::com::sun::star::awt::XTextListener
106                              ,   ::com::sun::star::awt::XLayoutConstrains
107                              ,   ::com::sun::star::awt::XTextLayoutConstrains
108                              >   UnoEditControl_Base;
109 class TOOLKIT_DLLPUBLIC UnoEditControl    :public UnoControlBase
110                                             ,public UnoEditControl_Base
111 {
112 private:
113     TextListenerMultiplexer maTextListeners;
114 
115     // Not all fields derived from UnoEditCOntrol have the property "Text"
116     // They only support XTextComponent, so keep the text
117     // here, maybe there is no Peer when calling setText()...
118     ::rtl::OUString     maText;
119     sal_uInt16              mnMaxTextLen;
120 
121     sal_Bool            mbSetTextInPeer;
122     sal_Bool            mbSetMaxTextLenInPeer;
123     sal_Bool            mbHasTextProperty;
124 
125 public:
126 
127                                 UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
128     ::rtl::OUString             GetComponentServiceName();
129     TextListenerMultiplexer&    GetTextListeners()  { return maTextListeners; }
130 
131     void                        ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
132 
133     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
134     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
135     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
136 
137     // disambiguate XInterface
138     DECLARE_XINTERFACE()
139 
140     // XAggregation
141     ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
142 
143     // XTypeProvider
144     DECLARE_XTYPEPROVIDER()
145 
146     // XTextListener
147     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
148 
149     // XTextComponent
150     void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException);
151     void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException);
152     void SAL_CALL setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException);
153     void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
154     ::rtl::OUString SAL_CALL getText(  ) throw(::com::sun::star::uno::RuntimeException);
155     ::rtl::OUString SAL_CALL getSelectedText(  ) throw(::com::sun::star::uno::RuntimeException);
156     void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException);
157     ::com::sun::star::awt::Selection SAL_CALL getSelection(  ) throw(::com::sun::star::uno::RuntimeException);
158     sal_Bool SAL_CALL isEditable(  ) throw(::com::sun::star::uno::RuntimeException);
159     void SAL_CALL setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException);
160     void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException);
161     sal_Int16 SAL_CALL getMaxTextLen(  ) throw(::com::sun::star::uno::RuntimeException);
162 
163     // XLayoutConstrains
164     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
165     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
166     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
167 
168     // XTextLayoutConstrains
169     ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
170     void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException);
171 
172     // XServiceInfo
173     DECLIMPL_SERVICEINFO_DERIVED( UnoEditControl, UnoControlBase, szServiceName2_UnoControlEdit )
174 
175     sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
176 };
177 
178 //  ----------------------------------------------------
179 //  class UnoControlFileControlModel
180 //  ----------------------------------------------------
181 class UnoControlFileControlModel : public UnoControlModel
182 {
183 protected:
184     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
185     ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
186 
187 public:
188                         UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
189                         UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;}
190 
191     UnoControlModel*    Clone() const { return new UnoControlFileControlModel( *this ); }
192 
193     // ::com::sun::star::io::XPersistObject
194     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
195 
196     // ::com::sun::star::beans::XMultiPropertySet
197     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
198 
199     // ::com::sun::star::lang::XServiceInfo
200     DECLIMPL_SERVICEINFO_DERIVED( UnoControlFileControlModel, UnoControlModel, szServiceName2_UnoControlFileControlModel )
201 };
202 
203 //  ----------------------------------------------------
204 //  class UnoFileControl
205 //  ----------------------------------------------------
206 class UnoFileControl : public UnoEditControl
207 {
208 public:
209                         UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
210     ::rtl::OUString     GetComponentServiceName();
211 
212     // ::com::sun::star::lang::XServiceInfo
213     DECLIMPL_SERVICEINFO_DERIVED( UnoFileControl, UnoEditControl, szServiceName2_UnoControlFileControl )
214 };
215 
216 //  ----------------------------------------------------
217 //  class GraphicControlModel
218 //  ----------------------------------------------------
219 class GraphicControlModel : public UnoControlModel
220 {
221 private:
222     bool                                                                                    mbAdjustingImagePosition;
223     bool                                                                                    mbAdjustingGraphic;
224 
225     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
226     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
227 
228 protected:
229     GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
230         :UnoControlModel( i_factory )
231         ,mbAdjustingImagePosition( false )
232         ,mbAdjustingGraphic( false )
233     {
234     }
235     GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
236 
237     // ::cppu::OPropertySetHelper
238     void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
239 
240     // UnoControlModel
241     ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
242 
243 private:
244         GraphicControlModel& operator=( const GraphicControlModel& );   // never implemented
245 };
246 
247 //  ----------------------------------------------------
248 //  class UnoControlButtonModel
249 //  ----------------------------------------------------
250 class UnoControlButtonModel : public GraphicControlModel
251 {
252 protected:
253     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
254     ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
255 
256 public:
257                         UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
258                         UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
259 
260     UnoControlModel*    Clone() const { return new UnoControlButtonModel( *this ); }
261 
262     // ::com::sun::star::beans::XMultiPropertySet
263     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
264 
265     // ::com::sun::star::io::XPersistObject
266     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
267 
268     // ::com::sun::star::lang::XServiceInfo
269     DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, GraphicControlModel, szServiceName2_UnoControlButtonModel )
270 };
271 
272 //  ----------------------------------------------------
273 //  class UnoButtonControl
274 //  ----------------------------------------------------
275 typedef ::cppu::AggImplInheritanceHelper4   <   UnoControlBase
276                                             ,   ::com::sun::star::awt::XButton
277                                             ,   ::com::sun::star::awt::XToggleButton
278                                             ,   ::com::sun::star::awt::XLayoutConstrains
279                                             ,   ::com::sun::star::awt::XItemListener
280                                             >   UnoButtonControl_Base;
281 class UnoButtonControl :    public UnoButtonControl_Base
282 {
283 private:
284     ActionListenerMultiplexer   maActionListeners;
285     ItemListenerMultiplexer     maItemListeners;
286     ::rtl::OUString             maActionCommand;
287 
288 public:
289 
290                         UnoButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
291     ::rtl::OUString     GetComponentServiceName();
292 
293     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
294     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
295 
296     // ::com::sun::star::awt::XButton
297     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
298     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
299     void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
300     void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
301 
302     // ::com::sun::star::awt::XToggleButton
303     // ::com::sun::star::awt::XItemEventBroadcaster
304     void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
305     void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
306 
307     // ::com::sun::star::lang::XEventListener
308     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
309 
310     // XItemListener
311     virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
312 
313     // ::com::sun::star::awt::XLayoutConstrains
314     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
315     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
316     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
317 
318     // ::com::sun::star::lang::XServiceInfo
319     DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, UnoControlBase, szServiceName2_UnoControlButton )
320 };
321 
322 //  ----------------------------------------------------
323 //  class UnoControlImageControlModel
324 //  ----------------------------------------------------
325 class UnoControlImageControlModel : public GraphicControlModel
326 {
327 private:
328     bool    mbAdjustingImageScaleMode;
329 
330 protected:
331     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
332     ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
333 
334 public:
335                                     UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
336                                     UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
337 
338     UnoControlModel*    Clone() const { return new UnoControlImageControlModel( *this ); }
339 
340     // ::com::sun::star::beans::XMultiPropertySet
341     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
342 
343     // ::com::sun::star::io::XPersistObject
344     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
345 
346     // ::com::sun::star::lang::XServiceInfo
347     DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, GraphicControlModel, szServiceName2_UnoControlImageControlModel )
348 
349     // ::cppu::OPropertySetHelper
350     void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
351 };
352 
353 //  ----------------------------------------------------
354 //  class UnoImageControlControl
355 //  ----------------------------------------------------
356 typedef ::cppu::AggImplInheritanceHelper1   <   UnoControlBase
357                                             ,   ::com::sun::star::awt::XLayoutConstrains
358                                             >   UnoImageControlControl_Base;
359 class UnoImageControlControl : public UnoImageControlControl_Base
360 {
361 private:
362     ActionListenerMultiplexer   maActionListeners;
363     ::rtl::OUString             maActionCommand;
364 
365 public:
366 
367                             UnoImageControlControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
368     ::rtl::OUString         GetComponentServiceName();
369 
370     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
371 
372     // ::com::sun::star::awt::XControl
373     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
374 
375     // ::com::sun::star::awt::XLayoutConstrains
376     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
377     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
378     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
379 
380     // ::com::sun::star::lang::XServiceInfo
381     DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, UnoControlBase, szServiceName2_UnoControlImageControl )
382 };
383 
384 //  ----------------------------------------------------
385 //  class UnoControlRadioButtonModel
386 //  ----------------------------------------------------
387 class UnoControlRadioButtonModel :  public GraphicControlModel
388 
389 {
390 protected:
391     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
392     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
393 
394 public:
395                         UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
396                         UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
397 
398     UnoControlModel*    Clone() const { return new UnoControlRadioButtonModel( *this ); }
399 
400     // ::com::sun::star::io::XPersistObject
401     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
402 
403     // ::com::sun::star::beans::XMultiPropertySet
404     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
405 
406     // ::com::sun::star::lang::XServiceInfo
407     DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, GraphicControlModel, szServiceName2_UnoControlRadioButtonModel )
408 
409 };
410 
411 //  ----------------------------------------------------
412 //  class UnoRadioButtonControl
413 //  ----------------------------------------------------
414 typedef ::cppu::AggImplInheritanceHelper4   <   UnoControlBase
415                                             ,   ::com::sun::star::awt::XButton
416                                             ,   ::com::sun::star::awt::XRadioButton
417                                             ,   ::com::sun::star::awt::XItemListener
418                                             ,   ::com::sun::star::awt::XLayoutConstrains
419                                             >   UnoRadioButtonControl_Base;
420 class UnoRadioButtonControl : public UnoRadioButtonControl_Base
421 {
422 private:
423     ItemListenerMultiplexer     maItemListeners;
424     ActionListenerMultiplexer   maActionListeners;
425     ::rtl::OUString             maActionCommand;
426 
427 public:
428 
429                             UnoRadioButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
430     ::rtl::OUString         GetComponentServiceName();
431 
432     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
433     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
434     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
435 
436     // ::com::sun::star::awt::XControl
437     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
438 
439     // ::com::sun::star::awt::XButton
440     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
441     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
442     void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
443 
444     // ::com::sun::star::awt::XRadioButton
445     void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
446     void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
447     sal_Bool SAL_CALL getState(  ) throw(::com::sun::star::uno::RuntimeException);
448     void SAL_CALL setState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException);
449     void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
450 
451     // ::com::sun::star::awt::XItemListener
452     void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
453 
454     // ::com::sun::star::awt::XLayoutConstrains
455     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
456     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
457     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
458 
459     // ::com::sun::star::lang::XServiceInfo
460     DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, UnoControlBase, szServiceName2_UnoControlRadioButton )
461 
462 };
463 
464 //  ----------------------------------------------------
465 //  class UnoControlCheckBoxModel
466 //  ----------------------------------------------------
467 class UnoControlCheckBoxModel : public GraphicControlModel
468 {
469 protected:
470     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
471     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
472 
473 public:
474                         UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
475                         UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;}
476 
477     UnoControlModel*    Clone() const { return new UnoControlCheckBoxModel( *this ); }
478 
479     // ::com::sun::star::io::XPersistObject
480     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
481 
482     // ::com::sun::star::beans::XMultiPropertySet
483     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
484 
485     // ::com::sun::star::lang::XServiceInfo
486     DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, GraphicControlModel, szServiceName2_UnoControlCheckBoxModel )
487 };
488 
489 //  ----------------------------------------------------
490 //  class UnoCheckBoxControl
491 //  ----------------------------------------------------
492 typedef ::cppu::AggImplInheritanceHelper4   <   UnoControlBase
493                                             ,   ::com::sun::star::awt::XButton
494                                             ,   ::com::sun::star::awt::XCheckBox
495                                             ,   ::com::sun::star::awt::XItemListener
496                                             ,   ::com::sun::star::awt::XLayoutConstrains
497                                             >   UnoCheckBoxControl_Base;
498 class UnoCheckBoxControl : public UnoCheckBoxControl_Base
499 {
500 private:
501     ItemListenerMultiplexer     maItemListeners;
502     ActionListenerMultiplexer   maActionListeners;
503     ::rtl::OUString             maActionCommand;
504 
505 public:
506 
507                             UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
508                             ~UnoCheckBoxControl(){;}
509     ::rtl::OUString         GetComponentServiceName();
510 
511     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
512     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
513     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
514 
515     // ::com::sun::star::awt::XControl
516     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
517 
518     // ::com::sun::star::awt::XButton
519     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
520     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
521     void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
522 
523     virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException);
524     virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException);
525 
526 
527     sal_Int16 SAL_CALL getState(  ) throw(::com::sun::star::uno::RuntimeException);
528     void SAL_CALL setState( sal_Int16 n ) throw(::com::sun::star::uno::RuntimeException);
529     void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
530     void SAL_CALL enableTriState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException);
531 
532     // ::com::sun::star::awt::XItemListener
533     void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
534 
535     // ::com::sun::star::awt::XLayoutConstrains
536     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
537     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
538     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
539 
540     // ::com::sun::star::lang::XServiceInfo
541     DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, UnoControlBase, szServiceName2_UnoControlCheckBox )
542 
543 };
544 
545 //  ----------------------------------------------------
546 //  class UnoControlFixedTextModel
547 //  ----------------------------------------------------
548 class UnoControlFixedHyperlinkModel : public UnoControlModel
549 {
550 protected:
551     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
552     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
553 
554 public:
555     UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
556     UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;}
557 
558     UnoControlModel*    Clone() const { return new UnoControlFixedHyperlinkModel( *this ); }
559 
560     // ::com::sun::star::io::XPersistObject
561     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
562 
563     // ::com::sun::star::beans::XMultiPropertySet
564     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
565 
566     // ::com::sun::star::lang::XServiceInfo
567     DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedHyperlinkModel, UnoControlModel, szServiceName_UnoControlFixedHyperlinkModel )
568 };
569 
570 //  ----------------------------------------------------
571 //  class UnoFixedHyperlinkControl
572 //  ----------------------------------------------------
573 class UnoFixedHyperlinkControl : public UnoControlBase,
574                                  public ::com::sun::star::awt::XFixedHyperlink,
575                                  public ::com::sun::star::awt::XLayoutConstrains
576 {
577 private:
578     ActionListenerMultiplexer   maActionListeners;
579 
580 public:
581     UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
582 
583     ::rtl::OUString     GetComponentServiceName();
584 
585     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
586     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
587     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
588     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
589 
590     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
591     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
592 
593     // ::com::sun::star::lang::XTypeProvider
594     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
595     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
596 
597     // ::com::sun::star::awt::XControl
598     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
599 
600     // ::com::sun::star::awt::XFixedHyperlink
601     void SAL_CALL setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
602     ::rtl::OUString SAL_CALL getText(  ) throw(::com::sun::star::uno::RuntimeException);
603     void SAL_CALL setURL( const ::rtl::OUString& URL ) throw(::com::sun::star::uno::RuntimeException);
604     ::rtl::OUString SAL_CALL getURL(  ) throw(::com::sun::star::uno::RuntimeException);
605     void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException);
606     sal_Int16 SAL_CALL getAlignment(  ) throw(::com::sun::star::uno::RuntimeException);
607     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
608     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
609 
610     // ::com::sun::star::awt::XLayoutConstrains
611     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
612     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
613     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
614 
615     // ::com::sun::star::lang::XServiceInfo
616     DECLIMPL_SERVICEINFO_DERIVED( UnoFixedHyperlinkControl, UnoControlBase, szServiceName_UnoControlFixedHyperlink )
617 };
618 
619 //  ----------------------------------------------------
620 //  class UnoControlFixedTextModel
621 //  ----------------------------------------------------
622 class UnoControlFixedTextModel : public UnoControlModel
623 {
624 protected:
625     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
626     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
627 
628 public:
629                         UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
630                         UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;}
631 
632     UnoControlModel*    Clone() const { return new UnoControlFixedTextModel( *this ); }
633 
634     // ::com::sun::star::io::XPersistObject
635     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
636 
637     // ::com::sun::star::beans::XMultiPropertySet
638     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
639 
640     // ::com::sun::star::lang::XServiceInfo
641     DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedTextModel, UnoControlModel, szServiceName2_UnoControlFixedTextModel )
642 
643 };
644 
645 //  ----------------------------------------------------
646 //  class UnoFixedTextControl
647 //  ----------------------------------------------------
648 class UnoFixedTextControl : public UnoControlBase,
649                             public ::com::sun::star::awt::XFixedText,
650                             public ::com::sun::star::awt::XLayoutConstrains
651 {
652 public:
653                         UnoFixedTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
654     ::rtl::OUString     GetComponentServiceName();
655 
656     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
657     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
658     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
659     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
660 
661     // ::com::sun::star::lang::XTypeProvider
662     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
663     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
664 
665     // ::com::sun::star::awt::XControl
666     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
667 
668     // ::com::sun::star::awt::XFixedText
669     void SAL_CALL setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
670     ::rtl::OUString SAL_CALL getText(  ) throw(::com::sun::star::uno::RuntimeException);
671     void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException);
672     sal_Int16 SAL_CALL getAlignment(  ) throw(::com::sun::star::uno::RuntimeException);
673 
674     // ::com::sun::star::awt::XLayoutConstrains
675     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
676     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
677     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
678 
679     // ::com::sun::star::lang::XServiceInfo
680     DECLIMPL_SERVICEINFO_DERIVED( UnoFixedTextControl, UnoControlBase, szServiceName2_UnoControlFixedText )
681 
682 };
683 
684 //  ----------------------------------------------------
685 //  class UnoControlGroupBoxModel
686 //  ----------------------------------------------------
687 class UnoControlGroupBoxModel : public UnoControlModel
688 {
689 protected:
690     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
691     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
692 
693 public:
694                         UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
695                         UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;}
696 
697     UnoControlModel*    Clone() const { return new UnoControlGroupBoxModel( *this ); }
698 
699     // ::com::sun::star::io::XPersistObject
700     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
701 
702     // ::com::sun::star::beans::XMultiPropertySet
703     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
704 
705     // ::com::sun::star::lang::XServiceInfo
706     DECLIMPL_SERVICEINFO_DERIVED( UnoControlGroupBoxModel, UnoControlModel, szServiceName2_UnoControlGroupBoxModel )
707 
708 };
709 
710 //  ----------------------------------------------------
711 //  class UnoGroupBoxControl
712 //  ----------------------------------------------------
713 class UnoGroupBoxControl :  public UnoControlBase
714 {
715 public:
716                         UnoGroupBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
717     ::rtl::OUString     GetComponentServiceName();
718 
719     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
720 
721     // ::com::sun::star::lang::XServiceInfo
722     DECLIMPL_SERVICEINFO_DERIVED( UnoGroupBoxControl, UnoControlBase, szServiceName2_UnoControlGroupBox )
723 
724 };
725 
726 //  ----------------------------------------------------
727 //  class UnoControlListBoxModel
728 //  ----------------------------------------------------
729 struct UnoControlListBoxModel_Data;
730 typedef ::cppu::AggImplInheritanceHelper1   <   UnoControlModel
731                                             ,   ::com::sun::star::awt::XItemList
732                                             >   UnoControlListBoxModel_Base;
733 class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base
734 {
735 protected:
736     enum ConstructorMode
737     {
738         ConstructDefault,
739         ConstructWithoutProperties
740     };
741 
742 public:
743                         UnoControlListBoxModel(
744                             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory,
745                             ConstructorMode const i_mode = ConstructDefault
746                         );
747                         UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
748                         ~UnoControlListBoxModel();
749 
750     UnoControlModel*    Clone() const { return new UnoControlListBoxModel( *this ); }
751 
752     virtual void        ImplNormalizePropertySequence(
753                             const sal_Int32                 _nCount,        /// the number of entries in the arrays
754                             sal_Int32*                      _pHandles,      /// the handles of the properties to set
755                             ::com::sun::star::uno::Any*     _pValues,       /// the values of the properties to set
756                             sal_Int32*                      _pValidHandles  /// pointer to the valid handles, allowed to be adjusted
757                         )   const SAL_THROW(());
758 
759     // ::com::sun::star::beans::XMultiPropertySet
760     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
761 
762     // ::com::sun::star::io::XPersistObject
763     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
764 
765     // ::com::sun::star::lang::XServiceInfo
766     //DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
767     ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
768     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
769 
770     // ::com::sun::star::awt::XItemList
771     virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException);
772     virtual void SAL_CALL insertItem( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
773     virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
774     virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
775     virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
776     virtual void SAL_CALL removeAllItems(  ) throw (::com::sun::star::uno::RuntimeException);
777     virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
778     virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
779     virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
780     virtual void SAL_CALL setItemData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
781     virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
782     virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
783     virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
784     virtual ::com::sun::star::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
785     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems(  ) throw (::com::sun::star::uno::RuntimeException);
786     virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
787     virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
788 
789     // OPropertySetHelper
790     void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
791 
792 protected:
793     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
794     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
795 
796 private:
797     void    impl_notifyItemListEvent_nolck(
798                 const sal_Int32 i_nItemPosition,
799                 const ::boost::optional< ::rtl::OUString >& i_rItemText,
800                 const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
801                 void ( SAL_CALL ::com::sun::star::awt::XItemListListener::*NotificationMethod )( const ::com::sun::star::awt::ItemListEvent& )
802             );
803 
804     void    impl_handleInsert(
805                 const sal_Int32 i_nItemPosition,
806                 const ::boost::optional< ::rtl::OUString >& i_rItemText,
807                 const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
808                 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
809             );
810 
811     void    impl_handleRemove(
812                 const sal_Int32 i_nItemPosition,
813                 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
814             );
815 
816     void    impl_handleModify(
817                 const sal_Int32 i_nItemPosition,
818                 const ::boost::optional< ::rtl::OUString >& i_rItemText,
819                 const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
820                 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
821             );
822 
823     void    impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const;
824     void    impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems );
825 
826 protected:
827     ::boost::scoped_ptr< UnoControlListBoxModel_Data >  m_pData;
828     ::cppu::OInterfaceContainerHelper                   m_aItemListListeners;
829 };
830 
831 //  ----------------------------------------------------
832 //  class UnoListBoxControl
833 //  ----------------------------------------------------
834 typedef ::cppu::AggImplInheritanceHelper5   <   UnoControlBase
835                                             ,   ::com::sun::star::awt::XListBox
836                                             ,   ::com::sun::star::awt::XItemListener
837                                             ,   ::com::sun::star::awt::XLayoutConstrains
838                                             ,   ::com::sun::star::awt::XTextLayoutConstrains
839                                             ,   ::com::sun::star::awt::XItemListListener
840                                             >   UnoListBoxControl_Base;
841 class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
842 {
843 public:
844                         UnoListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
845     ::rtl::OUString     GetComponentServiceName();
846 
847     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
848     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
849     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
850 
851     // ::com::sun::star::awt::XListBox
852     void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
853     void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
854     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
855     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
856     void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
857     void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
858     void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException);
859     sal_Int16 SAL_CALL getItemCount(  ) throw(::com::sun::star::uno::RuntimeException);
860     ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
861     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems(  ) throw(::com::sun::star::uno::RuntimeException);
862     sal_Int16 SAL_CALL getSelectedItemPos(  ) throw(::com::sun::star::uno::RuntimeException);
863     ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos(  ) throw(::com::sun::star::uno::RuntimeException);
864     ::rtl::OUString SAL_CALL getSelectedItem(  ) throw(::com::sun::star::uno::RuntimeException);
865     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedItems(  ) throw(::com::sun::star::uno::RuntimeException);
866     void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
867     void SAL_CALL selectItemsPos( const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
868     void SAL_CALL selectItem( const ::rtl::OUString& aItem, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
869     sal_Bool SAL_CALL isMutipleMode(  ) throw(::com::sun::star::uno::RuntimeException);
870     void SAL_CALL setMultipleMode( sal_Bool bMulti ) throw(::com::sun::star::uno::RuntimeException);
871     sal_Int16 SAL_CALL getDropDownLineCount(  ) throw(::com::sun::star::uno::RuntimeException);
872     void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
873     void SAL_CALL makeVisible( sal_Int16 nEntry ) throw(::com::sun::star::uno::RuntimeException);
874 
875     // ::com::sun::star::awt::XItemListener
876     void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
877 
878     // ::com::sun::star::awt::XLayoutConstrains
879     ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw(::com::sun::star::uno::RuntimeException);
880     ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw(::com::sun::star::uno::RuntimeException);
881     ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
882 
883     // ::com::sun::star::awt::XTextLayoutConstrains
884     ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
885     void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException);
886 
887     // XUnoControl
888     sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
889 
890     // XItemListListener
891     virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
892     virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
893     virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
894     virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
895     virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
896 
897     // ::com::sun::star::lang::XServiceInfo
898     // DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
899     ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
900     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
901 
902 protected:
903     void                ImplUpdateSelectedItemsProperty();
904     virtual void        ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
905     virtual void        updateFromModel();
906 
907     ActionListenerMultiplexer&  getActionListeners();
908     ItemListenerMultiplexer&    getItemListeners();
909 private:
910     ActionListenerMultiplexer   maActionListeners;
911     ItemListenerMultiplexer     maItemListeners;
912 };
913 
914 //  ----------------------------------------------------
915 //  class UnoControlComboBoxModel
916 //  ----------------------------------------------------
917 class UnoControlComboBoxModel : public UnoControlListBoxModel
918 {
919 protected:
920     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
921     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
922 
923 public:
924                         UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
925                         UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
926 
927     UnoControlModel*    Clone() const { return new UnoControlComboBoxModel( *this ); }
928 
929     // ::com::sun::star::io::XPersistObject
930     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
931 
932     // ::com::sun::star::beans::XMultiPropertySet
933     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
934     // OPropertySetHelper
935     void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
936 
937     // ::com::sun::star::lang::XServiceInfo
938     ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
939     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
940     // DECLIMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
941 
942 };
943 
944 //  ----------------------------------------------------
945 //  class UnoComboBoxControl
946 //  ----------------------------------------------------
947 class UnoComboBoxControl :  public UnoEditControl
948                         ,   public ::com::sun::star::awt::XComboBox
949                         ,   public ::com::sun::star::awt::XItemListener
950                         ,   public ::com::sun::star::awt::XItemListListener
951 {
952 private:
953     ActionListenerMultiplexer   maActionListeners;
954     ItemListenerMultiplexer     maItemListeners;
955 
956 public:
957 
958                         UnoComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
959     ::rtl::OUString     GetComponentServiceName();
960 
961     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
962     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoEditControl::disposing( Source ); }
963     void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
964 
965     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); }
966     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
967     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
968     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
969 
970 
971     // ::com::sun::star::lang::XTypeProvider
972     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
973     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
974 
975     // ::com::sun::star::awt::XComboBox
976     void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
977     void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
978     void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
979     void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
980     void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
981     void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
982     void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException);
983     sal_Int16 SAL_CALL getItemCount(  ) throw(::com::sun::star::uno::RuntimeException);
984     ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
985     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems(  ) throw(::com::sun::star::uno::RuntimeException);
986     sal_Int16 SAL_CALL getDropDownLineCount(  ) throw(::com::sun::star::uno::RuntimeException);
987     void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
988 
989     // XUnoControl
990     virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
991 
992     // XItemListListener
993     virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
994     virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
995     virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
996     virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
997     virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
998 
999     // XItemListener
1000     virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
1001 
1002     // ::com::sun::star::lang::XServiceInfo
1003     ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
1004     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
1005     //DECLIMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
1006 protected:
1007     virtual void        ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
1008     virtual void        updateFromModel();
1009     ActionListenerMultiplexer&  getActionListeners();
1010     ItemListenerMultiplexer&    getItemListeners();
1011 
1012 };
1013 
1014 //  ----------------------------------------------------
1015 //  class UnoSpinFieldControl
1016 //  ----------------------------------------------------
1017 class UnoSpinFieldControl : public UnoEditControl,
1018                             public ::com::sun::star::awt::XSpinField
1019 {
1020 private:
1021     SpinListenerMultiplexer     maSpinListeners;
1022     sal_Bool                        mbRepeat;
1023 
1024 public:
1025                                 UnoSpinFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1026 
1027     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); }
1028     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1029     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1030     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1031 
1032     // ::com::sun::star::lang::XTypeProvider
1033     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1034     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1035 
1036     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
1037 
1038     // ::com::sun::star::awt::XSpinField
1039     void SAL_CALL addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException);
1040     void SAL_CALL removeSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException);
1041     void SAL_CALL up() throw(::com::sun::star::uno::RuntimeException);
1042     void SAL_CALL down() throw(::com::sun::star::uno::RuntimeException);
1043     void SAL_CALL first() throw(::com::sun::star::uno::RuntimeException);
1044     void SAL_CALL last() throw(::com::sun::star::uno::RuntimeException);
1045     void SAL_CALL enableRepeat( sal_Bool bRepeat ) throw(::com::sun::star::uno::RuntimeException);
1046 
1047 
1048     // ::com::sun::star::lang::XServiceInfo
1049     // No service info, only base class for other fields.
1050 };
1051 
1052 
1053 //  ----------------------------------------------------
1054 //  class UnoControlDateFieldModel
1055 //  ----------------------------------------------------
1056 class UnoControlDateFieldModel : public UnoControlModel
1057 {
1058 protected:
1059     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1060     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1061 
1062 public:
1063                 UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1064                 UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1065 
1066     UnoControlModel*    Clone() const { return new UnoControlDateFieldModel( *this ); }
1067 
1068     // ::com::sun::star::io::XPersistObject
1069     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1070 
1071     // ::com::sun::star::beans::XMultiPropertySet
1072     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1073 
1074     // ::com::sun::star::lang::XServiceInfo
1075     DECLIMPL_SERVICEINFO_DERIVED( UnoControlDateFieldModel, UnoControlModel, szServiceName2_UnoControlDateFieldModel )
1076 
1077 };
1078 
1079 //  ----------------------------------------------------
1080 //  class UnoDateFieldControl
1081 //  ----------------------------------------------------
1082 class UnoDateFieldControl : public UnoSpinFieldControl,
1083                             public ::com::sun::star::awt::XDateField
1084 {
1085 private:
1086     sal_Int32       mnFirst;
1087     sal_Int32       mnLast;
1088     sal_Bool        mbLongFormat;
1089 public:
1090                             UnoDateFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1091     ::rtl::OUString         GetComponentServiceName();
1092 
1093     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
1094     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1095     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1096     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1097 
1098     // ::com::sun::star::lang::XTypeProvider
1099     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1100     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1101 
1102     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
1103 
1104     // ::com::sun::star::awt::XTextListener
1105     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
1106 
1107     //XDateField
1108     void SAL_CALL setDate( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
1109     sal_Int32 SAL_CALL getDate(  ) throw(::com::sun::star::uno::RuntimeException);
1110     void SAL_CALL setMin( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
1111     sal_Int32 SAL_CALL getMin(  ) throw(::com::sun::star::uno::RuntimeException);
1112     void SAL_CALL setMax( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
1113     sal_Int32 SAL_CALL getMax(  ) throw(::com::sun::star::uno::RuntimeException);
1114     void SAL_CALL setFirst( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
1115     sal_Int32 SAL_CALL getFirst(  ) throw(::com::sun::star::uno::RuntimeException);
1116     void SAL_CALL setLast( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
1117     sal_Int32 SAL_CALL getLast(  ) throw(::com::sun::star::uno::RuntimeException);
1118     void SAL_CALL setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException);
1119     sal_Bool SAL_CALL isLongFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1120     void SAL_CALL setEmpty(  ) throw(::com::sun::star::uno::RuntimeException);
1121     sal_Bool SAL_CALL isEmpty(  ) throw(::com::sun::star::uno::RuntimeException);
1122     void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
1123     sal_Bool SAL_CALL isStrictFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1124 
1125     // ::com::sun::star::lang::XServiceInfo
1126     DECLIMPL_SERVICEINFO_DERIVED( UnoDateFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlDateField )
1127 };
1128 
1129 //  ----------------------------------------------------
1130 //  class UnoControlTimeFieldModel
1131 //  ----------------------------------------------------
1132 class UnoControlTimeFieldModel : public UnoControlModel
1133 {
1134 protected:
1135     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1136     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1137 
1138 public:
1139                         UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1140                         UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1141 
1142     UnoControlModel*    Clone() const { return new UnoControlTimeFieldModel( *this ); }
1143 
1144     // ::com::sun::star::io::XPersistObject
1145     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1146 
1147     // ::com::sun::star::beans::XMultiPropertySet
1148     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1149 
1150     // ::com::sun::star::lang::XServiceInfo
1151     DECLIMPL_SERVICEINFO_DERIVED( UnoControlTimeFieldModel, UnoControlModel, szServiceName2_UnoControlTimeFieldModel )
1152 
1153 };
1154 
1155 //  ----------------------------------------------------
1156 //  class UnoTimeFieldControl
1157 //  ----------------------------------------------------
1158 class UnoTimeFieldControl : public UnoSpinFieldControl,
1159                             public ::com::sun::star::awt::XTimeField
1160 {
1161 private:
1162     sal_Int32       mnFirst;
1163     sal_Int32       mnLast;
1164 
1165 public:
1166                         UnoTimeFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1167     ::rtl::OUString     GetComponentServiceName();
1168 
1169     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
1170     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1171     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1172     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1173 
1174     // ::com::sun::star::lang::XTypeProvider
1175     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1176     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1177 
1178     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
1179 
1180     // ::com::sun::star::awt::XTextListener
1181     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
1182 
1183     //XTimeField
1184     void SAL_CALL setTime( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
1185     sal_Int32 SAL_CALL getTime(  ) throw(::com::sun::star::uno::RuntimeException);
1186     void SAL_CALL setMin( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
1187     sal_Int32 SAL_CALL getMin(  ) throw(::com::sun::star::uno::RuntimeException);
1188     void SAL_CALL setMax( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
1189     sal_Int32 SAL_CALL getMax(  ) throw(::com::sun::star::uno::RuntimeException);
1190     void SAL_CALL setFirst( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
1191     sal_Int32 SAL_CALL getFirst(  ) throw(::com::sun::star::uno::RuntimeException);
1192     void SAL_CALL setLast( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
1193     sal_Int32 SAL_CALL getLast(  ) throw(::com::sun::star::uno::RuntimeException);
1194     void SAL_CALL setEmpty(  ) throw(::com::sun::star::uno::RuntimeException);
1195     sal_Bool SAL_CALL isEmpty(  ) throw(::com::sun::star::uno::RuntimeException);
1196     void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
1197     sal_Bool SAL_CALL isStrictFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1198 
1199     // ::com::sun::star::lang::XServiceInfo
1200     DECLIMPL_SERVICEINFO_DERIVED( UnoTimeFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlTimeField )
1201 
1202 };
1203 
1204 //  ----------------------------------------------------
1205 //  class UnoControlNumericFieldModel
1206 //  ----------------------------------------------------
1207 class UnoControlNumericFieldModel : public UnoControlModel
1208 {
1209 protected:
1210     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1211     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1212 
1213 public:
1214                 UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1215                 UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1216 
1217     UnoControlModel*    Clone() const { return new UnoControlNumericFieldModel( *this ); }
1218 
1219     // ::com::sun::star::io::XPersistObject
1220     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1221 
1222     // ::com::sun::star::beans::XMultiPropertySet
1223     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1224 
1225     // ::com::sun::star::lang::XServiceInfo
1226     DECLIMPL_SERVICEINFO_DERIVED( UnoControlNumericFieldModel, UnoControlModel, szServiceName2_UnoControlNumericFieldModel )
1227 
1228 };
1229 
1230 //  ----------------------------------------------------
1231 //  class UnoNumericFieldControl
1232 //  ----------------------------------------------------
1233 class UnoNumericFieldControl :  public UnoSpinFieldControl,
1234                                 public ::com::sun::star::awt::XNumericField
1235 {
1236 private:
1237     double mnFirst;
1238     double mnLast;
1239 
1240 public:
1241                         UnoNumericFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1242     ::rtl::OUString     GetComponentServiceName();
1243 
1244     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
1245     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1246     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1247     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1248 
1249     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
1250 
1251     // ::com::sun::star::lang::XTypeProvider
1252     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1253     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1254 
1255     // ::com::sun::star::awt::XTextListener
1256     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
1257 
1258     // ::com::sun::star::awt::XNumericField
1259     void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException);
1260     double SAL_CALL getValue(  ) throw(::com::sun::star::uno::RuntimeException);
1261     void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException);
1262     double SAL_CALL getMin(  ) throw(::com::sun::star::uno::RuntimeException);
1263     void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException);
1264     double SAL_CALL getMax(  ) throw(::com::sun::star::uno::RuntimeException);
1265     void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException);
1266     double SAL_CALL getFirst(  ) throw(::com::sun::star::uno::RuntimeException);
1267     void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException);
1268     double SAL_CALL getLast(  ) throw(::com::sun::star::uno::RuntimeException);
1269     void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException);
1270     double SAL_CALL getSpinSize(  ) throw(::com::sun::star::uno::RuntimeException);
1271     void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException);
1272     sal_Int16 SAL_CALL getDecimalDigits(  ) throw(::com::sun::star::uno::RuntimeException);
1273     void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
1274     sal_Bool SAL_CALL isStrictFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1275 
1276     // ::com::sun::star::lang::XServiceInfo
1277     DECLIMPL_SERVICEINFO_DERIVED( UnoNumericFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlNumericField )
1278 
1279 };
1280 
1281 //  ----------------------------------------------------
1282 //  class UnoControlCurrencyFieldModel
1283 //  ----------------------------------------------------
1284 class UnoControlCurrencyFieldModel : public UnoControlModel
1285 {
1286 protected:
1287     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1288     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1289 
1290 public:
1291                         UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1292                         UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1293 
1294     UnoControlModel*    Clone() const { return new UnoControlCurrencyFieldModel( *this ); }
1295 
1296     // ::com::sun::star::io::XPersistObject
1297     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1298 
1299     // ::com::sun::star::beans::XMultiPropertySet
1300     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1301 
1302     // ::com::sun::star::lang::XServiceInfo
1303     DECLIMPL_SERVICEINFO_DERIVED( UnoControlCurrencyFieldModel, UnoControlModel, szServiceName2_UnoControlCurrencyFieldModel )
1304 
1305 };
1306 
1307 //  ----------------------------------------------------
1308 //  class UnoCurrencyFieldControl
1309 //  ----------------------------------------------------
1310 class UnoCurrencyFieldControl : public UnoSpinFieldControl,
1311                                 public ::com::sun::star::awt::XCurrencyField
1312 {
1313 private:
1314     double mnFirst;
1315     double mnLast;
1316 
1317 public:
1318                         UnoCurrencyFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1319     ::rtl::OUString     GetComponentServiceName();
1320 
1321     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
1322     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1323     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1324     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1325 
1326     void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
1327 
1328     // ::com::sun::star::lang::XTypeProvider
1329     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1330     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1331 
1332     // ::com::sun::star::awt::XTextListener
1333     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
1334 
1335     // ::com::sun::star::awt::XCurrencyField
1336     void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException);
1337     double SAL_CALL getValue(  ) throw(::com::sun::star::uno::RuntimeException);
1338     void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException);
1339     double SAL_CALL getMin(  ) throw(::com::sun::star::uno::RuntimeException);
1340     void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException);
1341     double SAL_CALL getMax(  ) throw(::com::sun::star::uno::RuntimeException);
1342     void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException);
1343     double SAL_CALL getFirst(  ) throw(::com::sun::star::uno::RuntimeException);
1344     void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException);
1345     double SAL_CALL getLast(  ) throw(::com::sun::star::uno::RuntimeException);
1346     void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException);
1347     double SAL_CALL getSpinSize(  ) throw(::com::sun::star::uno::RuntimeException);
1348     void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException);
1349     sal_Int16 SAL_CALL getDecimalDigits(  ) throw(::com::sun::star::uno::RuntimeException);
1350     void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
1351     sal_Bool SAL_CALL isStrictFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1352 
1353     // ::com::sun::star::lang::XServiceInfo
1354     DECLIMPL_SERVICEINFO_DERIVED( UnoCurrencyFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlCurrencyField )
1355 };
1356 
1357 //  ----------------------------------------------------
1358 //  class UnoControlPatternFieldModel
1359 //  ----------------------------------------------------
1360 class UnoControlPatternFieldModel : public UnoControlModel
1361 {
1362 protected:
1363     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1364     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1365 
1366 public:
1367                         UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1368                         UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1369 
1370     UnoControlModel*    Clone() const { return new UnoControlPatternFieldModel( *this ); }
1371 
1372     // ::com::sun::star::io::XPersistObject
1373     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1374 
1375     // ::com::sun::star::beans::XMultiPropertySet
1376     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1377 
1378     // ::com::sun::star::lang::XServiceInfo
1379     DECLIMPL_SERVICEINFO_DERIVED( UnoControlPatternFieldModel, UnoControlModel, szServiceName2_UnoControlPatternFieldModel )
1380 
1381 };
1382 
1383 //  ----------------------------------------------------
1384 //  class UnoPatternFieldControl
1385 //  ----------------------------------------------------
1386 class UnoPatternFieldControl :  public UnoSpinFieldControl,
1387                                 public ::com::sun::star::awt::XPatternField
1388 {
1389 protected:
1390     void            ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
1391 
1392 public:
1393                         UnoPatternFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1394     ::rtl::OUString     GetComponentServiceName();
1395 
1396     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
1397     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1398     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1399     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1400 
1401     // ::com::sun::star::lang::XTypeProvider
1402     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1403     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1404 
1405     // ::com::sun::star::awt::XPatternField
1406     void SAL_CALL setMasks( const ::rtl::OUString& EditMask, const ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException);
1407     void SAL_CALL getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException);
1408     void SAL_CALL setString( const ::rtl::OUString& Str ) throw(::com::sun::star::uno::RuntimeException);
1409     ::rtl::OUString SAL_CALL getString(  ) throw(::com::sun::star::uno::RuntimeException);
1410     void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
1411     sal_Bool SAL_CALL isStrictFormat(  ) throw(::com::sun::star::uno::RuntimeException);
1412 
1413     // ::com::sun::star::lang::XServiceInfo
1414     DECLIMPL_SERVICEINFO_DERIVED( UnoPatternFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlPatternField )
1415 
1416 };
1417 
1418 //  ----------------------------------------------------
1419 //  class UnoControlProgressBarModel
1420 //  ----------------------------------------------------
1421 class UnoControlProgressBarModel :  public UnoControlModel
1422 {
1423 protected:
1424     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1425     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1426 
1427 public:
1428                         UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1429                         UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;}
1430 
1431     UnoControlModel*    Clone() const { return new UnoControlProgressBarModel( *this ); }
1432 
1433     // ::com::sun::star::beans::XMultiPropertySet
1434     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1435 
1436     // ::com::sun::star::io::XPersistObject
1437     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1438 
1439     // XServiceInfo
1440     DECLIMPL_SERVICEINFO_DERIVED( UnoControlProgressBarModel, UnoControlModel, szServiceName2_UnoControlProgressBarModel )
1441 };
1442 
1443 //  ----------------------------------------------------
1444 //  class UnoProgressBarControl
1445 //  ----------------------------------------------------
1446 class UnoProgressBarControl :   public UnoControlBase,
1447                                 public ::com::sun::star::awt::XProgressBar
1448 {
1449 public:
1450                                 UnoProgressBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1451     ::rtl::OUString             GetComponentServiceName();
1452 
1453     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
1454     ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
1455     void                        SAL_CALL acquire() throw()  { OWeakAggObject::acquire(); }
1456     void                        SAL_CALL release() throw()  { OWeakAggObject::release(); }
1457 
1458     // ::com::sun::star::lang::XTypeProvider
1459     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
1460     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
1461 
1462     // ::com::sun::star::awt::XProgressBar
1463     void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException);
1464     void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException);
1465     void SAL_CALL setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException);
1466     void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException );
1467     sal_Int32 SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
1468 
1469     // ::com::sun::star::lang::XServiceInfo
1470     DECLIMPL_SERVICEINFO_DERIVED( UnoProgressBarControl, UnoControlBase, szServiceName2_UnoControlProgressBar )
1471 };
1472 
1473 
1474 //  ----------------------------------------------------
1475 //  class UnoControlFixedLineModel
1476 //  ----------------------------------------------------
1477 class UnoControlFixedLineModel : public UnoControlModel
1478 {
1479 protected:
1480     ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
1481     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
1482 
1483 public:
1484                         UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1485                         UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;}
1486 
1487     UnoControlModel*    Clone() const { return new UnoControlFixedLineModel( *this ); }
1488 
1489     // ::com::sun::star::beans::XMultiPropertySet
1490     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
1491 
1492     // ::com::sun::star::io::XPersistObject
1493     ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
1494 
1495     // ::com::sun::star::lang::XServiceInfo
1496     DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedLineModel, UnoControlModel, szServiceName2_UnoControlFixedLineModel )
1497 
1498 };
1499 
1500 //  ----------------------------------------------------
1501 //  class UnoFixedLineControl
1502 //  ----------------------------------------------------
1503 class UnoFixedLineControl : public UnoControlBase
1504 {
1505 public:
1506                         UnoFixedLineControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
1507     ::rtl::OUString     GetComponentServiceName();
1508 
1509     sal_Bool SAL_CALL isTransparent(  ) throw(::com::sun::star::uno::RuntimeException);
1510 
1511     // ::com::sun::star::lang::XServiceInfo
1512     DECLIMPL_SERVICEINFO_DERIVED( UnoFixedLineControl, UnoControlBase, szServiceName2_UnoControlFixedLine )
1513 
1514 };
1515 
1516 
1517 
1518 #endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_
1519 
1520