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