Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include <accessibility/extended/accessibletabbar.hxx>
30 : : #include <svtools/tabbar.hxx>
31 : : #include <accessibility/extended/accessibletabbarpagelist.hxx>
32 : : #include <com/sun/star/accessibility/AccessibleEventId.hpp>
33 : : #include <com/sun/star/accessibility/AccessibleRole.hpp>
34 : : #include <com/sun/star/accessibility/AccessibleStateType.hpp>
35 : : #include <unotools/accessiblestatesethelper.hxx>
36 : : #include <unotools/accessiblerelationsethelper.hxx>
37 : : #include <vcl/svapp.hxx>
38 : : #include <toolkit/awt/vclxfont.hxx>
39 : : #include <toolkit/helper/convert.hxx>
40 : :
41 : : #include <vector>
42 : :
43 : :
44 : : //.........................................................................
45 : : namespace accessibility
46 : : {
47 : : //.........................................................................
48 : :
49 : : using namespace ::com::sun::star;
50 : : using namespace ::com::sun::star::uno;
51 : : using namespace ::com::sun::star::lang;
52 : : using namespace ::com::sun::star::accessibility;
53 : : using namespace ::comphelper;
54 : :
55 : : // ----------------------------------------------------
56 : : // class AccessibleTabBar
57 : : // ----------------------------------------------------
58 : :
59 : 0 : AccessibleTabBar::AccessibleTabBar( TabBar* pTabBar )
60 [ # # ]: 0 : :AccessibleTabBarBase( pTabBar )
61 : : {
62 [ # # ]: 0 : if ( m_pTabBar )
63 [ # # ][ # # ]: 0 : m_aAccessibleChildren.assign( m_pTabBar->GetAccessibleChildWindowCount() + 1, Reference< XAccessible >() );
64 : 0 : }
65 : :
66 : : // -----------------------------------------------------------------------------
67 : :
68 : 0 : AccessibleTabBar::~AccessibleTabBar()
69 : : {
70 [ # # ]: 0 : }
71 : :
72 : : // -----------------------------------------------------------------------------
73 : :
74 : 0 : void AccessibleTabBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
75 : : {
76 : 0 : Any aOldValue, aNewValue;
77 : :
78 [ # # # # : 0 : switch ( rVclWindowEvent.GetId() )
# # # ]
79 : : {
80 : : case VCLEVENT_WINDOW_ENABLED:
81 : : {
82 [ # # ]: 0 : aNewValue <<= AccessibleStateType::SENSITIVE;
83 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
84 [ # # ]: 0 : aNewValue <<= AccessibleStateType::ENABLED;
85 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
86 : : }
87 : 0 : break;
88 : : case VCLEVENT_WINDOW_DISABLED:
89 : : {
90 [ # # ]: 0 : aOldValue <<= AccessibleStateType::ENABLED;
91 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
92 [ # # ]: 0 : aOldValue <<= AccessibleStateType::SENSITIVE;
93 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
94 : : }
95 : 0 : break;
96 : : case VCLEVENT_WINDOW_GETFOCUS:
97 : : {
98 [ # # ]: 0 : aNewValue <<= AccessibleStateType::FOCUSED;
99 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
100 : : }
101 : 0 : break;
102 : : case VCLEVENT_WINDOW_LOSEFOCUS:
103 : : {
104 [ # # ]: 0 : aOldValue <<= AccessibleStateType::FOCUSED;
105 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
106 : : }
107 : 0 : break;
108 : : case VCLEVENT_WINDOW_SHOW:
109 : : {
110 [ # # ]: 0 : aNewValue <<= AccessibleStateType::SHOWING;
111 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
112 : : }
113 : 0 : break;
114 : : case VCLEVENT_WINDOW_HIDE:
115 : : {
116 [ # # ]: 0 : aOldValue <<= AccessibleStateType::SHOWING;
117 [ # # ]: 0 : NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
118 : : }
119 : 0 : break;
120 : : default:
121 : : {
122 [ # # ]: 0 : AccessibleTabBarBase::ProcessWindowEvent( rVclWindowEvent );
123 : : }
124 : 0 : break;
125 : 0 : }
126 : 0 : }
127 : :
128 : : // -----------------------------------------------------------------------------
129 : :
130 : 0 : void AccessibleTabBar::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
131 : : {
132 [ # # ]: 0 : if ( m_pTabBar )
133 : : {
134 [ # # ]: 0 : if ( m_pTabBar->IsEnabled() )
135 : : {
136 : 0 : rStateSet.AddState( AccessibleStateType::ENABLED );
137 : 0 : rStateSet.AddState( AccessibleStateType::SENSITIVE );
138 : : }
139 : :
140 : 0 : rStateSet.AddState( AccessibleStateType::FOCUSABLE );
141 : :
142 [ # # ]: 0 : if ( m_pTabBar->HasFocus() )
143 : 0 : rStateSet.AddState( AccessibleStateType::FOCUSED );
144 : :
145 : 0 : rStateSet.AddState( AccessibleStateType::VISIBLE );
146 : :
147 [ # # ]: 0 : if ( m_pTabBar->IsVisible() )
148 : 0 : rStateSet.AddState( AccessibleStateType::SHOWING );
149 : :
150 [ # # ]: 0 : if ( m_pTabBar->GetStyle() & WB_SIZEABLE )
151 : 0 : rStateSet.AddState( AccessibleStateType::RESIZABLE );
152 : : }
153 : 0 : }
154 : :
155 : : // -----------------------------------------------------------------------------
156 : : // OCommonAccessibleComponent
157 : : // -----------------------------------------------------------------------------
158 : :
159 : 0 : awt::Rectangle AccessibleTabBar::implGetBounds() throw (RuntimeException)
160 : : {
161 : 0 : awt::Rectangle aBounds;
162 [ # # ]: 0 : if ( m_pTabBar )
163 [ # # ][ # # ]: 0 : aBounds = AWTRectangle( Rectangle( m_pTabBar->GetPosPixel(), m_pTabBar->GetSizePixel() ) );
[ # # ]
164 : :
165 : 0 : return aBounds;
166 : : }
167 : :
168 : : // -----------------------------------------------------------------------------
169 : : // XInterface
170 : : // -----------------------------------------------------------------------------
171 : :
172 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XINTERFACE2( AccessibleTabBar, AccessibleExtendedComponentHelper_BASE, AccessibleTabBar_BASE )
173 : :
174 : : // -----------------------------------------------------------------------------
175 : : // XTypeProvider
176 : : // -----------------------------------------------------------------------------
177 : :
178 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XTYPEPROVIDER2( AccessibleTabBar, AccessibleExtendedComponentHelper_BASE, AccessibleTabBar_BASE )
[ # # ]
179 : :
180 : : // -----------------------------------------------------------------------------
181 : : // XComponent
182 : : // -----------------------------------------------------------------------------
183 : :
184 : 0 : void AccessibleTabBar::disposing()
185 : : {
186 : 0 : AccessibleTabBarBase::disposing();
187 : :
188 : : // dispose all children
189 [ # # ]: 0 : for ( sal_uInt32 i = 0; i < m_aAccessibleChildren.size(); ++i )
190 : : {
191 [ # # ]: 0 : Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
192 [ # # ]: 0 : if ( xComponent.is() )
193 [ # # ][ # # ]: 0 : xComponent->dispose();
194 : 0 : }
195 : 0 : m_aAccessibleChildren.clear();
196 : 0 : }
197 : :
198 : : // -----------------------------------------------------------------------------
199 : : // XServiceInfo
200 : : // -----------------------------------------------------------------------------
201 : :
202 : 0 : ::rtl::OUString AccessibleTabBar::getImplementationName() throw (RuntimeException)
203 : : {
204 : 0 : return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleTabBar" ));
205 : : }
206 : :
207 : : // -----------------------------------------------------------------------------
208 : :
209 : 0 : sal_Bool AccessibleTabBar::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
210 : : {
211 [ # # ]: 0 : Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
212 : 0 : const ::rtl::OUString* pNames = aNames.getConstArray();
213 : 0 : const ::rtl::OUString* pEnd = pNames + aNames.getLength();
214 [ # # ][ # # ]: 0 : for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
[ # # ]
215 : : ;
216 : :
217 [ # # ]: 0 : return pNames != pEnd;
218 : : }
219 : :
220 : : // -----------------------------------------------------------------------------
221 : :
222 : 0 : Sequence< ::rtl::OUString > AccessibleTabBar::getSupportedServiceNames() throw (RuntimeException)
223 : : {
224 : 0 : Sequence< ::rtl::OUString > aNames(1);
225 [ # # ][ # # ]: 0 : aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.AccessibleTabBar" ));
226 : 0 : return aNames;
227 : : }
228 : :
229 : : // -----------------------------------------------------------------------------
230 : : // XAccessible
231 : : // -----------------------------------------------------------------------------
232 : :
233 : 0 : Reference< XAccessibleContext > AccessibleTabBar::getAccessibleContext( ) throw (RuntimeException)
234 : : {
235 [ # # ]: 0 : OExternalLockGuard aGuard( this );
236 : :
237 [ # # ][ # # ]: 0 : return this;
238 : : }
239 : :
240 : : // -----------------------------------------------------------------------------
241 : : // XAccessibleContext
242 : : // -----------------------------------------------------------------------------
243 : :
244 : 0 : sal_Int32 AccessibleTabBar::getAccessibleChildCount() throw (RuntimeException)
245 : : {
246 [ # # ]: 0 : OExternalLockGuard aGuard( this );
247 : :
248 [ # # ]: 0 : return m_aAccessibleChildren.size();
249 : : }
250 : :
251 : : // -----------------------------------------------------------------------------
252 : :
253 : 0 : Reference< XAccessible > AccessibleTabBar::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException)
254 : : {
255 [ # # ]: 0 : OExternalLockGuard aGuard( this );
256 : :
257 [ # # ][ # # ]: 0 : if ( i < 0 || i >= getAccessibleChildCount() )
[ # # ][ # # ]
258 [ # # ]: 0 : throw IndexOutOfBoundsException();
259 : :
260 : 0 : Reference< XAccessible > xChild = m_aAccessibleChildren[i];
261 [ # # ]: 0 : if ( !xChild.is() )
262 : : {
263 [ # # ]: 0 : if ( m_pTabBar )
264 : : {
265 [ # # ]: 0 : sal_Int32 nCount = m_pTabBar->GetAccessibleChildWindowCount();
266 : :
267 [ # # ]: 0 : if ( i < nCount )
268 : : {
269 [ # # ]: 0 : Window* pChild = m_pTabBar->GetAccessibleChildWindow( (sal_uInt16)i );
270 [ # # ]: 0 : if ( pChild )
271 [ # # ][ # # ]: 0 : xChild = pChild->GetAccessible();
272 : : }
273 [ # # ]: 0 : else if ( i == nCount )
274 : : {
275 [ # # ][ # # ]: 0 : xChild = new AccessibleTabBarPageList( m_pTabBar, i );
[ # # ]
276 : : }
277 : :
278 : : // insert into child list
279 [ # # ]: 0 : m_aAccessibleChildren[i] = xChild;
280 : : }
281 : : }
282 : :
283 [ # # ]: 0 : return xChild;
284 : : }
285 : :
286 : : // -----------------------------------------------------------------------------
287 : :
288 : 0 : Reference< XAccessible > AccessibleTabBar::getAccessibleParent( ) throw (RuntimeException)
289 : : {
290 [ # # ]: 0 : OExternalLockGuard aGuard( this );
291 : :
292 : 0 : Reference< XAccessible > xParent;
293 [ # # ]: 0 : if ( m_pTabBar )
294 : : {
295 [ # # ]: 0 : Window* pParent = m_pTabBar->GetAccessibleParentWindow();
296 [ # # ]: 0 : if ( pParent )
297 [ # # ][ # # ]: 0 : xParent = pParent->GetAccessible();
298 : : }
299 : :
300 [ # # ]: 0 : return xParent;
301 : : }
302 : :
303 : : // -----------------------------------------------------------------------------
304 : :
305 : 0 : sal_Int32 AccessibleTabBar::getAccessibleIndexInParent( ) throw (RuntimeException)
306 : : {
307 [ # # ]: 0 : OExternalLockGuard aGuard( this );
308 : :
309 : 0 : sal_Int32 nIndexInParent = -1;
310 [ # # ]: 0 : if ( m_pTabBar )
311 : : {
312 [ # # ]: 0 : Window* pParent = m_pTabBar->GetAccessibleParentWindow();
313 [ # # ]: 0 : if ( pParent )
314 : : {
315 [ # # ][ # # ]: 0 : for ( sal_uInt16 i = 0, nCount = pParent->GetAccessibleChildWindowCount(); i < nCount; ++i )
316 : : {
317 [ # # ]: 0 : Window* pChild = pParent->GetAccessibleChildWindow( i );
318 [ # # ]: 0 : if ( pChild == static_cast< Window* >( m_pTabBar ) )
319 : : {
320 : 0 : nIndexInParent = i;
321 : 0 : break;
322 : : }
323 : : }
324 : : }
325 : : }
326 : :
327 [ # # ]: 0 : return nIndexInParent;
328 : : }
329 : :
330 : : // -----------------------------------------------------------------------------
331 : :
332 : 0 : sal_Int16 AccessibleTabBar::getAccessibleRole( ) throw (RuntimeException)
333 : : {
334 [ # # ]: 0 : OExternalLockGuard aGuard( this );
335 : :
336 [ # # ]: 0 : return AccessibleRole::PANEL;
337 : : }
338 : :
339 : : // -----------------------------------------------------------------------------
340 : :
341 : 0 : ::rtl::OUString AccessibleTabBar::getAccessibleDescription( ) throw (RuntimeException)
342 : : {
343 [ # # ]: 0 : OExternalLockGuard aGuard( this );
344 : :
345 : 0 : ::rtl::OUString sDescription;
346 [ # # ]: 0 : if ( m_pTabBar )
347 [ # # ][ # # ]: 0 : sDescription = m_pTabBar->GetAccessibleDescription();
[ # # ]
348 : :
349 [ # # ]: 0 : return sDescription;
350 : : }
351 : :
352 : : // -----------------------------------------------------------------------------
353 : :
354 : 0 : ::rtl::OUString AccessibleTabBar::getAccessibleName( ) throw (RuntimeException)
355 : : {
356 [ # # ]: 0 : OExternalLockGuard aGuard( this );
357 : :
358 : 0 : ::rtl::OUString sName;
359 [ # # ]: 0 : if ( m_pTabBar )
360 [ # # ][ # # ]: 0 : sName = m_pTabBar->GetAccessibleName();
[ # # ]
361 : :
362 [ # # ]: 0 : return sName;
363 : : }
364 : :
365 : : // -----------------------------------------------------------------------------
366 : :
367 : 0 : Reference< XAccessibleRelationSet > AccessibleTabBar::getAccessibleRelationSet( ) throw (RuntimeException)
368 : : {
369 [ # # ]: 0 : OExternalLockGuard aGuard( this );
370 : :
371 [ # # ]: 0 : utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
372 [ # # ][ # # ]: 0 : Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
373 [ # # ]: 0 : return xSet;
374 : : }
375 : :
376 : : // -----------------------------------------------------------------------------
377 : :
378 : 0 : Reference< XAccessibleStateSet > AccessibleTabBar::getAccessibleStateSet( ) throw (RuntimeException)
379 : : {
380 [ # # ]: 0 : OExternalLockGuard aGuard( this );
381 : :
382 [ # # ]: 0 : utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
383 [ # # ][ # # ]: 0 : Reference< XAccessibleStateSet > xSet = pStateSetHelper;
384 : :
385 [ # # ][ # # ]: 0 : if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
386 : : {
387 [ # # ]: 0 : FillAccessibleStateSet( *pStateSetHelper );
388 : : }
389 : : else
390 : : {
391 [ # # ]: 0 : pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
392 : : }
393 : :
394 [ # # ]: 0 : return xSet;
395 : : }
396 : :
397 : : // -----------------------------------------------------------------------------
398 : :
399 : 0 : Locale AccessibleTabBar::getLocale( ) throw (IllegalAccessibleComponentStateException, RuntimeException)
400 : : {
401 [ # # ]: 0 : OExternalLockGuard aGuard( this );
402 : :
403 [ # # ][ # # ]: 0 : return Application::GetSettings().GetLocale();
[ # # ]
404 : : }
405 : :
406 : : // -----------------------------------------------------------------------------
407 : : // XAccessibleComponent
408 : : // -----------------------------------------------------------------------------
409 : :
410 : 0 : Reference< XAccessible > AccessibleTabBar::getAccessibleAtPoint( const awt::Point& rPoint ) throw (RuntimeException)
411 : : {
412 [ # # ]: 0 : OExternalLockGuard aGuard( this );
413 : :
414 : 0 : Reference< XAccessible > xChild;
415 [ # # ]: 0 : for ( sal_uInt32 i = 0; i < m_aAccessibleChildren.size(); ++i )
416 : : {
417 [ # # ]: 0 : Reference< XAccessible > xAcc = getAccessibleChild( i );
418 [ # # ]: 0 : if ( xAcc.is() )
419 : : {
420 [ # # ][ # # ]: 0 : Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY );
[ # # ]
421 [ # # ]: 0 : if ( xComp.is() )
422 : : {
423 [ # # ][ # # ]: 0 : Rectangle aRect = VCLRectangle( xComp->getBounds() );
[ # # ]
424 : 0 : Point aPos = VCLPoint( rPoint );
425 [ # # ][ # # ]: 0 : if ( aRect.IsInside( aPos ) )
426 : : {
427 [ # # ]: 0 : xChild = xAcc;
428 : : break;
429 : : }
430 [ # # ]: 0 : }
431 : : }
432 [ # # ]: 0 : }
433 : :
434 [ # # ]: 0 : return xChild;
435 : : }
436 : :
437 : : // -----------------------------------------------------------------------------
438 : :
439 : 0 : void AccessibleTabBar::grabFocus( ) throw (RuntimeException)
440 : : {
441 [ # # ]: 0 : OExternalLockGuard aGuard( this );
442 : :
443 [ # # ]: 0 : if ( m_pTabBar )
444 [ # # ][ # # ]: 0 : m_pTabBar->GrabFocus();
445 : 0 : }
446 : :
447 : : // -----------------------------------------------------------------------------
448 : :
449 : 0 : sal_Int32 AccessibleTabBar::getForeground( ) throw (RuntimeException)
450 : : {
451 [ # # ]: 0 : OExternalLockGuard aGuard( this );
452 : :
453 : 0 : sal_Int32 nColor = 0;
454 [ # # ]: 0 : if ( m_pTabBar )
455 : : {
456 [ # # ][ # # ]: 0 : if ( m_pTabBar->IsControlForeground() )
457 [ # # ]: 0 : nColor = m_pTabBar->GetControlForeground().GetColor();
458 : : else
459 : : {
460 [ # # ]: 0 : Font aFont;
461 [ # # ][ # # ]: 0 : if ( m_pTabBar->IsControlFont() )
462 [ # # ][ # # ]: 0 : aFont = m_pTabBar->GetControlFont();
[ # # ]
463 : : else
464 [ # # ]: 0 : aFont = m_pTabBar->GetFont();
465 [ # # ][ # # ]: 0 : nColor = aFont.GetColor().GetColor();
466 : : }
467 : : }
468 : :
469 [ # # ]: 0 : return nColor;
470 : : }
471 : :
472 : : // -----------------------------------------------------------------------------
473 : :
474 : 0 : sal_Int32 AccessibleTabBar::getBackground( ) throw (RuntimeException)
475 : : {
476 [ # # ]: 0 : OExternalLockGuard aGuard( this );
477 : :
478 : 0 : sal_Int32 nColor = 0;
479 [ # # ]: 0 : if ( m_pTabBar )
480 : : {
481 [ # # ][ # # ]: 0 : if ( m_pTabBar->IsControlBackground() )
482 [ # # ]: 0 : nColor = m_pTabBar->GetControlBackground().GetColor();
483 : : else
484 [ # # ]: 0 : nColor = m_pTabBar->GetBackground().GetColor().GetColor();
485 : : }
486 : :
487 [ # # ]: 0 : return nColor;
488 : : }
489 : :
490 : : // -----------------------------------------------------------------------------
491 : : // XAccessibleExtendedComponent
492 : : // -----------------------------------------------------------------------------
493 : :
494 : 0 : Reference< awt::XFont > AccessibleTabBar::getFont( ) throw (RuntimeException)
495 : : {
496 [ # # ]: 0 : OExternalLockGuard aGuard( this );
497 : :
498 : 0 : Reference< awt::XFont > xFont;
499 [ # # ]: 0 : if ( m_pTabBar )
500 : : {
501 [ # # ][ # # ]: 0 : Reference< awt::XDevice > xDev( m_pTabBar->GetComponentInterface(), UNO_QUERY );
502 [ # # ]: 0 : if ( xDev.is() )
503 : : {
504 [ # # ]: 0 : Font aFont;
505 [ # # ][ # # ]: 0 : if ( m_pTabBar->IsControlFont() )
506 [ # # ][ # # ]: 0 : aFont = m_pTabBar->GetControlFont();
[ # # ]
507 : : else
508 [ # # ]: 0 : aFont = m_pTabBar->GetFont();
509 [ # # ]: 0 : VCLXFont* pVCLXFont = new VCLXFont;
510 [ # # ][ # # ]: 0 : pVCLXFont->Init( *xDev.get(), aFont );
511 [ # # ][ # # ]: 0 : xFont = pVCLXFont;
512 : 0 : }
513 : : }
514 : :
515 [ # # ]: 0 : return xFont;
516 : : }
517 : :
518 : : // -----------------------------------------------------------------------------
519 : :
520 : 0 : ::rtl::OUString AccessibleTabBar::getTitledBorderText( ) throw (RuntimeException)
521 : : {
522 [ # # ]: 0 : OExternalLockGuard aGuard( this );
523 : :
524 : 0 : ::rtl::OUString sText;
525 [ # # ]: 0 : if ( m_pTabBar )
526 [ # # ][ # # ]: 0 : sText = m_pTabBar->GetText();
[ # # ]
527 : :
528 [ # # ]: 0 : return sText;
529 : : }
530 : :
531 : : // -----------------------------------------------------------------------------
532 : :
533 : 0 : ::rtl::OUString AccessibleTabBar::getToolTipText( ) throw (RuntimeException)
534 : : {
535 [ # # ]: 0 : OExternalLockGuard aGuard( this );
536 : :
537 : 0 : ::rtl::OUString sText;
538 [ # # ]: 0 : if ( m_pTabBar )
539 [ # # ][ # # ]: 0 : sText = m_pTabBar->GetQuickHelpText();
540 : :
541 [ # # ]: 0 : return sText;
542 : : }
543 : :
544 : : // -----------------------------------------------------------------------------
545 : :
546 : : //.........................................................................
547 : : } // namespace accessibility
548 : : //.........................................................................
549 : :
550 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|