Branch libreoffice-5-0-4
[LibreOffice.git] / include / toolkit / controls / unocontrols.hxx
bloba0bd3cdbcd0d2c74d096a81b79f355a2b140a32e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
21 #define INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
23 #include <toolkit/dllapi.h>
24 #include <com/sun/star/awt/XTextComponent.hpp>
25 #include <com/sun/star/awt/XTextListener.hpp>
26 #include <com/sun/star/awt/XLayoutConstrains.hpp>
27 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
28 #include <com/sun/star/awt/XButton.hpp>
29 #include <com/sun/star/awt/XToggleButton.hpp>
30 #include <com/sun/star/awt/XRadioButton.hpp>
31 #include <com/sun/star/awt/XItemListener.hpp>
32 #include <com/sun/star/awt/XCheckBox.hpp>
33 #include <com/sun/star/awt/XFixedHyperlink.hpp>
34 #include <com/sun/star/awt/XFixedText.hpp>
35 #include <com/sun/star/awt/XListBox.hpp>
36 #include <com/sun/star/awt/XComboBox.hpp>
37 #include <com/sun/star/awt/XDateField.hpp>
38 #include <com/sun/star/awt/XSpinField.hpp>
39 #include <com/sun/star/awt/XTimeField.hpp>
40 #include <com/sun/star/awt/XNumericField.hpp>
41 #include <com/sun/star/awt/XCurrencyField.hpp>
42 #include <com/sun/star/awt/XPatternField.hpp>
43 #include <com/sun/star/awt/XProgressBar.hpp>
44 #include <com/sun/star/awt/XItemList.hpp>
45 #include <com/sun/star/graphic/XGraphicObject.hpp>
46 #include <toolkit/controls/unocontrolmodel.hxx>
47 #include <toolkit/controls/unocontrolbase.hxx>
48 #include <toolkit/helper/macros.hxx>
49 #include <toolkit/helper/servicenames.hxx>
50 #include <vcl/bitmapex.hxx>
51 #include <cppuhelper/implbase5.hxx>
52 #include <cppuhelper/implbase4.hxx>
53 #include <cppuhelper/implbase2.hxx>
54 #include <cppuhelper/implbase1.hxx>
55 #include <comphelper/uno3.hxx>
57 #include <list>
58 #include <memory>
59 #include <vector>
61 #include <boost/optional.hpp>
63 #define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
65 class ImageHelper
67 public:
68 // The routine will always attempt to return a valid XGraphic for the
69 // passed _rURL, additionallly xOutGraphicObject will contain the
70 // associated XGraphicObject ( if url is valid for that ) and is set
71 // appropriately ( e.g. NULL if non GraphicObject scheme ) or a valid
72 // object if the rURL points to a valid object
73 static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicAndGraphicObjectFromURL_nothrow( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject >& xOutGraphicObject, const OUString& _rURL );
74 static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const OUString& _rURL );
79 // class UnoControlEditModel
81 class UnoControlEditModel : public UnoControlModel
83 protected:
84 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
85 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
87 public:
88 UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
89 UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;}
91 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlEditModel( *this ); }
93 // ::com::sun::star::io::XPersistObject
94 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 // ::com::sun::star::beans::XMultiPropertySet
97 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
100 // XServiceInfo
101 OUString SAL_CALL getImplementationName()
102 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
105 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 // class UnoEditControl
111 typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XTextComponent
112 , ::com::sun::star::awt::XTextListener
113 , ::com::sun::star::awt::XLayoutConstrains
114 , ::com::sun::star::awt::XTextLayoutConstrains
115 > UnoEditControl_Base;
116 class TOOLKIT_DLLPUBLIC UnoEditControl :public UnoControlBase
117 ,public UnoEditControl_Base
119 private:
120 TextListenerMultiplexer maTextListeners;
122 // Not all fields derived from UnoEditCOntrol have the property "Text"
123 // They only support XTextComponent, so keep the text
124 // here, maybe there is no Peer when calling setText()...
125 OUString maText;
126 sal_uInt16 mnMaxTextLen;
128 bool mbSetTextInPeer;
129 bool mbSetMaxTextLenInPeer;
130 bool mbHasTextProperty;
132 public:
134 UnoEditControl();
135 OUString GetComponentServiceName() SAL_OVERRIDE;
136 TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
138 void ImplSetPeerProperty( const OUString& rPropName, const ::com::sun::star::uno::Any& rVal ) SAL_OVERRIDE;
140 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, std::exception) SAL_OVERRIDE;
141 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { UnoControlBase::disposing( Source ); }
142 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
144 // disambiguate XInterface
145 DECLARE_XINTERFACE()
147 // XAggregation
148 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
150 // XTypeProvider
151 DECLARE_XTYPEPROVIDER()
153 // XTextListener
154 void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
156 // XTextComponent
157 void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
158 void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
159 void SAL_CALL setText( const OUString& aText ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
160 void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const OUString& Text ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
161 OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
162 OUString SAL_CALL getSelectedText( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
163 void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
164 ::com::sun::star::awt::Selection SAL_CALL getSelection( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
165 sal_Bool SAL_CALL isEditable( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
166 void SAL_CALL setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
167 void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
168 sal_Int16 SAL_CALL getMaxTextLen( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
170 // XLayoutConstrains
171 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
172 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
173 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
175 // XTextLayoutConstrains
176 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
177 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
179 // XServiceInfo
180 OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
181 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
183 sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
187 // class UnoControlFileControlModel
189 class UnoControlFileControlModel : public UnoControlModel
191 protected:
192 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
193 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
195 public:
196 UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
197 UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;}
199 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlFileControlModel( *this ); }
201 // ::com::sun::star::io::XPersistObject
202 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
204 // ::com::sun::star::beans::XMultiPropertySet
205 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
207 // ::com::sun::star::lang::XServiceInfo
208 OUString SAL_CALL getImplementationName()
209 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
211 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
212 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
216 // class UnoFileControl
218 class UnoFileControl : public UnoEditControl
220 public:
221 UnoFileControl();
222 OUString GetComponentServiceName() SAL_OVERRIDE;
224 // ::com::sun::star::lang::XServiceInfo
225 OUString SAL_CALL getImplementationName()
226 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
228 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
229 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
233 // class GraphicControlModel
235 class GraphicControlModel : public UnoControlModel
237 private:
238 bool mbAdjustingImagePosition;
239 bool mbAdjustingGraphic;
241 ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
243 protected:
244 GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
245 :UnoControlModel( rxContext )
246 ,mbAdjustingImagePosition( false )
247 ,mbAdjustingGraphic( false )
250 GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
252 // ::cppu::OPropertySetHelper
253 void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
255 // UnoControlModel
256 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
258 private:
259 GraphicControlModel& operator=( const GraphicControlModel& ) SAL_DELETED_FUNCTION;
263 // class UnoControlButtonModel
265 class UnoControlButtonModel : public GraphicControlModel
267 protected:
268 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
269 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
271 public:
272 UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
273 UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
275 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlButtonModel( *this ); }
277 // ::com::sun::star::beans::XMultiPropertySet
278 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
280 // ::com::sun::star::io::XPersistObject
281 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
283 // ::com::sun::star::lang::XServiceInfo
284 OUString SAL_CALL getImplementationName()
285 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
287 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
288 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
292 // class UnoButtonControl
294 typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
295 , ::com::sun::star::awt::XButton
296 , ::com::sun::star::awt::XToggleButton
297 , ::com::sun::star::awt::XLayoutConstrains
298 , ::com::sun::star::awt::XItemListener
299 > UnoButtonControl_Base;
300 class UnoButtonControl : public UnoButtonControl_Base
302 private:
303 ActionListenerMultiplexer maActionListeners;
304 ItemListenerMultiplexer maItemListeners;
305 OUString maActionCommand;
307 public:
309 UnoButtonControl();
310 OUString GetComponentServiceName() SAL_OVERRIDE;
312 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, std::exception) SAL_OVERRIDE;
313 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
315 // ::com::sun::star::awt::XButton
316 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
317 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
318 void SAL_CALL setLabel( const OUString& Label ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
319 void SAL_CALL setActionCommand( const OUString& Command ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
321 // ::com::sun::star::awt::XToggleButton
322 // ::com::sun::star::awt::XItemEventBroadcaster
323 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
324 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
326 // ::com::sun::star::lang::XEventListener
327 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
329 // XItemListener
330 virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
332 // ::com::sun::star::awt::XLayoutConstrains
333 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
334 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
335 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
337 // ::com::sun::star::lang::XServiceInfo
338 OUString SAL_CALL getImplementationName()
339 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
341 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
342 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
346 // class UnoControlImageControlModel
348 class UnoControlImageControlModel : public GraphicControlModel
350 private:
351 bool mbAdjustingImageScaleMode;
353 protected:
354 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
355 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
357 public:
358 UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
359 UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
361 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlImageControlModel( *this ); }
363 // ::com::sun::star::beans::XMultiPropertySet
364 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
366 // ::com::sun::star::io::XPersistObject
367 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
369 // ::com::sun::star::lang::XServiceInfo
370 OUString SAL_CALL getImplementationName()
371 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
373 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
374 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
376 // ::cppu::OPropertySetHelper
377 void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
381 // class UnoImageControlControl
383 typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
384 , ::com::sun::star::awt::XLayoutConstrains
385 > UnoImageControlControl_Base;
386 class UnoImageControlControl : public UnoImageControlControl_Base
388 private:
389 ActionListenerMultiplexer maActionListeners;
391 public:
393 UnoImageControlControl();
394 OUString GetComponentServiceName() SAL_OVERRIDE;
396 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
398 // ::com::sun::star::awt::XControl
399 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
401 // ::com::sun::star::awt::XLayoutConstrains
402 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
403 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
404 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
406 // ::com::sun::star::lang::XServiceInfo
407 OUString SAL_CALL getImplementationName()
408 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
410 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
411 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
415 // class UnoControlRadioButtonModel
417 class UnoControlRadioButtonModel : public GraphicControlModel
420 protected:
421 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
422 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
424 public:
425 UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
426 UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
428 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlRadioButtonModel( *this ); }
430 // ::com::sun::star::io::XPersistObject
431 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
433 // ::com::sun::star::beans::XMultiPropertySet
434 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
436 // ::com::sun::star::lang::XServiceInfo
437 OUString SAL_CALL getImplementationName()
438 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
440 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
441 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
445 // class UnoRadioButtonControl
447 typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
448 , ::com::sun::star::awt::XButton
449 , ::com::sun::star::awt::XRadioButton
450 , ::com::sun::star::awt::XItemListener
451 , ::com::sun::star::awt::XLayoutConstrains
452 > UnoRadioButtonControl_Base;
453 class UnoRadioButtonControl : public UnoRadioButtonControl_Base
455 private:
456 ItemListenerMultiplexer maItemListeners;
457 ActionListenerMultiplexer maActionListeners;
458 OUString maActionCommand;
460 public:
462 UnoRadioButtonControl();
463 OUString GetComponentServiceName() SAL_OVERRIDE;
465 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, std::exception) SAL_OVERRIDE;
466 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
467 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { UnoControlBase::disposing( Source ); }
469 // ::com::sun::star::awt::XControl
470 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
472 // ::com::sun::star::awt::XButton
473 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
474 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
475 void SAL_CALL setActionCommand( const OUString& Command ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
477 // ::com::sun::star::awt::XRadioButton
478 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
479 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
480 sal_Bool SAL_CALL getState( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
481 void SAL_CALL setState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
482 void SAL_CALL setLabel( const OUString& Label ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
484 // ::com::sun::star::awt::XItemListener
485 void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
487 // ::com::sun::star::awt::XLayoutConstrains
488 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
489 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
490 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
492 // ::com::sun::star::lang::XServiceInfo
493 OUString SAL_CALL getImplementationName()
494 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
496 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
497 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
501 // class UnoControlCheckBoxModel
503 class UnoControlCheckBoxModel : public GraphicControlModel
505 protected:
506 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
507 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
509 public:
510 UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
511 UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;}
513 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlCheckBoxModel( *this ); }
515 // ::com::sun::star::io::XPersistObject
516 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
518 // ::com::sun::star::beans::XMultiPropertySet
519 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
521 // ::com::sun::star::lang::XServiceInfo
522 OUString SAL_CALL getImplementationName()
523 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
525 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
526 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
530 // class UnoCheckBoxControl
532 typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
533 , ::com::sun::star::awt::XButton
534 , ::com::sun::star::awt::XCheckBox
535 , ::com::sun::star::awt::XItemListener
536 , ::com::sun::star::awt::XLayoutConstrains
537 > UnoCheckBoxControl_Base;
538 class UnoCheckBoxControl : public UnoCheckBoxControl_Base
540 private:
541 ItemListenerMultiplexer maItemListeners;
542 ActionListenerMultiplexer maActionListeners;
543 OUString maActionCommand;
545 public:
547 UnoCheckBoxControl();
548 virtual ~UnoCheckBoxControl(){;}
549 OUString GetComponentServiceName() SAL_OVERRIDE;
551 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, std::exception) SAL_OVERRIDE;
552 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
553 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { UnoControlBase::disposing( Source ); }
555 // ::com::sun::star::awt::XControl
556 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
558 // ::com::sun::star::awt::XButton
559 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
560 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
561 void SAL_CALL setActionCommand( const OUString& Command ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
563 virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
564 virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
567 sal_Int16 SAL_CALL getState( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
568 void SAL_CALL setState( sal_Int16 n ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
569 void SAL_CALL setLabel( const OUString& Label ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
570 void SAL_CALL enableTriState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
572 // ::com::sun::star::awt::XItemListener
573 void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
575 // ::com::sun::star::awt::XLayoutConstrains
576 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
577 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
578 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
580 // ::com::sun::star::lang::XServiceInfo
581 OUString SAL_CALL getImplementationName()
582 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
584 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
585 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
589 // class UnoControlFixedTextModel
591 class UnoControlFixedHyperlinkModel : public UnoControlModel
593 protected:
594 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
595 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
597 public:
598 UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
599 UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;}
601 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlFixedHyperlinkModel( *this ); }
603 // ::com::sun::star::io::XPersistObject
604 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
606 // ::com::sun::star::beans::XMultiPropertySet
607 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
609 // ::com::sun::star::lang::XServiceInfo
610 DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedHyperlinkModel, UnoControlModel, "com.sun.star.awt.UnoControlFixedHyperlinkModel" )
614 // class UnoFixedHyperlinkControl
616 class UnoFixedHyperlinkControl : public UnoControlBase,
617 public ::com::sun::star::awt::XFixedHyperlink,
618 public ::com::sun::star::awt::XLayoutConstrains
620 private:
621 ActionListenerMultiplexer maActionListeners;
623 public:
624 UnoFixedHyperlinkControl();
626 OUString GetComponentServiceName() SAL_OVERRIDE;
628 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoControlBase::queryInterface(rType); }
629 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
630 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
631 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
633 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, std::exception) SAL_OVERRIDE;
634 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
636 // ::com::sun::star::lang::XTypeProvider
637 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
638 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
640 // ::com::sun::star::awt::XControl
641 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
643 // ::com::sun::star::awt::XFixedHyperlink
644 void SAL_CALL setText( const OUString& Text ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
645 OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
646 void SAL_CALL setURL( const OUString& URL ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
647 OUString SAL_CALL getURL( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
648 void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
649 sal_Int16 SAL_CALL getAlignment( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
650 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
651 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
653 // ::com::sun::star::awt::XLayoutConstrains
654 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
655 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
656 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
658 // ::com::sun::star::lang::XServiceInfo
659 DECLIMPL_SERVICEINFO_DERIVED( UnoFixedHyperlinkControl, UnoControlBase, "com.sun.star.awt.UnoControlFixedHyperlink" )
663 // class UnoControlFixedTextModel
665 class UnoControlFixedTextModel : public UnoControlModel
667 protected:
668 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
669 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
671 public:
672 UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
673 UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;}
675 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlFixedTextModel( *this ); }
677 // ::com::sun::star::io::XPersistObject
678 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
680 // ::com::sun::star::beans::XMultiPropertySet
681 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
683 // ::com::sun::star::lang::XServiceInfo
684 OUString SAL_CALL getImplementationName()
685 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
687 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
688 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
692 // class UnoFixedTextControl
694 class UnoFixedTextControl : public UnoControlBase,
695 public ::com::sun::star::awt::XFixedText,
696 public ::com::sun::star::awt::XLayoutConstrains
698 public:
699 UnoFixedTextControl();
700 OUString GetComponentServiceName() SAL_OVERRIDE;
702 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoControlBase::queryInterface(rType); }
703 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
704 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
705 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
707 // ::com::sun::star::lang::XTypeProvider
708 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
709 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
711 // ::com::sun::star::awt::XControl
712 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
714 // ::com::sun::star::awt::XFixedText
715 void SAL_CALL setText( const OUString& Text ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
716 OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
717 void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
718 sal_Int16 SAL_CALL getAlignment( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
720 // ::com::sun::star::awt::XLayoutConstrains
721 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
722 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
723 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
725 // ::com::sun::star::lang::XServiceInfo
726 OUString SAL_CALL getImplementationName()
727 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
729 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
730 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
734 // class UnoControlGroupBoxModel
736 class UnoControlGroupBoxModel : public UnoControlModel
738 protected:
739 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
740 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
742 public:
743 UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
744 UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;}
746 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlGroupBoxModel( *this ); }
748 // ::com::sun::star::io::XPersistObject
749 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
751 // ::com::sun::star::beans::XMultiPropertySet
752 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
754 // ::com::sun::star::lang::XServiceInfo
755 OUString SAL_CALL getImplementationName()
756 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
758 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
759 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
763 // class UnoGroupBoxControl
765 class UnoGroupBoxControl : public UnoControlBase
767 public:
768 UnoGroupBoxControl();
769 OUString GetComponentServiceName() SAL_OVERRIDE;
771 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
773 // ::com::sun::star::lang::XServiceInfo
774 OUString SAL_CALL getImplementationName()
775 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
777 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
778 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
782 // class UnoControlListBoxModel
784 struct UnoControlListBoxModel_Data;
785 typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
786 , ::com::sun::star::awt::XItemList
787 > UnoControlListBoxModel_Base;
788 class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base
790 protected:
791 enum ConstructorMode
793 ConstructDefault,
794 ConstructWithoutProperties
797 public:
798 UnoControlListBoxModel(
799 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
800 ConstructorMode const i_mode = ConstructDefault
802 UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
803 virtual ~UnoControlListBoxModel();
805 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlListBoxModel( *this ); }
807 virtual void ImplNormalizePropertySequence(
808 const sal_Int32 _nCount, /// the number of entries in the arrays
809 sal_Int32* _pHandles, /// the handles of the properties to set
810 ::com::sun::star::uno::Any* _pValues, /// the values of the properties to set
811 sal_Int32* _pValidHandles /// pointer to the valid handles, allowed to be adjusted
812 ) const SAL_OVERRIDE;
814 // ::com::sun::star::beans::XMultiPropertySet
815 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
817 // ::com::sun::star::io::XPersistObject
818 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
820 // ::com::sun::star::lang::XServiceInfo
821 OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
822 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
824 // ::com::sun::star::awt::XItemList
825 virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
826 virtual void SAL_CALL insertItem( ::sal_Int32 Position, const OUString& ItemText, const OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
827 virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
828 virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
829 virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
830 virtual void SAL_CALL removeAllItems( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
831 virtual void SAL_CALL setItemText( ::sal_Int32 Position, const OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
832 virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
833 virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const OUString& ItemText, const OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
834 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, std::exception) SAL_OVERRIDE;
835 virtual OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
836 virtual OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
837 virtual ::com::sun::star::beans::Pair< OUString, OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
838 virtual ::com::sun::star::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
839 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< OUString, OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
840 virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
841 virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
843 // OPropertySetHelper
844 void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
846 protected:
847 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
848 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
850 private:
851 void impl_notifyItemListEvent_nolck(
852 const sal_Int32 i_nItemPosition,
853 const ::boost::optional< OUString >& i_rItemText,
854 const ::boost::optional< OUString >& i_rItemImageURL,
855 void ( SAL_CALL ::com::sun::star::awt::XItemListListener::*NotificationMethod )( const ::com::sun::star::awt::ItemListEvent& )
858 void impl_handleInsert(
859 const sal_Int32 i_nItemPosition,
860 const ::boost::optional< OUString >& i_rItemText,
861 const ::boost::optional< OUString >& i_rItemImageURL,
862 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
865 void impl_handleRemove(
866 const sal_Int32 i_nItemPosition,
867 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
870 void impl_handleModify(
871 const sal_Int32 i_nItemPosition,
872 const ::boost::optional< OUString >& i_rItemText,
873 const ::boost::optional< OUString >& i_rItemImageURL,
874 ::osl::ClearableMutexGuard& i_rClearBeforeNotify
877 void impl_getStringItemList( ::std::vector< OUString >& o_rStringItems ) const;
878 void impl_setStringItemList_nolck( const ::std::vector< OUString >& i_rStringItems );
880 protected:
881 std::unique_ptr<UnoControlListBoxModel_Data> m_xData;
882 ::cppu::OInterfaceContainerHelper m_aItemListListeners;
886 // class UnoListBoxControl
888 typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
889 , ::com::sun::star::awt::XListBox
890 , ::com::sun::star::awt::XItemListener
891 , ::com::sun::star::awt::XLayoutConstrains
892 , ::com::sun::star::awt::XTextLayoutConstrains
893 , ::com::sun::star::awt::XItemListListener
894 > UnoListBoxControl_Base;
895 class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
897 public:
898 UnoListBoxControl();
899 OUString GetComponentServiceName() SAL_OVERRIDE;
901 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, std::exception) SAL_OVERRIDE;
902 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
903 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { UnoControlBase::disposing( Source ); }
905 // ::com::sun::star::awt::XListBox
906 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
907 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
908 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
909 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
910 void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
911 void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
912 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
913 sal_Int16 SAL_CALL getItemCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
914 OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
915 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getItems( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
916 sal_Int16 SAL_CALL getSelectedItemPos( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
917 ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
918 OUString SAL_CALL getSelectedItem( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
919 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSelectedItems( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
920 void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
921 void SAL_CALL selectItemsPos( const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
922 void SAL_CALL selectItem( const OUString& aItem, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
923 sal_Bool SAL_CALL isMutipleMode( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
924 void SAL_CALL setMultipleMode( sal_Bool bMulti ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
925 sal_Int16 SAL_CALL getDropDownLineCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
926 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
927 void SAL_CALL makeVisible( sal_Int16 nEntry ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
929 // ::com::sun::star::awt::XItemListener
930 void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
932 // ::com::sun::star::awt::XLayoutConstrains
933 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
934 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
935 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
937 // ::com::sun::star::awt::XTextLayoutConstrains
938 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
939 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
941 // XUnoControl
942 sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
944 // XItemListListener
945 virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
946 virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
947 virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
948 virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
949 virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
951 // ::com::sun::star::lang::XServiceInfo
952 OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
953 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
955 protected:
956 void ImplUpdateSelectedItemsProperty();
957 virtual void ImplSetPeerProperty( const OUString& rPropName, const ::com::sun::star::uno::Any& rVal ) SAL_OVERRIDE;
958 virtual void updateFromModel() SAL_OVERRIDE;
960 private:
961 ActionListenerMultiplexer maActionListeners;
962 ItemListenerMultiplexer maItemListeners;
966 // class UnoControlComboBoxModel
968 class UnoControlComboBoxModel : public UnoControlListBoxModel
970 protected:
971 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
972 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
974 public:
975 UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
976 UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
978 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlComboBoxModel( *this ); }
980 // ::com::sun::star::io::XPersistObject
981 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
983 // ::com::sun::star::beans::XMultiPropertySet
984 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
985 // OPropertySetHelper
986 void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
988 // ::com::sun::star::lang::XServiceInfo
989 OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
990 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
995 // class UnoComboBoxControl
997 class UnoComboBoxControl : public UnoEditControl
998 , public ::com::sun::star::awt::XComboBox
999 , public ::com::sun::star::awt::XItemListener
1000 , public ::com::sun::star::awt::XItemListListener
1002 private:
1003 ActionListenerMultiplexer maActionListeners;
1004 ItemListenerMultiplexer maItemListeners;
1006 public:
1008 UnoComboBoxControl();
1009 OUString GetComponentServiceName() SAL_OVERRIDE;
1011 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, std::exception) SAL_OVERRIDE;
1012 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { UnoEditControl::disposing( Source ); }
1013 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1015 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoEditControl::queryInterface(rType); }
1016 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1017 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1018 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1021 // ::com::sun::star::lang::XTypeProvider
1022 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1023 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1025 // ::com::sun::star::awt::XComboBox
1026 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1027 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1028 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1029 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1030 void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1031 void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1032 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1033 sal_Int16 SAL_CALL getItemCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1034 OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1035 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getItems( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1036 sal_Int16 SAL_CALL getDropDownLineCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1037 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1039 // XUnoControl
1040 virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
1042 // XItemListListener
1043 virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1044 virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1045 virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1046 virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1047 virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1049 // XItemListener
1050 virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1052 // ::com::sun::star::lang::XServiceInfo
1053 OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1054 ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1055 protected:
1056 virtual void ImplSetPeerProperty( const OUString& rPropName, const ::com::sun::star::uno::Any& rVal ) SAL_OVERRIDE;
1057 virtual void updateFromModel() SAL_OVERRIDE;
1058 ActionListenerMultiplexer& getActionListeners();
1059 ItemListenerMultiplexer& getItemListeners();
1064 // class UnoSpinFieldControl
1066 class UnoSpinFieldControl : public UnoEditControl,
1067 public ::com::sun::star::awt::XSpinField
1069 private:
1070 SpinListenerMultiplexer maSpinListeners;
1071 bool mbRepeat;
1073 public:
1074 UnoSpinFieldControl();
1076 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoEditControl::queryInterface(rType); }
1077 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1078 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1079 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1081 // ::com::sun::star::lang::XTypeProvider
1082 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1083 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1085 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, std::exception) SAL_OVERRIDE;
1087 // ::com::sun::star::awt::XSpinField
1088 void SAL_CALL addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1089 void SAL_CALL removeSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1090 void SAL_CALL up() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1091 void SAL_CALL down() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1092 void SAL_CALL first() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1093 void SAL_CALL last() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1094 void SAL_CALL enableRepeat( sal_Bool bRepeat ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1097 // ::com::sun::star::lang::XServiceInfo
1098 // No service info, only base class for other fields.
1103 // class UnoControlDateFieldModel
1105 class UnoControlDateFieldModel : public UnoControlModel
1107 protected:
1108 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1109 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1111 public:
1112 UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1113 UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1115 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlDateFieldModel( *this ); }
1117 // ::com::sun::star::io::XPersistObject
1118 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1120 // ::com::sun::star::beans::XMultiPropertySet
1121 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1123 // ::com::sun::star::lang::XServiceInfo
1124 OUString SAL_CALL getImplementationName()
1125 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1127 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1128 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1132 // class UnoDateFieldControl
1134 class UnoDateFieldControl : public UnoSpinFieldControl,
1135 public ::com::sun::star::awt::XDateField
1137 private:
1138 ::com::sun::star::util::Date mnFirst;
1139 ::com::sun::star::util::Date mnLast;
1140 TriState mbLongFormat;
1141 public:
1142 UnoDateFieldControl();
1143 OUString GetComponentServiceName() SAL_OVERRIDE;
1145 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoSpinFieldControl::queryInterface(rType); }
1146 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1147 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1148 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1150 // ::com::sun::star::lang::XTypeProvider
1151 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1152 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1154 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, std::exception) SAL_OVERRIDE;
1156 // ::com::sun::star::awt::XTextListener
1157 void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1159 //XDateField
1160 void SAL_CALL setDate( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1161 ::com::sun::star::util::Date SAL_CALL getDate( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1162 void SAL_CALL setMin( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1163 ::com::sun::star::util::Date SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1164 void SAL_CALL setMax( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1165 ::com::sun::star::util::Date SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1166 void SAL_CALL setFirst( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1167 ::com::sun::star::util::Date SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1168 void SAL_CALL setLast( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1169 ::com::sun::star::util::Date SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1170 void SAL_CALL setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1171 sal_Bool SAL_CALL isLongFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1172 void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1173 sal_Bool SAL_CALL isEmpty( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1174 void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1175 sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1177 // ::com::sun::star::lang::XServiceInfo
1178 OUString SAL_CALL getImplementationName()
1179 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1181 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1182 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1186 // class UnoControlTimeFieldModel
1188 class UnoControlTimeFieldModel : public UnoControlModel
1190 protected:
1191 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1192 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1194 public:
1195 UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1196 UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1198 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlTimeFieldModel( *this ); }
1200 // ::com::sun::star::io::XPersistObject
1201 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1203 // ::com::sun::star::beans::XMultiPropertySet
1204 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1206 // ::com::sun::star::lang::XServiceInfo
1207 OUString SAL_CALL getImplementationName()
1208 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1210 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1211 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1215 // class UnoTimeFieldControl
1217 class UnoTimeFieldControl : public UnoSpinFieldControl,
1218 public ::com::sun::star::awt::XTimeField
1220 private:
1221 ::com::sun::star::util::Time mnFirst;
1222 ::com::sun::star::util::Time mnLast;
1224 public:
1225 UnoTimeFieldControl();
1226 OUString GetComponentServiceName() SAL_OVERRIDE;
1228 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoSpinFieldControl::queryInterface(rType); }
1229 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1230 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1231 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1233 // ::com::sun::star::lang::XTypeProvider
1234 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1235 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1237 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, std::exception) SAL_OVERRIDE;
1239 // ::com::sun::star::awt::XTextListener
1240 void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1242 //XTimeField
1243 void SAL_CALL setTime( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1244 ::com::sun::star::util::Time SAL_CALL getTime( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1245 void SAL_CALL setMin( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1246 ::com::sun::star::util::Time SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1247 void SAL_CALL setMax( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1248 ::com::sun::star::util::Time SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1249 void SAL_CALL setFirst( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1250 ::com::sun::star::util::Time SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1251 void SAL_CALL setLast( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1252 ::com::sun::star::util::Time SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1253 void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1254 sal_Bool SAL_CALL isEmpty( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1255 void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1256 sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1258 // ::com::sun::star::lang::XServiceInfo
1259 OUString SAL_CALL getImplementationName()
1260 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1262 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1263 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1267 // class UnoControlNumericFieldModel
1269 class UnoControlNumericFieldModel : public UnoControlModel
1271 protected:
1272 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1273 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1275 public:
1276 UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1277 UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1279 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlNumericFieldModel( *this ); }
1281 // ::com::sun::star::io::XPersistObject
1282 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1284 // ::com::sun::star::beans::XMultiPropertySet
1285 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1287 // ::com::sun::star::lang::XServiceInfo
1288 OUString SAL_CALL getImplementationName()
1289 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1291 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1292 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1296 // class UnoNumericFieldControl
1298 class UnoNumericFieldControl : public UnoSpinFieldControl,
1299 public ::com::sun::star::awt::XNumericField
1301 private:
1302 double mnFirst;
1303 double mnLast;
1305 public:
1306 UnoNumericFieldControl();
1307 OUString GetComponentServiceName() SAL_OVERRIDE;
1309 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoSpinFieldControl::queryInterface(rType); }
1310 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1311 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1312 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1314 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, std::exception) SAL_OVERRIDE;
1316 // ::com::sun::star::lang::XTypeProvider
1317 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1318 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1320 // ::com::sun::star::awt::XTextListener
1321 void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1323 // ::com::sun::star::awt::XNumericField
1324 void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1325 double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1326 void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1327 double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1328 void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1329 double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1330 void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1331 double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1332 void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1333 double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1334 void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1335 double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1336 void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1337 sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1338 void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1339 sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1341 // ::com::sun::star::lang::XServiceInfo
1342 OUString SAL_CALL getImplementationName()
1343 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1345 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1346 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1350 // class UnoControlCurrencyFieldModel
1352 class UnoControlCurrencyFieldModel : public UnoControlModel
1354 protected:
1355 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1356 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1358 public:
1359 UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1360 UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1362 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlCurrencyFieldModel( *this ); }
1364 // ::com::sun::star::io::XPersistObject
1365 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1367 // ::com::sun::star::beans::XMultiPropertySet
1368 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1370 // ::com::sun::star::lang::XServiceInfo
1371 OUString SAL_CALL getImplementationName()
1372 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1374 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1375 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1379 // class UnoCurrencyFieldControl
1381 class UnoCurrencyFieldControl : public UnoSpinFieldControl,
1382 public ::com::sun::star::awt::XCurrencyField
1384 private:
1385 double mnFirst;
1386 double mnLast;
1388 public:
1389 UnoCurrencyFieldControl();
1390 OUString GetComponentServiceName() SAL_OVERRIDE;
1392 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoSpinFieldControl::queryInterface(rType); }
1393 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1394 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1395 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1397 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, std::exception) SAL_OVERRIDE;
1399 // ::com::sun::star::lang::XTypeProvider
1400 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1401 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1403 // ::com::sun::star::awt::XTextListener
1404 void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1406 // ::com::sun::star::awt::XCurrencyField
1407 void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1408 double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1409 void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1410 double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1411 void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1412 double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1413 void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1414 double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1415 void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1416 double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1417 void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1418 double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1419 void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1420 sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1421 void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1422 sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1424 // ::com::sun::star::lang::XServiceInfo
1425 OUString SAL_CALL getImplementationName()
1426 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1428 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1429 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1433 // class UnoControlPatternFieldModel
1435 class UnoControlPatternFieldModel : public UnoControlModel
1437 protected:
1438 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1439 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1441 public:
1442 UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1443 UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;}
1445 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlPatternFieldModel( *this ); }
1447 // ::com::sun::star::io::XPersistObject
1448 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1450 // ::com::sun::star::beans::XMultiPropertySet
1451 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1453 // ::com::sun::star::lang::XServiceInfo
1454 OUString SAL_CALL getImplementationName()
1455 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1457 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1458 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1462 // class UnoPatternFieldControl
1464 class UnoPatternFieldControl : public UnoSpinFieldControl,
1465 public ::com::sun::star::awt::XPatternField
1467 protected:
1468 void ImplSetPeerProperty( const OUString& rPropName, const ::com::sun::star::uno::Any& rVal ) SAL_OVERRIDE;
1470 public:
1471 UnoPatternFieldControl();
1472 OUString GetComponentServiceName() SAL_OVERRIDE;
1474 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoSpinFieldControl::queryInterface(rType); }
1475 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1476 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1477 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1479 // ::com::sun::star::lang::XTypeProvider
1480 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1481 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1483 // ::com::sun::star::awt::XPatternField
1484 void SAL_CALL setMasks( const OUString& EditMask, const OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1485 void SAL_CALL getMasks( OUString& EditMask, OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1486 void SAL_CALL setString( const OUString& Str ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1487 OUString SAL_CALL getString( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1488 void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1489 sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1491 // ::com::sun::star::lang::XServiceInfo
1492 OUString SAL_CALL getImplementationName()
1493 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1495 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1496 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1500 // class UnoControlProgressBarModel
1502 class UnoControlProgressBarModel : public UnoControlModel
1504 protected:
1505 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1506 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1508 public:
1509 UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1510 UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;}
1512 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlProgressBarModel( *this ); }
1514 // ::com::sun::star::beans::XMultiPropertySet
1515 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1517 // ::com::sun::star::io::XPersistObject
1518 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1520 // XServiceInfo
1521 OUString SAL_CALL getImplementationName()
1522 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1524 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1525 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1529 // class UnoProgressBarControl
1531 class UnoProgressBarControl : public UnoControlBase,
1532 public ::com::sun::star::awt::XProgressBar
1534 public:
1535 UnoProgressBarControl();
1536 OUString GetComponentServiceName() SAL_OVERRIDE;
1538 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return UnoControlBase::queryInterface(rType); }
1539 ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1540 void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakAggObject::acquire(); }
1541 void SAL_CALL release() throw() SAL_OVERRIDE { OWeakAggObject::release(); }
1543 // ::com::sun::star::lang::XTypeProvider
1544 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1545 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1547 // ::com::sun::star::awt::XProgressBar
1548 void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1549 void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1550 void SAL_CALL setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1551 void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
1552 sal_Int32 SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1554 // ::com::sun::star::lang::XServiceInfo
1555 OUString SAL_CALL getImplementationName()
1556 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1558 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1559 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1564 // class UnoControlFixedLineModel
1566 class UnoControlFixedLineModel : public UnoControlModel
1568 protected:
1569 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const SAL_OVERRIDE;
1570 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
1572 public:
1573 UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
1574 UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;}
1576 UnoControlModel* Clone() const SAL_OVERRIDE { return new UnoControlFixedLineModel( *this ); }
1578 // ::com::sun::star::beans::XMultiPropertySet
1579 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1581 // ::com::sun::star::io::XPersistObject
1582 OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1584 // ::com::sun::star::lang::XServiceInfo
1585 OUString SAL_CALL getImplementationName()
1586 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1588 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1589 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1593 // class UnoFixedLineControl
1595 class UnoFixedLineControl : public UnoControlBase
1597 public:
1598 UnoFixedLineControl();
1599 OUString GetComponentServiceName() SAL_OVERRIDE;
1601 sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1603 // ::com::sun::star::lang::XServiceInfo
1604 OUString SAL_CALL getImplementationName()
1605 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1607 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
1608 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
1613 #endif // INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
1615 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */