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