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 : :
30 : : #define _SVX_CHARMAP_CXX_
31 : : #include <unotools/accessiblestatesethelper.hxx>
32 : : #include <vcl/svapp.hxx>
33 : : #include <stdio.h>
34 : : #include <svx/charmap.hxx>
35 : : #include "charmapacc.hxx"
36 : : #include <com/sun/star/accessibility/AccessibleRole.hpp>
37 : : #include <com/sun/star/accessibility/AccessibleStateType.hpp>
38 : : #include <toolkit/helper/externallock.hxx>
39 : : #include <toolkit/helper/convert.hxx>
40 : : #include <osl/interlck.h>
41 : : #include <svx/dialmgr.hxx>
42 : : #include "accessibility.hrc"
43 : : #include <comphelper/types.hxx>
44 : :
45 : : namespace svx
46 : : {
47 : : using namespace comphelper;
48 : : using namespace ::com::sun::star;
49 : : using namespace ::com::sun::star::uno;
50 : : using namespace ::com::sun::star::lang;
51 : : using namespace ::com::sun::star::accessibility;
52 : :
53 : : // ----------------
54 : : // - SvxShowCharSetVirtualAcc -
55 : : // ----------------
56 : 0 : SvxShowCharSetVirtualAcc::SvxShowCharSetVirtualAcc( SvxShowCharSet* pParent ) : OAccessibleComponentHelper(new VCLExternalSolarLock())
57 : : ,mpParent( pParent )
58 [ # # ]: 0 : ,m_pTable(NULL)
59 : : {
60 [ # # ]: 0 : osl_incrementInterlockedCount(&m_refCount);
61 : : {
62 [ # # ][ # # ]: 0 : lateInit(this);
63 : : }
64 [ # # ]: 0 : osl_decrementInterlockedCount(&m_refCount);
65 : 0 : }
66 : :
67 : : // -----------------------------------------------------------------------------
68 : :
69 : 0 : SvxShowCharSetVirtualAcc::~SvxShowCharSetVirtualAcc()
70 : : {
71 [ # # ]: 0 : ensureDisposed();
72 [ # # ][ # # ]: 0 : delete getExternalLock();
[ # # ]
73 [ # # ]: 0 : }
74 : : // -----------------------------------------------------------------------------
75 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XINTERFACE2( SvxShowCharSetVirtualAcc, OAccessibleComponentHelper, OAccessibleHelper_Base_2 )
76 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvxShowCharSetVirtualAcc, OAccessibleComponentHelper, OAccessibleHelper_Base_2 )
[ # # ]
77 : :
78 : 0 : void SAL_CALL SvxShowCharSetVirtualAcc::fireEvent(
79 : : const sal_Int16 _nEventId,
80 : : const ::com::sun::star::uno::Any& _rOldValue,
81 : : const ::com::sun::star::uno::Any& _rNewValue
82 : : )
83 : : {
84 [ # # ]: 0 : if ( m_pTable )
85 : 0 : m_pTable->fireEvent(_nEventId,_rOldValue,_rNewValue);
86 : 0 : }
87 : : // -----------------------------------------------------------------------------
88 : 0 : sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChildCount( ) throw (RuntimeException)
89 : : {
90 [ # # ]: 0 : OExternalLockGuard aGuard( this );
91 [ # # ]: 0 : ensureAlive();
92 [ # # ][ # # ]: 0 : return ( mpParent->getScrollBar()->IsVisible() ) ? 2 : 1;
[ # # ][ # # ]
93 : : }
94 : : // -----------------------------------------------------------------------------
95 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleAtPoint( const awt::Point& aPoint )
96 : : throw (uno::RuntimeException)
97 : : {
98 [ # # ]: 0 : OExternalLockGuard aGuard( this );
99 [ # # ]: 0 : ensureAlive();
100 : :
101 : 0 : uno::Reference< accessibility::XAccessible > xRet;
102 [ # # ]: 0 : const sal_uInt16 nItemId = sal::static_int_cast<sal_uInt16>(mpParent->PixelToMapIndex( Point( aPoint.X, aPoint.Y ) ));
103 : :
104 [ # # ]: 0 : if( sal_uInt16(-1) != nItemId )
105 : : {
106 [ # # ]: 0 : if ( !m_pTable )
107 [ # # ]: 0 : m_pTable = new SvxShowCharSetAcc(this);
108 [ # # ][ # # ]: 0 : xRet = m_pTable;
109 : : }
110 [ # # ][ # # ]: 0 : else if ( mpParent->getScrollBar()->IsVisible() )
[ # # ]
111 : : {
112 [ # # ][ # # ]: 0 : const Point aOutPos( mpParent->getScrollBar()->GetPosPixel() );
113 [ # # ]: 0 : const Size aScrollBar = mpParent->getScrollBar()->GetOutputSizePixel();
114 [ # # ]: 0 : Rectangle aRect(aOutPos,aScrollBar);
115 : :
116 [ # # ][ # # ]: 0 : if ( aRect.IsInside(VCLPoint(aPoint)) )
117 [ # # ][ # # ]: 0 : xRet = mpParent->getScrollBar()->GetAccessible();
[ # # ]
118 : : }
119 [ # # ]: 0 : return xRet;
120 : : }
121 : : // -----------------------------------------------------------------------------
122 : 0 : uno::Any SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleKeyBinding()
123 : : throw (uno::RuntimeException)
124 : : {
125 : 0 : return uno::Any();
126 : : }
127 : : // -----------------------------------------------------------------------------
128 : 0 : void SAL_CALL SvxShowCharSetVirtualAcc::grabFocus()
129 : : throw (uno::RuntimeException)
130 : : {
131 [ # # ]: 0 : OExternalLockGuard aGuard( this );
132 [ # # ]: 0 : ensureAlive();
133 [ # # ][ # # ]: 0 : mpParent->GrabFocus();
134 : 0 : }
135 : :
136 : :
137 : : // -----------------------------------------------------------------------------
138 : 0 : Reference< XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException)
139 : : {
140 [ # # ]: 0 : OExternalLockGuard aGuard( this );
141 [ # # ]: 0 : ensureAlive();
142 [ # # ][ # # ]: 0 : if ( mpParent->getScrollBar()->IsVisible() && i == 0 )
[ # # ][ # # ]
[ # # ]
143 [ # # ][ # # ]: 0 : return mpParent->getScrollBar()->GetAccessible();
144 [ # # ]: 0 : else if ( i == 1 )
145 : : {
146 [ # # ]: 0 : if ( !m_xAcc.is() )
147 : : {
148 [ # # ]: 0 : m_pTable = new SvxShowCharSetAcc(this);
149 [ # # ][ # # ]: 0 : m_xAcc = m_pTable;
150 : : }
151 : : }
152 : : else
153 [ # # ]: 0 : throw IndexOutOfBoundsException();
154 [ # # ]: 0 : return m_xAcc;
155 : : }
156 : : // -----------------------------------------------------------------------------
157 : 0 : Reference< XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleParent( ) throw (RuntimeException)
158 : : {
159 [ # # ]: 0 : OExternalLockGuard aGuard( this );
160 [ # # ]: 0 : ensureAlive();
161 [ # # ]: 0 : Window* pParent = mpParent->GetParent();
162 : 0 : uno::Reference< accessibility::XAccessible > xRet;
163 : :
164 [ # # ]: 0 : if ( pParent )
165 [ # # ][ # # ]: 0 : xRet = pParent->GetAccessible();
166 : :
167 [ # # ]: 0 : return xRet;
168 : : }
169 : : // -----------------------------------------------------------------------------
170 : 0 : ::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetVirtualAcc::implGetBounds( ) throw (RuntimeException)
171 : : {
172 [ # # ]: 0 : const Point aOutPos( mpParent->GetPosPixel() );
173 : 0 : Size aOutSize( mpParent->GetOutputSizePixel() );
174 [ # # ][ # # ]: 0 : if ( mpParent->getScrollBar()->IsVisible() )
[ # # ]
175 : : {
176 [ # # ]: 0 : const Size aScrollBar = mpParent->getScrollBar()->GetOutputSizePixel();
177 : 0 : aOutSize.Width() -= aScrollBar.Width();
178 : 0 : aOutSize.Height() -= aScrollBar.Height();
179 : : }
180 : :
181 : 0 : awt::Rectangle aRet;
182 : :
183 : 0 : aRet.X = aOutPos.X();
184 : 0 : aRet.Y = aOutPos.Y();
185 : 0 : aRet.Width = aOutSize.Width();
186 : 0 : aRet.Height = aOutSize.Height();
187 : :
188 : 0 : return aRet;
189 : : }
190 : : // -----------------------------------------------------------------------------
191 : 0 : sal_Int16 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRole( ) throw (RuntimeException)
192 : : {
193 : 0 : return accessibility::AccessibleRole::SCROLL_PANE;
194 : : }
195 : : // -----------------------------------------------------------------------------
196 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleDescription( ) throw (RuntimeException)
197 : : {
198 [ # # ]: 0 : OExternalLockGuard aGuard( this );
199 [ # # ][ # # ]: 0 : return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION);
[ # # ]
200 : : }
201 : : // -----------------------------------------------------------------------------
202 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleName( ) throw (RuntimeException)
203 : : {
204 [ # # ]: 0 : OExternalLockGuard aGuard( this );
205 [ # # ][ # # ]: 0 : return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC);
[ # # ]
206 : : }
207 : : // -----------------------------------------------------------------------------
208 : 0 : Reference< XAccessibleRelationSet > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRelationSet( ) throw (RuntimeException)
209 : : {
210 : 0 : return Reference< XAccessibleRelationSet >();
211 : : }
212 : : // -----------------------------------------------------------------------------
213 : 0 : Reference< XAccessibleStateSet > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleStateSet( ) throw (RuntimeException)
214 : : {
215 [ # # ]: 0 : OExternalLockGuard aGuard( this );
216 : :
217 [ # # ]: 0 : ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper;
218 : :
219 [ # # ]: 0 : if( mpParent )
220 : : {
221 : : // SELECTABLE
222 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::FOCUSABLE );
223 [ # # ][ # # ]: 0 : if ( mpParent->HasFocus() )
224 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::FOCUSED );
225 [ # # ][ # # ]: 0 : if ( mpParent->IsActive() )
226 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::ACTIVE );
227 [ # # ][ # # ]: 0 : if ( mpParent->IsEnabled() )
228 : : {
229 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::ENABLED );
230 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::SENSITIVE );
231 : : }
232 [ # # ][ # # ]: 0 : if ( mpParent->IsReallyVisible() )
233 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::VISIBLE );
234 : : }
235 : :
236 [ # # ][ # # ]: 0 : return pStateSet;
[ # # ]
237 : : }
238 : : // -----------------------------------------------------------------------------
239 : 0 : void SAL_CALL SvxShowCharSetVirtualAcc::disposing()
240 : : {
241 : 0 : OAccessibleContextHelper::disposing();
242 [ # # ]: 0 : if ( m_pTable )
243 : 0 : m_pTable->dispose();
244 : 0 : m_pTable = NULL;
245 : 0 : }
246 : : // -----------------------------------------------------------------------------
247 : : // ----------------
248 : : // - SvxShowCharSetItem -
249 : : // ----------------
250 : :
251 : 0 : SvxShowCharSetItem::SvxShowCharSetItem( SvxShowCharSet& rParent,SvxShowCharSetAcc* _pParent,sal_uInt16 _nPos ) :
252 : : mrParent( rParent )
253 : : ,mnId( _nPos )
254 : : ,m_pItem(NULL)
255 [ # # ]: 0 : ,m_pParent(_pParent)
256 : : {
257 : 0 : }
258 : : // -----------------------------------------------------------------------
259 : :
260 : 0 : SvxShowCharSetItem::~SvxShowCharSetItem()
261 : : {
262 [ # # ]: 0 : if ( m_xAcc.is() )
263 : : {
264 [ # # ]: 0 : m_pItem->ParentDestroyed();
265 [ # # ]: 0 : ClearAccessible();
266 : : }
267 : 0 : }
268 : :
269 : : // -----------------------------------------------------------------------
270 : :
271 : 0 : uno::Reference< accessibility::XAccessible > SvxShowCharSetItem::GetAccessible()
272 : : {
273 [ # # ]: 0 : if( !m_xAcc.is() )
274 : : {
275 [ # # ]: 0 : m_pItem = new SvxShowCharSetItemAcc( this );
276 [ # # ]: 0 : m_xAcc = m_pItem;
277 : : }
278 : :
279 : 0 : return m_xAcc;
280 : : }
281 : :
282 : : // -----------------------------------------------------------------------
283 : :
284 : 0 : void SvxShowCharSetItem::ClearAccessible()
285 : : {
286 [ # # ]: 0 : if ( m_xAcc.is() )
287 : : {
288 : 0 : m_pItem = NULL;
289 : 0 : m_xAcc = NULL;
290 : : }
291 : 0 : }
292 : :
293 : :
294 : : // ---------------
295 : : // - SvxShowCharSetAcc -
296 : : // ---------------
297 : :
298 : 0 : SvxShowCharSetAcc::SvxShowCharSetAcc( SvxShowCharSetVirtualAcc* _pParent ) : OAccessibleSelectionHelper(new VCLExternalSolarLock())
299 [ # # ][ # # ]: 0 : ,m_pParent( _pParent )
300 : : {
301 [ # # ]: 0 : osl_incrementInterlockedCount(&m_refCount);
302 : : {
303 [ # # ][ # # ]: 0 : lateInit(this);
304 : : }
305 [ # # ]: 0 : osl_decrementInterlockedCount(&m_refCount);
306 : 0 : }
307 : :
308 : : // -----------------------------------------------------------------------------
309 : :
310 : 0 : SvxShowCharSetAcc::~SvxShowCharSetAcc()
311 : : {
312 [ # # ]: 0 : ensureDisposed();
313 [ # # ][ # # ]: 0 : delete getExternalLock();
[ # # ]
314 [ # # ]: 0 : }
315 : : // -----------------------------------------------------------------------------
316 : 0 : void SAL_CALL SvxShowCharSetAcc::disposing()
317 : : {
318 [ # # ]: 0 : OAccessibleSelectionHelper::disposing();
319 : 0 : ::std::vector< Reference< XAccessible > >::iterator aIter = m_aChildren.begin();
320 : 0 : ::std::vector< Reference< XAccessible > >::iterator aEnd = m_aChildren.end();
321 [ # # ][ # # ]: 0 : for (;aIter != aEnd ; ++aIter)
322 [ # # ]: 0 : ::comphelper::disposeComponent(*aIter);
323 : :
324 : 0 : m_aChildren.clear();
325 : 0 : m_pParent = NULL;
326 : 0 : }
327 : :
328 : : // -----------------------------------------------------------------------------
329 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XINTERFACE2( SvxShowCharSetAcc, OAccessibleSelectionHelper, OAccessibleHelper_Base )
330 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvxShowCharSetAcc, OAccessibleSelectionHelper, OAccessibleHelper_Base )
[ # # ]
331 : : // -----------------------------------------------------------------------
332 : 0 : sal_Bool SvxShowCharSetAcc::implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (RuntimeException)
333 : : {
334 : : return m_pParent && m_pParent->getCharSetControl()->IsSelected(
335 [ # # ][ # # ]: 0 : sal::static_int_cast<sal_uInt16>(nAccessibleChildIndex));
336 : : }
337 : : // -----------------------------------------------------------------------------
338 : : // select the specified child => watch for special ChildIndexes (ACCESSIBLE_SELECTION_CHILD_xxx)
339 : 0 : void SvxShowCharSetAcc::implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bSelect ) throw (IndexOutOfBoundsException, RuntimeException)
340 : : {
341 [ # # ]: 0 : if ( m_pParent )
342 : : {
343 [ # # ]: 0 : if ( bSelect )
344 : 0 : m_pParent->getCharSetControl()->SelectIndex(nAccessibleChildIndex,sal_True);
345 : : else
346 : 0 : m_pParent->getCharSetControl()->DeSelect();
347 : : }
348 : 0 : }
349 : : // -----------------------------------------------------------------------------
350 : 0 : ::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetAcc::implGetBounds( ) throw (RuntimeException)
351 : : {
352 [ # # ]: 0 : const Point aOutPos( m_pParent->getCharSetControl()->GetPosPixel() );
353 : 0 : Size aOutSize( m_pParent->getCharSetControl()->GetOutputSizePixel());
354 [ # # ][ # # ]: 0 : if ( m_pParent->getCharSetControl()->getScrollBar()->IsVisible() )
[ # # ]
355 : : {
356 [ # # ]: 0 : const Size aScrollBar = m_pParent->getCharSetControl()->getScrollBar()->GetOutputSizePixel();
357 : 0 : aOutSize.Width() -= aScrollBar.Width();
358 : 0 : aOutSize.Height() -= aScrollBar.Height();
359 : : }
360 : :
361 : 0 : awt::Rectangle aRet;
362 : :
363 : 0 : aRet.X = aOutPos.X();
364 : 0 : aRet.Y = aOutPos.Y();
365 : 0 : aRet.Width = aOutSize.Width();
366 : 0 : aRet.Height = aOutSize.Height();
367 : :
368 : 0 : return aRet;
369 : : }
370 : : // -----------------------------------------------------------------------------
371 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleChildCount()
372 : : throw (uno::RuntimeException)
373 : : {
374 [ # # ]: 0 : OExternalLockGuard aGuard( this );
375 [ # # ]: 0 : ensureAlive();
376 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->getMaxCharCount();
377 : : }
378 : :
379 : : // -----------------------------------------------------------------------------
380 : :
381 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleChild( sal_Int32 i )
382 : : throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
383 : : {
384 [ # # ]: 0 : OExternalLockGuard aGuard( this );
385 [ # # ]: 0 : ensureAlive();
386 : 0 : uno::Reference< accessibility::XAccessible > xRet;
387 [ # # ]: 0 : SvxShowCharSetItem* pItem = m_pParent->getCharSetControl()->ImplGetItem( static_cast< sal_uInt16 >( i ) );
388 : :
389 [ # # ]: 0 : if( pItem )
390 : : {
391 : 0 : pItem->m_pParent = this;
392 [ # # ][ # # ]: 0 : xRet = pItem->GetAccessible();
393 [ # # ]: 0 : m_aChildren.push_back(xRet);
394 : : }
395 : : else
396 [ # # ]: 0 : throw lang::IndexOutOfBoundsException();
397 : :
398 [ # # ]: 0 : return xRet;
399 : : }
400 : :
401 : : // -----------------------------------------------------------------------------
402 : :
403 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleParent()
404 : : throw (uno::RuntimeException)
405 : : {
406 [ # # ]: 0 : OExternalLockGuard aGuard( this );
407 [ # # ]: 0 : ensureAlive();
408 [ # # ][ # # ]: 0 : return m_pParent;
[ # # ]
409 : : }
410 : :
411 : : // -----------------------------------------------------------------------------
412 : :
413 : 0 : sal_Int16 SAL_CALL SvxShowCharSetAcc::getAccessibleRole()
414 : : throw (uno::RuntimeException)
415 : : {
416 : 0 : return accessibility::AccessibleRole::TABLE;
417 : : }
418 : :
419 : : // -----------------------------------------------------------------------------
420 : :
421 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetAcc::getAccessibleDescription()
422 : : throw (uno::RuntimeException)
423 : : {
424 [ # # ]: 0 : OExternalLockGuard aGuard( this );
425 [ # # ][ # # ]: 0 : return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION );
[ # # ]
426 : : }
427 : :
428 : : // -----------------------------------------------------------------------------
429 : :
430 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetAcc::getAccessibleName()
431 : : throw (uno::RuntimeException)
432 : : {
433 [ # # ]: 0 : OExternalLockGuard aGuard( this );
434 [ # # ]: 0 : ensureAlive();
435 [ # # ][ # # ]: 0 : return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC );
[ # # ]
436 : : }
437 : :
438 : : // -----------------------------------------------------------------------------
439 : :
440 : 0 : uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL SvxShowCharSetAcc::getAccessibleRelationSet()
441 : : throw (uno::RuntimeException)
442 : : {
443 : 0 : return uno::Reference< accessibility::XAccessibleRelationSet >();
444 : : }
445 : :
446 : : // -----------------------------------------------------------------------------
447 : :
448 : 0 : uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvxShowCharSetAcc::getAccessibleStateSet()
449 : : throw (uno::RuntimeException)
450 : : {
451 [ # # ]: 0 : OExternalLockGuard aGuard( this );
452 : :
453 [ # # ]: 0 : ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper;
454 : :
455 [ # # ]: 0 : if( m_pParent->getCharSetControl() )
456 : : {
457 : : // SELECTABLE
458 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::FOCUSABLE );
459 [ # # ][ # # ]: 0 : if ( m_pParent->getCharSetControl()->HasFocus() )
460 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::FOCUSED );
461 [ # # ][ # # ]: 0 : if ( m_pParent->getCharSetControl()->IsActive() )
462 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::ACTIVE );
463 [ # # ][ # # ]: 0 : if ( m_pParent->getCharSetControl()->IsEnabled() )
464 : : {
465 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::ENABLED );
466 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::SENSITIVE );
467 : : }
468 [ # # ][ # # ]: 0 : if ( m_pParent->getCharSetControl()->IsReallyVisible() )
469 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::VISIBLE );
470 : :
471 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::MANAGES_DESCENDANTS );
472 : : }
473 : :
474 [ # # ][ # # ]: 0 : return pStateSet;
[ # # ]
475 : : }
476 : : // -----------------------------------------------------------------------------
477 : :
478 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleAtPoint( const awt::Point& aPoint )
479 : : throw (uno::RuntimeException)
480 : : {
481 [ # # ]: 0 : OExternalLockGuard aGuard( this );
482 [ # # ]: 0 : ensureAlive();
483 : :
484 : 0 : uno::Reference< accessibility::XAccessible > xRet;
485 : : const sal_uInt16 nItemId = sal::static_int_cast<sal_uInt16>(
486 [ # # ]: 0 : m_pParent->getCharSetControl()->PixelToMapIndex( Point( aPoint.X, aPoint.Y ) ));
487 : :
488 [ # # ]: 0 : if( sal_uInt16(-1) != nItemId )
489 : : {
490 [ # # ]: 0 : SvxShowCharSetItem* pItem = m_pParent->getCharSetControl()->ImplGetItem( nItemId );
491 [ # # ][ # # ]: 0 : xRet = pItem->GetAccessible();
492 : : }
493 [ # # ]: 0 : return xRet;
494 : : }
495 : :
496 : : // -----------------------------------------------------------------------------
497 : : // -----------------------------------------------------------------------------
498 : :
499 : 0 : void SAL_CALL SvxShowCharSetAcc::grabFocus()
500 : : throw (uno::RuntimeException)
501 : : {
502 [ # # ]: 0 : OExternalLockGuard aGuard( this );
503 [ # # ]: 0 : ensureAlive();
504 [ # # ][ # # ]: 0 : m_pParent->getCharSetControl()->GrabFocus();
505 : 0 : }
506 : :
507 : : // -----------------------------------------------------------------------------
508 : :
509 : 0 : uno::Any SAL_CALL SvxShowCharSetAcc::getAccessibleKeyBinding()
510 : : throw (uno::RuntimeException)
511 : : {
512 : 0 : return uno::Any();
513 : : }
514 : : // -----------------------------------------------------------------------------
515 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleRowCount( ) throw (RuntimeException)
516 : : {
517 : 0 : return ((getAccessibleChildCount()-1) / COLUMN_COUNT) + 1;
518 : : }
519 : : // -----------------------------------------------------------------------------
520 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleColumnCount( ) throw (RuntimeException)
521 : : {
522 : 0 : return COLUMN_COUNT;
523 : : }
524 : : // -----------------------------------------------------------------------------
525 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetAcc::getAccessibleRowDescription( sal_Int32 /*nRow*/ ) throw (IndexOutOfBoundsException, RuntimeException)
526 : : {
527 : 0 : return ::rtl::OUString();
528 : : }
529 : : // -----------------------------------------------------------------------------
530 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetAcc::getAccessibleColumnDescription( sal_Int32 /*nColumn*/ ) throw (IndexOutOfBoundsException, RuntimeException)
531 : : {
532 : 0 : return ::rtl::OUString();
533 : : }
534 : : // -----------------------------------------------------------------------------
535 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleRowExtentAt( sal_Int32 /*nRow*/, sal_Int32 /*nColumn*/ ) throw (IndexOutOfBoundsException, RuntimeException)
536 : : {
537 : 0 : return 1;
538 : : }
539 : : // -----------------------------------------------------------------------------
540 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleColumnExtentAt( sal_Int32 /*nRow*/, sal_Int32 /*nColumn*/ ) throw (IndexOutOfBoundsException, RuntimeException)
541 : : {
542 : 0 : return 1;
543 : : }
544 : : // -----------------------------------------------------------------------------
545 : 0 : Reference< XAccessibleTable > SAL_CALL SvxShowCharSetAcc::getAccessibleRowHeaders( ) throw (RuntimeException)
546 : : {
547 : 0 : return Reference< XAccessibleTable >();
548 : : }
549 : : // -----------------------------------------------------------------------------
550 : 0 : Reference< XAccessibleTable > SAL_CALL SvxShowCharSetAcc::getAccessibleColumnHeaders( ) throw (RuntimeException)
551 : : {
552 : 0 : return Reference< XAccessibleTable >();
553 : : }
554 : : // -----------------------------------------------------------------------------
555 : 0 : Sequence< sal_Int32 > SAL_CALL SvxShowCharSetAcc::getSelectedAccessibleRows( ) throw (RuntimeException)
556 : : {
557 [ # # ]: 0 : OExternalLockGuard aGuard( this );
558 [ # # ]: 0 : ensureAlive();
559 [ # # ]: 0 : Sequence< sal_Int32 > aSel(1);
560 [ # # ][ # # ]: 0 : aSel[0] = m_pParent->getCharSetControl()->GetRowPos(m_pParent->getCharSetControl()->GetSelectIndexId());
[ # # ]
561 [ # # ]: 0 : return aSel;
562 : : }
563 : : // -----------------------------------------------------------------------------
564 : 0 : Sequence< sal_Int32 > SAL_CALL SvxShowCharSetAcc::getSelectedAccessibleColumns( ) throw (RuntimeException)
565 : : {
566 [ # # ]: 0 : OExternalLockGuard aGuard( this );
567 [ # # ]: 0 : ensureAlive();
568 [ # # ]: 0 : Sequence< sal_Int32 > aSel(1);
569 [ # # ][ # # ]: 0 : aSel[0] = m_pParent->getCharSetControl()->GetColumnPos(m_pParent->getCharSetControl()->GetSelectIndexId());
[ # # ]
570 [ # # ]: 0 : return aSel;
571 : : }
572 : : // -----------------------------------------------------------------------------
573 : 0 : sal_Bool SAL_CALL SvxShowCharSetAcc::isAccessibleRowSelected( sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException)
574 : : {
575 [ # # ]: 0 : OExternalLockGuard aGuard( this );
576 [ # # ]: 0 : ensureAlive();
577 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->GetRowPos(m_pParent->getCharSetControl()->GetSelectIndexId()) == nRow;
[ # # ]
578 : : }
579 : : // -----------------------------------------------------------------------------
580 : 0 : sal_Bool SAL_CALL SvxShowCharSetAcc::isAccessibleColumnSelected( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
581 : : {
582 [ # # ]: 0 : OExternalLockGuard aGuard( this );
583 [ # # ]: 0 : ensureAlive();
584 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->GetColumnPos(m_pParent->getCharSetControl()->GetSelectIndexId()) == nColumn;
[ # # ]
585 : : }
586 : : // -----------------------------------------------------------------------------
587 : 0 : Reference< XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
588 : : {
589 [ # # ]: 0 : OExternalLockGuard aGuard( this );
590 [ # # ]: 0 : ensureAlive();
591 : : ::svx::SvxShowCharSetItem* pItem = m_pParent->getCharSetControl()->ImplGetItem(
592 [ # # ][ # # ]: 0 : sal::static_int_cast<sal_uInt16>(getAccessibleIndex(nRow,nColumn) ));
593 [ # # ]: 0 : if ( !pItem )
594 [ # # ]: 0 : throw IndexOutOfBoundsException();
595 [ # # ][ # # ]: 0 : return pItem->GetAccessible();
596 : : }
597 : : // -----------------------------------------------------------------------------
598 : 0 : Reference< XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleCaption( ) throw (RuntimeException)
599 : : {
600 : 0 : return Reference< XAccessible >();
601 : : }
602 : : // -----------------------------------------------------------------------------
603 : 0 : Reference< XAccessible > SAL_CALL SvxShowCharSetAcc::getAccessibleSummary( ) throw (RuntimeException)
604 : : {
605 : 0 : return Reference< XAccessible >();
606 : : }
607 : : // -----------------------------------------------------------------------------
608 : 0 : sal_Bool SAL_CALL SvxShowCharSetAcc::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
609 : : {
610 [ # # ]: 0 : OExternalLockGuard aGuard( this );
611 [ # # ]: 0 : ensureAlive();
612 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->GetSelectIndexId() == getAccessibleIndex(nRow,nColumn);
[ # # ]
613 : : }
614 : : // -----------------------------------------------------------------------------
615 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
616 : : {
617 : 0 : return (nRow*COLUMN_COUNT) + nColumn;
618 : : }
619 : : // -----------------------------------------------------------------------------
620 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleRow( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
621 : : {
622 [ # # ]: 0 : OExternalLockGuard aGuard( this );
623 [ # # ]: 0 : ensureAlive();
624 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->GetRowPos(sal::static_int_cast<sal_uInt16>(nChildIndex));
625 : : }
626 : : // -----------------------------------------------------------------------------
627 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getAccessibleColumn( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
628 : : {
629 [ # # ]: 0 : OExternalLockGuard aGuard( this );
630 [ # # ]: 0 : ensureAlive();
631 [ # # ][ # # ]: 0 : return m_pParent->getCharSetControl()->GetColumnPos(sal::static_int_cast<sal_uInt16>(nChildIndex));
632 : : }
633 : : // -----------------------------------------------------------------------------
634 : :
635 : : // -----------------------------------------------------------------------------
636 : : // ----------------
637 : : // - SvxShowCharSetItemAcc -
638 : : // ----------------
639 : :
640 : 0 : SvxShowCharSetItemAcc::SvxShowCharSetItemAcc( SvxShowCharSetItem* pParent ) : OAccessibleComponentHelper(new VCLExternalSolarLock())
641 [ # # ]: 0 : ,mpParent( pParent )
642 : : {
643 : : OSL_ENSURE(pParent,"NO parent supplied!");
644 [ # # ]: 0 : osl_incrementInterlockedCount(&m_refCount);
645 : : { // #b6211265 #
646 [ # # ][ # # ]: 0 : lateInit(this);
647 : : }
648 [ # # ]: 0 : osl_decrementInterlockedCount(&m_refCount);
649 : 0 : }
650 : :
651 : : // -----------------------------------------------------------------------------
652 : :
653 : 0 : SvxShowCharSetItemAcc::~SvxShowCharSetItemAcc()
654 : : {
655 [ # # ]: 0 : ensureDisposed();
656 [ # # ][ # # ]: 0 : delete getExternalLock();
[ # # ]
657 [ # # ]: 0 : }
658 : : // -----------------------------------------------------------------------------
659 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XINTERFACE2( SvxShowCharSetItemAcc, OAccessibleComponentHelper, OAccessibleHelper_Base_2 )
660 [ # # ][ # # ]: 0 : IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvxShowCharSetItemAcc, OAccessibleComponentHelper, OAccessibleHelper_Base_2 )
[ # # ]
661 : : // -----------------------------------------------------------------------------
662 : :
663 : 0 : void SvxShowCharSetItemAcc::ParentDestroyed()
664 : : {
665 [ # # ]: 0 : const ::osl::MutexGuard aGuard( GetMutex() );
666 [ # # ]: 0 : mpParent = NULL;
667 : 0 : }
668 : :
669 : : // -----------------------------------------------------------------------------
670 : :
671 : 0 : sal_Int32 SAL_CALL SvxShowCharSetItemAcc::getAccessibleChildCount()
672 : : throw (uno::RuntimeException)
673 : : {
674 : 0 : return 0;
675 : : }
676 : :
677 : : // -----------------------------------------------------------------------------
678 : :
679 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetItemAcc::getAccessibleChild( sal_Int32 /*i*/ )
680 : : throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
681 : : {
682 [ # # ]: 0 : throw lang::IndexOutOfBoundsException();
683 : : }
684 : :
685 : : // -----------------------------------------------------------------------------
686 : :
687 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetItemAcc::getAccessibleParent()
688 : : throw (uno::RuntimeException)
689 : : {
690 [ # # ]: 0 : OExternalLockGuard aGuard( this );
691 [ # # ]: 0 : ensureAlive();
692 [ # # ][ # # ]: 0 : return mpParent->m_pParent;
[ # # ]
693 : : }
694 : :
695 : : // -----------------------------------------------------------------------------
696 : :
697 : 0 : sal_Int16 SAL_CALL SvxShowCharSetItemAcc::getAccessibleRole()
698 : : throw (uno::RuntimeException)
699 : : {
700 : 0 : return accessibility::AccessibleRole::LABEL;
701 : : }
702 : :
703 : : // -----------------------------------------------------------------------------
704 : :
705 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
706 : : throw (uno::RuntimeException)
707 : : {
708 [ # # ]: 0 : OExternalLockGuard aGuard( this );
709 [ # # ]: 0 : ensureAlive();
710 [ # # ][ # # ]: 0 : String sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE );
[ # # ]
711 : :
712 : 0 : sal_Unicode c = mpParent->maText.GetChar(0);
713 : 0 : char buf[16] = "0x0000";
714 : 0 : sal_Unicode c_Shifted = c;
715 [ # # ]: 0 : for( int i = 0; i < 4; ++i )
716 : : {
717 : 0 : char h = (char)(c_Shifted & 0x0F);
718 [ # # ]: 0 : buf[5-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
719 : 0 : c_Shifted >>= 4;
720 : : }
721 [ # # ]: 0 : if( c < 256 )
722 : 0 : snprintf( buf+6, 10, " (%d)", c );
723 [ # # ]: 0 : sDescription.AppendAscii(buf);
724 : :
725 [ # # ][ # # ]: 0 : return sDescription;
[ # # ]
726 : : }
727 : :
728 : : // -----------------------------------------------------------------------------
729 : :
730 : 0 : ::rtl::OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleName()
731 : : throw (uno::RuntimeException)
732 : : {
733 [ # # ]: 0 : OExternalLockGuard aGuard( this );
734 [ # # ]: 0 : ensureAlive();
735 [ # # ]: 0 : String aRet;
736 : :
737 [ # # ]: 0 : if( mpParent )
738 : : {
739 [ # # ]: 0 : aRet = mpParent->maText;
740 : :
741 [ # # ]: 0 : if( !aRet.Len() )
742 [ # # ][ # # ]: 0 : aRet = getAccessibleDescription();
743 : : }
744 : :
745 [ # # ][ # # ]: 0 : return aRet;
[ # # ]
746 : : }
747 : :
748 : : // -----------------------------------------------------------------------------
749 : :
750 : 0 : uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL SvxShowCharSetItemAcc::getAccessibleRelationSet()
751 : : throw (uno::RuntimeException)
752 : : {
753 : 0 : return uno::Reference< accessibility::XAccessibleRelationSet >();
754 : : }
755 : :
756 : : // -----------------------------------------------------------------------------
757 : :
758 : 0 : uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvxShowCharSetItemAcc::getAccessibleStateSet()
759 : : throw (uno::RuntimeException)
760 : : {
761 [ # # ]: 0 : OExternalLockGuard aGuard( this );
762 [ # # ]: 0 : ensureAlive();
763 : :
764 [ # # ]: 0 : ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper;
765 : :
766 [ # # ]: 0 : if( mpParent )
767 : : {
768 : : // SELECTABLE
769 [ # # ]: 0 : pStateSet->AddState( accessibility::AccessibleStateType::SELECTABLE );
770 [ # # ]: 0 : pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE );
771 : :
772 : : // SELECTED
773 [ # # ][ # # ]: 0 : if( mpParent->mrParent.GetSelectIndexId() == mpParent->mnId )
774 : : {
775 [ # # ]: 0 : pStateSet->AddState( accessibility::AccessibleStateType::SELECTED );
776 [ # # ]: 0 : pStateSet->AddState( accessibility::AccessibleStateType::FOCUSED );
777 : : }
778 [ # # ][ # # ]: 0 : if ( mpParent->mnId >= mpParent->mrParent.FirstInView() && mpParent->mnId <= mpParent->mrParent.LastInView() )
[ # # ][ # # ]
[ # # ]
779 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::VISIBLE );
780 [ # # ]: 0 : pStateSet->AddState( AccessibleStateType::TRANSIENT );
781 : : }
782 : :
783 [ # # ][ # # ]: 0 : return pStateSet;
[ # # ]
784 : : }
785 : :
786 : : // -----------------------------------------------------------------------------
787 : 0 : void SAL_CALL SvxShowCharSetItemAcc::grabFocus()
788 : : throw (uno::RuntimeException)
789 : : {
790 : : // nothing to do
791 : 0 : }
792 : :
793 : : // -----------------------------------------------------------------------------
794 : :
795 : 0 : uno::Any SAL_CALL SvxShowCharSetItemAcc::getAccessibleKeyBinding()
796 : : throw (uno::RuntimeException)
797 : : {
798 : 0 : return uno::Any();
799 : : }
800 : : // -----------------------------------------------------------------------------
801 : 0 : awt::Rectangle SAL_CALL SvxShowCharSetItemAcc::implGetBounds( ) throw (RuntimeException)
802 : : {
803 : 0 : awt::Rectangle aRet;
804 : :
805 [ # # ]: 0 : if( mpParent )
806 : : {
807 : 0 : Rectangle aRect( mpParent->maRect );
808 : 0 : Point aOrigin;
809 [ # # ]: 0 : Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
810 : :
811 [ # # ]: 0 : aRect.Intersection( aParentRect );
812 : :
813 : 0 : aRet.X = aRect.Left();
814 : 0 : aRet.Y = aRect.Top();
815 [ # # ]: 0 : aRet.Width = aRect.GetWidth();
816 [ # # ]: 0 : aRet.Height = aRect.GetHeight();
817 : : }
818 : :
819 : 0 : return aRet;
820 : : }
821 : : // -----------------------------------------------------------------------------
822 : 0 : uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetItemAcc::getAccessibleAtPoint( const awt::Point& /*aPoint*/ )
823 : : throw (uno::RuntimeException)
824 : : {
825 : 0 : return uno::Reference< accessibility::XAccessible >();
826 : : }
827 : : // -----------------------------------------------------------------------------
828 : 0 : sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getForeground( ) throw (RuntimeException)
829 : : {
830 [ # # ]: 0 : OExternalLockGuard aGuard( this );
831 : :
832 : 0 : sal_Int32 nColor = 0;
833 [ # # ]: 0 : if ( mpParent )
834 : : {
835 [ # # ][ # # ]: 0 : if ( mpParent->IsControlForeground() )
836 [ # # ]: 0 : nColor = mpParent->GetControlForeground().GetColor();
837 : : else
838 : : {
839 [ # # ]: 0 : Font aFont;
840 [ # # ][ # # ]: 0 : if ( mpParent->IsControlFont() )
841 [ # # ][ # # ]: 0 : aFont = mpParent->GetControlFont();
[ # # ]
842 : : else
843 [ # # ]: 0 : aFont = mpParent->GetFont();
844 [ # # ][ # # ]: 0 : nColor = aFont.GetColor().GetColor();
845 : : }
846 : : }
847 : :
848 [ # # ]: 0 : return nColor;
849 : : }
850 : : // -----------------------------------------------------------------------------
851 : 0 : sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getBackground( ) throw (RuntimeException)
852 : : {
853 [ # # ]: 0 : OExternalLockGuard aGuard( this );
854 : 0 : sal_Int32 nColor = 0;
855 [ # # ]: 0 : if ( mpParent )
856 : : {
857 [ # # ][ # # ]: 0 : if ( mpParent->IsControlBackground() )
858 [ # # ]: 0 : nColor = mpParent->GetControlBackground().GetColor();
859 : : else
860 [ # # ]: 0 : nColor = mpParent->GetBackground().GetColor().GetColor();
861 : : }
862 : :
863 [ # # ]: 0 : return nColor;
864 : : }
865 : : // -----------------------------------------------------------------------------
866 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getForeground( ) throw (RuntimeException)
867 : : {
868 [ # # ]: 0 : OExternalLockGuard aGuard( this );
869 : :
870 : 0 : sal_Int32 nColor = 0;
871 [ # # ]: 0 : if ( m_pParent )
872 [ # # ]: 0 : nColor = m_pParent->getForeground();
873 [ # # ]: 0 : return nColor;
874 : : }
875 : : // -----------------------------------------------------------------------------
876 : 0 : sal_Int32 SAL_CALL SvxShowCharSetAcc::getBackground( ) throw (RuntimeException)
877 : : {
878 [ # # ]: 0 : OExternalLockGuard aGuard( this );
879 : 0 : sal_Int32 nColor = 0;
880 [ # # ]: 0 : if ( m_pParent )
881 [ # # ]: 0 : nColor = m_pParent->getBackground();
882 [ # # ]: 0 : return nColor;
883 : : }
884 : : // -----------------------------------------------------------------------------
885 : :
886 : : // -----------------------------------------------------------------------------
887 : : } // namespace svx
888 : : // -----------------------------------------------------------------------------
889 : :
890 : :
891 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|