LibreOffice Module vcl (master)  1
svtabbx.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
22 #include <vcl/svtabbx.hxx>
23 #include <vcl/headbar.hxx>
24 #include <vcl/svlbitm.hxx>
25 #include <vcl/treelistentry.hxx>
27 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
28 #include <sal/log.hxx>
29 #include <osl/diagnose.h>
30 #include <strings.hrc>
31 #include <svdata.hxx>
32 #include <memory>
33 
34 using namespace ::com::sun::star::uno;
35 using namespace ::com::sun::star::accessibility;
36 
37 static constexpr SvLBoxTabFlags MYTABMASK =
39 
40 // SvTreeListBox callback
41 
43 {
45  if( mvTabList.empty() )
46  return;
47 
48  DBG_ASSERT(!mvTabList.empty(),"TabList ?");
49 
50  // The tree listbox has now inserted its tabs into the list. Now we
51  // fluff up the list with additional tabs and adjust the rightmost tab
52  // of the tree listbox.
53 
54  // Picking the rightmost tab.
55  // HACK for the explorer! If ViewParent != 0, the first tab of the tree
56  // listbox is calculated by the tree listbox itself! This behavior is
57  // necessary for ButtonsOnRoot, as the explorer does not know in this
58  // case, which additional offset it needs to add to the tabs in this mode
59  // -- the tree listbox knows that, though!
60  /*
61  if( !pViewParent )
62  {
63  SvLBoxTab* pFirstTab = (SvLBoxTab*)aTabs.GetObject( aTabs.Count()-1 );
64  pFirstTab->SetPos( pTabList[0].GetPos() );
65  pFirstTab->nFlags &= ~MYTABMASK;
66  pFirstTab->nFlags |= pTabList[0].nFlags;
67  }
68  */
69 
70  // append all other tabs to the list
71  for( sal_uInt16 nCurTab = 1; nCurTab < sal_uInt16(mvTabList.size()); nCurTab++ )
72  {
73  SvLBoxTab& rTab = mvTabList[nCurTab];
74  AddTab( rTab.GetPos(), rTab.nFlags );
75  }
76 }
77 
78 void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
79  const Image& rColl, const Image& rExp)
80 {
81  SvTreeListBox::InitEntry(pEntry, rStr, rColl, rExp);
82 
83  sal_Int32 nIndex = 0;
84  // TODO: verify if nTabCount is always >0 here!
85  const sal_uInt16 nCount = mvTabList.size() - 1;
86  for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
87  {
88  const OUString aToken = GetToken(aCurEntry, nIndex);
89  pEntry->AddItem(std::make_unique<SvLBoxString>(aToken));
90  }
91 }
92 
94  : SvTreeListBox( pParent, nBits )
95 {
96  SetHighlightRange(); // select full width
97 }
98 
100 {
101  disposeOnce();
102 }
103 
105 {
106  mvTabList.clear();
108 }
109 
110 void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit eMapUnit)
111 {
112  mvTabList.resize(nTabs);
113 
114  MapMode aMMSource( eMapUnit );
115  MapMode aMMDest( MapUnit::MapPixel );
116 
117  for( sal_uInt16 nIdx = 0; nIdx < sal_uInt16(mvTabList.size()); nIdx++, pTabPositions++ )
118  {
119  Size aSize( *pTabPositions, 0 );
120  aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
121  long nNewTab = aSize.Width();
122  mvTabList[nIdx].SetPos( nNewTab );
123  mvTabList[nIdx].nFlags &= MYTABMASK;
124  }
126  if( IsUpdateMode() )
127  Invalidate();
128 }
129 
130 void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
131 {
132  DBG_ASSERT(nTab<mvTabList.size(),"Invalid Tab-Pos");
133  if( nTab >= mvTabList.size() )
134  return;
135 
136  MapMode aMMSource( eMapUnit );
137  MapMode aMMDest( MapUnit::MapPixel );
138  Size aSize( nValue, 0 );
139  aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
140  nValue = aSize.Width();
141  mvTabList[ nTab ].SetPos( nValue );
143  if( IsUpdateMode() )
144  Invalidate();
145 }
146 
148  bool /*bChildrenOnDemand*/,
149  sal_uLong nPos, void* pUserData )
150 {
151  return InsertEntryToColumn( rText, pParent, nPos, 0xffff, pUserData );
152 }
153 
155  const Image& rExpandedEntryBmp,
156  const Image& rCollapsedEntryBmp,
157  SvTreeListEntry* pParent,
158  bool /*bChildrenOnDemand*/,
159  sal_uLong nPos, void* pUserData )
160 {
161  return InsertEntryToColumn( rText, rExpandedEntryBmp, rCollapsedEntryBmp,
162  pParent, nPos, 0xffff, pUserData );
163 }
164 
165 SvTreeListEntry* SvTabListBox::InsertEntryToColumn(const OUString& rStr,SvTreeListEntry* pParent,sal_uLong nPos,sal_uInt16 nCol,
166  void* pUser )
167 {
168  OUString aStr;
169  if( nCol != 0xffff )
170  {
171  while( nCol )
172  {
173  aStr += "\t";
174  nCol--;
175  }
176  }
177  aStr += rStr;
178  OUString aFirstStr( aStr );
179  sal_Int32 nEnd = aFirstStr.indexOf( '\t' );
180  if( nEnd != -1 )
181  {
182  aFirstStr = aFirstStr.copy(0, nEnd);
183  aCurEntry = aStr.copy(++nEnd);
184  }
185  else
186  aCurEntry.clear();
187  return SvTreeListBox::InsertEntry( aFirstStr, pParent, false, nPos, pUser );
188 }
189 
191  const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
192  SvTreeListEntry* pParent,sal_uLong nPos,sal_uInt16 nCol, void* pUser )
193 {
194  OUString aStr;
195  if( nCol != 0xffff )
196  {
197  while( nCol )
198  {
199  aStr += "\t";
200  nCol--;
201  }
202  }
203  aStr += rStr;
204  OUString aFirstStr( aStr );
205  sal_Int32 nEnd = aFirstStr.indexOf('\t');
206  if (nEnd != -1)
207  {
208  aFirstStr = aFirstStr.copy(0, nEnd);
209  aCurEntry = aStr.copy(++nEnd);
210  }
211  else
212  aCurEntry.clear();
213 
215  aFirstStr,
216  rExpandedEntryBmp, rCollapsedEntryBmp,
217  pParent, false, nPos, pUser );
218 }
219 
221 {
222  return GetEntryText( pEntry, 0xffff );
223 }
224 
225 OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol )
226 {
227  DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
228  OUStringBuffer aResult;
229  if( pEntry )
230  {
231  sal_uInt16 nCount = pEntry->ItemCount();
232  sal_uInt16 nCur = 0;
233  while( nCur < nCount )
234  {
235  const SvLBoxItem& rStr = pEntry->GetItem( nCur );
236  if (rStr.GetType() == SvLBoxItemType::String)
237  {
238  if( nCol == 0xffff )
239  {
240  if (!aResult.isEmpty())
241  aResult.append("\t");
242  aResult.append(static_cast<const SvLBoxString&>(rStr).GetText());
243  }
244  else
245  {
246  if( nCol == 0 )
247  return static_cast<const SvLBoxString&>(rStr).GetText();
248  nCol--;
249  }
250  }
251  nCur++;
252  }
253  }
254  return aResult.makeStringAndClear();
255 }
256 
257 OUString SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
258 {
259  SvTreeListEntry* pEntry = GetEntryOnPos( nPos );
260  return GetEntryText( pEntry, nCol );
261 }
262 
263 void SvTabListBox::SetEntryText(const OUString& rStr, SvTreeListEntry* pEntry, sal_uInt16 nCol)
264 {
265  DBG_ASSERT(pEntry,"SetEntryText:Invalid Entry");
266  if( !pEntry )
267  return;
268 
269  OUString sOldText = GetEntryText(pEntry, nCol);
270  if (sOldText == rStr)
271  return;
272 
273  sal_Int32 nIndex = 0;
274  const sal_uInt16 nCount = pEntry->ItemCount();
275  for (sal_uInt16 nCur = 0; nCur < nCount; ++nCur)
276  {
277  SvLBoxItem& rBoxItem = pEntry->GetItem( nCur );
278  if (rBoxItem.GetType() == SvLBoxItemType::String)
279  {
280  if (!nCol || nCol==0xFFFF)
281  {
282  const OUString aTemp(GetToken(rStr, nIndex));
283  static_cast<SvLBoxString&>(rBoxItem).SetText( aTemp );
284  if (!nCol && nIndex<0)
285  break;
286  }
287  else
288  {
289  --nCol;
290  }
291  }
292  }
293  GetModel()->InvalidateEntry( pEntry );
294 }
295 
296 OUString SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
297 {
298  SvTreeListEntry* pEntry = GetEntryOnPos( nPos );
299  DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
300  OUString aResult;
301  if (pEntry && pEntry->ItemCount() > static_cast<size_t>(nCol+1))
302  {
303  const SvLBoxItem& rStr = pEntry->GetItem( nCol + 1 );
304  if (rStr.GetType() == SvLBoxItemType::String)
305  aResult = static_cast<const SvLBoxString&>(rStr).GetText();
306  }
307  return aResult;
308 }
309 
311 {
312  sal_uLong nPos = 0;
313  SvTreeListEntry* pTmpEntry = First();
314  while( pTmpEntry )
315  {
316  if ( pTmpEntry == pEntry )
317  return nPos;
318  pTmpEntry = Next( pTmpEntry );
319  ++nPos;
320  }
321  return 0xffffffff;
322 }
323 
324 // static
325 OUString SvTabListBox::GetToken( const OUString &sStr, sal_Int32& nIndex )
326 {
327  return sStr.getToken(0, '\t', nIndex);
328 }
329 
330 OUString SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
331 {
332  SvTreeListEntry* pEntry = SvTreeListBox::GetEntry( nPos );
333  DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
334  OUStringBuffer aResult;
335  if ( pEntry )
336  {
337  sal_uInt16 nCount = pEntry->ItemCount();
338  sal_uInt16 nCur = 0;
339  while( nCur < nCount )
340  {
341  const SvLBoxItem& rBoxItem = pEntry->GetItem( nCur );
342  if (rBoxItem.GetType() == SvLBoxItemType::String)
343  {
344  if ( nCol == 0xffff )
345  {
346  if (!aResult.isEmpty())
347  aResult.append("\t");
348  aResult.append(static_cast<const SvLBoxString&>(rBoxItem).GetText());
349  }
350  else
351  {
352  if ( nCol == 0 )
353  {
354  OUString sRet = static_cast<const SvLBoxString&>(rBoxItem).GetText();
355  if ( sRet.isEmpty() )
356  sRet = VclResId( STR_SVT_ACC_EMPTY_FIELD );
357  return sRet;
358  }
359  --nCol;
360  }
361  }
362  ++nCur;
363  }
364  }
365  return aResult.makeStringAndClear();
366 }
367 
369 {
370  SvTreeListEntry* pEntry = nullptr;
371  sal_uLong i, nPos = 0, nCount = GetLevelChildCount( nullptr );
372  for ( i = 0; i < nCount; ++i )
373  {
374  SvTreeListEntry* pParent = GetEntry(i);
375  if ( nPos == _nEntryPos )
376  {
377  pEntry = pParent;
378  break;
379  }
380  else
381  {
382  nPos++;
383  pEntry = GetChildOnPos( pParent, _nEntryPos, nPos );
384  if ( pEntry )
385  break;
386  }
387  }
388 
389  return pEntry;
390 }
391 
393 {
394  sal_uLong i, nCount = GetLevelChildCount( _pParent );
395  for ( i = 0; i < nCount; ++i )
396  {
397  SvTreeListEntry* pParent = GetEntry( _pParent, i );
398  if ( _rPos == _nEntryPos )
399  return pParent;
400  else
401  {
402  _rPos++;
403  SvTreeListEntry* pEntry = GetChildOnPos( pParent, _nEntryPos, _rPos );
404  if ( pEntry )
405  return pEntry;
406  }
407  }
408 
409  return nullptr;
410 }
411 
412 void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
413 {
414  DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab");
415  if( nTab >= mvTabList.size() )
416  return;
417  SvLBoxTab& rTab = mvTabList[ nTab ];
418  SvLBoxTabFlags nFlags = rTab.nFlags;
419  nFlags &= ~MYTABMASK;
420  // see SvLBoxTab::CalcOffset for force, which only matters for centering
421  nFlags |= static_cast<SvLBoxTabFlags>(eJustify) | SvLBoxTabFlags::FORCE;
422  rTab.nFlags = nFlags;
424  if( IsUpdateMode() )
425  Invalidate();
426 }
427 
428 long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
429 {
431  SetTabs();
432 
433  DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab");
434  return aTabs[ nTab ]->GetPos();
435 }
436 
437 namespace vcl
438 {
440  {
443 
444  SvHeaderTabListBoxImpl() : m_pHeaderBar( nullptr ) { }
445  };
446 }
447 
449  : SvTabListBox(pParent, nWinStyle)
450  , m_bFirstPaint(true)
451  , m_pImpl(new ::vcl::SvHeaderTabListBoxImpl)
452  , m_pAccessible(nullptr)
453 {
454 }
455 
457 {
458  disposeOnce();
459 }
460 
462 {
463  m_pImpl.reset();
465 }
466 
467 void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect )
468 {
469  if (m_bFirstPaint)
470  {
471  m_bFirstPaint = false;
472  }
473  SvTabListBox::Paint(rRenderContext, rRect);
474 }
475 
477 {
478  DBG_ASSERT( !m_pImpl->m_pHeaderBar, "header bar already initialized" );
479  DBG_ASSERT( pHeaderBar, "invalid header bar initialization" );
480  m_pImpl->m_pHeaderBar = pHeaderBar;
481  SetScrolledHdl( LINK( this, SvHeaderTabListBox, ScrollHdl_Impl ) );
482  m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl( LINK( this, SvHeaderTabListBox, CreateAccessibleHdl_Impl ) );
483 }
484 
486 {
487  return m_pImpl ? m_pImpl->m_pHeaderBar : nullptr;
488 }
489 
490 bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol )
491 {
493  SvLBoxButton& rItem = static_cast<SvLBoxButton&>( pEntry->GetItem( nCol + 1 ) );
494 
495  if (rItem.GetType() == SvLBoxItemType::Button)
496  {
497  SvItemStateFlags nButtonFlags = rItem.GetButtonFlags();
498  eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
499  }
500 
501  return ( eState == SvButtonState::Checked );
502 }
503 
505  const OUString& rStr, SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
506 {
507  SvTreeListEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, pParent, nPos, nCol, pUserData );
509  return pEntry;
510 }
511 
513  const OUString& rStr, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
514  SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
515 {
517  rStr, rExpandedEntryBmp, rCollapsedEntryBmp, pParent, nPos, nCol, pUserData );
519  return pEntry;
520 }
521 
523  SvTreeListEntry* pEnt, SvTreeListEntry* pPar, sal_uLong nPos )
524 {
525  sal_uLong n = SvTabListBox::Insert( pEnt, pPar, nPos );
527  return n;
528 }
529 
531 {
532  sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
534  return nPos;
535 }
536 
538 {
539  m_pImpl->m_pHeaderBar->SetOffset( -GetXOffset() );
540 }
541 
542 IMPL_LINK_NOARG(SvHeaderTabListBox, CreateAccessibleHdl_Impl, HeaderBar*, void)
543 {
544  vcl::Window* pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow();
545  DBG_ASSERT( pParent, "SvHeaderTabListBox..CreateAccessibleHdl_Impl - accessible parent not found" );
546  if ( pParent )
547  {
548  css::uno::Reference< XAccessible > xAccParent = pParent->GetAccessible();
549  if ( xAccParent.is() )
550  {
551  Reference< XAccessible > xAccessible = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxHeaderBar(
552  xAccParent, *this, ::vcl::BBTYPE_COLUMNHEADERBAR );
553  m_pImpl->m_pHeaderBar->SetAccessible( xAccessible );
554  }
555  }
556 }
557 
559 {
560  if ( !m_aAccessibleChildren.empty() )
561  {
562  sal_uInt32 nCount = ( GetRowCount() + 1 ) * GetColumnCount();
563  if ( m_aAccessibleChildren.size() < nCount )
564  m_aAccessibleChildren.resize( nCount );
565  else
566  {
567  DBG_ASSERT( m_aAccessibleChildren.size() == nCount, "wrong children count" );
568  }
569  }
570 }
571 
572 bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriState& _rState )
573 {
574  bool bRet = false;
575  SvTreeListEntry* pEntry = GetEntry( _nRow );
576  if ( pEntry )
577  {
578  sal_uInt16 nItemCount = pEntry->ItemCount();
579  if ( nItemCount > ( _nColumn + 1 ) )
580  {
581  SvLBoxItem& rItem = pEntry->GetItem( _nColumn + 1 );
582  if (rItem.GetType() == SvLBoxItemType::Button)
583  {
584  bRet = true;
585  _rState = ( ( static_cast<SvLBoxButton&>(rItem).GetButtonFlags() & SvItemStateFlags::UNCHECKED ) == SvItemStateFlags::NONE )
587  }
588  }
589  else
590  {
591  SAL_WARN( "svtools.contnr", "SvHeaderTabListBox::IsCellCheckBox(): column out of range" );
592  }
593  }
594  return bRet;
595 }
597 {
598  return GetEntryCount();
599 }
600 
602 {
603  return m_pImpl->m_pHeaderBar->GetItemCount();
604 }
605 
607 {
608  sal_Int32 nRet = -1;
609  SvTreeListEntry* pEntry = GetCurEntry();
610  if ( pEntry )
611  {
613  for ( sal_uLong i = 0; i < nCount; ++i )
614  {
615  if ( pEntry == GetEntry(i) )
616  {
617  nRet = i;
618  break;
619  }
620  }
621  }
622 
623  return nRet;
624 }
625 
627 {
628  sal_uInt16 nPos = GetCurrentTabPos() - 1;
629  return nPos;
630 }
631 
632 OUString SvHeaderTabListBox::GetRowDescription( sal_Int32 _nRow ) const
633 {
634  return GetEntryText( _nRow );
635 }
636 
637 OUString SvHeaderTabListBox::GetColumnDescription( sal_uInt16 _nColumn ) const
638 {
639  return m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
640 }
641 
643 {
644  return false;
645 }
646 
647 bool SvHeaderTabListBox::GoToCell( sal_Int32 /*_nRow*/, sal_uInt16 /*_nColumn*/ )
648 {
649  return false;
650 }
651 
653 {
655 }
656 
658 {
660 }
661 
662 void SvHeaderTabListBox::SelectRow( long _nRow, bool _bSelect, bool )
663 {
664  Select( GetEntry( _nRow ), _bSelect );
665 }
666 
667 void SvHeaderTabListBox::SelectColumn( sal_uInt16, bool )
668 {
669 }
670 
672 {
673  return GetSelectionCount();
674 }
675 
677 {
678  return 0;
679 }
680 
681 bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
682 {
683  SvTreeListEntry* pEntry = GetEntry( _nRow );
684  return ( pEntry && IsSelected( pEntry ) );
685 }
686 
688 {
689  return false;
690 }
691 
692 void SvHeaderTabListBox::GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& ) const
693 {
694 }
695 
696 void SvHeaderTabListBox::GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& ) const
697 {
698 }
699 
700 bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
701 {
702  return true;
703 }
704 
705 OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
706 {
707  return GetTabEntryText(_nRow, _nColumnPos);
708 }
709 
710 tools::Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen )
711 {
712  tools::Rectangle aRect;
713  if ( _bIsColumnBar )
714  {
715  vcl::Window* pParent = nullptr;
716  if ( !_bOnScreen )
717  pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow();
718 
719  aRect = m_pImpl->m_pHeaderBar->GetWindowExtentsRelative( pParent );
720  }
721  return aRect;
722 }
723 
725 {
726  vcl::Window* pParent = nullptr;
727  if ( !_bOnScreen )
728  pParent = GetAccessibleParentWindow();
729 
730  tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) );
731  return aRect;
732 }
733 
734 tools::Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen )
735 {
736  DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" );
737  tools::Rectangle aRect;
738  SvTreeListEntry* pEntry = GetEntry( _nRow );
739  if ( pEntry )
740  {
741  aRect = _bIsHeader ? calcHeaderRect( true, false ) : GetBoundingRect( pEntry );
742  Point aTopLeft = aRect.TopLeft();
743  DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" );
744  tools::Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
745  aTopLeft.setX( aItemRect.Left() );
746  Size aSize = aItemRect.GetSize();
747  aRect = tools::Rectangle( aTopLeft, aSize );
748  vcl::Window* pParent = nullptr;
749  if ( !_bOnScreen )
750  pParent = GetAccessibleParentWindow();
751  aTopLeft = aRect.TopLeft();
752  aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft();
753  aRect = tools::Rectangle( aTopLeft, aRect.GetSize() );
754  }
755 
756  return aRect;
757 }
758 
759 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
760 {
761  OSL_ENSURE( m_pAccessible, "Invalid call: Accessible is null" );
762 
763  Reference< XAccessible > xChild;
764 
765  TriState eState = TRISTATE_INDET;
766  bool bIsCheckBox = IsCellCheckBox( _nRow, _nColumnPos, eState );
767  if ( bIsCheckBox )
768  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleCheckBoxCell(
769  m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, eState, false );
770  else
771  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell(
772  m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, OFFSET_NONE );
773 
774  return xChild;
775 }
776 
777 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleRowHeader( sal_Int32 )
778 {
779  Reference< XAccessible > xHeader;
780  return xHeader;
781 }
782 
783 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_uInt16 _nColumn )
784 {
785  // first call? -> initial list
786  if ( m_aAccessibleChildren.empty() )
787  {
788  const sal_uInt16 nColumnCount = GetColumnCount();
789  m_aAccessibleChildren.assign( nColumnCount, Reference< XAccessible >() );
790  }
791 
792  // get header
793  Reference< XAccessible > xChild = m_aAccessibleChildren[ _nColumn ];
794  // already exists?
795  if ( !xChild.is() && m_pAccessible )
796  {
797  // no -> create new header cell
798  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxHeaderCell(
799  _nColumn, m_pAccessible->getHeaderBar(),
800  *this, nullptr, ::vcl::BBTYPE_COLUMNHEADERCELL
801  );
802 
803  // insert into list
804  m_aAccessibleChildren[ _nColumn ] = xChild;
805  }
806  return xChild;
807 }
808 
810 {
811  return -1;
812 }
813 
814 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleControl( sal_Int32 )
815 {
816  Reference< XAccessible > xControl;
817  return xControl;
818 }
819 
821 {
822  return false;
823 }
824 
825 bool SvHeaderTabListBox::ConvertPointToCellAddress( sal_Int32&, sal_uInt16&, const Point& )
826 {
827  return false;
828 }
829 
831 {
832  return false;
833 }
834 
836 {
837  return false;
838 }
839 
841 {
842  OUString aRetText;
843  switch( _eType )
844  {
848  // should be empty now (see #i63983)
849  aRetText.clear();
850  break;
851 
853  {
854  // here we need a valid pos, we can not handle -1
855  if ( _nPos >= 0 )
856  {
857  sal_uInt16 nColumnCount = GetColumnCount();
858  if (nColumnCount > 0)
859  {
860  sal_Int32 nRow = _nPos / nColumnCount;
861  sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
862  aRetText = GetCellText( nRow, nColumn );
863  }
864  }
865  break;
866  }
868  {
869  break; // checkbox cells have no name
870  }
872  {
873  aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( static_cast<sal_uInt16>(_nPos) ) );
874  break;
875  }
876 
879  aRetText = "error";
880  break;
881 
882  default:
883  OSL_FAIL("BrowseBox::GetAccessibleName: invalid enum!");
884  }
885  return aRetText;
886 }
887 
889 {
890  OUString aRetText;
891 
892  if( _eType == ::vcl::BBTYPE_TABLECELL && _nPos != -1 )
893  {
894  const OUString sVar1( "%1" );
895  const OUString sVar2( "%2" );
896 
897  sal_uInt16 nColumnCount = GetColumnCount();
898  if (nColumnCount > 0)
899  {
900  sal_Int32 nRow = _nPos / nColumnCount;
901  sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
902 
903  OUString aText( VclResId(STR_SVT_ACC_DESC_TABLISTBOX) );
904  aText = aText.replaceFirst( sVar1, OUString::number( nRow ) );
905  OUString sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
906  if ( sColHeader.isEmpty() )
907  sColHeader = OUString::number( nColumn );
908  aText = aText.replaceFirst( sVar2, sColHeader );
909  aRetText = aText;
910  }
911  }
912 
913  return aRetText;
914 }
915 
917 {
918  switch( _eType )
919  {
922  {
923  _rStateSet.AddState( AccessibleStateType::FOCUSABLE );
924  if ( HasFocus() )
925  _rStateSet.AddState( AccessibleStateType::FOCUSED );
926  if ( IsActive() )
927  _rStateSet.AddState( AccessibleStateType::ACTIVE );
928  if ( IsEnabled() )
929  {
930  _rStateSet.AddState( AccessibleStateType::ENABLED );
931  _rStateSet.AddState( AccessibleStateType::SENSITIVE );
932  }
933  if ( IsReallyVisible() )
934  _rStateSet.AddState( AccessibleStateType::VISIBLE );
935  if ( _eType == ::vcl::BBTYPE_TABLE )
936  {
937 
938  _rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
939  _rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
940  }
941  break;
942  }
943 
945  {
946  sal_Int32 nCurRow = GetCurrRow();
947  sal_uInt16 nCurColumn = GetCurrColumn();
948  if ( IsCellVisible( nCurRow, nCurColumn ) )
949  _rStateSet.AddState( AccessibleStateType::VISIBLE );
950  if ( IsEnabled() )
951  _rStateSet.AddState( AccessibleStateType::ENABLED );
952  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
953  break;
954  }
955 
958  {
959  _rStateSet.AddState( AccessibleStateType::VISIBLE );
960  _rStateSet.AddState( AccessibleStateType::FOCUSABLE );
961  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
962  if ( IsEnabled() )
963  _rStateSet.AddState( AccessibleStateType::ENABLED );
964  break;
965  }
966  default:
967  break;
968  }
969 }
970 
971 void SvHeaderTabListBox::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumn ) const
972 {
973  _rStateSet.AddState( AccessibleStateType::SELECTABLE );
974  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
975 
976  if ( IsCellVisible( _nRow, _nColumn ) )
977  {
978  _rStateSet.AddState( AccessibleStateType::VISIBLE );
979  _rStateSet.AddState( AccessibleStateType::ENABLED );
980  }
981 
982  if ( IsRowSelected( _nRow ) )
983  {
984  _rStateSet.AddState( AccessibleStateType::ACTIVE );
985  _rStateSet.AddState( AccessibleStateType::SELECTED );
986  }
987  if ( IsEnabled() )
988  _rStateSet.AddState( AccessibleStateType::ENABLED );
989 }
990 
992 {
993  GrabFocus();
994 }
995 
996 bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector )
997 {
998  return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector );
999 }
1000 
1002 {
1003  return Control::GetWindowExtentsRelative( pRelativeWindow );
1004 }
1005 
1007 {
1009 }
1010 
1011 Reference< XAccessible > SvHeaderTabListBox::GetAccessible()
1012 {
1013  return Control::GetAccessible();
1014 }
1015 
1017 {
1019 }
1020 
1022 {
1023  return this;
1024 }
1025 
1026 Reference< XAccessible > SvHeaderTabListBox::CreateAccessible()
1027 {
1029  DBG_ASSERT( pParent, "SvHeaderTabListBox::::CreateAccessible - accessible parent not found" );
1030 
1031  Reference< XAccessible > xAccessible;
1032  if ( m_pAccessible ) xAccessible = m_pAccessible->getMyself();
1033 
1034  if( pParent && !m_pAccessible )
1035  {
1036  Reference< XAccessible > xAccParent = pParent->GetAccessible();
1037  if ( xAccParent.is() )
1038  {
1039  m_pAccessible = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleTabListBox( xAccParent, *this );
1040  if ( m_pAccessible )
1041  xAccessible = m_pAccessible->getMyself();
1042  }
1043  }
1044  return xAccessible;
1045 }
1046 
1048 {
1049  return tools::Rectangle();
1050 }
1051 
1052 sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
1053 {
1054  OUString sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
1055  MetricVector aRects;
1056  if ( GetGlyphBoundRects(Point(0,0), sText, 0, sText.getLength(), aRects) )
1057  {
1058  sal_Int32 nPos = 0;
1059  for (auto const& rectangle : aRects)
1060  {
1061  if( rectangle.IsInside(_rPoint) )
1062  return nPos;
1063  ++nPos;
1064  }
1065  }
1066 
1067  return -1;
1068 }
1069 
1070 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AddItem(std::unique_ptr< SvLBoxItem > pItem)
Point TopLeft() const
long Width() const
A cell of the column header bar.
sal_uInt16 GetCurrentTabPos() const
virtual SvTreeListEntry * InsertEntry(const OUString &rText, SvTreeListEntry *pParent=nullptr, bool bChildrenOnDemand=false, sal_uLong nPos=TREELIST_APPEND, void *pUserData=nullptr) override
Definition: svtabbx.cxx:147
virtual void SelectAll() override
Definition: svtabbx.cxx:657
sal_Int32 nIndex
void InvalidateEntry(SvTreeListEntry *)
Definition: treelist.cxx:1030
static SvButtonState ConvertToButtonState(SvItemStateFlags nItemFlags)
Definition: svlbitm.cxx:107
std::vector< tools::Rectangle > MetricVector
Definition: outdev.hxx:139
SvTabJustify
Definition: svtabbx.hxx:31
SvTabListBox(vcl::Window *pParent, WinBits)
Definition: svtabbx.cxx:93
virtual SvTreeListEntry * InsertEntryToColumn(const OUString &, SvTreeListEntry *pParent, sal_uLong nPos, sal_uInt16 nCol, void *pUserData=nullptr)
Definition: svtabbx.cxx:165
OUString aCurEntry
Definition: svtabbx.hxx:42
virtual void GrabFocus() override
Definition: svtabbx.cxx:1006
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1668
SvTreeList * GetModel() const
vcl::Window * GetAccessibleParentWindow() const
bool IsCellCheckBox(long _nRow, sal_uInt16 _nColumn, TriState &_rState)
Definition: svtabbx.cxx:572
sal_uIntPtr sal_uLong
virtual sal_Int32 GetAccessibleControlCount() const override
Definition: svtabbx.cxx:809
sal_uLong GetEntryCount() const
virtual long GetRowCount() const override
Definition: svtabbx.cxx:596
sal_Int64 n
SvItemStateFlags
Definition: svlbitm.hxx:45
void SetScrolledHdl(const Link< SvTreeListBox *, void > &rLink)
AccessibleChildren m_aAccessibleChildren
Definition: svtabbx.hxx:106
SvTreeListEntry * GetEntryOnPos(sal_uLong _nEntryPos) const
Definition: svtabbx.cxx:368
sal_uLong GetEntryPos(const SvTreeListEntry *pEntry) const
Definition: svtabbx.cxx:310
long GetPos() const
SvTreeListEntry * GetCurEntry() const
TRISTATE_TRUE
::vcl::IAccessibleTabListBox * m_pAccessible
Definition: svtabbx.hxx:105
SvHeaderTabListBox(vcl::Window *pParent, WinBits nBits)
Definition: svtabbx.cxx:448
virtual bool ConvertPointToCellAddress(sal_Int32 &_rnRow, sal_uInt16 &_rnColPos, const Point &_rPoint) override
Definition: svtabbx.cxx:825
SvLBoxTabFlags nFlags
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow, sal_Int32 _nColumnPos, const Point &_rPoint) override
Definition: svtabbx.cxx:1052
virtual vcl::Window * GetWindowInstance() override
Definition: svtabbx.cxx:1021
sal_Int64 WinBits
virtual void SetNoSelection() override
Definition: svtabbx.cxx:652
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 _nRow, sal_uInt16 _nColumn) override
Definition: svtabbx.cxx:759
virtual sal_Int32 GetSelectedColumnCount() const override
Definition: svtabbx.cxx:676
void setX(long nX)
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
virtual tools::Rectangle calcTableRect(bool _bOnScreen=true) override
Definition: svtabbx.cxx:724
int nCount
virtual bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector) override
Definition: svtabbx.cxx:996
virtual OUString GetAccessibleObjectDescription(::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos=-1) const override
Definition: svtabbx.cxx:888
virtual OUString GetAccessibleCellText(long _nRow, sal_uInt16 _nColumnPos) const override
Definition: svtabbx.cxx:705
void SelectAll(bool bSelect, bool bPaint=true)
virtual OUString GetText() const
Definition: window.cxx:3056
VclPtr< HeaderBar > m_pHeaderBar
Definition: svtabbx.cxx:441
virtual bool IsColumnSelected(long _nColumn) const override
Definition: svtabbx.cxx:687
virtual bool GoToCell(sal_Int32 _nRow, sal_uInt16 _nColumn) override
Definition: svtabbx.cxx:647
virtual bool IsCellVisible(sal_Int32 _nRow, sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:700
static constexpr SvLBoxTabFlags MYTABMASK
Definition: svtabbx.cxx:37
virtual tools::Rectangle calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen=true) override
Definition: svtabbx.cxx:710
virtual bool ConvertPointToControlIndex(sal_Int32 &_rnIndex, const Point &_rPoint) override
Definition: svtabbx.cxx:820
TRISTATE_INDET
virtual void SetTabs() override
Definition: svtabbx.cxx:42
void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff)
The row header bar ("handle column").
size_t ItemCount() const
virtual vcl::Window * GetAccessibleParentWindow() const override
Definition: svtabbx.cxx:1016
sal_uLong GetLevelChildCount(SvTreeListEntry *pParent) const
virtual sal_uLong Insert(SvTreeListEntry *pEnt, SvTreeListEntry *pPar, sal_uLong nPos=TREELIST_APPEND) override
Definition: svtabbx.cxx:522
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: svtabbx.cxx:104
#define DBG_ASSERT(sCon, aError)
virtual sal_Int32 GetSelectedRowCount() const override
Definition: svtabbx.cxx:671
a client for the accessibility implementations which have been outsourced from the main vcl/svtools l...
HeaderBar * GetHeaderBar()
Definition: svtabbx.cxx:485
std::unique_ptr<::vcl::SvHeaderTabListBoxImpl > m_pImpl
Definition: svtabbx.hxx:104
virtual void SetTabs()
virtual void SetText(const OUString &rStr) override
Definition: ctrl.cxx:95
int i
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleColumnHeader(sal_uInt16 _nColumnPos) override
Definition: svtabbx.cxx:783
virtual bool ConvertPointToColumnHeader(sal_uInt16 &_rnColPos, const Point &_rPoint) override
Definition: svtabbx.cxx:835
TRISTATE_FALSE
virtual void SelectRow(long _nRow, bool _bSelect=true, bool bExpand=true) override
Definition: svtabbx.cxx:662
bool IsUpdateMode() const
Definition: window2.cxx:1168
bool IsSelected(SvTreeListEntry *pEntry) const
Definition: treelist.cxx:1372
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
virtual ~SvTabListBox() override
Definition: svtabbx.cxx:99
SvButtonState
Definition: treelistbox.hxx:57
std::vector< SvLBoxTab > mvTabList
Definition: svtabbx.hxx:41
void AddTab(long nPos, SvLBoxTabFlags nFlags)
A cell of the row header bar.
void InitHeaderBar(HeaderBar *pHeaderBar)
Definition: svtabbx.cxx:476
virtual SvTreeListEntry * InsertEntry(const OUString &rText, SvTreeListEntry *pParent=nullptr, bool bChildrenOnDemand=false, sal_uLong nPos=TREELIST_APPEND, void *pUserData=nullptr)
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Creates and returns the accessible object of the whole BrowseBox.
Definition: svtabbx.cxx:1026
virtual void GetAllSelectedRows(css::uno::Sequence< sal_Int32 > &_rRows) const override
Definition: svtabbx.cxx:692
virtual void InitEntry(SvTreeListEntry *, const OUString &, const Image &, const Image &)
const SvLBoxItem & GetItem(size_t nPos) const
void SetTabJustify(sal_uInt16 nTab, SvTabJustify)
Definition: svtabbx.cxx:412
void GrabFocus()
Definition: window.cxx:2977
Size GetSize() const
SvItemStateFlags GetButtonFlags() const
Definition: svlbitm.hxx:173
void SetEntryText(const OUString &, SvTreeListEntry *, sal_uInt16 nCol=0xffff)
Definition: svtabbx.cxx:263
#define OFFSET_NONE
virtual SvLBoxItemType GetType() const =0
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
std::vector< std::unique_ptr< SvLBoxTab > > aTabs
SvTreeListEntry * Next(SvTreeListEntry *pEntry) const
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:285
virtual sal_Int32 GetCurrRow() const override
Definition: svtabbx.cxx:606
OUString GetCellText(sal_uLong nPos, sal_uInt16 nCol) const
Definition: svtabbx.cxx:296
virtual css::uno::Reference< css::accessibility::XAccessible > getMyself()=0
returns the XAccessible object itself
SvTreeListEntry * First() const
virtual bool IsRowSelected(long _nRow) const override
Definition: svtabbx.cxx:681
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: svtabbx.cxx:467
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
virtual void GetAllSelectedColumns(css::uno::Sequence< sal_Int32 > &_rColumns) const override
Definition: svtabbx.cxx:696
virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow, sal_Int32 _nColumnPos, sal_Int32 nIndex) override
Definition: svtabbx.cxx:1047
virtual tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const override
Definition: svtabbx.cxx:1001
def rectangle(l)
virtual OUString GetEntryText(SvTreeListEntry *pEntry) const override
Definition: svtabbx.cxx:220
virtual void InitEntry(SvTreeListEntry *, const OUString &, const Image &, const Image &) override
Definition: svtabbx.cxx:78
The BrowseBox itself.
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override
Definition: svtabbx.cxx:1011
virtual css::uno::Reference< css::accessibility::XAccessible > getHeaderBar()=0
returns the accessible object for the column header bar
OUString GetTabEntryText(sal_uLong nPos, sal_uInt16 nCol) const
Definition: svtabbx.cxx:330
SvTreeListEntry * GetEntry(SvTreeListEntry *pParent, sal_uLong nPos) const
Definition: image.hxx:40
AccessibleBrowseBoxObjType
This enumeration contains a constant for each kind of accessible object of a BrowseBox.
virtual bool HasRowHeader() const override
Definition: svtabbx.cxx:642
virtual void FillAccessibleStateSet(::utl::AccessibleStateSetHelper &_rStateSet,::vcl::AccessibleBrowseBoxObjType _eType) const override
Definition: svtabbx.cxx:916
virtual SvTreeListEntry * InsertEntryToColumn(const OUString &, SvTreeListEntry *pParent, sal_uLong nPos, sal_uInt16 nCol, void *pUserData=nullptr) override
Definition: svtabbx.cxx:504
virtual tools::Rectangle GetFieldRectPixelAbs(sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen=true) override
Definition: svtabbx.cxx:734
tools::Rectangle GetBoundingRect(SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
AccessibleFactoryAccess m_aFactoryAccess
Definition: svtabbx.cxx:442
bool IsActive() const
Definition: window2.cxx:1178
void SetTab(sal_uInt16 nTab, long nValue, MapUnit=MapUnit::MapAppFont)
Definition: svtabbx.cxx:130
SvxBoxItem & rBoxItem
virtual OUString GetAccessibleObjectName(::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos=-1) const override
Definition: svtabbx.cxx:840
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
static OUString GetToken(const OUString &sStr, sal_Int32 &nIndex)
Definition: svtabbx.cxx:325
virtual void SelectColumn(sal_uInt16 _nColumn, bool _bSelect=true) override
Definition: svtabbx.cxx:667
virtual sal_uInt16 GetColumnCount() const override
Definition: svtabbx.cxx:601
bool IsEnabled() const
Definition: window2.cxx:1117
MapUnit
#define SAL_WARN(area, stream)
long GetLogicTab(sal_uInt16 nTab)
Definition: svtabbx.cxx:428
OUString VclResId(const char *pId)
Definition: svdata.cxx:266
virtual OUString GetRowDescription(sal_Int32 _nRow) const override
Definition: svtabbx.cxx:632
virtual bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader(sal_Int32 _nRow) override
Definition: svtabbx.cxx:777
virtual bool ConvertPointToRowHeader(sal_Int32 &_rnRow, const Point &_rPoint) override
Definition: svtabbx.cxx:830
virtual OUString GetColumnDescription(sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:637
SvLBoxTabFlags
Definition: treelistbox.hxx:63
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
bool IsReallyVisible() const
Definition: window2.cxx:1102
SvTreeFlags nTreeFlags
TriState
virtual void FillAccessibleStateSetForCell(::utl::AccessibleStateSetHelper &_rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:971
bool HasFocus() const
Definition: window.cxx:2982
sal_uLong GetSelectionCount() const
Definition: treelist.cxx:1092
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: svtabbx.cxx:461
virtual sal_uLong Insert(SvTreeListEntry *pEnt, SvTreeListEntry *pPar, sal_uLong nPos=TREELIST_APPEND)
void AddState(sal_Int16 aState)
virtual void GrabTableFocus() override
Definition: svtabbx.cxx:991
DefTokenId const nToken
aStr
static bool IsItemChecked(SvTreeListEntry *pEntry, sal_uInt16 nCol)
Definition: svtabbx.cxx:490
tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const
Definition: window.cxx:2901
virtual sal_uInt16 GetCurrColumn() const override
Definition: svtabbx.cxx:626
SvTreeListEntry * GetChildOnPos(SvTreeListEntry *_pParent, sal_uLong _nEntryPos, sal_uLong &_rPos) const
Definition: svtabbx.cxx:392
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
The horizontal column header bar.
sal_uInt16 nPos
IMPL_LINK_NOARG(SvHeaderTabListBox, ScrollHdl_Impl, SvTreeListBox *, void)
Definition: svtabbx.cxx:537
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl(sal_Int32 _nIndex) override
Definition: svtabbx.cxx:814
virtual ~SvHeaderTabListBox() override
Definition: svtabbx.cxx:456
void RecalculateAccessibleChildren()
Definition: svtabbx.cxx:558