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