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