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 nTextColumn = nCol;
275  const sal_uInt16 nCount = pEntry->ItemCount();
276  for (sal_uInt16 nCur = 0; nCur < nCount; ++nCur)
277  {
278  SvLBoxItem& rBoxItem = pEntry->GetItem( nCur );
279  if (rBoxItem.GetType() == SvLBoxItemType::String)
280  {
281  if (!nCol || nCol==0xFFFF)
282  {
283  const OUString aTemp(GetToken(rStr, nIndex));
284  static_cast<SvLBoxString&>(rBoxItem).SetText( aTemp );
285  if (!nCol && nIndex<0)
286  break;
287  }
288  else
289  {
290  --nCol;
291  }
292  }
293  }
294  GetModel()->InvalidateEntry( pEntry );
295 
296  std::unique_ptr<TabListBoxEventData> pData( new TabListBoxEventData( pEntry, nTextColumn, sOldText ) );
298 }
299 
300 OUString SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
301 {
302  SvTreeListEntry* pEntry = GetEntryOnPos( nPos );
303  DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
304  OUString aResult;
305  if (pEntry && pEntry->ItemCount() > static_cast<size_t>(nCol+1))
306  {
307  const SvLBoxItem& rStr = pEntry->GetItem( nCol + 1 );
308  if (rStr.GetType() == SvLBoxItemType::String)
309  aResult = static_cast<const SvLBoxString&>(rStr).GetText();
310  }
311  return aResult;
312 }
313 
315 {
316  sal_uLong nPos = 0;
317  SvTreeListEntry* pTmpEntry = First();
318  while( pTmpEntry )
319  {
320  if ( pTmpEntry == pEntry )
321  return nPos;
322  pTmpEntry = Next( pTmpEntry );
323  ++nPos;
324  }
325  return 0xffffffff;
326 }
327 
328 // static
329 OUString SvTabListBox::GetToken( const OUString &sStr, sal_Int32& nIndex )
330 {
331  return sStr.getToken(0, '\t', nIndex);
332 }
333 
334 OUString SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
335 {
336  SvTreeListEntry* pEntry = SvTreeListBox::GetEntry( nPos );
337  DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
338  OUStringBuffer aResult;
339  if ( pEntry )
340  {
341  sal_uInt16 nCount = pEntry->ItemCount();
342  sal_uInt16 nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
343  while( nCur < nCount )
344  {
345  const SvLBoxItem& rBoxItem = pEntry->GetItem( nCur );
346  if (rBoxItem.GetType() == SvLBoxItemType::String)
347  {
348  if ( nCol == 0xffff )
349  {
350  if (!aResult.isEmpty())
351  aResult.append("\t");
352  aResult.append(static_cast<const SvLBoxString&>(rBoxItem).GetText());
353  }
354  else
355  {
356  if ( nCol == 0 )
357  {
358  OUString sRet = static_cast<const SvLBoxString&>(rBoxItem).GetText();
359  if ( sRet.isEmpty() )
360  sRet = VclResId( STR_SVT_ACC_EMPTY_FIELD );
361  return sRet;
362  }
363  --nCol;
364  }
365  }
366  ++nCur;
367  }
368  }
369  return aResult.makeStringAndClear();
370 }
371 
373 {
374  SvTreeListEntry* pEntry = nullptr;
375  sal_uLong i, nPos = 0, nCount = GetLevelChildCount( nullptr );
376  for ( i = 0; i < nCount; ++i )
377  {
378  SvTreeListEntry* pParent = GetEntry(i);
379  if ( nPos == _nEntryPos )
380  {
381  pEntry = pParent;
382  break;
383  }
384  else
385  {
386  nPos++;
387  pEntry = GetChildOnPos( pParent, _nEntryPos, nPos );
388  if ( pEntry )
389  break;
390  }
391  }
392 
393  return pEntry;
394 }
395 
397 {
398  sal_uLong i, nCount = GetLevelChildCount( _pParent );
399  for ( i = 0; i < nCount; ++i )
400  {
401  SvTreeListEntry* pParent = GetEntry( _pParent, i );
402  if ( _rPos == _nEntryPos )
403  return pParent;
404  else
405  {
406  _rPos++;
407  SvTreeListEntry* pEntry = GetChildOnPos( pParent, _nEntryPos, _rPos );
408  if ( pEntry )
409  return pEntry;
410  }
411  }
412 
413  return nullptr;
414 }
415 
416 void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
417 {
418  DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab");
419  if( nTab >= mvTabList.size() )
420  return;
421  SvLBoxTab& rTab = mvTabList[ nTab ];
422  SvLBoxTabFlags nFlags = rTab.nFlags;
423  nFlags &= ~MYTABMASK;
424  // see SvLBoxTab::CalcOffset for force, which only matters for centering
425  nFlags |= static_cast<SvLBoxTabFlags>(eJustify) | SvLBoxTabFlags::FORCE;
426  rTab.nFlags = nFlags;
428  if( IsUpdateMode() )
429  Invalidate();
430 }
431 
432 long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
433 {
435  SetTabs();
436 
437  DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab");
438  return aTabs[ nTab ]->GetPos();
439 }
440 
441 namespace vcl
442 {
444  {
447 
448  SvHeaderTabListBoxImpl() : m_pHeaderBar( nullptr ) { }
449  };
450 }
451 
453  : SvTabListBox(pParent, nWinStyle)
454  , m_bFirstPaint(true)
455  , m_pImpl(new ::vcl::SvHeaderTabListBoxImpl)
456  , m_pAccessible(nullptr)
457 {
458 }
459 
461 {
462  disposeOnce();
463 }
464 
466 {
467  m_pImpl.reset();
469 }
470 
471 void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect )
472 {
473  if (m_bFirstPaint)
474  {
475  m_bFirstPaint = false;
476  }
477  SvTabListBox::Paint(rRenderContext, rRect);
478 }
479 
481 {
482  DBG_ASSERT( !m_pImpl->m_pHeaderBar, "header bar already initialized" );
483  DBG_ASSERT( pHeaderBar, "invalid header bar initialization" );
484  m_pImpl->m_pHeaderBar = pHeaderBar;
485  SetScrolledHdl( LINK( this, SvHeaderTabListBox, ScrollHdl_Impl ) );
486  m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl( LINK( this, SvHeaderTabListBox, CreateAccessibleHdl_Impl ) );
487 }
488 
490 {
491  return m_pImpl ? m_pImpl->m_pHeaderBar : nullptr;
492 }
493 
494 bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol )
495 {
497  SvLBoxButton& rItem = static_cast<SvLBoxButton&>( pEntry->GetItem( nCol + 1 ) );
498 
499  if (rItem.GetType() == SvLBoxItemType::Button)
500  {
501  SvItemStateFlags nButtonFlags = rItem.GetButtonFlags();
502  eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
503  }
504 
505  return ( eState == SvButtonState::Checked );
506 }
507 
509  const OUString& rStr, SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
510 {
511  SvTreeListEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, pParent, nPos, nCol, pUserData );
513  return pEntry;
514 }
515 
517  const OUString& rStr, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
518  SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
519 {
521  rStr, rExpandedEntryBmp, rCollapsedEntryBmp, pParent, nPos, nCol, pUserData );
523  return pEntry;
524 }
525 
527  SvTreeListEntry* pEnt, SvTreeListEntry* pPar, sal_uLong nPos )
528 {
529  sal_uLong n = SvTabListBox::Insert( pEnt, pPar, nPos );
531  return n;
532 }
533 
535 {
536  sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
538  return nPos;
539 }
540 
542 {
543  m_pImpl->m_pHeaderBar->SetOffset( -GetXOffset() );
544 }
545 
546 IMPL_LINK_NOARG(SvHeaderTabListBox, CreateAccessibleHdl_Impl, HeaderBar*, void)
547 {
548  vcl::Window* pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow();
549  DBG_ASSERT( pParent, "SvHeaderTabListBox..CreateAccessibleHdl_Impl - accessible parent not found" );
550  if ( pParent )
551  {
552  css::uno::Reference< XAccessible > xAccParent = pParent->GetAccessible();
553  if ( xAccParent.is() )
554  {
555  Reference< XAccessible > xAccessible = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxHeaderBar(
556  xAccParent, *this, ::vcl::BBTYPE_COLUMNHEADERBAR );
557  m_pImpl->m_pHeaderBar->SetAccessible( xAccessible );
558  }
559  }
560 }
561 
563 {
564  if ( !m_aAccessibleChildren.empty() )
565  {
566  sal_uInt32 nCount = ( GetRowCount() + 1 ) * GetColumnCount();
567  if ( m_aAccessibleChildren.size() < nCount )
568  m_aAccessibleChildren.resize( nCount );
569  else
570  {
571  DBG_ASSERT( m_aAccessibleChildren.size() == nCount, "wrong children count" );
572  }
573  }
574 }
575 
576 bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriState& _rState )
577 {
578  bool bRet = false;
579  SvTreeListEntry* pEntry = GetEntry( _nRow );
580  if ( pEntry )
581  {
582  sal_uInt16 nItemCount = pEntry->ItemCount();
583  if ( nItemCount > ( _nColumn + 1 ) )
584  {
585  SvLBoxItem& rItem = pEntry->GetItem( _nColumn + 1 );
586  if (rItem.GetType() == SvLBoxItemType::Button)
587  {
588  bRet = true;
589  _rState = ( ( static_cast<SvLBoxButton&>(rItem).GetButtonFlags() & SvItemStateFlags::UNCHECKED ) == SvItemStateFlags::NONE )
591  }
592  }
593  else
594  {
595  SAL_WARN( "svtools.contnr", "SvHeaderTabListBox::IsCellCheckBox(): column out of range" );
596  }
597  }
598  return bRet;
599 }
601 {
602  return GetEntryCount();
603 }
604 
606 {
607  return m_pImpl->m_pHeaderBar->GetItemCount();
608 }
609 
611 {
612  sal_Int32 nRet = -1;
613  SvTreeListEntry* pEntry = GetCurEntry();
614  if ( pEntry )
615  {
616  sal_uLong nCount = GetEntryCount();
617  for ( sal_uLong i = 0; i < nCount; ++i )
618  {
619  if ( pEntry == GetEntry(i) )
620  {
621  nRet = i;
622  break;
623  }
624  }
625  }
626 
627  return nRet;
628 }
629 
631 {
632  sal_uInt16 nPos = GetCurrentTabPos() - 1;
633  return nPos;
634 }
635 
636 OUString SvHeaderTabListBox::GetRowDescription( sal_Int32 _nRow ) const
637 {
638  return GetEntryText( _nRow );
639 }
640 
641 OUString SvHeaderTabListBox::GetColumnDescription( sal_uInt16 _nColumn ) const
642 {
643  return m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
644 }
645 
647 {
648  return false;
649 }
650 
651 bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
652 {
653  bool bRet = IsCellFocusEnabled();
654  if ( bRet )
655  {
656  // first set cursor to _nRow
657  SetCursor( GetEntry( _nRow ), true );
658  // then set the focus into _nColumn
659  bRet = SetCurrentTabPos( _nColumn );
660  }
661  return bRet;
662 }
663 
665 {
667 }
668 
670 {
672 }
673 
674 void SvHeaderTabListBox::SelectRow( long _nRow, bool _bSelect, bool )
675 {
676  Select( GetEntry( _nRow ), _bSelect );
677 }
678 
679 void SvHeaderTabListBox::SelectColumn( sal_uInt16, bool )
680 {
681 }
682 
684 {
685  return GetSelectionCount();
686 }
687 
689 {
690  return 0;
691 }
692 
693 bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
694 {
695  SvTreeListEntry* pEntry = GetEntry( _nRow );
696  return ( pEntry && IsSelected( pEntry ) );
697 }
698 
700 {
701  return false;
702 }
703 
704 void SvHeaderTabListBox::GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& ) const
705 {
706 }
707 
708 void SvHeaderTabListBox::GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& ) const
709 {
710 }
711 
712 bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
713 {
714  return true;
715 }
716 
717 OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
718 {
719  return GetTabEntryText(_nRow, _nColumnPos);
720 }
721 
722 tools::Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen )
723 {
724  tools::Rectangle aRect;
725  if ( _bIsColumnBar )
726  {
727  vcl::Window* pParent = nullptr;
728  if ( !_bOnScreen )
729  pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow();
730 
731  aRect = m_pImpl->m_pHeaderBar->GetWindowExtentsRelative( pParent );
732  }
733  return aRect;
734 }
735 
737 {
738  vcl::Window* pParent = nullptr;
739  if ( !_bOnScreen )
740  pParent = GetAccessibleParentWindow();
741 
742  tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) );
743  return aRect;
744 }
745 
746 tools::Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen )
747 {
748  DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" );
749  tools::Rectangle aRect;
750  SvTreeListEntry* pEntry = GetEntry( _nRow );
751  if ( pEntry )
752  {
753  aRect = _bIsHeader ? calcHeaderRect( true, false ) : GetBoundingRect( pEntry );
754  Point aTopLeft = aRect.TopLeft();
755  DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" );
756  tools::Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
757  aTopLeft.setX( aItemRect.Left() );
758  Size aSize = aItemRect.GetSize();
759  aRect = tools::Rectangle( aTopLeft, aSize );
760  vcl::Window* pParent = nullptr;
761  if ( !_bOnScreen )
762  pParent = GetAccessibleParentWindow();
763  aTopLeft = aRect.TopLeft();
764  aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft();
765  aRect = tools::Rectangle( aTopLeft, aRect.GetSize() );
766  }
767 
768  return aRect;
769 }
770 
771 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
772 {
773  OSL_ENSURE( m_pAccessible, "Invalid call: Accessible is null" );
774 
775  Reference< XAccessible > xChild;
776 
777  TriState eState = TRISTATE_INDET;
778  bool bIsCheckBox = IsCellCheckBox( _nRow, _nColumnPos, eState );
779  if ( bIsCheckBox )
780  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleCheckBoxCell(
781  m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, eState, false );
782  else
783  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell(
784  m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, OFFSET_NONE );
785 
786  return xChild;
787 }
788 
789 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleRowHeader( sal_Int32 )
790 {
791  Reference< XAccessible > xHeader;
792  return xHeader;
793 }
794 
795 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_uInt16 _nColumn )
796 {
797  // first call? -> initial list
798  if ( m_aAccessibleChildren.empty() )
799  {
800  const sal_uInt16 nColumnCount = GetColumnCount();
801  m_aAccessibleChildren.assign( nColumnCount, Reference< XAccessible >() );
802  }
803 
804  // get header
805  Reference< XAccessible > xChild = m_aAccessibleChildren[ _nColumn ];
806  // already exists?
807  if ( !xChild.is() && m_pAccessible )
808  {
809  // no -> create new header cell
810  xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxHeaderCell(
811  _nColumn, m_pAccessible->getHeaderBar(),
812  *this, nullptr, ::vcl::BBTYPE_COLUMNHEADERCELL
813  );
814 
815  // insert into list
816  m_aAccessibleChildren[ _nColumn ] = xChild;
817  }
818  return xChild;
819 }
820 
822 {
823  return -1;
824 }
825 
826 Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleControl( sal_Int32 )
827 {
828  Reference< XAccessible > xControl;
829  return xControl;
830 }
831 
833 {
834  return false;
835 }
836 
837 bool SvHeaderTabListBox::ConvertPointToCellAddress( sal_Int32&, sal_uInt16&, const Point& )
838 {
839  return false;
840 }
841 
843 {
844  return false;
845 }
846 
848 {
849  return false;
850 }
851 
853 {
854  OUString aRetText;
855  switch( _eType )
856  {
860  // should be empty now (see #i63983)
861  aRetText.clear();
862  break;
863 
865  {
866  // here we need a valid pos, we can not handle -1
867  if ( _nPos >= 0 )
868  {
869  sal_uInt16 nColumnCount = GetColumnCount();
870  if (nColumnCount > 0)
871  {
872  sal_Int32 nRow = _nPos / nColumnCount;
873  sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
874  aRetText = GetCellText( nRow, nColumn );
875  }
876  }
877  break;
878  }
880  {
881  break; // checkbox cells have no name
882  }
884  {
885  aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( static_cast<sal_uInt16>(_nPos) ) );
886  break;
887  }
888 
891  aRetText = "error";
892  break;
893 
894  default:
895  OSL_FAIL("BrowseBox::GetAccessibleName: invalid enum!");
896  }
897  return aRetText;
898 }
899 
901 {
902  OUString aRetText;
903 
904  if( _eType == ::vcl::BBTYPE_TABLECELL && _nPos != -1 )
905  {
906  const OUString sVar1( "%1" );
907  const OUString sVar2( "%2" );
908 
909  sal_uInt16 nColumnCount = GetColumnCount();
910  if (nColumnCount > 0)
911  {
912  sal_Int32 nRow = _nPos / nColumnCount;
913  sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
914 
915  OUString aText( VclResId(STR_SVT_ACC_DESC_TABLISTBOX) );
916  aText = aText.replaceFirst( sVar1, OUString::number( nRow ) );
917  OUString sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
918  if ( sColHeader.isEmpty() )
919  sColHeader = OUString::number( nColumn );
920  aText = aText.replaceFirst( sVar2, sColHeader );
921  aRetText = aText;
922  }
923  }
924 
925  return aRetText;
926 }
927 
929 {
930  switch( _eType )
931  {
934  {
935  _rStateSet.AddState( AccessibleStateType::FOCUSABLE );
936  if ( HasFocus() )
937  _rStateSet.AddState( AccessibleStateType::FOCUSED );
938  if ( IsActive() )
939  _rStateSet.AddState( AccessibleStateType::ACTIVE );
940  if ( IsEnabled() )
941  {
942  _rStateSet.AddState( AccessibleStateType::ENABLED );
943  _rStateSet.AddState( AccessibleStateType::SENSITIVE );
944  }
945  if ( IsReallyVisible() )
946  _rStateSet.AddState( AccessibleStateType::VISIBLE );
947  if ( _eType == ::vcl::BBTYPE_TABLE )
948  {
949 
950  _rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
951  _rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
952  }
953  break;
954  }
955 
957  {
958  sal_Int32 nCurRow = GetCurrRow();
959  sal_uInt16 nCurColumn = GetCurrColumn();
960  if ( IsCellVisible( nCurRow, nCurColumn ) )
961  _rStateSet.AddState( AccessibleStateType::VISIBLE );
962  if ( IsEnabled() )
963  _rStateSet.AddState( AccessibleStateType::ENABLED );
964  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
965  break;
966  }
967 
970  {
971  _rStateSet.AddState( AccessibleStateType::VISIBLE );
972  _rStateSet.AddState( AccessibleStateType::FOCUSABLE );
973  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
974  if ( IsEnabled() )
975  _rStateSet.AddState( AccessibleStateType::ENABLED );
976  break;
977  }
978  default:
979  break;
980  }
981 }
982 
983 void SvHeaderTabListBox::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumn ) const
984 {
985  _rStateSet.AddState( AccessibleStateType::SELECTABLE );
986  _rStateSet.AddState( AccessibleStateType::TRANSIENT );
987 
988  if ( IsCellVisible( _nRow, _nColumn ) )
989  {
990  _rStateSet.AddState( AccessibleStateType::VISIBLE );
991  _rStateSet.AddState( AccessibleStateType::ENABLED );
992  }
993 
994  if ( IsRowSelected( _nRow ) )
995  {
996  _rStateSet.AddState( AccessibleStateType::ACTIVE );
997  _rStateSet.AddState( AccessibleStateType::SELECTED );
998  }
999  if ( IsEnabled() )
1000  _rStateSet.AddState( AccessibleStateType::ENABLED );
1001 }
1002 
1004 {
1005  GrabFocus();
1006 }
1007 
1008 bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector )
1009 {
1010  return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector );
1011 }
1012 
1014 {
1015  return Control::GetWindowExtentsRelative( pRelativeWindow );
1016 }
1017 
1019 {
1021 }
1022 
1023 Reference< XAccessible > SvHeaderTabListBox::GetAccessible()
1024 {
1025  return Control::GetAccessible();
1026 }
1027 
1029 {
1031 }
1032 
1034 {
1035  return this;
1036 }
1037 
1038 Reference< XAccessible > SvHeaderTabListBox::CreateAccessible()
1039 {
1041  DBG_ASSERT( pParent, "SvHeaderTabListBox::::CreateAccessible - accessible parent not found" );
1042 
1043  Reference< XAccessible > xAccessible;
1044  if ( m_pAccessible ) xAccessible = m_pAccessible->getMyself();
1045 
1046  if( pParent && !m_pAccessible )
1047  {
1048  Reference< XAccessible > xAccParent = pParent->GetAccessible();
1049  if ( xAccParent.is() )
1050  {
1051  m_pAccessible = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleTabListBox( xAccParent, *this );
1052  if ( m_pAccessible )
1053  xAccessible = m_pAccessible->getMyself();
1054  }
1055  }
1056  return xAccessible;
1057 }
1058 
1060 {
1061  return tools::Rectangle();
1062 }
1063 
1064 sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
1065 {
1066  OUString sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
1067  MetricVector aRects;
1068  if ( GetGlyphBoundRects(Point(0,0), sText, 0, sText.getLength(), aRects) )
1069  {
1070  sal_Int32 nPos = 0;
1071  for (auto const& rectangle : aRects)
1072  {
1073  if( rectangle.IsInside(_rPoint) )
1074  return nPos;
1075  ++nPos;
1076  }
1077  }
1078 
1079  return -1;
1080 }
1081 
1082 /* 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:669
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:52
virtual void GrabFocus() override
Definition: svtabbx.cxx:1018
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1674
SvTreeList * GetModel() const
vcl::Window * GetAccessibleParentWindow() const
bool IsCellCheckBox(long _nRow, sal_uInt16 _nColumn, TriState &_rState)
Definition: svtabbx.cxx:576
sal_uIntPtr sal_uLong
virtual sal_Int32 GetAccessibleControlCount() const override
Definition: svtabbx.cxx:821
sal_uLong GetEntryCount() const
virtual long GetRowCount() const override
Definition: svtabbx.cxx:600
SvItemStateFlags
Definition: svlbitm.hxx:45
void SetScrolledHdl(const Link< SvTreeListBox *, void > &rLink)
AccessibleChildren m_aAccessibleChildren
Definition: svtabbx.hxx:116
void SetCursor(SvTreeListEntry *pEntry, bool bForceNoSelect=false)
SvTreeListEntry * GetEntryOnPos(sal_uLong _nEntryPos) const
Definition: svtabbx.cxx:372
sal_uLong GetEntryPos(const SvTreeListEntry *pEntry) const
Definition: svtabbx.cxx:314
long GetPos() const
SvTreeListEntry * GetCurEntry() const
TRISTATE_TRUE
::vcl::IAccessibleTabListBox * m_pAccessible
Definition: svtabbx.hxx:115
SvHeaderTabListBox(vcl::Window *pParent, WinBits nBits)
Definition: svtabbx.cxx:452
virtual bool ConvertPointToCellAddress(sal_Int32 &_rnRow, sal_uInt16 &_rnColPos, const Point &_rPoint) override
Definition: svtabbx.cxx:837
SvLBoxTabFlags nFlags
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow, sal_Int32 _nColumnPos, const Point &_rPoint) override
Definition: svtabbx.cxx:1064
virtual vcl::Window * GetWindowInstance() override
Definition: svtabbx.cxx:1033
sal_Int64 WinBits
virtual void SetNoSelection() override
Definition: svtabbx.cxx:664
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 _nRow, sal_uInt16 _nColumn) override
Definition: svtabbx.cxx:771
virtual sal_Int32 GetSelectedColumnCount() const override
Definition: svtabbx.cxx:688
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:736
virtual bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector) override
Definition: svtabbx.cxx:1008
virtual OUString GetAccessibleObjectDescription(::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos=-1) const override
Definition: svtabbx.cxx:900
virtual OUString GetAccessibleCellText(long _nRow, sal_uInt16 _nColumnPos) const override
Definition: svtabbx.cxx:717
void SelectAll(bool bSelect, bool bPaint=true)
virtual OUString GetText() const
Definition: window.cxx:3059
VclPtr< HeaderBar > m_pHeaderBar
Definition: svtabbx.cxx:445
virtual bool IsColumnSelected(long _nColumn) const override
Definition: svtabbx.cxx:699
virtual bool GoToCell(sal_Int32 _nRow, sal_uInt16 _nColumn) override
Definition: svtabbx.cxx:651
virtual bool IsCellVisible(sal_Int32 _nRow, sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:712
static constexpr SvLBoxTabFlags MYTABMASK
Definition: svtabbx.cxx:37
virtual tools::Rectangle calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen=true) override
Definition: svtabbx.cxx:722
virtual bool ConvertPointToControlIndex(sal_Int32 &_rnIndex, const Point &_rPoint) override
Definition: svtabbx.cxx:832
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:1028
sal_uLong GetLevelChildCount(SvTreeListEntry *pParent) const
virtual sal_uLong Insert(SvTreeListEntry *pEnt, SvTreeListEntry *pPar, sal_uLong nPos=TREELIST_APPEND) override
Definition: svtabbx.cxx:526
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:683
a client for the accessibility implementations which have been outsourced from the main vcl/svtools l...
HeaderBar * GetHeaderBar()
Definition: svtabbx.cxx:489
std::unique_ptr<::vcl::SvHeaderTabListBoxImpl > m_pImpl
Definition: svtabbx.hxx:114
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:795
virtual bool ConvertPointToColumnHeader(sal_uInt16 &_rnColPos, const Point &_rPoint) override
Definition: svtabbx.cxx:847
TRISTATE_FALSE
virtual void SelectRow(long _nRow, bool _bSelect=true, bool bExpand=true) override
Definition: svtabbx.cxx:674
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: ctrl.cxx:297
bool IsUpdateMode() const
Definition: window2.cxx:1162
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:51
void AddTab(long nPos, SvLBoxTabFlags nFlags)
A cell of the row header bar.
void InitHeaderBar(HeaderBar *pHeaderBar)
Definition: svtabbx.cxx:480
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:1038
virtual void GetAllSelectedRows(css::uno::Sequence< sal_Int32 > &_rRows) const override
Definition: svtabbx.cxx:704
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:416
void GrabFocus()
Definition: window.cxx:2980
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:610
OUString GetCellText(sal_uLong nPos, sal_uInt16 nCol) const
Definition: svtabbx.cxx:300
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:693
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: svtabbx.cxx:471
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
virtual void GetAllSelectedColumns(css::uno::Sequence< sal_Int32 > &_rColumns) const override
Definition: svtabbx.cxx:708
virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow, sal_Int32 _nColumnPos, sal_Int32 nIndex) override
Definition: svtabbx.cxx:1059
virtual tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const override
Definition: svtabbx.cxx:1013
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:1023
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:334
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:646
virtual void FillAccessibleStateSet(::utl::AccessibleStateSetHelper &_rStateSet,::vcl::AccessibleBrowseBoxObjType _eType) const override
Definition: svtabbx.cxx:928
virtual SvTreeListEntry * InsertEntryToColumn(const OUString &, SvTreeListEntry *pParent, sal_uLong nPos, sal_uInt16 nCol, void *pUserData=nullptr) override
Definition: svtabbx.cxx:508
virtual tools::Rectangle GetFieldRectPixelAbs(sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen=true) override
Definition: svtabbx.cxx:746
tools::Rectangle GetBoundingRect(SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
AccessibleFactoryAccess m_aFactoryAccess
Definition: svtabbx.cxx:446
bool IsActive() const
Definition: window2.cxx:1172
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:852
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:329
virtual void SelectColumn(sal_uInt16 _nColumn, bool _bSelect=true) override
Definition: svtabbx.cxx:679
virtual sal_uInt16 GetColumnCount() const override
Definition: svtabbx.cxx:605
bool IsEnabled() const
Definition: window2.cxx:1111
MapUnit
#define SAL_WARN(area, stream)
long GetLogicTab(sal_uInt16 nTab)
Definition: svtabbx.cxx:432
OUString VclResId(const char *pId)
Definition: svdata.cxx:258
virtual OUString GetRowDescription(sal_Int32 _nRow) const override
Definition: svtabbx.cxx:636
bool IsCellFocusEnabled() const
virtual bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader(sal_Int32 _nRow) override
Definition: svtabbx.cxx:789
virtual bool ConvertPointToRowHeader(sal_Int32 &_rnRow, const Point &_rPoint) override
Definition: svtabbx.cxx:842
virtual OUString GetColumnDescription(sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:641
bool SetCurrentTabPos(sal_uInt16 _nNewPos)
SvLBoxTabFlags
Definition: treelistbox.hxx:63
bool IsReallyVisible() const
Definition: window2.cxx:1096
SvTreeFlags nTreeFlags
TriState
virtual void FillAccessibleStateSetForCell(::utl::AccessibleStateSetHelper &_rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumn) const override
Definition: svtabbx.cxx:983
bool HasFocus() const
Definition: window.cxx:2985
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:465
sal_Int32 nPos
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:1003
DefTokenId const nToken
aStr
static bool IsItemChecked(SvTreeListEntry *pEntry, sal_uInt16 nCol)
Definition: svtabbx.cxx:494
tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const
Definition: window.cxx:2904
virtual sal_uInt16 GetCurrColumn() const override
Definition: svtabbx.cxx:630
SvTreeListEntry * GetChildOnPos(SvTreeListEntry *_pParent, sal_uLong _nEntryPos, sal_uLong &_rPos) const
Definition: svtabbx.cxx:396
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
The horizontal column header bar.
IMPL_LINK_NOARG(SvHeaderTabListBox, ScrollHdl_Impl, SvTreeListBox *, void)
Definition: svtabbx.cxx:541
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl(sal_Int32 _nIndex) override
Definition: svtabbx.cxx:826
virtual ~SvHeaderTabListBox() override
Definition: svtabbx.cxx:460
void RecalculateAccessibleChildren()
Definition: svtabbx.cxx:562