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 : : #include <svtools/ivctrl.hxx>
31 : : #include "imivctl.hxx"
32 : : #include <vcl/bitmapex.hxx>
33 : : #include <vcl/controllayout.hxx>
34 : : #include <vcl/mnemonic.hxx>
35 : : using namespace ::com::sun::star::accessibility;
36 : :
37 : : /*****************************************************************************
38 : : |
39 : : | class : SvxIconChoiceCtrlEntry
40 : : |
41 : : \*****************************************************************************/
42 : :
43 [ # # ][ # # ]: 0 : SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 _nFlags )
[ # # ][ # # ]
44 : : {
45 [ # # ]: 0 : aText = rText;
46 [ # # ]: 0 : aImage = rImage;
47 : 0 : pUserData = NULL;
48 : :
49 : 0 : nFlags = _nFlags;
50 : 0 : eTextMode = IcnShowTextShort;
51 : 0 : pblink = 0;
52 : 0 : pflink = 0;
53 : 0 : }
54 : :
55 : 0 : String SvxIconChoiceCtrlEntry::GetDisplayText() const
56 : : {
57 : 0 : return MnemonicGenerator::EraseAllMnemonicChars( aText );
58 : : }
59 : :
60 : : // ----------------------------------------------------------------------------
61 : :
62 : 0 : SvxIconChoiceCtrlColumnInfo::SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& rInfo )
63 [ # # ]: 0 : : aColText( rInfo.aColText ), aColImage( rInfo.aColImage )
64 : : {
65 : 0 : nWidth = rInfo.nWidth;
66 : 0 : eAlignment = rInfo.eAlignment;
67 : 0 : nSubItem = rInfo.nSubItem;
68 : 0 : }
69 : :
70 : : /*****************************************************************************
71 : : |
72 : : | class : SvtIconChoiceCtrl
73 : : |
74 : : \*****************************************************************************/
75 : :
76 : 0 : SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, WinBits nWinStyle ) :
77 : :
78 : : // WB_CLIPCHILDREN on, as ScrollBars lie on the window!
79 : : Control( pParent, nWinStyle | WB_CLIPCHILDREN ),
80 : :
81 : : _pCurKeyEvent ( NULL ),
82 [ # # ]: 0 : _pImp ( new SvxIconChoiceCtrl_Impl( this, nWinStyle ) ),
83 [ # # ][ # # ]: 0 : _bAutoFontColor ( sal_False )
[ # # ][ # # ]
84 : :
85 : : {
86 [ # # ]: 0 : SetLineColor();
87 [ # # ]: 0 : _pImp->SetGrid( Size( 100, 70 ) );
88 [ # # ]: 0 : _pImp->InitSettings();
89 [ # # ]: 0 : _pImp->SetPositionMode( IcnViewPositionModeAutoArrange );
90 : 0 : }
91 : :
92 : 0 : SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
93 : : {
94 [ # # ]: 0 : _pImp->CallEventListeners( VCLEVENT_OBJECT_DYING );
95 [ # # ][ # # ]: 0 : delete _pImp;
96 [ # # ]: 0 : }
97 : :
98 : 0 : SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
99 : : {
100 [ # # ]: 0 : SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags);
101 : :
102 : 0 : _pImp->InsertEntry( pEntry, nPos, pPos );
103 : :
104 : 0 : return pEntry;
105 : : }
106 : :
107 : 0 : sal_Bool SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const rtl::OUString&, sal_Bool )
108 : : {
109 : 0 : return sal_True;
110 : : }
111 : :
112 : 0 : sal_Bool SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
113 : : {
114 : 0 : return sal_True;
115 : : }
116 : :
117 : 0 : void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, OutputDevice& rDev )
118 : : {
119 [ # # ]: 0 : rDev.DrawImage( rPos, pEntry->GetImage() );
120 : 0 : }
121 : :
122 : 0 : String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, sal_Bool )
123 : : {
124 : 0 : return pEntry->GetText();
125 : : }
126 : :
127 : 0 : sal_Bool SvtIconChoiceCtrl::HasBackground() const
128 : : {
129 : 0 : return sal_False;
130 : : }
131 : :
132 : 0 : sal_Bool SvtIconChoiceCtrl::HasFont() const
133 : : {
134 : 0 : return sal_False;
135 : : }
136 : :
137 : 0 : sal_Bool SvtIconChoiceCtrl::HasFontTextColor() const
138 : : {
139 : 0 : return sal_True;
140 : : }
141 : :
142 : 0 : sal_Bool SvtIconChoiceCtrl::HasFontFillColor() const
143 : : {
144 : 0 : return sal_True;
145 : : }
146 : :
147 : 0 : void SvtIconChoiceCtrl::Paint( const Rectangle& rRect )
148 : : {
149 : 0 : _pImp->Paint( rRect );
150 : 0 : }
151 : :
152 : 0 : void SvtIconChoiceCtrl::MouseButtonDown( const MouseEvent& rMEvt )
153 : : {
154 [ # # ]: 0 : if( !_pImp->MouseButtonDown( rMEvt ) )
155 : 0 : Control::MouseButtonDown( rMEvt );
156 : 0 : }
157 : :
158 : 0 : void SvtIconChoiceCtrl::MouseButtonUp( const MouseEvent& rMEvt )
159 : : {
160 [ # # ]: 0 : if( !_pImp->MouseButtonUp( rMEvt ) )
161 : 0 : Control::MouseButtonUp( rMEvt );
162 : 0 : }
163 : :
164 : 0 : void SvtIconChoiceCtrl::MouseMove( const MouseEvent& rMEvt )
165 : : {
166 [ # # ]: 0 : if( !_pImp->MouseMove( rMEvt ) )
167 : 0 : Control::MouseMove( rMEvt );
168 : 0 : }
169 : 0 : void SvtIconChoiceCtrl::ArrangeIcons()
170 : : {
171 [ # # ]: 0 : if ( GetStyle() & WB_ALIGN_TOP )
172 : : {
173 : 0 : Size aFullSize;
174 [ # # ]: 0 : Rectangle aEntryRect;
175 : :
176 [ # # ][ # # ]: 0 : for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
177 : : {
178 [ # # ]: 0 : SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
179 [ # # ]: 0 : aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
180 : :
181 [ # # ]: 0 : aFullSize.setWidth ( aFullSize.getWidth()+aEntryRect.GetWidth() );
182 : : }
183 : :
184 [ # # ]: 0 : _pImp->Arrange ( sal_False, aFullSize.getWidth() );
185 : : }
186 [ # # ]: 0 : else if ( GetStyle() & WB_ALIGN_LEFT )
187 : : {
188 : 0 : Size aFullSize;
189 [ # # ]: 0 : Rectangle aEntryRect;
190 : :
191 [ # # ][ # # ]: 0 : for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
192 : : {
193 [ # # ]: 0 : SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
194 [ # # ]: 0 : aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
195 : :
196 [ # # ]: 0 : aFullSize.setHeight ( aFullSize.getHeight()+aEntryRect.GetHeight() );
197 : : }
198 : :
199 [ # # ]: 0 : _pImp->Arrange ( sal_False, 0, aFullSize.getHeight() );
200 : : }
201 : : else
202 : : {
203 : 0 : _pImp->Arrange();
204 : : }
205 : 0 : _pImp->Arrange( sal_False, 0, 1000 );
206 : 0 : }
207 : 0 : void SvtIconChoiceCtrl::Resize()
208 : : {
209 : 0 : _pImp->Resize();
210 : 0 : Control::Resize();
211 : 0 : }
212 : :
213 : 0 : Point SvtIconChoiceCtrl::GetPixelPos( const Point& rPosLogic ) const
214 : : {
215 : 0 : Point aPos( rPosLogic );
216 : 0 : aPos += GetMapMode().GetOrigin();
217 : 0 : return aPos;
218 : : }
219 : :
220 : 0 : void SvtIconChoiceCtrl::DocumentRectChanged()
221 : : {
222 : 0 : _aDocRectChangedHdl.Call( this );
223 : 0 : }
224 : :
225 : 0 : void SvtIconChoiceCtrl::VisibleRectChanged()
226 : : {
227 : 0 : _aVisRectChangedHdl.Call( this );
228 : 0 : }
229 : :
230 : 0 : void SvtIconChoiceCtrl::GetFocus()
231 : : {
232 [ # # ]: 0 : _pImp->GetFocus();
233 [ # # ]: 0 : Control::GetFocus();
234 : : sal_uLong nPos;
235 [ # # ]: 0 : SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry ( nPos );
236 [ # # ]: 0 : if ( pSelectedEntry )
237 [ # # ]: 0 : _pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pSelectedEntry );
238 : 0 : }
239 : :
240 : 0 : void SvtIconChoiceCtrl::LoseFocus()
241 : : {
242 : 0 : _pImp->LoseFocus();
243 : 0 : Control::LoseFocus();
244 : 0 : }
245 : :
246 : 0 : void SvtIconChoiceCtrl::SetFont( const Font& rFont )
247 : : {
248 [ # # ]: 0 : if( rFont != GetFont() )
249 : : {
250 : 0 : Control::SetFont( rFont );
251 : 0 : _pImp->FontModified();
252 : : }
253 : 0 : }
254 : :
255 : 0 : void SvtIconChoiceCtrl::SetPointFont( const Font& rFont )
256 : : {
257 [ # # ][ # # ]: 0 : if( rFont != GetPointFont() )
258 : : {
259 : 0 : Control::SetPointFont( rFont );
260 : 0 : _pImp->FontModified();
261 : : }
262 : 0 : }
263 : 0 : SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, sal_Bool bHit ) const
264 : : {
265 : 0 : Point aPos( rPixPos );
266 : 0 : aPos -= GetMapMode().GetOrigin();
267 [ # # ]: 0 : return ((SvtIconChoiceCtrl*)this)->_pImp->GetEntry( aPos, bHit );
268 : : }
269 : :
270 : 0 : void SvtIconChoiceCtrl::SetStyle( WinBits nWinStyle )
271 : : {
272 : 0 : _pImp->SetStyle( nWinStyle );
273 : 0 : }
274 : :
275 : 0 : WinBits SvtIconChoiceCtrl::GetStyle() const
276 : : {
277 : 0 : return _pImp->GetStyle();
278 : : }
279 : 0 : void SvtIconChoiceCtrl::Command( const CommandEvent& rCEvt )
280 : : {
281 : 0 : _pImp->Command( rCEvt );
282 : 0 : }
283 : :
284 : 0 : void SvtIconChoiceCtrl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry )
285 : : {
286 : 0 : _pImp->SetEntryTextMode( eMode, pEntry );
287 : 0 : }
288 : :
289 : 0 : sal_uLong SvtIconChoiceCtrl::GetEntryCount() const
290 : : {
291 : 0 : return _pImp->GetEntryCount();
292 : : }
293 : :
294 : 0 : SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_uLong nPos ) const
295 : : {
296 : 0 : return _pImp->GetEntry( nPos );
297 : : }
298 : :
299 : 0 : void SvtIconChoiceCtrl::CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics )
300 : : {
301 : 0 : _pImp->CreateAutoMnemonics( &_rUsedMnemonics );
302 : 0 : }
303 : :
304 : 0 : void SvtIconChoiceCtrl::CreateAutoMnemonics( void )
305 : : {
306 : 0 : _pImp->CreateAutoMnemonics();
307 : 0 : }
308 : :
309 : 0 : SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const
310 : : {
311 : 0 : return _pImp->GetFirstSelectedEntry( rPos );
312 : : }
313 : :
314 : 0 : void SvtIconChoiceCtrl::ClickIcon()
315 : : {
316 : : sal_uLong nPos;
317 [ # # ]: 0 : GetSelectedEntry ( nPos );
318 [ # # ]: 0 : _aClickIconHdl.Call( this );
319 : 0 : }
320 : 0 : sal_Bool SvtIconChoiceCtrl::IsEntryEditing() const
321 : : {
322 : 0 : return _pImp->IsEntryEditing();
323 : : }
324 : :
325 : 0 : sal_Bool SvtIconChoiceCtrl::SetChoiceWithCursor ( sal_Bool bDo )
326 : : {
327 : 0 : return _pImp->SetChoiceWithCursor (bDo);
328 : : }
329 : :
330 : 0 : void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
331 : : {
332 : 0 : sal_Bool bKeyUsed = DoKeyInput( rKEvt );
333 [ # # ]: 0 : if ( !bKeyUsed )
334 : : {
335 : 0 : _pCurKeyEvent = (KeyEvent*)&rKEvt;
336 : 0 : Control::KeyInput( rKEvt );
337 : 0 : _pCurKeyEvent = NULL;
338 : : }
339 : 0 : }
340 : 0 : sal_Bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
341 : : {
342 : : // under OS/2, we get key up/down even while editing
343 [ # # ]: 0 : if( IsEntryEditing() )
344 : 0 : return sal_True;
345 : 0 : _pCurKeyEvent = (KeyEvent*)&rKEvt;
346 : 0 : sal_Bool bHandled = _pImp->KeyInput( rKEvt );
347 : 0 : _pCurKeyEvent = NULL;
348 : 0 : return bHandled;
349 : : }
350 : 0 : sal_uLong SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
351 : : {
352 : 0 : return _pImp->GetEntryListPos( pEntry );
353 : : }
354 : 0 : SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetCursor( ) const
355 : : {
356 : 0 : return _pImp->GetCurEntry( );
357 : : }
358 : 0 : void SvtIconChoiceCtrl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
359 : : {
360 : 0 : _pImp->SetCursor( pEntry );
361 : 0 : }
362 : 0 : void SvtIconChoiceCtrl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry )
363 : : {
364 : 0 : _pImp->InvalidateEntry( pEntry );
365 : 0 : }
366 : :
367 : 0 : void SvtIconChoiceCtrl::StateChanged( StateChangedType nType )
368 : : {
369 : 0 : Control::StateChanged( nType );
370 : 0 : }
371 : :
372 : :
373 : 0 : void SvtIconChoiceCtrl::DataChanged( const DataChangedEvent& rDCEvt )
374 : : {
375 [ # # # # : 0 : if ( ((rDCEvt.GetType() == DATACHANGED_SETTINGS) ||
# # # # ]
[ # # ]
376 : 0 : (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
377 : 0 : (rDCEvt.GetType() == DATACHANGED_FONTS) ) &&
378 : 0 : (rDCEvt.GetFlags() & SETTINGS_STYLE) )
379 : : {
380 : 0 : _pImp->InitSettings();
381 : 0 : Invalidate(INVALIDATE_NOCHILDREN);
382 : : }
383 : : else
384 : 0 : Control::DataChanged( rDCEvt );
385 : 0 : }
386 : :
387 : 0 : void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper )
388 : : {
389 [ # # ]: 0 : if( rPaper != GetBackground() )
390 : : {
391 : 0 : const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
392 [ # # ]: 0 : Wallpaper aEmpty;
393 [ # # ][ # # ]: 0 : if( rPaper == aEmpty )
394 [ # # ][ # # ]: 0 : Control::SetBackground( rStyleSettings.GetFieldColor() );
[ # # ]
395 : : else
396 : : {
397 [ # # ]: 0 : Wallpaper aBackground( rPaper );
398 : : // HACK, as background might be transparent!
399 [ # # ][ # # ]: 0 : if( !aBackground.IsBitmap() )
400 [ # # ]: 0 : aBackground.SetStyle( WALLPAPER_TILE );
401 : :
402 [ # # ]: 0 : WallpaperStyle eStyle = aBackground.GetStyle();
403 [ # # ]: 0 : Color aBack( aBackground.GetColor());
404 : 0 : Color aTrans( COL_TRANSPARENT );
405 [ # # ][ # # ]: 0 : if( aBack == aTrans && (
[ # # ][ # # ]
[ # # ][ # # ]
406 [ # # ]: 0 : (!aBackground.IsBitmap() ||
407 [ # # ][ # # ]: 0 : aBackground.GetBitmap().IsTransparent() ||
[ # # ][ # # ]
[ # # ]
408 : : (eStyle != WALLPAPER_TILE && eStyle != WALLPAPER_SCALE))))
409 : : {
410 [ # # ]: 0 : aBackground.SetColor( rStyleSettings.GetFieldColor() );
411 : : }
412 [ # # ][ # # ]: 0 : if( aBackground.IsScrollable() )
413 : : {
414 [ # # ]: 0 : Rectangle aRect;
415 [ # # ]: 0 : aRect.SetSize( Size(32765, 32765) );
416 [ # # ]: 0 : aBackground.SetRect( aRect );
417 : : }
418 : : else
419 : : {
420 [ # # ]: 0 : Rectangle aRect( _pImp->GetOutputRect() );
421 [ # # ]: 0 : aBackground.SetRect( aRect );
422 : : }
423 [ # # ][ # # ]: 0 : Control::SetBackground( aBackground );
424 : : }
425 : :
426 : : // If text colors are attributed "hard," don't use automatism to select
427 : : // a readable text color.
428 [ # # ]: 0 : Font aFont( GetFont() );
429 [ # # ]: 0 : aFont.SetColor( rStyleSettings.GetFieldTextColor() );
430 [ # # ]: 0 : SetFont( aFont );
431 : :
432 [ # # ][ # # ]: 0 : Invalidate(INVALIDATE_NOCHILDREN);
[ # # ]
433 : : }
434 : 0 : }
435 : :
436 : 0 : void SvtIconChoiceCtrl::RequestHelp( const HelpEvent& rHEvt )
437 : : {
438 [ # # ]: 0 : if ( !_pImp->RequestHelp( rHEvt ) )
439 : 0 : Control::RequestHelp( rHEvt );
440 : 0 : }
441 : :
442 : 0 : void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode )
443 : : {
444 : 0 : _pImp->SetSelectionMode( eMode );
445 : 0 : }
446 : :
447 : 0 : Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const
448 : : {
449 : 0 : return _pImp->GetEntryBoundRect( pEntry );
450 : : }
451 : :
452 : 0 : void SvtIconChoiceCtrl::FillLayoutData() const
453 : : {
454 : 0 : CreateLayoutData();
455 : :
456 : 0 : SvtIconChoiceCtrl* pNonConstMe = const_cast< SvtIconChoiceCtrl* >( this );
457 : :
458 : : // loop through all entries
459 : 0 : sal_uInt16 nCount = (sal_uInt16)GetEntryCount();
460 : 0 : sal_uInt16 nPos = 0;
461 [ # # ]: 0 : while ( nPos < nCount )
462 : : {
463 [ # # ]: 0 : SvxIconChoiceCtrlEntry* pEntry = GetEntry( nPos );
464 : :
465 [ # # ]: 0 : Point aPos = _pImp->GetEntryBoundRect( pEntry ).TopLeft();
466 [ # # ]: 0 : String sEntryText = pEntry->GetDisplayText( );
467 [ # # ]: 0 : Rectangle aTextRect = _pImp->CalcTextRect( pEntry, &aPos, sal_False, &sEntryText );
468 : :
469 : 0 : sal_Bool bLargeIconMode = WB_ICON == ( _pImp->GetStyle() & ( VIEWMODE_MASK ) );
470 [ # # ]: 0 : sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
471 : :
472 [ # # ][ # # ]: 0 : _pImp->PaintItem( aTextRect, IcnViewFieldTypeText, pEntry, nTextPaintFlags, pNonConstMe, &sEntryText, GetLayoutData() );
473 : :
474 : 0 : ++nPos;
475 [ # # ]: 0 : }
476 : 0 : }
477 : :
478 : 0 : Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const
479 : : {
480 [ # # ]: 0 : Rectangle aRect;
481 : :
482 [ # # ]: 0 : Pair aEntryCharacterRange = GetLineStartEnd( _nEntryPos );
483 [ # # ]: 0 : if ( aEntryCharacterRange.A() + _nCharacterIndex < aEntryCharacterRange.B() )
484 : : {
485 [ # # ]: 0 : aRect = GetCharacterBounds( aEntryCharacterRange.A() + _nCharacterIndex );
486 : : }
487 : :
488 : 0 : return aRect;
489 : : }
490 : :
491 : 0 : void SvtIconChoiceCtrl::SetNoSelection()
492 : : {
493 : 0 : _pImp->SetNoSelection();
494 : 0 : }
495 : :
496 : 0 : void SvtIconChoiceCtrl::CallImplEventListeners(sal_uLong nEvent, void* pData)
497 : : {
498 : 0 : CallEventListeners(nEvent, pData);
499 : 0 : }
500 : 0 : ::com::sun::star::uno::Reference< XAccessible > SvtIconChoiceCtrl::CreateAccessible()
501 : : {
502 : 0 : Window* pParent = GetAccessibleParentWindow();
503 : : DBG_ASSERT( pParent, "SvTreeListBox::CreateAccessible - accessible parent not found" );
504 : :
505 : 0 : ::com::sun::star::uno::Reference< XAccessible > xAccessible;
506 [ # # ]: 0 : if ( pParent )
507 : : {
508 [ # # ]: 0 : ::com::sun::star::uno::Reference< XAccessible > xAccParent = pParent->GetAccessible();
509 [ # # ]: 0 : if ( xAccParent.is() )
510 : : {
511 [ # # ]: 0 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xTemp(GetComponentInterface());
512 [ # # ][ # # ]: 0 : xAccessible = _pImp->GetAccessibleFactory().createAccessibleIconChoiceCtrl( *this, xAccParent );
[ # # ]
513 : 0 : }
514 : : }
515 : 0 : return xAccessible;
516 : : }
517 : :
518 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|