LibreOffice Module sc (master) 1
AccessibleCsvControl.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
20#include <memory>
21#include <sal/config.h>
22
23#include <utility>
24
26#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
27#include <com/sun/star/accessibility/AccessibleStateType.hpp>
28#include <com/sun/star/accessibility/AccessibleEventId.hpp>
29#include <com/sun/star/accessibility/AccessibleTextType.hpp>
30#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
31#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
32#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
35#include <scitems.hxx>
36#include <editeng/fontitem.hxx>
37#include <editeng/fhgtitem.hxx>
38#include <editeng/langitem.hxx>
39#include <csvtablebox.hxx>
40#include <csvcontrol.hxx>
41#include <csvruler.hxx>
42#include <csvgrid.hxx>
43#include <AccessibleText.hxx>
44#include <editsrc.hxx>
45#include <scresid.hxx>
46#include <strings.hrc>
47#include <scmod.hxx>
48#include <svtools/colorcfg.hxx>
49#include <vcl/svapp.hxx>
50#include <vcl/settings.hxx>
51#include <o3tl/string_view.hxx>
52
53using ::utl::AccessibleRelationSetHelper;
54using ::accessibility::AccessibleStaticTextBase;
55using ::com::sun::star::uno::Any;
56using ::com::sun::star::uno::Reference;
57using ::com::sun::star::uno::Sequence;
58using ::com::sun::star::uno::RuntimeException;
59using ::com::sun::star::uno::XInterface;
60using ::com::sun::star::lang::IndexOutOfBoundsException;
61using ::com::sun::star::beans::PropertyValue;
62using namespace ::com::sun::star::accessibility;
63
66
69
71 : mpControl(&rControl)
72{
73}
74
76{
77 ensureDisposed();
78}
79
81{
82 SolarMutexGuard aGuard;
83 mpControl = nullptr;
84 comphelper::OAccessibleComponentHelper::disposing();
85}
86
87// XAccessibleComponent -------------------------------------------------------
88
89Reference< XAccessible > SAL_CALL ScAccessibleCsvControl::getAccessibleAtPoint( const css::awt::Point& /* rPoint */ )
90{
91 ensureAlive();
92 return nullptr;
93}
94
96{
97 SolarMutexGuard aGuard;
98 ensureAlive();
100}
101
102// events ---------------------------------------------------------------------
103
105{
106 Any aOldAny, aNewAny;
107 if (bFocused)
108 aNewAny <<= AccessibleStateType::FOCUSED;
109 else
110 aOldAny <<= AccessibleStateType::FOCUSED;
111 NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny);
112}
113
115{
116 OSL_FAIL( "ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
117}
118
120{
121 NotifyAccessibleEvent(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any());
122}
123
125{
126 NotifyAccessibleEvent(AccessibleEventId::SELECTION_CHANGED, Any(), Any());
127}
128
129void ScAccessibleCsvControl::SendTableUpdateEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */, bool /* bAllRows */ )
130{
131 OSL_FAIL( "ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
132}
133
134void ScAccessibleCsvControl::SendInsertColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
135{
136 OSL_FAIL( "ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
137}
138
139void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
140{
141 OSL_FAIL( "ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
142}
143
144// helpers --------------------------------------------------------------------
145
147{
148 SolarMutexGuard aGuard;
149 ensureAlive();
150 Size aOutSize(implGetControl().GetOutputSizePixel());
151 return css::awt::Rectangle(0, 0, aOutSize.Width(), aOutSize.Height());
152}
153
155{
156 assert(mpControl && "ScAccessibleCsvControl::implGetControl - missing control");
157 return *mpControl;
158}
159
161{
162 SolarMutexGuard aGuard;
163 sal_Int64 nStateSet = 0;
164 if (isAlive())
165 {
166 const ScCsvControl& rCtrl = implGetControl();
167 nStateSet |= AccessibleStateType::OPAQUE;
168 if( rCtrl.IsEnabled() )
169 nStateSet |= AccessibleStateType::ENABLED;
170 if( rCtrl.IsReallyVisible() )
171 nStateSet |= AccessibleStateType::SHOWING;
172 if( rCtrl.IsVisible() )
173 nStateSet |= AccessibleStateType::VISIBLE;
174 }
175 else
176 nStateSet |= AccessibleStateType::DEFUNC;
177 return nStateSet;
178}
179
180// Ruler ======================================================================
181
183static sal_Int32 lcl_GetApiPos( sal_Int32 nRulerPos )
184{
185 sal_Int32 nApiPos = nRulerPos;
186 sal_Int32 nStart = (nRulerPos - 1) / 10;
187 sal_Int32 nExp = 1;
188 while( nStart >= nExp )
189 {
190 nApiPos += nStart - nExp + 1;
191 nExp *= 10;
192 }
193 return ::std::max( nApiPos, static_cast<sal_Int32>(0) );
194}
195
197static sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos )
198{
199 sal_Int32 nDiv = 10;
200 sal_Int32 nExp = 10;
201 sal_Int32 nRulerPos = 0;
202 sal_Int32 nApiBase = 0;
203 sal_Int32 nApiLimit = 10;
204 while( nApiPos >= nApiLimit )
205 {
206 ++nDiv;
207 nRulerPos = nExp;
208 nExp *= 10;
209 nApiBase = nApiLimit;
210 nApiLimit = lcl_GetApiPos( nExp );
211 }
212 sal_Int32 nRelPos = nApiPos - nApiBase;
213 return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 );
214}
215
217static sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal_Int32 nExp )
218{
219 OSL_ENSURE( nExp > 0, "lcl_ExpandSequence - invalid value" );
220 rSeq.realloc( rSeq.getLength() + nExp );
221 return rSeq.getLength() - nExp;
222}
223
225static void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropName, const SfxPoolItem& rItem, sal_uInt8 nMID )
226{
227 rVal.Name = rPropName;
228 rItem.QueryValue( rVal.Value, nMID );
229}
230
232static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont )
233{
234 SvxFontItem aFontItem( rFont.GetFamilyType(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT );
235 SvxFontHeightItem aHeightItem( rFont.GetFontSize().Height(), 100, ATTR_FONT_HEIGHT );
236 SvxLanguageItem aLangItem( rFont.GetLanguage(), ATTR_FONT_LANGUAGE );
237
238 sal_Int32 nIndex = lcl_ExpandSequence( rSeq, 7 );
239 auto pSeq = rSeq.getArray();
240 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontName", aFontItem, MID_FONT_FAMILY_NAME );
241 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontFamily", aFontItem, MID_FONT_FAMILY );
242 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontStyleName", aFontItem, MID_FONT_STYLE_NAME );
243 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontCharSet", aFontItem, MID_FONT_PITCH );
244 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontPitch", aFontItem, MID_FONT_CHAR_SET );
245 lcl_FillProperty( pSeq[ nIndex++ ], "CharHeight", aHeightItem, MID_FONTHEIGHT );
246 lcl_FillProperty( pSeq[ nIndex++ ], "CharLocale", aLangItem, MID_LANG_LOCALE );
247}
248
250 : ImplInheritanceHelper(rRuler)
251{
253}
254
256{
257 ensureDisposed();
258}
259
260// XAccessibleComponent -----------------------------------------------------
261
263{
264 SolarMutexGuard aGuard;
265 ensureAlive();
266 return sal_Int32(Application::GetSettings().GetStyleSettings().GetLabelTextColor());
267}
268
270{
271 SolarMutexGuard aGuard;
272 ensureAlive();
273 return sal_Int32(Application::GetSettings().GetStyleSettings().GetFaceColor());
274}
275
276// XAccessibleContext ---------------------------------------------------------
277
279{
280 ensureAlive();
281 return 0;
282}
283
284Reference< XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleChild( sal_Int64 /* nIndex */ )
285{
286 ensureAlive();
287 throw IndexOutOfBoundsException();
288}
289
290Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleRelationSet()
291{
292 SolarMutexGuard aGuard;
293 ensureAlive();
294 rtl::Reference<AccessibleRelationSetHelper> pRelationSet = new AccessibleRelationSetHelper();
295
296 ScCsvRuler& rRuler = implGetRuler();
297 ScCsvTableBox* pTableBox = rRuler.GetTableBox();
298 ScCsvGrid& rGrid = pTableBox->GetGrid();
299
300 css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rGrid.GetAccessible()));
301 if( xAccObj.is() )
302 {
303 Sequence< Reference< XInterface > > aSeq{ xAccObj };
304 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLER_FOR, aSeq ) );
305 }
306
307 return pRelationSet;
308}
309
311{
312 SolarMutexGuard aGuard;
313 sal_Int64 nStateSet = implCreateStateSet();
314 if( isAlive() )
315 {
316 nStateSet |= AccessibleStateType::FOCUSABLE;
317 nStateSet |= AccessibleStateType::SINGLE_LINE;
318 if( implGetRuler().HasFocus() )
319 nStateSet |= AccessibleStateType::FOCUSED;
320 }
321 return nStateSet;
322}
323
324// XAccessibleText ------------------------------------------------------------
325
327{
328 SolarMutexGuard aGuard;
329 ensureAlive();
330 return lcl_GetApiPos( implGetRuler().GetRulerCursorPos() );
331}
332
334{
335 SolarMutexGuard aGuard;
336 ensureAlive();
338 ScCsvRuler& rRuler = implGetRuler();
339 sal_Int32 nOldCursor = rRuler.GetRulerCursorPos();
341 return rRuler.GetRulerCursorPos() != nOldCursor;
342}
343
345{
346 SolarMutexGuard aGuard;
347 ensureAlive();
349 return maBuffer[nIndex];
350}
351
352Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes( sal_Int32 nIndex,
353 const css::uno::Sequence< OUString >& /* aRequestedAttributes */ )
354{
355 SolarMutexGuard aGuard;
356 ensureAlive();
358 Sequence< PropertyValue > aSeq;
359 lcl_FillFontAttributes( aSeq, implGetRuler().GetDrawingArea()->get_ref_device().GetFont() );
360 return aSeq;
361}
362
363css::awt::Rectangle SAL_CALL ScAccessibleCsvRuler::getCharacterBounds( sal_Int32 nIndex )
364{
365 SolarMutexGuard aGuard;
366 ensureAlive();
368 ScCsvRuler& rRuler = implGetRuler();
369 Point aPos( rRuler.GetX( lcl_GetRulerPos( nIndex ) ) - rRuler.GetCharWidth() / 2, 0 );
370 css::awt::Rectangle aRect( aPos.X(), aPos.Y(), rRuler.GetCharWidth(), rRuler.GetOutputSizePixel().Height() );
371 // do not return rectangle out of window
372 sal_Int32 nWidth = rRuler.GetOutputSizePixel().Width();
373 if( aRect.X >= nWidth )
374 throw IndexOutOfBoundsException();
375 if( aRect.X + aRect.Width > nWidth )
376 aRect.Width = nWidth - aRect.X;
377 return aRect;
378}
379
381{
382 SolarMutexGuard aGuard;
383 ensureAlive();
384 return implGetTextLength();
385}
386
387sal_Int32 SAL_CALL ScAccessibleCsvRuler::getIndexAtPoint( const css::awt::Point& rPoint )
388{
389 SolarMutexGuard aGuard;
390 ensureAlive();
391 ScCsvRuler& rRuler = implGetRuler();
392 // use object's coordinate system, convert to API position
393 return lcl_GetApiPos( ::std::clamp( rRuler.GetPosFromX( rPoint.X ), sal_Int32(0), rRuler.GetPosCount() ) );
394}
395
397{
398 ensureAlive();
399 return OUString();
400}
401
403{
404 ensureAlive();
405 return -1;
406}
407
409{
410 ensureAlive();
411 return -1;
412}
413
414sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection( sal_Int32 /* nStartIndex */, sal_Int32 /* nEndIndex */ )
415{
416 ensureAlive();
417 return false;
418}
419
421{
422 SolarMutexGuard aGuard;
423 ensureAlive();
424 return OUString(maBuffer.subView( 0, implGetTextLength() ));
425}
426
427OUString SAL_CALL ScAccessibleCsvRuler::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
428{
429 SolarMutexGuard aGuard;
430 ensureAlive();
431 ensureValidRange( nStartIndex, nEndIndex );
432 return OUString( maBuffer.getStr() + nStartIndex, nEndIndex - nStartIndex );
433}
434
435TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType )
436{
437 SolarMutexGuard aGuard;
438 ensureAlive();
439
440 TextSegment aResult;
441 aResult.SegmentStart = -1;
442 aResult.SegmentEnd = -1;
443
444 if( (nIndex == implGetTextLength()) && (nTextType != AccessibleTextType::LINE) )
445 return aResult;
446
448
449 OUStringBuffer aResultText; // will be assigned to aResult.SegmentText below
450 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
451
452 switch( nTextType )
453 {
454 // single character
455 case AccessibleTextType::CHARACTER:
456 {
457 aResult.SegmentStart = nIndex;
458 aResult.SegmentEnd = nIndex;
459 o3tl::iterateCodePoints(maBuffer, &aResult.SegmentEnd);
460 for (; nIndex < aResult.SegmentEnd; nIndex++)
461 aResultText.append(maBuffer[nIndex]);
462 }
463 break;
464
465 // entire number or single dot/line
466 case AccessibleTextType::WORD:
467 case AccessibleTextType::GLYPH:
468 aResult.SegmentStart = nIndex;
469 if( nRulerPos % 10 )
470 aResultText.append(maBuffer[nIndex]);
471 else
472 aResultText.append( nRulerPos ); // string representation of sal_Int32!!!
473 break;
474
475 // entire text
476 case AccessibleTextType::SENTENCE:
477 case AccessibleTextType::PARAGRAPH:
478 case AccessibleTextType::LINE:
479 aResult.SegmentStart = 0;
480 aResultText.append( maBuffer.getStr(), implGetTextLength() );
481 break;
482
483 // equal-formatted text
484 case AccessibleTextType::ATTRIBUTE_RUN:
485 {
486 sal_Int32 nFirstIndex = implGetFirstEqualFormatted( nIndex );
487 sal_Int32 nLastIndex = implGetLastEqualFormatted( nIndex );
488 aResult.SegmentStart = nFirstIndex;
489 aResultText.append( maBuffer.getStr() + nFirstIndex, nLastIndex - nFirstIndex + 1 );
490 }
491 break;
492
493 default:
494 throw RuntimeException();
495 }
496
497 aResult.SegmentText = aResultText.makeStringAndClear();
498 aResult.SegmentEnd = aResult.SegmentStart + aResult.SegmentText.getLength();
499 return aResult;
500}
501
502TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 nTextType )
503{
504 SolarMutexGuard aGuard;
505 ensureAlive();
507
508 TextSegment aResult;
509 aResult.SegmentStart = -1;
510 aResult.SegmentEnd = -1;
511
512 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
513
514 switch( nTextType )
515 {
516 // single character
517 case AccessibleTextType::CHARACTER:
518 if( nIndex > 0 )
519 {
521 aResult = getTextAtIndex(nIndex, nTextType);
522 }
523 // else empty
524 break;
525
526 // entire number or single dot/line
527 case AccessibleTextType::WORD:
528 case AccessibleTextType::GLYPH:
529 if( nRulerPos > 0 )
530 aResult = getTextAtIndex( lcl_GetApiPos( nRulerPos - 1 ), nTextType );
531 // else empty
532 break;
533
534 // entire text
535 case AccessibleTextType::SENTENCE:
536 case AccessibleTextType::PARAGRAPH:
537 case AccessibleTextType::LINE:
538 // empty
539 break;
540
541 // equal-formatted text
542 case AccessibleTextType::ATTRIBUTE_RUN:
543 {
544 sal_Int32 nFirstIndex = implGetFirstEqualFormatted( nIndex );
545 if( nFirstIndex > 0 )
546 aResult = getTextAtIndex( nFirstIndex - 1, nTextType );
547 // else empty
548 }
549 break;
550
551 default:
552 throw RuntimeException();
553 }
554 return aResult;
555}
556
557TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 nTextType )
558{
559 SolarMutexGuard aGuard;
560 ensureAlive();
562
563 TextSegment aResult;
564 aResult.SegmentStart = -1;
565 aResult.SegmentEnd = -1;
566
567 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
568 sal_Int32 nLastValid = implGetTextLength();
569
570 switch( nTextType )
571 {
572 // single character
573 case AccessibleTextType::CHARACTER:
574 if( nIndex < nLastValid )
575 {
577 aResult = getTextAtIndex(nIndex, nTextType);
578 }
579 // else empty
580 break;
581
582 // entire number or single dot/line
583 case AccessibleTextType::WORD:
584 case AccessibleTextType::GLYPH:
585 if( nRulerPos < implGetRuler().GetPosCount() )
586 aResult = getTextAtIndex( lcl_GetApiPos( nRulerPos + 1 ), nTextType );
587 // else empty
588 break;
589
590 // entire text
591 case AccessibleTextType::SENTENCE:
592 case AccessibleTextType::PARAGRAPH:
593 case AccessibleTextType::LINE:
594 // empty
595 break;
596
597 // equal-formatted text
598 case AccessibleTextType::ATTRIBUTE_RUN:
599 {
600 sal_Int32 nLastIndex = implGetLastEqualFormatted( nIndex );
601 if( nLastIndex < nLastValid )
602 aResult = getTextAtIndex( nLastIndex + 1, nTextType );
603 // else empty
604 }
605 break;
606
607 default:
608 throw RuntimeException();
609 }
610 return aResult;
611}
612
613sal_Bool SAL_CALL ScAccessibleCsvRuler::copyText( sal_Int32 /* nStartIndex */, sal_Int32 /* nEndIndex */ )
614{
615 ensureAlive();
616 return false;
617}
618
619sal_Bool SAL_CALL ScAccessibleCsvRuler::scrollSubstringTo( sal_Int32 /* nStartIndex */, sal_Int32/* nEndIndex */, AccessibleScrollType /* aScrollType */ )
620{
621 return false;
622}
623
624// events ---------------------------------------------------------------------
625
627{
628 sal_Int32 nPos = implGetRuler().GetRulerCursorPos();
629 if (nPos != CSV_POS_INVALID)
630 {
631 Any aOldValue, aNewValue;
632 aNewValue <<= nPos;
633 NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
634 }
635}
636
637// helpers --------------------------------------------------------------------
638
640{
641 return ScResId( STR_ACC_CSVRULER_NAME );
642}
643
645{
646 return ScResId( STR_ACC_CSVRULER_DESCR );
647}
648
649void ScAccessibleCsvRuler::ensureValidIndex( sal_Int32 nIndex ) const
650{
651 if( (nIndex < 0) || (nIndex >= implGetTextLength()) )
652 throw IndexOutOfBoundsException();
653}
654
656{
657 if( (nIndex < 0) || (nIndex > implGetTextLength()) )
658 throw IndexOutOfBoundsException();
659}
660
661void ScAccessibleCsvRuler::ensureValidRange( sal_Int32& rnStartIndex, sal_Int32& rnEndIndex ) const
662{
663 if( rnStartIndex > rnEndIndex )
664 ::std::swap( rnStartIndex, rnEndIndex );
665 if( (rnStartIndex < 0) || (rnEndIndex > implGetTextLength()) )
666 throw IndexOutOfBoundsException();
667}
668
670{
671 return static_cast< ScCsvRuler& >( implGetControl() );
672}
673
675{
676 SolarMutexGuard aGuard;
677 ensureAlive();
678 // extend existing string buffer to new ruler size
679 sal_Int32 nRulerCount = implGetRuler().GetPosCount();
680 sal_Int32 nRulerPos = lcl_GetRulerPos( maBuffer.getLength() );
681 for( ; nRulerPos <= nRulerCount; ++nRulerPos ) // include last position
682 {
683 switch( nRulerPos % 10 )
684 {
685 case 0: maBuffer.append( nRulerPos ); break;
686 case 5: maBuffer.append( cRulerLine ); break;
687 default: maBuffer.append( cRulerDot );
688 }
689 }
690}
691
693{
694 return lcl_GetApiPos( implGetRuler().GetPosCount() + 1 );
695}
696
697bool ScAccessibleCsvRuler::implHasSplit( sal_Int32 nApiPos )
698{
699 sal_Int32 nRulerPos = lcl_GetRulerPos( nApiPos );
700 return implGetRuler().HasSplit( nRulerPos ) && (nApiPos == lcl_GetApiPos( nRulerPos ));
701}
702
704{
705 bool bSplit = implHasSplit( nApiPos );
706 while( (nApiPos > 0) && (implHasSplit( nApiPos - 1 ) == bSplit) )
707 --nApiPos;
708 return nApiPos;
709}
710
712{
713 bool bSplit = implHasSplit( nApiPos );
714 sal_Int32 nLength = implGetTextLength();
715 while( (nApiPos < nLength - 1) && (implHasSplit( nApiPos + 1 ) == bSplit) )
716 ++nApiPos;
717 return nApiPos;
718}
719
720css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvRuler::getAccessibleParent()
721{
722 return implGetControl().GetDrawingArea()->get_accessible_parent();
723}
724
725// Grid =======================================================================
726
728static sal_Int32 lcl_GetApiColumn( sal_uInt32 nGridColumn )
729{
730 return (nGridColumn != CSV_COLUMN_HEADER) ? static_cast< sal_Int32 >( nGridColumn + 1 ) : 0;
731}
732
734static sal_uInt32 lcl_GetGridColumn( sal_Int32 nApiColumn )
735{
736 return (nApiColumn > 0) ? static_cast< sal_uInt32 >( nApiColumn - 1 ) : CSV_COLUMN_HEADER;
737}
738
740 : ImplInheritanceHelper(rGrid)
741{
742}
743
745{
746 ensureDisposed();
747}
748
750{
751 SolarMutexGuard aGuard;
752 for (auto& rEntry : maAccessibleChildren)
753 rEntry.second->dispose();
754 maAccessibleChildren.clear();
756}
757
758// XAccessibleComponent -------------------------------------------------------
759
760Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleAtPoint( const css::awt::Point& rPoint )
761{
762 Reference< XAccessible > xRet;
763 if( containsPoint( rPoint ) )
764 {
765 SolarMutexGuard aGuard;
766 ensureAlive();
767
768 const ScCsvGrid& rGrid = implGetGrid();
769 // #102679#; use <= instead of <, because the offset is the size and not the point
770 sal_Int32 nColumn = ((rGrid.GetFirstX() <= rPoint.X) && (rPoint.X <= rGrid.GetLastX())) ?
771 lcl_GetApiColumn( rGrid.GetColumnFromX( rPoint.X ) ) : 0;
772 sal_Int32 nRow = (rPoint.Y >= rGrid.GetHdrHeight()) ?
773 (rGrid.GetLineFromY( rPoint.Y ) - rGrid.GetFirstVisLine() + 1) : 0;
774 xRet = getAccessibleCell(nRow, nColumn);
775 }
776 return xRet;
777}
778
780{
781 SolarMutexGuard aGuard;
782 ensureAlive();
783 return sal_Int32(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
784}
785
787{
788 SolarMutexGuard aGuard;
789 ensureAlive();
790 return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
791}
792
793// XAccessibleContext ---------------------------------------------------------
794
796{
797 SolarMutexGuard aGuard;
798 ensureAlive();
799 return implGetCellCount();
800}
801
802Reference<XAccessible> ScAccessibleCsvGrid::getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn)
803{
804 sal_Int64 nIndex = implGetIndex(nRow, nColumn);
805
806 XAccessibleSet::iterator aI = maAccessibleChildren.lower_bound(nIndex);
807 if (aI != maAccessibleChildren.end() && !(maAccessibleChildren.key_comp()(nIndex, aI->first)))
808 {
809 // key already exists
810 return aI->second;
811 }
812 // key does not exist
814 maAccessibleChildren.insert(aI, XAccessibleSet::value_type(nIndex, xNew));
815 return xNew;
816}
817
818Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleChild( sal_Int64 nIndex )
819{
820 SolarMutexGuard aGuard;
821 ensureAlive();
823
825}
826
827Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleRelationSet()
828{
829 SolarMutexGuard aGuard;
830 ensureAlive();
831 rtl::Reference<AccessibleRelationSetHelper> pRelationSet = new AccessibleRelationSetHelper();
832
833 ScCsvGrid& rGrid = implGetGrid();
834 ScCsvTableBox* pTableBox = rGrid.GetTableBox();
835 ScCsvRuler& rRuler = pTableBox->GetRuler();
836
837 if (rRuler.IsVisible())
838 {
839 css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rRuler.GetAccessible()));
840 if( xAccObj.is() )
841 {
842 Sequence< Reference< XInterface > > aSeq{ xAccObj };
843 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLED_BY, aSeq ) );
844 }
845 }
846
847 return pRelationSet;
848}
849
851{
852 SolarMutexGuard aGuard;
853 sal_Int64 nStateSet = implCreateStateSet();
854 if( isAlive() )
855 {
856 nStateSet |= AccessibleStateType::FOCUSABLE;
857 nStateSet |= AccessibleStateType::MULTI_SELECTABLE;
858 nStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
859 if( implGetGrid().HasFocus() )
860 nStateSet |= AccessibleStateType::FOCUSED;
861 }
862 else
863 nStateSet |= AccessibleStateType::DEFUNC;
864 return nStateSet;
865}
866
867// XAccessibleTable -----------------------------------------------------------
868
870{
871 SolarMutexGuard aGuard;
872 ensureAlive();
873 return implGetRowCount();
874}
875
877{
878 SolarMutexGuard aGuard;
879 ensureAlive();
880 return implGetColumnCount();
881}
882
883OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleRowDescription( sal_Int32 nRow )
884{
885 SolarMutexGuard aGuard;
886 ensureAlive();
887 ensureValidPosition( nRow, 0 );
888 return implGetCellText( nRow, 0 );
889}
890
891OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnDescription( sal_Int32 nColumn )
892{
893 SolarMutexGuard aGuard;
894 ensureAlive();
895 ensureValidPosition( 0, nColumn );
896 return implGetCellText( 0, nColumn );
897}
898
899sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
900{
901 ensureAlive();
902 ensureValidPosition( nRow, nColumn );
903 return 1;
904}
905
906sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
907{
908 ensureAlive();
909 ensureValidPosition( nRow, nColumn );
910 return 1;
911}
912
913Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleRowHeaders()
914{
915 ensureAlive();
916 return nullptr;
917}
918
919Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnHeaders()
920{
921 ensureAlive();
922 return nullptr;
923}
924
926{
927 ensureAlive();
928 return Sequence< sal_Int32 >();
929}
930
932{
933 SolarMutexGuard aGuard;
934 ensureAlive();
935
936 ScCsvGrid& rGrid = implGetGrid();
937 Sequence< sal_Int32 > aSeq( implGetColumnCount() );
938 auto pSeq = aSeq.getArray();
939
940 sal_Int32 nSeqIx = 0;
941 sal_uInt32 nColIx = rGrid.GetFirstSelected();
942 for( ; nColIx != CSV_COLUMN_INVALID; ++nSeqIx, nColIx = rGrid.GetNextSelected( nColIx ) )
943 pSeq[ nSeqIx ] = lcl_GetApiColumn( nColIx );
944
945 aSeq.realloc( nSeqIx );
946 return aSeq;
947}
948
950{
951 ensureAlive();
952 return false;
953}
954
956{
957 SolarMutexGuard aGuard;
958 ensureAlive();
959 ensureValidIndex( nColumn );
960 return implIsColumnSelected( nColumn );
961}
962
963Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
964{
965 SolarMutexGuard aGuard;
966 ensureAlive();
967 ensureValidPosition( nRow, nColumn );
968 return getAccessibleCell(nRow, nColumn);
969}
970
971Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCaption()
972{
973 ensureAlive();
974 return nullptr;
975}
976
977Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleSummary()
978{
979 ensureAlive();
980 return nullptr;
981}
982
983sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleSelected( sal_Int32 /* nRow */, sal_Int32 nColumn )
984{
985 return isAccessibleColumnSelected( nColumn );
986}
987
988sal_Int64 SAL_CALL ScAccessibleCsvGrid::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
989{
990 SolarMutexGuard aGuard;
991 ensureAlive();
992 ensureValidPosition( nRow, nColumn );
993 return implGetIndex( nRow, nColumn );
994}
995
996sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRow( sal_Int64 nChildIndex )
997{
998 SolarMutexGuard aGuard;
999 ensureAlive();
1000 ensureValidIndex( nChildIndex );
1001 return implGetRow( nChildIndex );
1002}
1003
1004sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumn( sal_Int64 nChildIndex )
1005{
1006 SolarMutexGuard aGuard;
1007 ensureAlive();
1008 ensureValidIndex( nChildIndex );
1009 return implGetColumn( nChildIndex );
1010}
1011
1012// XAccessibleSelection -------------------------------------------------------
1013
1014void SAL_CALL ScAccessibleCsvGrid::selectAccessibleChild( sal_Int64 nChildIndex )
1015{
1016 SolarMutexGuard aGuard;
1017 ensureAlive();
1018 ensureValidIndex( nChildIndex );
1019 sal_Int32 nColumn = implGetColumn( nChildIndex );
1020 if( nChildIndex == 0 )
1022 else
1023 implSelectColumn( nColumn, true );
1024}
1025
1027{
1028 SolarMutexGuard aGuard;
1029 ensureAlive();
1030 ensureValidIndex( nChildIndex );
1031 sal_Int32 nColumn = implGetColumn( nChildIndex );
1032 return implIsColumnSelected( nColumn );
1033}
1034
1036{
1037 SolarMutexGuard aGuard;
1038 ensureAlive();
1039 implGetGrid().SelectAll( false );
1040}
1041
1043{
1045}
1046
1048{
1049 SolarMutexGuard aGuard;
1050 ensureAlive();
1051 return static_cast<sal_Int64>(implGetRowCount()) * static_cast<sal_Int64>(implGetSelColumnCount());
1052}
1053
1054Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex )
1055{
1056 SolarMutexGuard aGuard;
1057 ensureAlive();
1058 sal_Int32 nColumns = implGetSelColumnCount();
1059 if( nColumns == 0 )
1060 throw IndexOutOfBoundsException();
1061
1062 sal_Int32 nRow = nSelectedChildIndex / nColumns;
1063 sal_Int32 nColumn = implGetSelColumn( nSelectedChildIndex % nColumns );
1064 return getAccessibleCellAt( nRow, nColumn );
1065}
1066
1067void SAL_CALL ScAccessibleCsvGrid::deselectAccessibleChild( sal_Int64 nSelectedChildIndex )
1068{
1069 SolarMutexGuard aGuard;
1070 ensureAlive();
1071 ensureValidIndex(nSelectedChildIndex);
1072 sal_Int32 nColumns = implGetSelColumnCount();
1073 if( nColumns == 0 )
1074 throw IndexOutOfBoundsException();
1075
1076 sal_Int32 nColumn = implGetSelColumn( nSelectedChildIndex % nColumns );
1077 ensureValidPosition( nSelectedChildIndex / nColumns, nColumn );
1078 if( nColumn > 0 )
1079 implSelectColumn( nColumn, false );
1080}
1081
1082// events ---------------------------------------------------------------------
1083
1085{
1087 Any aOldAny, aNewAny;
1088 (bFocused ? aNewAny : aOldAny) <<=
1089 getAccessibleCellAt( 0, lcl_GetApiColumn( implGetGrid().GetFocusColumn() ) );
1090 NotifyAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny);
1091}
1092
1093void ScAccessibleCsvGrid::SendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows )
1094{
1095 if( nFirstColumn <= nLastColumn )
1096 {
1097 AccessibleTableModelChange aModelChange(
1098 AccessibleTableModelChangeType::UPDATE, 0, bAllRows ? implGetRowCount() - 1 : 0,
1099 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1100 Any aOldAny, aNewAny;
1101 aNewAny <<= aModelChange;
1102 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1103 }
1104}
1105
1106void ScAccessibleCsvGrid::SendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
1107{
1108 if( nFirstColumn <= nLastColumn )
1109 {
1110 AccessibleTableModelChange aModelChange(
1111 AccessibleTableModelChangeType::COLUMNS_INSERTED, -1, -1,
1112 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1113 Any aOldAny, aNewAny;
1114 aNewAny <<= aModelChange;
1115 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1116 }
1117}
1118
1119void ScAccessibleCsvGrid::SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
1120{
1121 if( nFirstColumn <= nLastColumn )
1122 {
1123 AccessibleTableModelChange aModelChange(
1124 AccessibleTableModelChangeType::COLUMNS_REMOVED, -1, -1,
1125 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1126 Any aOldAny, aNewAny;
1127 aNewAny <<= aModelChange;
1128 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1129 }
1130}
1131
1132// helpers --------------------------------------------------------------------
1133
1135{
1136 return ScResId( STR_ACC_CSVGRID_NAME );
1137}
1138
1140{
1141 return ScResId( STR_ACC_CSVGRID_DESCR );
1142}
1143
1144void ScAccessibleCsvGrid::ensureValidIndex( sal_Int64 nIndex ) const
1145{
1146 if( (nIndex < 0) || (nIndex >= implGetCellCount()) )
1147 throw IndexOutOfBoundsException();
1148}
1149
1150void ScAccessibleCsvGrid::ensureValidPosition( sal_Int32 nRow, sal_Int32 nColumn ) const
1151{
1152 if( (nRow < 0) || (nRow >= implGetRowCount()) || (nColumn < 0) || (nColumn >= implGetColumnCount()) )
1153 throw IndexOutOfBoundsException();
1154}
1155
1157{
1158 return static_cast< ScCsvGrid& >( implGetControl() );
1159}
1160
1161bool ScAccessibleCsvGrid::implIsColumnSelected( sal_Int32 nColumn ) const
1162{
1163 return (nColumn > 0) && implGetGrid().IsSelected( lcl_GetGridColumn( nColumn ) );
1164}
1165
1166void ScAccessibleCsvGrid::implSelectColumn( sal_Int32 nColumn, bool bSelect )
1167{
1168 if( nColumn > 0 )
1169 implGetGrid().Select( lcl_GetGridColumn( nColumn ), bSelect );
1170}
1171
1173{
1174 return static_cast< sal_Int32 >( implGetGrid().GetLastVisLine() - implGetGrid().GetFirstVisLine() + 2 );
1175}
1176
1178{
1179 return static_cast< sal_Int32 >( implGetGrid().GetColumnCount() + 1 );
1180}
1181
1183{
1184 ScCsvGrid& rGrid = implGetGrid();
1185 sal_Int32 nCount = 0;
1186 for( sal_uInt32 nColIx = rGrid.GetFirstSelected(); nColIx != CSV_COLUMN_INVALID; nColIx = rGrid.GetNextSelected( nColIx ) )
1187 ++nCount;
1188 return nCount;
1189}
1190
1191sal_Int32 ScAccessibleCsvGrid::implGetSelColumn( sal_Int32 nSelColumn ) const
1192{
1193 ScCsvGrid& rGrid = implGetGrid();
1194 sal_Int32 nColumn = 0;
1195 for( sal_uInt32 nColIx = rGrid.GetFirstSelected(); nColIx != CSV_COLUMN_INVALID; nColIx = rGrid.GetNextSelected( nColIx ) )
1196 {
1197 if( nColumn == nSelColumn )
1198 return static_cast< sal_Int32 >( nColIx + 1 );
1199 ++nColumn;
1200 }
1201 return 0;
1202}
1203
1204OUString ScAccessibleCsvGrid::implGetCellText( sal_Int32 nRow, sal_Int32 nColumn ) const
1205{
1206 ScCsvGrid& rGrid = implGetGrid();
1207 sal_Int32 nLine = nRow + rGrid.GetFirstVisLine() - 1;
1208 OUString aCellStr;
1209 if( (nColumn > 0) && (nRow > 0) )
1210 aCellStr = rGrid.GetCellText( lcl_GetGridColumn( nColumn ), nLine );
1211 else if( nRow > 0 )
1212 aCellStr = OUString::number( nLine + 1 );
1213 else if( nColumn > 0 )
1214 aCellStr = rGrid.GetColumnTypeName( lcl_GetGridColumn( nColumn ) );
1215 return aCellStr;
1216}
1217
1219{
1220 return new ScAccessibleCsvCell(implGetGrid(), implGetCellText(nRow, nColumn), nRow, nColumn);
1221}
1222
1223css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvGrid::getAccessibleParent()
1224{
1225 return implGetControl().GetDrawingArea()->get_accessible_parent();
1226}
1227
1229 ScCsvGrid& rGrid,
1230 OUString aCellText,
1231 sal_Int32 nRow, sal_Int32 nColumn ) :
1232 ImplInheritanceHelper( rGrid ),
1233 AccessibleStaticTextBase( SvxEditSourcePtr() ),
1234 maCellText(std::move( aCellText )),
1235 mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) : CSV_LINE_HEADER ),
1236 mnColumn( lcl_GetGridColumn( nColumn ) ),
1237 mnIndex( nRow * (rGrid.GetColumnCount() + 1) + nColumn )
1238{
1240}
1241
1243{
1244}
1245
1247{
1248 SolarMutexGuard aGuard;
1251}
1252
1253// XAccessibleComponent -------------------------------------------------------
1254
1256{
1257 SolarMutexGuard aGuard;
1258 ensureAlive();
1259 ScCsvGrid& rGrid = implGetGrid();
1261}
1262
1264{
1265 SolarMutexGuard aGuard;
1266 ensureAlive();
1267 return sal_Int32(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
1268}
1269
1271{
1272 SolarMutexGuard aGuard;
1273 ensureAlive();
1274 return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
1275}
1276
1277// XAccessibleContext -----------------------------------------------------
1278
1280{
1281 return AccessibleStaticTextBase::getAccessibleChildCount();
1282}
1283
1284Reference< XAccessible > SAL_CALL ScAccessibleCsvCell::getAccessibleChild( sal_Int64 nIndex )
1285{
1286 return AccessibleStaticTextBase::getAccessibleChild( nIndex );
1287}
1288
1290{
1291 SolarMutexGuard aGuard;
1292 ensureAlive();
1293 return mnIndex;
1294}
1295
1296Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvCell::getAccessibleRelationSet()
1297{
1298 SolarMutexGuard aGuard;
1299 ensureAlive();
1300 return new AccessibleRelationSetHelper();
1301}
1302
1304{
1305 SolarMutexGuard aGuard;
1306 sal_Int64 nStateSet = implCreateStateSet();
1307 if( isAlive() )
1308 {
1309 const ScCsvGrid& rGrid = implGetGrid();
1310 nStateSet |= AccessibleStateType::SINGLE_LINE;
1312 nStateSet |= AccessibleStateType::SELECTABLE;
1313 if( rGrid.HasFocus() && (rGrid.GetFocusColumn() == mnColumn) && (mnLine == CSV_LINE_HEADER) )
1314 nStateSet |= AccessibleStateType::ACTIVE;
1315 if( rGrid.IsSelected( mnColumn ) )
1316 nStateSet |= AccessibleStateType::SELECTED;
1317 }
1318 return nStateSet;
1319}
1320
1321// XInterface -----------------------------------------------------------------
1322
1323IMPLEMENT_FORWARD_XINTERFACE2( ScAccessibleCsvCell, ImplInheritanceHelper, AccessibleStaticTextBase )
1324
1325// XTypeProvider --------------------------------------------------------------
1326
1327IMPLEMENT_FORWARD_XTYPEPROVIDER2( ScAccessibleCsvCell, ImplInheritanceHelper, AccessibleStaticTextBase )
1328
1329// helpers --------------------------------------------------------------------
1330
1331OUString SAL_CALL ScAccessibleCsvCell::getAccessibleName()
1332{
1333 return maCellText;
1334}
1335
1337{
1338 return OUString();
1339}
1340
1342{
1343 return static_cast< ScCsvGrid& >( implGetControl() );
1344}
1345
1347{
1348 ScCsvGrid& rGrid = implGetGrid();
1349 return Point(
1350 (mnColumn == CSV_COLUMN_HEADER) ? rGrid.GetHdrX() : rGrid.GetColumnX( mnColumn ),
1351 (mnLine == CSV_LINE_HEADER) ? 0 : rGrid.GetY( mnLine ) );
1352}
1353
1354sal_uInt32 ScAccessibleCsvCell::implCalcPixelWidth(sal_uInt32 nChars) const
1355{
1356 ScCsvGrid& rGrid = implGetGrid();
1357 return rGrid.GetCharWidth() * nChars;
1358}
1359
1361{
1362 ScCsvGrid& rGrid = implGetGrid();
1363 return Size(
1365 (mnLine == CSV_LINE_HEADER) ? rGrid.GetHdrHeight() : rGrid.GetLineHeight() );
1366}
1367
1369{
1370 ScCsvGrid& rGrid = implGetGrid();
1371 tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetOutputSizePixel() );
1373 {
1374 aClipRect.SetLeft( rGrid.GetFirstX() );
1375 aClipRect.SetRight( rGrid.GetLastX() );
1376 }
1377 if( mnLine != CSV_LINE_HEADER )
1378 aClipRect.SetTop( rGrid.GetHdrHeight() );
1379
1381 aRect.Intersection( aClipRect );
1382 if( aRect.IsEmpty() )
1383 aRect.SetSize( Size( -1, -1 ) );
1384
1385 return css::awt::Rectangle(aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight());
1386}
1387
1388::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource()
1389{
1390 ScCsvGrid& rGrid = implGetGrid();
1391
1392 ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( std::make_unique<ScAccessibleCsvTextData>(&rGrid.GetDrawingArea()->get_ref_device(), rGrid.GetEditEngine(), maCellText, implGetRealSize()) ) );
1393 return pEditSource;
1394}
1395
1396css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvCell::getAccessibleParent()
1397{
1398 ScCsvGrid& rGrid = implGetGrid();
1399
1400 ScAccessibleCsvGrid* pAcc = static_cast<ScAccessibleCsvGrid*>(rGrid.GetAccessible());
1401
1402 return pAcc;
1403}
1404
1405/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static sal_Int32 lcl_GetApiPos(sal_Int32 nRulerPos)
Converts a ruler cursor position to API text index.
const sal_Unicode cRulerDot
const sal_uInt32 CSV_COLUMN_HEADER
static sal_uInt32 lcl_GetGridColumn(sal_Int32 nApiColumn)
Converts an API columnm index to a ScCsvGrid column index.
static sal_Int32 lcl_GetApiColumn(sal_uInt32 nGridColumn)
Converts a grid columnm index to an API column index.
const sal_Int32 CSV_LINE_HEADER
const sal_Unicode cRulerLine
static void lcl_FillProperty(PropertyValue &rVal, const OUString &rPropName, const SfxPoolItem &rItem, sal_uInt8 nMID)
Fills the property value rVal with the specified name and value from the item.
static sal_Int32 lcl_GetRulerPos(sal_Int32 nApiPos)
Converts an API text index to a ruler cursor position.
static sal_Int32 lcl_ExpandSequence(Sequence< PropertyValue > &rSeq, sal_Int32 nExp)
Expands the sequence's size and returns the base index of the new inserted elements.
static void lcl_FillFontAttributes(Sequence< PropertyValue > &rSeq, const vcl::Font &rFont)
Fills the sequence with all font attributes of rFont.
static const AllSettings & GetSettings()
constexpr tools::Long Y() const
constexpr tools::Long X() const
Accessible class representing a cell of the CSV grid control.
virtual ~ScAccessibleCsvCell() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Returns the specified child.
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleDescription() override
sal_Int32 mnIndex
The grid column index (core index).
ScAccessibleCsvCell(ScCsvGrid &rGrid, OUString aCellText, sal_Int32 nRow, sal_Int32 nColumn)
The index of the cell in the table.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the ruler control.
Point implGetRealPos() const
Returns the pixel position of the cell (rel.
Size implGetRealSize() const
Returns the pixel size of the cell, regardless of visibility.
sal_uInt32 implCalcPixelWidth(sal_uInt32 nChars) const
Returns the width of the character count.
sal_uInt32 mnColumn
The grid line index (core index).
ScCsvGrid & implGetGrid() const
Returns the VCL grid control.
::std::unique_ptr< SvxEditSource > implCreateEditSource()
Creates the edit source the text helper needs.
virtual css::awt::Rectangle implGetBounds() override
Returns the bounding box of the cell relative in the table.
virtual void SAL_CALL grabFocus() override
Sets the focus to the column of this cell.
virtual sal_Int32 SAL_CALL getBackground() override
sal_Int32 mnLine
The text contents of this cell.
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Returns the index of this cell in the table.
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
::std::unique_ptr< SvxEditSource > SvxEditSourcePtr
virtual void SAL_CALL grabFocus() override
void SendVisibleEvent()
Sends a visible area changed event to all listeners.
virtual void SendInsertColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
Sends a table model changed event for an inserted column to all listeners.
virtual void SendCaretEvent()
Sends a caret changed event to all listeners.
void SendSelectionEvent()
Sends a selection changed event to all listeners.
virtual css::awt::Rectangle implGetBounds() override
ScAccessibleCsvControl(ScCsvControl &rControl)
Pointer to the VCL control.
virtual void SendTableUpdateEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows)
Sends a table model changed event for changed cell contents to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual ~ScAccessibleCsvControl() override
virtual void SendRemoveColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
Sends a table model changed event for a removed column to all listeners.
virtual void SendFocusEvent(bool bFocused)
Sends a GetFocus or LoseFocus event to all listeners.
ScCsvControl & implGetControl() const
Returns the VCL control.
virtual void SAL_CALL disposing() override
sal_Int64 implCreateStateSet()
Creates a StateSet and fills it with DEFUNC, OPAQUE, ENABLED, SHOWING and VISIBLE.
Accessible class representing the CSV grid control.
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
Returns true, if the specified row is selected.
virtual void SAL_CALL clearAccessibleSelection() override
Deselects all cells.
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
Returns true, if the specified column is selected.
virtual void SendRemoveColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) override
Sends a table model changed event for a removed column to all listeners.
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
Selects the specified child (selects the entire column or the entire table).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
Returns the summary description object of the table.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
Returns the caption object of the table.
void implSelectColumn(sal_Int32 nColumn, bool bSelect)
Selects the specified column (including header).
virtual void SendFocusEvent(bool bFocused) override
Sends a GetFocus or LoseFocus event to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
Returns the column headers as an AccessibleTable.
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
Returns the description of the specified row in the table.
sal_Int32 implGetRow(sal_Int64 nIndex) const
Returns the row index from cell index (including header).
virtual void SAL_CALL selectAllAccessibleChildren() override
Selects all cells.
virtual OUString SAL_CALL getAccessibleName() override
sal_Int32 implGetSelColumn(sal_Int32 nSelColumn) const
Returns the absolute column index of the nSelColumn-th selected column.
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count (count of cells in the table).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
Returns the cell at the specified point.
virtual void SendInsertColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) override
Sends a table model changed event for an inserted column to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
Returns the child with the specified index in all selected children.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
Returns true, if the specified child is selected.
OUString implGetCellText(sal_Int32 nRow, sal_Int32 nColumn) const
Returns the contents of the specified cell (including header).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
sal_Int32 implGetRowCount() const
Returns the count of visible rows in the table (including header).
sal_Int32 implGetColumnCount() const
Returns the total column count in the table (including header).
void ensureValidPosition(sal_Int32 nRow, sal_Int32 nColumn) const
@Throws css::lang::IndexOutOfBoundsException if the specified position is invalid.
virtual ~ScAccessibleCsvGrid() override
sal_Int64 implGetCellCount() const
Returns the total cell count in the table (including header).
void ensureValidIndex(sal_Int64 nIndex) const
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
Returns the selected columns as a sequence.
virtual void SendTableUpdateEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows) override
Sends a table model changed event for changed cell contents to all listeners.
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
Returns the number of columns in the table.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the accessible cell object at the specified position.
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
Deselects the child with the specified index in all selected children.
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
Returns the selected rows as a sequence.
ScAccessibleCsvGrid(ScCsvGrid &rGrid)
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
Returns the description text of the specified column in the table.
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the child index of the cell at the specified position.
css::uno::Reference< css::accessibility::XAccessible > getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn)
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of rows occupied at a specified row and column.
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of rows occupied at a specified row and column.
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
Returns true, if the cell at a specified position is selected.
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
Returns the number of rows in the table.
bool implIsColumnSelected(sal_Int32 nColumn) const
Returns true, if the specified column (including header) is selected.
sal_Int64 implGetIndex(sal_Int32 nRow, sal_Int32 nColumn) const
Returns the child index from cell position (including header).
ScCsvGrid & implGetGrid() const
Returns the VCL grid control.
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
Returns the count of selected children.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
Returns the row headers as an AccessibleTable.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the ruler control.
sal_Int32 implGetColumn(sal_Int64 nIndex) const
Returns the column index from cell index (including header).
rtl::Reference< ScAccessibleCsvCell > implCreateCellObj(sal_Int32 nRow, sal_Int32 nColumn)
Creates a new accessible object of the specified cell.
sal_Int32 implGetSelColumnCount() const
Returns the count of selected columns in the table.
virtual void SAL_CALL disposing() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
Returns the row index of the specified child.
XAccessibleSet maAccessibleChildren
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Returns the specified child cell.
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
Returns the column index of the specified child.
sal_Int32 implGetTextLength() const
Returns the character count of the text.
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the grid control.
virtual sal_Int32 SAL_CALL getBackground() override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
Sets the position of the caret.
bool implHasSplit(sal_Int32 nApiPos)
Returns true, if the character at the specified index has a split.
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &rPoint) override
Returns the character index at the specified coordinate (object's coordinate system).
void ensureValidIndex(sal_Int32 nIndex) const
void constructStringBuffer()
Builds the entire string buffer.
virtual OUString SAL_CALL getSelectedText() override
Returns the selected text (ruler returns empty string).
virtual sal_Int32 SAL_CALL getSelectionStart() override
Returns the start index of the selection (ruler returns -1).
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
Returns the specified text portion.
virtual OUString SAL_CALL getAccessibleName() override
void ensureValidIndexWithEnd(sal_Int32 nIndex) const
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Returns the specified range [Start,End) of the text.
virtual ~ScAccessibleCsvRuler() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
Returns the attributes of the specified character.
virtual OUString SAL_CALL getText() override
Returns the entire text.
ScCsvRuler & implGetRuler() const
Returns the VCL ruler control.
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
Returns the screen coordinates of the specified character.
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count (the ruler does not have children).
virtual sal_Int32 SAL_CALL getCaretPosition() override
Return the position of the caret.
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
sal_Int32 implGetLastEqualFormatted(sal_Int32 nApiPos)
Returns the last character index with equal formatting as at nApiPos.
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int32 SAL_CALL getCharacterCount() override
Returns the count of characters.
virtual void SendCaretEvent() override
Sends a caret changed event to all listeners.
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Selects a part of the text (ruler does nothing).
ScAccessibleCsvRuler(ScCsvRuler &rRuler)
Contains the text representation of the ruler.
void ensureValidRange(sal_Int32 &rnStartIndex, sal_Int32 &rnEndIndex) const
virtual sal_Int32 SAL_CALL getSelectionEnd() override
Returns the end index of the selection (ruler returns -1).
sal_Int32 implGetFirstEqualFormatted(sal_Int32 nApiPos)
Returns the first character index with equal formatting as at nApiPos.
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Copies the specified text range into the clipboard (ruler does nothing).
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
Returns the specified character.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Throws an exception (the ruler does not have children).
Base class for the CSV ruler and the data grid control.
Definition: csvcontrol.hxx:223
void Execute(ScCsvCmdType eType, sal_Int32 nParam1=CSV_POS_INVALID, sal_Int32 nParam2=CSV_POS_INVALID)
Executes a command by calling command handler.
Definition: csvcontrol.cxx:152
sal_Int32 GetPosCount() const
Returns the number of available positions.
Definition: csvcontrol.hxx:300
sal_Int32 GetPosFromX(sal_Int32 nX) const
Returns position from output coordinate.
Definition: csvcontrol.cxx:200
sal_Int32 GetLastVisLine() const
Returns index of last visible line.
Definition: csvcontrol.cxx:210
sal_Int32 GetRulerCursorPos() const
Returns the ruler cursor position.
Definition: csvcontrol.hxx:356
sal_Int32 GetCharWidth() const
Returns the width of one character column.
Definition: csvcontrol.hxx:318
sal_Int32 GetLineHeight() const
Returns the height of one line.
Definition: csvcontrol.hxx:349
sal_Int32 GetFirstVisLine() const
Returns index of first visible line.
Definition: csvcontrol.hxx:335
sal_Int32 GetHdrWidth() const
Returns the width of the header column.
Definition: csvcontrol.hxx:316
sal_Int32 GetX(sal_Int32 nPos) const
Returns output X coordinate of the specified position.
Definition: csvcontrol.cxx:195
sal_Int32 GetLineFromY(sal_Int32 nY) const
Returns line index from output coordinate.
Definition: csvcontrol.cxx:235
sal_Int32 GetHdrHeight() const
Returns the height of the header line.
Definition: csvcontrol.hxx:347
sal_Int32 GetLastX() const
Returns the X position of the last pixel of the data area.
Definition: csvcontrol.cxx:190
sal_Int32 GetHdrX() const
Returns the start position of the header column.
Definition: csvcontrol.cxx:180
sal_Int32 GetFirstX() const
Returns the X position of the first pixel of the data area.
Definition: csvcontrol.cxx:185
ScAccessibleCsvControl * GetAccessible()
Definition: csvcontrol.hxx:258
sal_Int32 GetY(sal_Int32 nLine) const
Returns output Y coordinate of the specified line.
Definition: csvcontrol.cxx:230
A data grid control for the CSV import dialog.
Definition: csvgrid.hxx:58
sal_Int32 GetColumnPos(sal_uInt32 nColIndex) const
Returns start position of the column with the specified index.
Definition: csvgrid.hxx:166
void SelectAll(bool bSelect=true)
Selects or deselects all columns.
Definition: csvgrid.cxx:701
sal_Int32 GetColumnWidth(sal_uInt32 nColIndex) const
Returns the character width of the column with the specified index.
Definition: csvgrid.cxx:493
sal_Int32 GetColumnX(sal_uInt32 nColIndex) const
Returns X coordinate of the specified column.
Definition: csvgrid.cxx:476
sal_uInt32 GetFocusColumn() const
Returns index of the focused column.
Definition: csvgrid.hxx:219
sal_uInt32 GetNextSelected(sal_uInt32 nFromIndex) const
Returns index of the first selected column really after nFromIndex.
Definition: csvgrid.cxx:646
void Select(sal_uInt32 nColIndex, bool bSelect=true)
Selects or deselects the specified column.
Definition: csvgrid.cxx:655
ScCsvTableBox * GetTableBox()
Definition: csvgrid.hxx:97
EditEngine * GetEditEngine()
Returns a pointer to the used edit engine.
Definition: csvgrid.cxx:1096
sal_uInt32 GetFirstSelected() const
Returns index of the first selected column.
Definition: csvgrid.cxx:641
sal_uInt32 GetColumnCount() const
Returns the number of columns.
Definition: csvgrid.hxx:149
bool IsSelected(sal_uInt32 nColIndex) const
Returns true, if the specified column is selected.
Definition: csvgrid.cxx:636
OUString GetCellText(sal_uInt32 nColIndex, sal_Int32 nLine) const
Returns the text of the specified cell.
Definition: csvgrid.cxx:865
OUString GetColumnTypeName(sal_uInt32 nColIndex) const
Returns the UI type name of the specified column.
Definition: csvgrid.cxx:562
sal_uInt32 GetColumnFromX(sal_Int32 nX) const
Returns column index from output coordinate.
Definition: csvgrid.cxx:481
A ruler control for the CSV import dialog.
Definition: csvruler.hxx:33
bool HasSplit(sal_Int32 nPos) const
Returns true if at position nPos is a split.
Definition: csvruler.hxx:99
ScCsvTableBox * GetTableBox()
Definition: csvruler.hxx:61
The control in the CSV import dialog that contains a ruler and a data grid to visualize and modify th...
Definition: csvtablebox.hxx:44
ScCsvGrid & GetGrid()
Definition: csvtablebox.hxx:81
ScCsvRuler & GetRuler()
Definition: csvtablebox.hxx:80
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void SetEditSource(::std::unique_ptr< SvxEditSource > &&pEditSource)
constexpr tools::Long GetWidth() const
constexpr void SetLeft(tools::Long v)
constexpr void SetTop(tools::Long v)
constexpr tools::Long Top() const
void SetSize(const Size &)
constexpr void SetRight(tools::Long v)
constexpr tools::Long GetHeight() const
tools::Rectangle & Intersection(const tools::Rectangle &rRect)
constexpr tools::Long Left() const
constexpr bool IsEmpty() const
FontFamily GetFamilyType()
const OUString & GetStyleName() const
const OUString & GetFamilyName() const
const Size & GetFontSize() const
LanguageType GetLanguage() const
FontPitch GetPitch()
rtl_TextEncoding GetCharSet() const
weld::DrawingArea * GetDrawingArea() const
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
@ CSVCMD_MOVEGRIDCURSOR
Move ruler cursor to new position. [position].
Definition: csvcontrol.hxx:178
@ CSVCMD_MOVERULERCURSOR
Change data line pixel height. [height in pixel}.
Definition: csvcontrol.hxx:177
const sal_uInt32 CSV_COLUMN_INVALID
Definition: csvgrid.hxx:38
const sal_Int32 CSV_POS_INVALID
Constant for an invalid ruler position.
Definition: csvsplits.hxx:29
int nCount
sal_Int32 nIndex
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
#define MID_LANG_LOCALE
#define MID_FONT_PITCH
#define MID_FONT_CHAR_SET
#define MID_FONTHEIGHT
#define MID_FONT_FAMILY
#define MID_FONT_FAMILY_NAME
#define MID_FONT_STYLE_NAME
sal_uInt32 iterateCodePoints(std::u16string_view string, sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints=1)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
bool isAlive()
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
#define SC_MOD()
Definition: scmod.hxx:247
sal_uInt32 mnIndex
unsigned char sal_uInt8
unsigned char sal_Bool
sal_uInt16 sal_Unicode
sal_Int32 nLength