1 /*************************************************************************
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * Copyright 2000, 2010 Oracle and/or its affiliates.
5  *
6  * OpenOffice.org - a multi-platform office productivity suite
7  *
8  * This file is part of OpenOffice.org.
9  *
10  * OpenOffice.org is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License version 3
12  * only, as published by the Free Software Foundation.
13  *
14  * OpenOffice.org is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License version 3 for more details
18  * (a copy is included in the LICENSE file that accompanied this code).
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with OpenOffice.org.  If not, see
22  * <http://www.openoffice.org/license.html>
23  * for a copy of the LGPLv3 License.
24  *
25  ************************************************************************/
26 
27 #include "precompiled_toolkit.hxx"
28 
29 #include "stylesettings.hxx"
30 #include <toolkit/awt/vclxwindow.hxx>
31 #include <toolkit/helper/vclunohelper.hxx>
32 
33 /** === begin UNO includes === **/
34 #include <com/sun/star/lang/DisposedException.hpp>
35 /** === end UNO includes === **/
36 
37 #include <cppuhelper/interfacecontainer.hxx>
38 #include <vos/mutex.hxx>
39 #include <osl/mutex.hxx>
40 #include <vcl/window.hxx>
41 #include <vcl/settings.hxx>
42 
43 //......................................................................................................................
44 namespace toolkit
45 {
46 //......................................................................................................................
47 
48 	/** === begin UNO using === **/
49 	using ::com::sun::star::uno::Reference;
50 	using ::com::sun::star::uno::XInterface;
51 	using ::com::sun::star::uno::UNO_QUERY;
52 	using ::com::sun::star::uno::UNO_QUERY_THROW;
53 	using ::com::sun::star::uno::UNO_SET_THROW;
54 	using ::com::sun::star::uno::Exception;
55 	using ::com::sun::star::uno::RuntimeException;
56 	using ::com::sun::star::uno::Any;
57 	using ::com::sun::star::uno::makeAny;
58 	using ::com::sun::star::uno::Sequence;
59 	using ::com::sun::star::uno::Type;
60     using ::com::sun::star::lang::DisposedException;
61     using ::com::sun::star::lang::EventObject;
62     using ::com::sun::star::awt::FontDescriptor;
63     using ::com::sun::star::awt::XStyleChangeListener;
64     using ::com::sun::star::awt::FontDescriptor;
65 	/** === end UNO using === **/
66 
67 	//==================================================================================================================
68 	//= WindowStyleSettings_Data
69 	//==================================================================================================================
70     struct WindowStyleSettings_Data
71     {
72         ::vos::IMutex&                      rMutex;
73         VCLXWindow*                         pOwningWindow;
74         ::cppu::OInterfaceContainerHelper   aStyleChangeListeners;
75 
76         WindowStyleSettings_Data( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
77             :rMutex( i_rWindowMutex )
78             ,pOwningWindow( &i_rOwningWindow )
79             ,aStyleChangeListeners( i_rListenerMutex )
80         {
81         }
82 
83         DECL_LINK( OnWindowEvent, const VclWindowEvent* );
84     };
85 
86 	//------------------------------------------------------------------------------------------------------------------
87     IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, const VclWindowEvent*, i_pEvent )
88     {
89         if ( !i_pEvent || ( i_pEvent->GetId() != VCLEVENT_WINDOW_DATACHANGED ) )
90             return 0L;
91         const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( i_pEvent->GetData() );
92         if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DATACHANGED_SETTINGS ) )
93             return 0L;
94         if ( ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE ) == 0 )
95             return 0L;
96 
97         EventObject aEvent( *pOwningWindow );
98         aStyleChangeListeners.notifyEach( &XStyleChangeListener::styleSettingsChanged, aEvent );
99         return 1L;
100     }
101 
102 	//==================================================================================================================
103 	//= StyleMethodGuard
104 	//==================================================================================================================
105     class StyleMethodGuard
106     {
107     public:
108         StyleMethodGuard( WindowStyleSettings_Data& i_rData )
109             :m_aGuard( i_rData.rMutex )
110         {
111             if ( i_rData.pOwningWindow == NULL )
112                 throw DisposedException();
113         }
114 
115         ~StyleMethodGuard()
116         {
117         }
118 
119     private:
120         ::vos::OGuard   m_aGuard;
121     };
122 
123 	//==================================================================================================================
124 	//= WindowStyleSettings
125 	//==================================================================================================================
126 	//------------------------------------------------------------------------------------------------------------------
127     WindowStyleSettings::WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
128         :m_pData( new WindowStyleSettings_Data( i_rWindowMutex, i_rListenerMutex, i_rOwningWindow ) )
129     {
130         Window* pWindow = i_rOwningWindow.GetWindow();
131         if ( !pWindow )
132             throw new RuntimeException();
133         pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
134     }
135 
136 	//------------------------------------------------------------------------------------------------------------------
137     WindowStyleSettings::~WindowStyleSettings()
138     {
139     }
140 
141 	//------------------------------------------------------------------------------------------------------------------
142     void WindowStyleSettings::dispose()
143     {
144         StyleMethodGuard aGuard( *m_pData );
145 
146         Window* pWindow = m_pData->pOwningWindow->GetWindow();
147         OSL_ENSURE( pWindow, "WindowStyleSettings::dispose: window has been reset before we could revoke the listener!" );
148         if ( pWindow )
149             pWindow->RemoveEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
150 
151         EventObject aEvent( *this );
152         m_pData->aStyleChangeListeners.disposeAndClear( aEvent );
153 
154         m_pData->pOwningWindow = NULL;
155     }
156 
157 	//------------------------------------------------------------------------------------------------------------------
158     namespace
159     {
160         sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data& i_rData, Color const & (StyleSettings::*i_pGetter)() const )
161         {
162             const Window* pWindow = i_rData.pOwningWindow->GetWindow();
163             const AllSettings aAllSettings = pWindow->GetSettings();
164             const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
165             return (aStyleSettings.*i_pGetter)().GetColor();
166         }
167 
168         void lcl_setStyleColor( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
169         {
170             Window* pWindow = i_rData.pOwningWindow->GetWindow();
171             AllSettings aAllSettings = pWindow->GetSettings();
172             StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
173             (aStyleSettings.*i_pSetter)( Color( i_nColor ) );
174             aAllSettings.SetStyleSettings( aStyleSettings );
175             pWindow->SetSettings( aAllSettings );
176         }
177 
178         FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, Font const & (StyleSettings::*i_pGetter)() const )
179         {
180             const Window* pWindow = i_rData.pOwningWindow->GetWindow();
181             const AllSettings aAllSettings = pWindow->GetSettings();
182             const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
183             return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
184         }
185 
186         void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Font const &),
187             Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
188         {
189             Window* pWindow = i_rData.pOwningWindow->GetWindow();
190             AllSettings aAllSettings = pWindow->GetSettings();
191             StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
192             const Font aNewFont = VCLUnoHelper::CreateFont( i_rFont, (aStyleSettings.*i_pGetter)() );
193             (aStyleSettings.*i_pSetter)( aNewFont );
194             aAllSettings.SetStyleSettings( aStyleSettings );
195             pWindow->SetSettings( aAllSettings );
196         }
197     }
198 
199 	//------------------------------------------------------------------------------------------------------------------
200     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveBorderColor() throw (RuntimeException)
201     {
202         StyleMethodGuard aGuard( *m_pData );
203         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveBorderColor );
204     }
205 
206 	//------------------------------------------------------------------------------------------------------------------
207     void SAL_CALL WindowStyleSettings::setActiveBorderColor( ::sal_Int32 _activebordercolor ) throw (RuntimeException)
208     {
209         StyleMethodGuard aGuard( *m_pData );
210         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveBorderColor, _activebordercolor );
211     }
212 
213 	//------------------------------------------------------------------------------------------------------------------
214     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveColor() throw (RuntimeException)
215     {
216         StyleMethodGuard aGuard( *m_pData );
217         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveColor );
218     }
219 
220 	//------------------------------------------------------------------------------------------------------------------
221     void SAL_CALL WindowStyleSettings::setActiveColor( ::sal_Int32 _activecolor ) throw (RuntimeException)
222     {
223         StyleMethodGuard aGuard( *m_pData );
224         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveColor, _activecolor );
225     }
226 
227 	//------------------------------------------------------------------------------------------------------------------
228     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTabColor() throw (RuntimeException)
229     {
230         StyleMethodGuard aGuard( *m_pData );
231         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTabColor );
232     }
233 
234 	//------------------------------------------------------------------------------------------------------------------
235     void SAL_CALL WindowStyleSettings::setActiveTabColor( ::sal_Int32 _activetabcolor ) throw (RuntimeException)
236     {
237         StyleMethodGuard aGuard( *m_pData );
238         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTabColor, _activetabcolor );
239     }
240 
241 	//------------------------------------------------------------------------------------------------------------------
242     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTextColor() throw (RuntimeException)
243     {
244         StyleMethodGuard aGuard( *m_pData );
245         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTextColor );
246     }
247 
248 	//------------------------------------------------------------------------------------------------------------------
249     void SAL_CALL WindowStyleSettings::setActiveTextColor( ::sal_Int32 _activetextcolor ) throw (RuntimeException)
250     {
251         StyleMethodGuard aGuard( *m_pData );
252         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTextColor, _activetextcolor );
253     }
254 
255 	//------------------------------------------------------------------------------------------------------------------
256     ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonRolloverTextColor() throw (RuntimeException)
257     {
258         StyleMethodGuard aGuard( *m_pData );
259         return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonRolloverTextColor );
260     }
261 
262 	//------------------------------------------------------------------------------------------------------------------
263     void SAL_CALL WindowStyleSettings::setButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) throw (RuntimeException)
264     {
265         StyleMethodGuard aGuard( *m_pData );
266         lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonRolloverTextColor, _buttonrollovertextcolor );
267     }
268 
269 	//------------------------------------------------------------------------------------------------------------------
270     ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonTextColor() throw (RuntimeException)
271     {
272         StyleMethodGuard aGuard( *m_pData );
273         return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonTextColor );
274     }
275 
276 	//------------------------------------------------------------------------------------------------------------------
277     void SAL_CALL WindowStyleSettings::setButtonTextColor( ::sal_Int32 _buttontextcolor ) throw (RuntimeException)
278     {
279         StyleMethodGuard aGuard( *m_pData );
280         lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonTextColor, _buttontextcolor );
281     }
282 
283 	//------------------------------------------------------------------------------------------------------------------
284     ::sal_Int32 SAL_CALL WindowStyleSettings::getCheckedColor() throw (RuntimeException)
285     {
286         StyleMethodGuard aGuard( *m_pData );
287         return lcl_getStyleColor( *m_pData, &StyleSettings::GetCheckedColor );
288     }
289 
290 	//------------------------------------------------------------------------------------------------------------------
291     void SAL_CALL WindowStyleSettings::setCheckedColor( ::sal_Int32 _checkedcolor ) throw (RuntimeException)
292     {
293         StyleMethodGuard aGuard( *m_pData );
294         lcl_setStyleColor( *m_pData, &StyleSettings::SetCheckedColor, _checkedcolor );
295     }
296 
297 	//------------------------------------------------------------------------------------------------------------------
298     ::sal_Int32 SAL_CALL WindowStyleSettings::getDarkShadowColor() throw (RuntimeException)
299     {
300         StyleMethodGuard aGuard( *m_pData );
301         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDarkShadowColor );
302     }
303 
304 	//------------------------------------------------------------------------------------------------------------------
305     void SAL_CALL WindowStyleSettings::setDarkShadowColor( ::sal_Int32 _darkshadowcolor ) throw (RuntimeException)
306     {
307         StyleMethodGuard aGuard( *m_pData );
308         lcl_setStyleColor( *m_pData, &StyleSettings::SetDarkShadowColor, _darkshadowcolor );
309     }
310 
311 	//------------------------------------------------------------------------------------------------------------------
312     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveBorderColor() throw (RuntimeException)
313     {
314         StyleMethodGuard aGuard( *m_pData );
315         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveBorderColor );
316     }
317 
318 	//------------------------------------------------------------------------------------------------------------------
319     void SAL_CALL WindowStyleSettings::setDeactiveBorderColor( ::sal_Int32 _deactivebordercolor ) throw (RuntimeException)
320     {
321         StyleMethodGuard aGuard( *m_pData );
322         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveBorderColor, _deactivebordercolor );
323     }
324 
325 	//------------------------------------------------------------------------------------------------------------------
326     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveColor() throw (RuntimeException)
327     {
328         StyleMethodGuard aGuard( *m_pData );
329         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveColor );
330     }
331 
332 	//------------------------------------------------------------------------------------------------------------------
333     void SAL_CALL WindowStyleSettings::setDeactiveColor( ::sal_Int32 _deactivecolor ) throw (RuntimeException)
334     {
335         StyleMethodGuard aGuard( *m_pData );
336         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveColor, _deactivecolor );
337     }
338 
339 	//------------------------------------------------------------------------------------------------------------------
340     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveTextColor() throw (RuntimeException)
341     {
342         StyleMethodGuard aGuard( *m_pData );
343         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveTextColor );
344     }
345 
346 	//------------------------------------------------------------------------------------------------------------------
347     void SAL_CALL WindowStyleSettings::setDeactiveTextColor( ::sal_Int32 _deactivetextcolor ) throw (RuntimeException)
348     {
349         StyleMethodGuard aGuard( *m_pData );
350         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveTextColor, _deactivetextcolor );
351     }
352 
353 	//------------------------------------------------------------------------------------------------------------------
354     ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogColor() throw (RuntimeException)
355     {
356         StyleMethodGuard aGuard( *m_pData );
357         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogColor );
358     }
359 
360 	//------------------------------------------------------------------------------------------------------------------
361     void SAL_CALL WindowStyleSettings::setDialogColor( ::sal_Int32 _dialogcolor ) throw (RuntimeException)
362     {
363         StyleMethodGuard aGuard( *m_pData );
364         lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogColor, _dialogcolor );
365     }
366 
367 	//------------------------------------------------------------------------------------------------------------------
368     ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogTextColor() throw (RuntimeException)
369     {
370         StyleMethodGuard aGuard( *m_pData );
371         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogTextColor );
372     }
373 
374 	//------------------------------------------------------------------------------------------------------------------
375     void SAL_CALL WindowStyleSettings::setDialogTextColor( ::sal_Int32 _dialogtextcolor ) throw (RuntimeException)
376     {
377         StyleMethodGuard aGuard( *m_pData );
378         lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogTextColor, _dialogtextcolor );
379     }
380 
381 	//------------------------------------------------------------------------------------------------------------------
382     ::sal_Int32 SAL_CALL WindowStyleSettings::getDisableColor() throw (RuntimeException)
383     {
384         StyleMethodGuard aGuard( *m_pData );
385         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDisableColor );
386     }
387 
388 	//------------------------------------------------------------------------------------------------------------------
389     void SAL_CALL WindowStyleSettings::setDisableColor( ::sal_Int32 _disablecolor ) throw (RuntimeException)
390     {
391         StyleMethodGuard aGuard( *m_pData );
392         lcl_setStyleColor( *m_pData, &StyleSettings::SetDisableColor, _disablecolor );
393     }
394 
395 	//------------------------------------------------------------------------------------------------------------------
396     ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceColor() throw (RuntimeException)
397     {
398         StyleMethodGuard aGuard( *m_pData );
399         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFaceColor );
400     }
401 
402 	//------------------------------------------------------------------------------------------------------------------
403     void SAL_CALL WindowStyleSettings::setFaceColor( ::sal_Int32 _facecolor ) throw (RuntimeException)
404     {
405         StyleMethodGuard aGuard( *m_pData );
406         lcl_setStyleColor( *m_pData, &StyleSettings::SetFaceColor, _facecolor );
407     }
408 
409 	//------------------------------------------------------------------------------------------------------------------
410     ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceGradientColor() throw (RuntimeException)
411     {
412         StyleMethodGuard aGuard( *m_pData );
413         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
414         const AllSettings aAllSettings = pWindow->GetSettings();
415         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
416         return aStyleSettings.GetFaceGradientColor().GetColor();
417     }
418 
419 	//------------------------------------------------------------------------------------------------------------------
420     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldColor() throw (RuntimeException)
421     {
422         StyleMethodGuard aGuard( *m_pData );
423         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldColor );
424     }
425 
426 	//------------------------------------------------------------------------------------------------------------------
427     void SAL_CALL WindowStyleSettings::setFieldColor( ::sal_Int32 _fieldcolor ) throw (RuntimeException)
428     {
429         StyleMethodGuard aGuard( *m_pData );
430         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldColor, _fieldcolor );
431     }
432 
433 	//------------------------------------------------------------------------------------------------------------------
434     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldRolloverTextColor() throw (RuntimeException)
435     {
436         StyleMethodGuard aGuard( *m_pData );
437         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldRolloverTextColor );
438     }
439 
440 	//------------------------------------------------------------------------------------------------------------------
441     void SAL_CALL WindowStyleSettings::setFieldRolloverTextColor( ::sal_Int32 _fieldrollovertextcolor ) throw (RuntimeException)
442     {
443         StyleMethodGuard aGuard( *m_pData );
444         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldRolloverTextColor, _fieldrollovertextcolor );
445     }
446 
447 	//------------------------------------------------------------------------------------------------------------------
448     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldTextColor() throw (RuntimeException)
449     {
450         StyleMethodGuard aGuard( *m_pData );
451         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldTextColor );
452     }
453 
454 	//------------------------------------------------------------------------------------------------------------------
455     void SAL_CALL WindowStyleSettings::setFieldTextColor( ::sal_Int32 _fieldtextcolor ) throw (RuntimeException)
456     {
457         StyleMethodGuard aGuard( *m_pData );
458         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldTextColor, _fieldtextcolor );
459     }
460 
461 	//------------------------------------------------------------------------------------------------------------------
462     ::sal_Int32 SAL_CALL WindowStyleSettings::getGroupTextColor() throw (RuntimeException)
463     {
464         StyleMethodGuard aGuard( *m_pData );
465         return lcl_getStyleColor( *m_pData, &StyleSettings::GetGroupTextColor );
466     }
467 
468 	//------------------------------------------------------------------------------------------------------------------
469     void SAL_CALL WindowStyleSettings::setGroupTextColor( ::sal_Int32 _grouptextcolor ) throw (RuntimeException)
470     {
471         StyleMethodGuard aGuard( *m_pData );
472         lcl_setStyleColor( *m_pData, &StyleSettings::SetGroupTextColor, _grouptextcolor );
473     }
474 
475 	//------------------------------------------------------------------------------------------------------------------
476     ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpColor() throw (RuntimeException)
477     {
478         StyleMethodGuard aGuard( *m_pData );
479         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpColor );
480     }
481 
482 	//------------------------------------------------------------------------------------------------------------------
483     void SAL_CALL WindowStyleSettings::setHelpColor( ::sal_Int32 _helpcolor ) throw (RuntimeException)
484     {
485         StyleMethodGuard aGuard( *m_pData );
486         lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpColor, _helpcolor );
487     }
488 
489 	//------------------------------------------------------------------------------------------------------------------
490     ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpTextColor() throw (RuntimeException)
491     {
492         StyleMethodGuard aGuard( *m_pData );
493         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpTextColor );
494     }
495 
496 	//------------------------------------------------------------------------------------------------------------------
497     void SAL_CALL WindowStyleSettings::setHelpTextColor( ::sal_Int32 _helptextcolor ) throw (RuntimeException)
498     {
499         StyleMethodGuard aGuard( *m_pData );
500         lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpTextColor, _helptextcolor );
501     }
502 
503 	//------------------------------------------------------------------------------------------------------------------
504     ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightColor() throw (RuntimeException)
505     {
506         StyleMethodGuard aGuard( *m_pData );
507         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightColor );
508     }
509 
510 	//------------------------------------------------------------------------------------------------------------------
511     void SAL_CALL WindowStyleSettings::setHighlightColor( ::sal_Int32 _highlightcolor ) throw (RuntimeException)
512     {
513         StyleMethodGuard aGuard( *m_pData );
514         lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightColor, _highlightcolor );
515     }
516 
517 	//------------------------------------------------------------------------------------------------------------------
518     ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightTextColor() throw (RuntimeException)
519     {
520         StyleMethodGuard aGuard( *m_pData );
521         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightTextColor );
522     }
523 
524 	//------------------------------------------------------------------------------------------------------------------
525     void SAL_CALL WindowStyleSettings::setHighlightTextColor( ::sal_Int32 _highlighttextcolor ) throw (RuntimeException)
526     {
527         StyleMethodGuard aGuard( *m_pData );
528         lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightTextColor, _highlighttextcolor );
529     }
530 
531 	//------------------------------------------------------------------------------------------------------------------
532     ::sal_Int32 SAL_CALL WindowStyleSettings::getInactiveTabColor() throw (RuntimeException)
533     {
534         StyleMethodGuard aGuard( *m_pData );
535         return lcl_getStyleColor( *m_pData, &StyleSettings::GetInactiveTabColor );
536     }
537 
538 	//------------------------------------------------------------------------------------------------------------------
539     void SAL_CALL WindowStyleSettings::setInactiveTabColor( ::sal_Int32 _inactivetabcolor ) throw (RuntimeException)
540     {
541         StyleMethodGuard aGuard( *m_pData );
542         lcl_setStyleColor( *m_pData, &StyleSettings::SetInactiveTabColor, _inactivetabcolor );
543     }
544 
545 	//------------------------------------------------------------------------------------------------------------------
546     ::sal_Int32 SAL_CALL WindowStyleSettings::getInfoTextColor() throw (RuntimeException)
547     {
548         StyleMethodGuard aGuard( *m_pData );
549         return lcl_getStyleColor( *m_pData, &StyleSettings::GetInfoTextColor );
550     }
551 
552 	//------------------------------------------------------------------------------------------------------------------
553     void SAL_CALL WindowStyleSettings::setInfoTextColor( ::sal_Int32 _infotextcolor ) throw (RuntimeException)
554     {
555         StyleMethodGuard aGuard( *m_pData );
556         lcl_setStyleColor( *m_pData, &StyleSettings::SetInfoTextColor, _infotextcolor );
557     }
558 
559 	//------------------------------------------------------------------------------------------------------------------
560     ::sal_Int32 SAL_CALL WindowStyleSettings::getLabelTextColor() throw (RuntimeException)
561     {
562         StyleMethodGuard aGuard( *m_pData );
563         return lcl_getStyleColor( *m_pData, &StyleSettings::GetLabelTextColor );
564     }
565 
566 	//------------------------------------------------------------------------------------------------------------------
567     void SAL_CALL WindowStyleSettings::setLabelTextColor( ::sal_Int32 _labeltextcolor ) throw (RuntimeException)
568     {
569         StyleMethodGuard aGuard( *m_pData );
570         lcl_setStyleColor( *m_pData, &StyleSettings::SetLabelTextColor, _labeltextcolor );
571     }
572 
573 	//------------------------------------------------------------------------------------------------------------------
574     ::sal_Int32 SAL_CALL WindowStyleSettings::getLightColor() throw (RuntimeException)
575     {
576         StyleMethodGuard aGuard( *m_pData );
577         return lcl_getStyleColor( *m_pData, &StyleSettings::GetLightColor );
578     }
579 
580 	//------------------------------------------------------------------------------------------------------------------
581     void SAL_CALL WindowStyleSettings::setLightColor( ::sal_Int32 _lightcolor ) throw (RuntimeException)
582     {
583         StyleMethodGuard aGuard( *m_pData );
584         lcl_setStyleColor( *m_pData, &StyleSettings::SetLightColor, _lightcolor );
585     }
586 
587 	//------------------------------------------------------------------------------------------------------------------
588     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarColor() throw (RuntimeException)
589     {
590         StyleMethodGuard aGuard( *m_pData );
591         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarColor );
592     }
593 
594 	//------------------------------------------------------------------------------------------------------------------
595     void SAL_CALL WindowStyleSettings::setMenuBarColor( ::sal_Int32 _menubarcolor ) throw (RuntimeException)
596     {
597         StyleMethodGuard aGuard( *m_pData );
598         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarColor, _menubarcolor );
599     }
600 
601 	//------------------------------------------------------------------------------------------------------------------
602     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarTextColor() throw (RuntimeException)
603     {
604         StyleMethodGuard aGuard( *m_pData );
605         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarTextColor );
606     }
607 
608 	//------------------------------------------------------------------------------------------------------------------
609     void SAL_CALL WindowStyleSettings::setMenuBarTextColor( ::sal_Int32 _menubartextcolor ) throw (RuntimeException)
610     {
611         StyleMethodGuard aGuard( *m_pData );
612         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarTextColor, _menubartextcolor );
613     }
614 
615 	//------------------------------------------------------------------------------------------------------------------
616     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBorderColor() throw (RuntimeException)
617     {
618         StyleMethodGuard aGuard( *m_pData );
619         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBorderColor );
620     }
621 
622 	//------------------------------------------------------------------------------------------------------------------
623     void SAL_CALL WindowStyleSettings::setMenuBorderColor( ::sal_Int32 _menubordercolor ) throw (RuntimeException)
624     {
625         StyleMethodGuard aGuard( *m_pData );
626         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBorderColor, _menubordercolor );
627     }
628 
629 	//------------------------------------------------------------------------------------------------------------------
630     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuColor() throw (RuntimeException)
631     {
632         StyleMethodGuard aGuard( *m_pData );
633         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuColor );
634     }
635 
636 	//------------------------------------------------------------------------------------------------------------------
637     void SAL_CALL WindowStyleSettings::setMenuColor( ::sal_Int32 _menucolor ) throw (RuntimeException)
638     {
639         StyleMethodGuard aGuard( *m_pData );
640         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuColor, _menucolor );
641     }
642 
643 	//------------------------------------------------------------------------------------------------------------------
644     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightColor() throw (RuntimeException)
645     {
646         StyleMethodGuard aGuard( *m_pData );
647         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightColor );
648     }
649 
650 	//------------------------------------------------------------------------------------------------------------------
651     void SAL_CALL WindowStyleSettings::setMenuHighlightColor( ::sal_Int32 _menuhighlightcolor ) throw (RuntimeException)
652     {
653         StyleMethodGuard aGuard( *m_pData );
654         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightColor, _menuhighlightcolor );
655     }
656 
657 	//------------------------------------------------------------------------------------------------------------------
658     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightTextColor() throw (RuntimeException)
659     {
660         StyleMethodGuard aGuard( *m_pData );
661         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightTextColor );
662     }
663 
664 	//------------------------------------------------------------------------------------------------------------------
665     void SAL_CALL WindowStyleSettings::setMenuHighlightTextColor( ::sal_Int32 _menuhighlighttextcolor ) throw (RuntimeException)
666     {
667         StyleMethodGuard aGuard( *m_pData );
668         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightTextColor, _menuhighlighttextcolor );
669     }
670 
671 	//------------------------------------------------------------------------------------------------------------------
672     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuTextColor() throw (RuntimeException)
673     {
674         StyleMethodGuard aGuard( *m_pData );
675         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuTextColor );
676     }
677 
678 	//------------------------------------------------------------------------------------------------------------------
679     void SAL_CALL WindowStyleSettings::setMenuTextColor( ::sal_Int32 _menutextcolor ) throw (RuntimeException)
680     {
681         StyleMethodGuard aGuard( *m_pData );
682         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuTextColor, _menutextcolor );
683     }
684 
685 	//------------------------------------------------------------------------------------------------------------------
686     ::sal_Int32 SAL_CALL WindowStyleSettings::getMonoColor() throw (RuntimeException)
687     {
688         StyleMethodGuard aGuard( *m_pData );
689         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMonoColor );
690     }
691 
692 	//------------------------------------------------------------------------------------------------------------------
693     void SAL_CALL WindowStyleSettings::setMonoColor( ::sal_Int32 _monocolor ) throw (RuntimeException)
694     {
695         StyleMethodGuard aGuard( *m_pData );
696         lcl_setStyleColor( *m_pData, &StyleSettings::SetMonoColor, _monocolor );
697     }
698 
699 	//------------------------------------------------------------------------------------------------------------------
700     ::sal_Int32 SAL_CALL WindowStyleSettings::getRadioCheckTextColor() throw (RuntimeException)
701     {
702         StyleMethodGuard aGuard( *m_pData );
703         return lcl_getStyleColor( *m_pData, &StyleSettings::GetRadioCheckTextColor );
704     }
705 
706 	//------------------------------------------------------------------------------------------------------------------
707     void SAL_CALL WindowStyleSettings::setRadioCheckTextColor( ::sal_Int32 _radiochecktextcolor ) throw (RuntimeException)
708     {
709         StyleMethodGuard aGuard( *m_pData );
710         lcl_setStyleColor( *m_pData, &StyleSettings::SetRadioCheckTextColor, _radiochecktextcolor );
711     }
712 
713 	//------------------------------------------------------------------------------------------------------------------
714     ::sal_Int32 SAL_CALL WindowStyleSettings::getSeparatorColor() throw (RuntimeException)
715     {
716         StyleMethodGuard aGuard( *m_pData );
717         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
718         const AllSettings aAllSettings = pWindow->GetSettings();
719         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
720         return aStyleSettings.GetSeparatorColor().GetColor();
721     }
722 
723 	//------------------------------------------------------------------------------------------------------------------
724     ::sal_Int32 SAL_CALL WindowStyleSettings::getShadowColor() throw (RuntimeException)
725     {
726         StyleMethodGuard aGuard( *m_pData );
727         return lcl_getStyleColor( *m_pData, &StyleSettings::GetShadowColor );
728     }
729 
730 	//------------------------------------------------------------------------------------------------------------------
731     void SAL_CALL WindowStyleSettings::setShadowColor( ::sal_Int32 _shadowcolor ) throw (RuntimeException)
732     {
733         StyleMethodGuard aGuard( *m_pData );
734         lcl_setStyleColor( *m_pData, &StyleSettings::SetShadowColor, _shadowcolor );
735     }
736 
737 	//------------------------------------------------------------------------------------------------------------------
738     ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowColor() throw (RuntimeException)
739     {
740         StyleMethodGuard aGuard( *m_pData );
741         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowColor );
742     }
743 
744 	//------------------------------------------------------------------------------------------------------------------
745     void SAL_CALL WindowStyleSettings::setWindowColor( ::sal_Int32 _windowcolor ) throw (RuntimeException)
746     {
747         StyleMethodGuard aGuard( *m_pData );
748         lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowColor, _windowcolor );
749     }
750 
751 	//------------------------------------------------------------------------------------------------------------------
752     ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowTextColor() throw (RuntimeException)
753     {
754         StyleMethodGuard aGuard( *m_pData );
755         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowTextColor );
756     }
757 
758 	//------------------------------------------------------------------------------------------------------------------
759     void SAL_CALL WindowStyleSettings::setWindowTextColor( ::sal_Int32 _windowtextcolor ) throw (RuntimeException)
760     {
761         StyleMethodGuard aGuard( *m_pData );
762         lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowTextColor, _windowtextcolor );
763     }
764 
765 	//------------------------------------------------------------------------------------------------------------------
766     ::sal_Int32 SAL_CALL WindowStyleSettings::getWorkspaceColor() throw (RuntimeException)
767     {
768         StyleMethodGuard aGuard( *m_pData );
769         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWorkspaceColor );
770     }
771 
772 	//------------------------------------------------------------------------------------------------------------------
773     void SAL_CALL WindowStyleSettings::setWorkspaceColor( ::sal_Int32 _workspacecolor ) throw (RuntimeException)
774     {
775         StyleMethodGuard aGuard( *m_pData );
776         lcl_setStyleColor( *m_pData, &StyleSettings::SetWorkspaceColor, _workspacecolor );
777     }
778 
779 	//------------------------------------------------------------------------------------------------------------------
780     ::sal_Bool SAL_CALL WindowStyleSettings::getHighContrastMode() throw (RuntimeException)
781     {
782         StyleMethodGuard aGuard( *m_pData );
783         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
784         const AllSettings aAllSettings = pWindow->GetSettings();
785         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
786         return aStyleSettings.GetHighContrastMode();
787     }
788 
789 	//------------------------------------------------------------------------------------------------------------------
790     void SAL_CALL WindowStyleSettings::setHighContrastMode( ::sal_Bool _highcontrastmode ) throw (RuntimeException)
791     {
792         StyleMethodGuard aGuard( *m_pData );
793         Window* pWindow = m_pData->pOwningWindow->GetWindow();
794         AllSettings aAllSettings = pWindow->GetSettings();
795         StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
796         aStyleSettings.SetHighContrastMode( _highcontrastmode );
797         aAllSettings.SetStyleSettings( aStyleSettings );
798         pWindow->SetSettings( aAllSettings );
799     }
800 
801 	//------------------------------------------------------------------------------------------------------------------
802     FontDescriptor SAL_CALL WindowStyleSettings::getApplicationFont() throw (RuntimeException)
803     {
804         StyleMethodGuard aGuard( *m_pData );
805         return lcl_getStyleFont( *m_pData, &StyleSettings::GetAppFont );
806     }
807 
808 	//------------------------------------------------------------------------------------------------------------------
809     void SAL_CALL WindowStyleSettings::setApplicationFont( const FontDescriptor& _applicationfont ) throw (RuntimeException)
810     {
811         StyleMethodGuard aGuard( *m_pData );
812         lcl_setStyleFont( *m_pData, &StyleSettings::SetAppFont, &StyleSettings::GetAppFont, _applicationfont );
813     }
814 
815 	//------------------------------------------------------------------------------------------------------------------
816     FontDescriptor SAL_CALL WindowStyleSettings::getHelpFont() throw (RuntimeException)
817     {
818         StyleMethodGuard aGuard( *m_pData );
819         return lcl_getStyleFont( *m_pData, &StyleSettings::GetHelpFont );
820     }
821 
822 	//------------------------------------------------------------------------------------------------------------------
823     void SAL_CALL WindowStyleSettings::setHelpFont( const FontDescriptor& _helpfont ) throw (RuntimeException)
824     {
825         StyleMethodGuard aGuard( *m_pData );
826         lcl_setStyleFont( *m_pData, &StyleSettings::SetHelpFont, &StyleSettings::GetHelpFont, _helpfont );
827     }
828 
829 	//------------------------------------------------------------------------------------------------------------------
830     FontDescriptor SAL_CALL WindowStyleSettings::getTitleFont() throw (RuntimeException)
831     {
832         StyleMethodGuard aGuard( *m_pData );
833         return lcl_getStyleFont( *m_pData, &StyleSettings::GetTitleFont );
834     }
835 
836 	//------------------------------------------------------------------------------------------------------------------
837     void SAL_CALL WindowStyleSettings::setTitleFont( const FontDescriptor& _titlefont ) throw (RuntimeException)
838     {
839         StyleMethodGuard aGuard( *m_pData );
840         lcl_setStyleFont( *m_pData, &StyleSettings::SetTitleFont, &StyleSettings::GetTitleFont, _titlefont );
841     }
842 
843 	//------------------------------------------------------------------------------------------------------------------
844     FontDescriptor SAL_CALL WindowStyleSettings::getFloatTitleFont() throw (RuntimeException)
845     {
846         StyleMethodGuard aGuard( *m_pData );
847         return lcl_getStyleFont( *m_pData, &StyleSettings::GetFloatTitleFont );
848     }
849 
850 	//------------------------------------------------------------------------------------------------------------------
851     void SAL_CALL WindowStyleSettings::setFloatTitleFont( const FontDescriptor& _floattitlefont ) throw (RuntimeException)
852     {
853         StyleMethodGuard aGuard( *m_pData );
854         lcl_setStyleFont( *m_pData, &StyleSettings::SetFloatTitleFont, &StyleSettings::GetFloatTitleFont, _floattitlefont );
855     }
856 
857 	//------------------------------------------------------------------------------------------------------------------
858     FontDescriptor SAL_CALL WindowStyleSettings::getMenuFont() throw (RuntimeException)
859     {
860         StyleMethodGuard aGuard( *m_pData );
861         return lcl_getStyleFont( *m_pData, &StyleSettings::GetMenuFont );
862     }
863 
864 	//------------------------------------------------------------------------------------------------------------------
865     void SAL_CALL WindowStyleSettings::setMenuFont( const FontDescriptor& _menufont ) throw (RuntimeException)
866     {
867         StyleMethodGuard aGuard( *m_pData );
868         lcl_setStyleFont( *m_pData, &StyleSettings::SetMenuFont, &StyleSettings::GetMenuFont, _menufont );
869     }
870 
871 	//------------------------------------------------------------------------------------------------------------------
872     FontDescriptor SAL_CALL WindowStyleSettings::getToolFont() throw (RuntimeException)
873     {
874         StyleMethodGuard aGuard( *m_pData );
875         return lcl_getStyleFont( *m_pData, &StyleSettings::GetToolFont );
876     }
877 
878 	//------------------------------------------------------------------------------------------------------------------
879     void SAL_CALL WindowStyleSettings::setToolFont( const FontDescriptor& _toolfont ) throw (RuntimeException)
880     {
881         StyleMethodGuard aGuard( *m_pData );
882         lcl_setStyleFont( *m_pData, &StyleSettings::SetToolFont, &StyleSettings::GetToolFont, _toolfont );
883     }
884 
885 	//------------------------------------------------------------------------------------------------------------------
886     FontDescriptor SAL_CALL WindowStyleSettings::getGroupFont() throw (RuntimeException)
887     {
888         StyleMethodGuard aGuard( *m_pData );
889         return lcl_getStyleFont( *m_pData, &StyleSettings::GetGroupFont );
890     }
891 
892 	//------------------------------------------------------------------------------------------------------------------
893     void SAL_CALL WindowStyleSettings::setGroupFont( const FontDescriptor& _groupfont ) throw (RuntimeException)
894     {
895         StyleMethodGuard aGuard( *m_pData );
896         lcl_setStyleFont( *m_pData, &StyleSettings::SetGroupFont, &StyleSettings::GetGroupFont, _groupfont );
897     }
898 
899 	//------------------------------------------------------------------------------------------------------------------
900     FontDescriptor SAL_CALL WindowStyleSettings::getLabelFont() throw (RuntimeException)
901     {
902         StyleMethodGuard aGuard( *m_pData );
903         return lcl_getStyleFont( *m_pData, &StyleSettings::GetLabelFont );
904     }
905 
906 	//------------------------------------------------------------------------------------------------------------------
907     void SAL_CALL WindowStyleSettings::setLabelFont( const FontDescriptor& _labelfont ) throw (RuntimeException)
908     {
909         StyleMethodGuard aGuard( *m_pData );
910         lcl_setStyleFont( *m_pData, &StyleSettings::SetLabelFont, &StyleSettings::GetLabelFont, _labelfont );
911     }
912 
913 	//------------------------------------------------------------------------------------------------------------------
914     FontDescriptor SAL_CALL WindowStyleSettings::getInfoFont() throw (RuntimeException)
915     {
916         StyleMethodGuard aGuard( *m_pData );
917         return lcl_getStyleFont( *m_pData, &StyleSettings::GetInfoFont );
918     }
919 
920 	//------------------------------------------------------------------------------------------------------------------
921     void SAL_CALL WindowStyleSettings::setInfoFont( const FontDescriptor& _infofont ) throw (RuntimeException)
922     {
923         StyleMethodGuard aGuard( *m_pData );
924         lcl_setStyleFont( *m_pData, &StyleSettings::SetInfoFont, &StyleSettings::GetInfoFont, _infofont );
925     }
926 
927 	//------------------------------------------------------------------------------------------------------------------
928     FontDescriptor SAL_CALL WindowStyleSettings::getRadioCheckFont() throw (RuntimeException)
929     {
930         StyleMethodGuard aGuard( *m_pData );
931         return lcl_getStyleFont( *m_pData, &StyleSettings::GetRadioCheckFont );
932     }
933 
934 	//------------------------------------------------------------------------------------------------------------------
935     void SAL_CALL WindowStyleSettings::setRadioCheckFont( const FontDescriptor& _radiocheckfont ) throw (RuntimeException)
936     {
937         StyleMethodGuard aGuard( *m_pData );
938         lcl_setStyleFont( *m_pData, &StyleSettings::SetRadioCheckFont, &StyleSettings::GetRadioCheckFont, _radiocheckfont );
939     }
940 
941 	//------------------------------------------------------------------------------------------------------------------
942     FontDescriptor SAL_CALL WindowStyleSettings::getPushButtonFont() throw (RuntimeException)
943     {
944         StyleMethodGuard aGuard( *m_pData );
945         return lcl_getStyleFont( *m_pData, &StyleSettings::GetPushButtonFont );
946     }
947 
948 	//------------------------------------------------------------------------------------------------------------------
949     void SAL_CALL WindowStyleSettings::setPushButtonFont( const FontDescriptor& _pushbuttonfont ) throw (RuntimeException)
950     {
951         StyleMethodGuard aGuard( *m_pData );
952         lcl_setStyleFont( *m_pData, &StyleSettings::SetPushButtonFont, &StyleSettings::GetPushButtonFont, _pushbuttonfont );
953     }
954 
955 	//------------------------------------------------------------------------------------------------------------------
956     FontDescriptor SAL_CALL WindowStyleSettings::getFieldFont() throw (RuntimeException)
957     {
958         StyleMethodGuard aGuard( *m_pData );
959         return lcl_getStyleFont( *m_pData, &StyleSettings::GetFieldFont );
960     }
961 
962 	//------------------------------------------------------------------------------------------------------------------
963     void SAL_CALL WindowStyleSettings::setFieldFont( const FontDescriptor& _fieldfont ) throw (RuntimeException)
964     {
965         StyleMethodGuard aGuard( *m_pData );
966         lcl_setStyleFont( *m_pData, &StyleSettings::SetFieldFont, &StyleSettings::GetFieldFont, _fieldfont );
967     }
968 
969 	//------------------------------------------------------------------------------------------------------------------
970     void SAL_CALL WindowStyleSettings::addStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
971     {
972         StyleMethodGuard aGuard( *m_pData );
973         if ( i_rListener.is() )
974             m_pData->aStyleChangeListeners.addInterface( i_rListener );
975     }
976 
977 	//------------------------------------------------------------------------------------------------------------------
978     void SAL_CALL WindowStyleSettings::removeStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
979     {
980         StyleMethodGuard aGuard( *m_pData );
981         if ( i_rListener.is() )
982             m_pData->aStyleChangeListeners.removeInterface( i_rListener );
983     }
984 
985 //......................................................................................................................
986 } // namespace toolkit
987 //......................................................................................................................
988