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>
36#include <scitems.hxx>
37#include <editeng/fontitem.hxx>
38#include <editeng/fhgtitem.hxx>
39#include <editeng/langitem.hxx>
40#include <csvtablebox.hxx>
41#include <csvcontrol.hxx>
42#include <csvruler.hxx>
43#include <csvgrid.hxx>
44#include <AccessibleText.hxx>
45#include <editsrc.hxx>
46#include <scresid.hxx>
47#include <strings.hrc>
48#include <scmod.hxx>
49#include <svtools/colorcfg.hxx>
50#include <vcl/svapp.hxx>
51#include <vcl/settings.hxx>
52
53using ::utl::AccessibleRelationSetHelper;
54using ::utl::AccessibleStateSetHelper;
55using ::accessibility::AccessibleStaticTextBase;
56using ::com::sun::star::uno::Any;
57using ::com::sun::star::uno::Reference;
58using ::com::sun::star::uno::Sequence;
59using ::com::sun::star::uno::RuntimeException;
60using ::com::sun::star::uno::XInterface;
61using ::com::sun::star::lang::IndexOutOfBoundsException;
62using ::com::sun::star::beans::PropertyValue;
63using namespace ::com::sun::star::accessibility;
64
67
70
72 : mpControl(&rControl)
73{
74}
75
77{
79}
80
82{
83 SolarMutexGuard aGuard;
84 mpControl = nullptr;
86}
87
88// XAccessibleComponent -------------------------------------------------------
89
90Reference< XAccessible > SAL_CALL ScAccessibleCsvControl::getAccessibleAtPoint( const css::awt::Point& /* rPoint */ )
91{
93 return nullptr;
94}
95
97{
98 SolarMutexGuard aGuard;
101}
102
103// events ---------------------------------------------------------------------
104
106{
107 Any aOldAny, aNewAny;
108 if (bFocused)
109 aNewAny <<= AccessibleStateType::FOCUSED;
110 else
111 aOldAny <<= AccessibleStateType::FOCUSED;
112 NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny);
113}
114
116{
117 OSL_FAIL( "ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
118}
119
121{
122 NotifyAccessibleEvent(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any());
123}
124
126{
127 NotifyAccessibleEvent(AccessibleEventId::SELECTION_CHANGED, Any(), Any());
128}
129
130void ScAccessibleCsvControl::SendTableUpdateEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */, bool /* bAllRows */ )
131{
132 OSL_FAIL( "ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
133}
134
135void ScAccessibleCsvControl::SendInsertColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
136{
137 OSL_FAIL( "ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
138}
139
140void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
141{
142 OSL_FAIL( "ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
143}
144
145// helpers --------------------------------------------------------------------
146
148{
149 SolarMutexGuard aGuard;
150 ensureAlive();
151 Size aOutSize(implGetControl().GetOutputSizePixel());
152 return css::awt::Rectangle(0, 0, aOutSize.Width(), aOutSize.Height());
153}
154
156{
157 assert(mpControl && "ScAccessibleCsvControl::implGetControl - missing control");
158 return *mpControl;
159}
160
162{
163 SolarMutexGuard aGuard;
164 rtl::Reference<AccessibleStateSetHelper> pStateSet = new AccessibleStateSetHelper();
165 if (isAlive())
166 {
167 const ScCsvControl& rCtrl = implGetControl();
168 pStateSet->AddState( AccessibleStateType::OPAQUE );
169 if( rCtrl.IsEnabled() )
170 pStateSet->AddState( AccessibleStateType::ENABLED );
171 if( rCtrl.IsReallyVisible() )
172 pStateSet->AddState( AccessibleStateType::SHOWING );
173 if( rCtrl.IsVisible() )
174 pStateSet->AddState( AccessibleStateType::VISIBLE );
175 }
176 else
177 pStateSet->AddState( AccessibleStateType::DEFUNC );
178 return pStateSet;
179}
180
181// Ruler ======================================================================
182
184static sal_Int32 lcl_GetApiPos( sal_Int32 nRulerPos )
185{
186 sal_Int32 nApiPos = nRulerPos;
187 sal_Int32 nStart = (nRulerPos - 1) / 10;
188 sal_Int32 nExp = 1;
189 while( nStart >= nExp )
190 {
191 nApiPos += nStart - nExp + 1;
192 nExp *= 10;
193 }
194 return ::std::max( nApiPos, static_cast<sal_Int32>(0) );
195}
196
198static sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos )
199{
200 sal_Int32 nDiv = 10;
201 sal_Int32 nExp = 10;
202 sal_Int32 nRulerPos = 0;
203 sal_Int32 nApiBase = 0;
204 sal_Int32 nApiLimit = 10;
205 while( nApiPos >= nApiLimit )
206 {
207 ++nDiv;
208 nRulerPos = nExp;
209 nExp *= 10;
210 nApiBase = nApiLimit;
211 nApiLimit = lcl_GetApiPos( nExp );
212 }
213 sal_Int32 nRelPos = nApiPos - nApiBase;
214 return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 );
215}
216
218static sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal_Int32 nExp )
219{
220 OSL_ENSURE( nExp > 0, "lcl_ExpandSequence - invalid value" );
221 rSeq.realloc( rSeq.getLength() + nExp );
222 return rSeq.getLength() - nExp;
223}
224
226static void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropName, const SfxPoolItem& rItem, sal_uInt8 nMID )
227{
228 rVal.Name = rPropName;
229 rItem.QueryValue( rVal.Value, nMID );
230}
231
233static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont )
234{
235 SvxFontItem aFontItem( rFont.GetFamilyType(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT );
236 SvxFontHeightItem aHeightItem( rFont.GetFontSize().Height(), 100, ATTR_FONT_HEIGHT );
237 SvxLanguageItem aLangItem( rFont.GetLanguage(), ATTR_FONT_LANGUAGE );
238
239 sal_Int32 nIndex = lcl_ExpandSequence( rSeq, 7 );
240 auto pSeq = rSeq.getArray();
241 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontName", aFontItem, MID_FONT_FAMILY_NAME );
242 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontFamily", aFontItem, MID_FONT_FAMILY );
243 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontStyleName", aFontItem, MID_FONT_STYLE_NAME );
244 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontCharSet", aFontItem, MID_FONT_PITCH );
245 lcl_FillProperty( pSeq[ nIndex++ ], "CharFontPitch", aFontItem, MID_FONT_CHAR_SET );
246 lcl_FillProperty( pSeq[ nIndex++ ], "CharHeight", aHeightItem, MID_FONTHEIGHT );
247 lcl_FillProperty( pSeq[ nIndex++ ], "CharLocale", aLangItem, MID_LANG_LOCALE );
248}
249
251 : ScAccessibleCsvControl(rRuler)
252{
254}
255
257{
259}
260
261// XAccessibleComponent -----------------------------------------------------
262
264{
265 SolarMutexGuard aGuard;
266 ensureAlive();
267 return sal_Int32(Application::GetSettings().GetStyleSettings().GetLabelTextColor());
268}
269
271{
272 SolarMutexGuard aGuard;
273 ensureAlive();
274 return sal_Int32(Application::GetSettings().GetStyleSettings().GetFaceColor());
275}
276
277// XAccessibleContext ---------------------------------------------------------
278
280{
281 ensureAlive();
282 return 0;
283}
284
285Reference< XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleChild( sal_Int32 /* nIndex */ )
286{
287 ensureAlive();
288 throw IndexOutOfBoundsException();
289}
290
291Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleRelationSet()
292{
293 SolarMutexGuard aGuard;
294 ensureAlive();
295 rtl::Reference<AccessibleRelationSetHelper> pRelationSet = new AccessibleRelationSetHelper();
296
297 ScCsvRuler& rRuler = implGetRuler();
298 ScCsvTableBox* pTableBox = rRuler.GetTableBox();
299 ScCsvGrid& rGrid = pTableBox->GetGrid();
300
301 css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rGrid.GetAccessible()));
302 if( xAccObj.is() )
303 {
304 Sequence< Reference< XInterface > > aSeq{ xAccObj };
305 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLER_FOR, aSeq ) );
306 }
307
308 return pRelationSet;
309}
310
311Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleStateSet()
312{
313 SolarMutexGuard aGuard;
315 if( isAlive() )
316 {
317 pStateSet->AddState( AccessibleStateType::FOCUSABLE );
318 pStateSet->AddState( AccessibleStateType::SINGLE_LINE );
319 if( implGetRuler().HasFocus() )
320 pStateSet->AddState( AccessibleStateType::FOCUSED );
321 }
322 return pStateSet;
323}
324
325// XAccessibleText ------------------------------------------------------------
326
328{
329 SolarMutexGuard aGuard;
330 ensureAlive();
331 return lcl_GetApiPos( implGetRuler().GetRulerCursorPos() );
332}
333
335{
336 SolarMutexGuard aGuard;
337 ensureAlive();
339 ScCsvRuler& rRuler = implGetRuler();
340 sal_Int32 nOldCursor = rRuler.GetRulerCursorPos();
342 return rRuler.GetRulerCursorPos() != nOldCursor;
343}
344
346{
347 SolarMutexGuard aGuard;
348 ensureAlive();
350 return maBuffer[nIndex];
351}
352
353Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes( sal_Int32 nIndex,
354 const css::uno::Sequence< OUString >& /* aRequestedAttributes */ )
355{
356 SolarMutexGuard aGuard;
357 ensureAlive();
359 Sequence< PropertyValue > aSeq;
360 lcl_FillFontAttributes( aSeq, implGetRuler().GetDrawingArea()->get_ref_device().GetFont() );
361 return aSeq;
362}
363
364css::awt::Rectangle SAL_CALL ScAccessibleCsvRuler::getCharacterBounds( sal_Int32 nIndex )
365{
366 SolarMutexGuard aGuard;
367 ensureAlive();
369 ScCsvRuler& rRuler = implGetRuler();
370 Point aPos( rRuler.GetX( lcl_GetRulerPos( nIndex ) ) - rRuler.GetCharWidth() / 2, 0 );
371 css::awt::Rectangle aRect( aPos.X(), aPos.Y(), rRuler.GetCharWidth(), rRuler.GetOutputSizePixel().Height() );
372 // do not return rectangle out of window
373 sal_Int32 nWidth = rRuler.GetOutputSizePixel().Width();
374 if( aRect.X >= nWidth )
375 throw IndexOutOfBoundsException();
376 if( aRect.X + aRect.Width > nWidth )
377 aRect.Width = nWidth - aRect.X;
378 return aRect;
379}
380
382{
383 SolarMutexGuard aGuard;
384 ensureAlive();
385 return implGetTextLength();
386}
387
388sal_Int32 SAL_CALL ScAccessibleCsvRuler::getIndexAtPoint( const css::awt::Point& rPoint )
389{
390 SolarMutexGuard aGuard;
391 ensureAlive();
392 ScCsvRuler& rRuler = implGetRuler();
393 // use object's coordinate system, convert to API position
394 return lcl_GetApiPos( ::std::clamp( rRuler.GetPosFromX( rPoint.X ), sal_Int32(0), rRuler.GetPosCount() ) );
395}
396
398{
399 ensureAlive();
400 return OUString();
401}
402
404{
405 ensureAlive();
406 return -1;
407}
408
410{
411 ensureAlive();
412 return -1;
413}
414
415sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection( sal_Int32 /* nStartIndex */, sal_Int32 /* nEndIndex */ )
416{
417 ensureAlive();
418 return false;
419}
420
422{
423 SolarMutexGuard aGuard;
424 ensureAlive();
425 return OUString( maBuffer.getStr(), implGetTextLength() );
426}
427
428OUString SAL_CALL ScAccessibleCsvRuler::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
429{
430 SolarMutexGuard aGuard;
431 ensureAlive();
432 ensureValidRange( nStartIndex, nEndIndex );
433 return OUString( maBuffer.getStr() + nStartIndex, nEndIndex - nStartIndex );
434}
435
436TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType )
437{
438 SolarMutexGuard aGuard;
439 ensureAlive();
440
441 TextSegment aResult;
442 aResult.SegmentStart = -1;
443 aResult.SegmentEnd = -1;
444
445 if( (nIndex == implGetTextLength()) && (nTextType != AccessibleTextType::LINE) )
446 return aResult;
447
449
450 OUStringBuffer aResultText; // will be assigned to aResult.SegmentText below
451 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
452
453 switch( nTextType )
454 {
455 // single character
456 case AccessibleTextType::CHARACTER:
457 {
458 aResult.SegmentStart = nIndex;
459 aResultText.append(maBuffer[nIndex]);
460 }
461 break;
462
463 // entire number or single dot/line
464 case AccessibleTextType::WORD:
465 case AccessibleTextType::GLYPH:
466 aResult.SegmentStart = nIndex;
467 if( nRulerPos % 10 )
468 aResultText.append(maBuffer[nIndex]);
469 else
470 aResultText.append( nRulerPos ); // string representation of sal_Int32!!!
471 break;
472
473 // entire text
474 case AccessibleTextType::SENTENCE:
475 case AccessibleTextType::PARAGRAPH:
476 case AccessibleTextType::LINE:
477 aResult.SegmentStart = 0;
478 aResultText.append( maBuffer.getStr(), implGetTextLength() );
479 break;
480
481 // equal-formatted text
482 case AccessibleTextType::ATTRIBUTE_RUN:
483 {
484 sal_Int32 nFirstIndex = implGetFirstEqualFormatted( nIndex );
485 sal_Int32 nLastIndex = implGetLastEqualFormatted( nIndex );
486 aResult.SegmentStart = nFirstIndex;
487 aResultText.append( maBuffer.getStr() + nFirstIndex, nLastIndex - nFirstIndex + 1 );
488 }
489 break;
490
491 default:
492 throw RuntimeException();
493 }
494
495 aResult.SegmentText = aResultText.makeStringAndClear();
496 aResult.SegmentEnd = aResult.SegmentStart + aResult.SegmentText.getLength();
497 return aResult;
498}
499
500TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 nTextType )
501{
502 SolarMutexGuard aGuard;
503 ensureAlive();
505
506 TextSegment aResult;
507 aResult.SegmentStart = -1;
508 aResult.SegmentEnd = -1;
509
510 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
511
512 switch( nTextType )
513 {
514 // single character
515 case AccessibleTextType::CHARACTER:
516 if( nIndex > 0 )
517 aResult = getTextAtIndex( nIndex - 1, nTextType );
518 // else empty
519 break;
520
521 // entire number or single dot/line
522 case AccessibleTextType::WORD:
523 case AccessibleTextType::GLYPH:
524 if( nRulerPos > 0 )
525 aResult = getTextAtIndex( lcl_GetApiPos( nRulerPos - 1 ), nTextType );
526 // else empty
527 break;
528
529 // entire text
530 case AccessibleTextType::SENTENCE:
531 case AccessibleTextType::PARAGRAPH:
532 case AccessibleTextType::LINE:
533 // empty
534 break;
535
536 // equal-formatted text
537 case AccessibleTextType::ATTRIBUTE_RUN:
538 {
539 sal_Int32 nFirstIndex = implGetFirstEqualFormatted( nIndex );
540 if( nFirstIndex > 0 )
541 aResult = getTextAtIndex( nFirstIndex - 1, nTextType );
542 // else empty
543 }
544 break;
545
546 default:
547 throw RuntimeException();
548 }
549 return aResult;
550}
551
552TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 nTextType )
553{
554 SolarMutexGuard aGuard;
555 ensureAlive();
557
558 TextSegment aResult;
559 aResult.SegmentStart = -1;
560 aResult.SegmentEnd = -1;
561
562 sal_Int32 nRulerPos = lcl_GetRulerPos( nIndex );
563 sal_Int32 nLastValid = implGetTextLength();
564
565 switch( nTextType )
566 {
567 // single character
568 case AccessibleTextType::CHARACTER:
569 if( nIndex < nLastValid )
570 aResult = getTextAtIndex( nIndex + 1, nTextType );
571 // else empty
572 break;
573
574 // entire number or single dot/line
575 case AccessibleTextType::WORD:
576 case AccessibleTextType::GLYPH:
577 if( nRulerPos < implGetRuler().GetPosCount() )
578 aResult = getTextAtIndex( lcl_GetApiPos( nRulerPos + 1 ), nTextType );
579 // else empty
580 break;
581
582 // entire text
583 case AccessibleTextType::SENTENCE:
584 case AccessibleTextType::PARAGRAPH:
585 case AccessibleTextType::LINE:
586 // empty
587 break;
588
589 // equal-formatted text
590 case AccessibleTextType::ATTRIBUTE_RUN:
591 {
592 sal_Int32 nLastIndex = implGetLastEqualFormatted( nIndex );
593 if( nLastIndex < nLastValid )
594 aResult = getTextAtIndex( nLastIndex + 1, nTextType );
595 // else empty
596 }
597 break;
598
599 default:
600 throw RuntimeException();
601 }
602 return aResult;
603}
604
605sal_Bool SAL_CALL ScAccessibleCsvRuler::copyText( sal_Int32 /* nStartIndex */, sal_Int32 /* nEndIndex */ )
606{
607 ensureAlive();
608 return false;
609}
610
611sal_Bool SAL_CALL ScAccessibleCsvRuler::scrollSubstringTo( sal_Int32 /* nStartIndex */, sal_Int32/* nEndIndex */, AccessibleScrollType /* aScrollType */ )
612{
613 return false;
614}
615
616// XInterface -----------------------------------------------------------------
617
618Any SAL_CALL ScAccessibleCsvRuler::queryInterface( const css::uno::Type& rType )
619{
621 return aAny.hasValue() ? aAny : ScAccessibleCsvControl::queryInterface( rType );
622}
623
624void SAL_CALL ScAccessibleCsvRuler::acquire() noexcept
625{
626 ScAccessibleCsvControl::acquire();
627}
628
629void SAL_CALL ScAccessibleCsvRuler::release() noexcept
630{
631 ScAccessibleCsvControl::release();
632}
633
634// XTypeProvider --------------------------------------------------------------
635
636Sequence< css::uno::Type > SAL_CALL ScAccessibleCsvRuler::getTypes()
637{
638 return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(),
640}
641
643{
644 return css::uno::Sequence<sal_Int8>();
645}
646
647// events ---------------------------------------------------------------------
648
650{
651 sal_Int32 nPos = implGetRuler().GetRulerCursorPos();
652 if (nPos != CSV_POS_INVALID)
653 {
654 Any aOldValue, aNewValue;
655 aNewValue <<= nPos;
656 NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
657 }
658}
659
660// helpers --------------------------------------------------------------------
661
663{
664 return ScResId( STR_ACC_CSVRULER_NAME );
665}
666
668{
669 return ScResId( STR_ACC_CSVRULER_DESCR );
670}
671
672void ScAccessibleCsvRuler::ensureValidIndex( sal_Int32 nIndex ) const
673{
674 if( (nIndex < 0) || (nIndex >= implGetTextLength()) )
675 throw IndexOutOfBoundsException();
676}
677
679{
680 if( (nIndex < 0) || (nIndex > implGetTextLength()) )
681 throw IndexOutOfBoundsException();
682}
683
684void ScAccessibleCsvRuler::ensureValidRange( sal_Int32& rnStartIndex, sal_Int32& rnEndIndex ) const
685{
686 if( rnStartIndex > rnEndIndex )
687 ::std::swap( rnStartIndex, rnEndIndex );
688 if( (rnStartIndex < 0) || (rnEndIndex > implGetTextLength()) )
689 throw IndexOutOfBoundsException();
690}
691
693{
694 return static_cast< ScCsvRuler& >( implGetControl() );
695}
696
698{
699 SolarMutexGuard aGuard;
700 ensureAlive();
701 // extend existing string buffer to new ruler size
702 sal_Int32 nRulerCount = implGetRuler().GetPosCount();
703 sal_Int32 nRulerPos = lcl_GetRulerPos( maBuffer.getLength() );
704 for( ; nRulerPos <= nRulerCount; ++nRulerPos ) // include last position
705 {
706 switch( nRulerPos % 10 )
707 {
708 case 0: maBuffer.append( nRulerPos ); break;
709 case 5: maBuffer.append( cRulerLine ); break;
710 default: maBuffer.append( cRulerDot );
711 }
712 }
713}
714
716{
717 return lcl_GetApiPos( implGetRuler().GetPosCount() + 1 );
718}
719
720bool ScAccessibleCsvRuler::implHasSplit( sal_Int32 nApiPos )
721{
722 sal_Int32 nRulerPos = lcl_GetRulerPos( nApiPos );
723 return implGetRuler().HasSplit( nRulerPos ) && (nApiPos == lcl_GetApiPos( nRulerPos ));
724}
725
727{
728 bool bSplit = implHasSplit( nApiPos );
729 while( (nApiPos > 0) && (implHasSplit( nApiPos - 1 ) == bSplit) )
730 --nApiPos;
731 return nApiPos;
732}
733
735{
736 bool bSplit = implHasSplit( nApiPos );
737 sal_Int32 nLength = implGetTextLength();
738 while( (nApiPos < nLength - 1) && (implHasSplit( nApiPos + 1 ) == bSplit) )
739 ++nApiPos;
740 return nApiPos;
741}
742
743css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvRuler::getAccessibleParent()
744{
746}
747
748// Grid =======================================================================
749
751static sal_Int32 lcl_GetApiColumn( sal_uInt32 nGridColumn )
752{
753 return (nGridColumn != CSV_COLUMN_HEADER) ? static_cast< sal_Int32 >( nGridColumn + 1 ) : 0;
754}
755
757static sal_uInt32 lcl_GetGridColumn( sal_Int32 nApiColumn )
758{
759 return (nApiColumn > 0) ? static_cast< sal_uInt32 >( nApiColumn - 1 ) : CSV_COLUMN_HEADER;
760}
761
764{
765}
766
768{
770}
771
773{
774 SolarMutexGuard aGuard;
775 for (auto& rEntry : maAccessibleChildren)
776 rEntry.second->dispose();
777 maAccessibleChildren.clear();
779}
780
781// XAccessibleComponent -------------------------------------------------------
782
783Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleAtPoint( const css::awt::Point& rPoint )
784{
785 Reference< XAccessible > xRet;
786 if( containsPoint( rPoint ) )
787 {
788 SolarMutexGuard aGuard;
789 ensureAlive();
790
791 const ScCsvGrid& rGrid = implGetGrid();
792 // #102679#; use <= instead of <, because the offset is the size and not the point
793 sal_Int32 nColumn = ((rGrid.GetFirstX() <= rPoint.X) && (rPoint.X <= rGrid.GetLastX())) ?
794 lcl_GetApiColumn( rGrid.GetColumnFromX( rPoint.X ) ) : 0;
795 sal_Int32 nRow = (rPoint.Y >= rGrid.GetHdrHeight()) ?
796 (rGrid.GetLineFromY( rPoint.Y ) - rGrid.GetFirstVisLine() + 1) : 0;
797 xRet = getAccessibleCell(nRow, nColumn);
798 }
799 return xRet;
800}
801
803{
804 SolarMutexGuard aGuard;
805 ensureAlive();
806 return sal_Int32(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
807}
808
810{
811 SolarMutexGuard aGuard;
812 ensureAlive();
813 return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
814}
815
816// XAccessibleContext ---------------------------------------------------------
817
819{
820 SolarMutexGuard aGuard;
821 ensureAlive();
822 return implGetCellCount();
823}
824
825Reference<XAccessible> ScAccessibleCsvGrid::getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn)
826{
827 sal_Int32 nIndex = implGetIndex(nRow, nColumn);
828
829 XAccessibleSet::iterator aI = maAccessibleChildren.lower_bound(nIndex);
830 if (aI != maAccessibleChildren.end() && !(maAccessibleChildren.key_comp()(nIndex, aI->first)))
831 {
832 // key already exists
833 return aI->second;
834 }
835 // key does not exist
837 maAccessibleChildren.insert(aI, XAccessibleSet::value_type(nIndex, xNew));
838 return xNew;
839}
840
841Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleChild( sal_Int32 nIndex )
842{
843 SolarMutexGuard aGuard;
844 ensureAlive();
846
848}
849
850Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleRelationSet()
851{
852 SolarMutexGuard aGuard;
853 ensureAlive();
854 rtl::Reference<AccessibleRelationSetHelper> pRelationSet = new AccessibleRelationSetHelper();
855
856 ScCsvGrid& rGrid = implGetGrid();
857 ScCsvTableBox* pTableBox = rGrid.GetTableBox();
858 ScCsvRuler& rRuler = pTableBox->GetRuler();
859
860 if (rRuler.IsVisible())
861 {
862 css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rRuler.GetAccessible()));
863 if( xAccObj.is() )
864 {
865 Sequence< Reference< XInterface > > aSeq{ xAccObj };
866 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLED_BY, aSeq ) );
867 }
868 }
869
870 return pRelationSet;
871}
872
873Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleStateSet()
874{
875 SolarMutexGuard aGuard;
877 if( isAlive() )
878 {
879 pStateSet->AddState( AccessibleStateType::FOCUSABLE );
880 pStateSet->AddState( AccessibleStateType::MULTI_SELECTABLE );
881 pStateSet->AddState( AccessibleStateType::MANAGES_DESCENDANTS );
882 if( implGetGrid().HasFocus() )
883 pStateSet->AddState( AccessibleStateType::FOCUSED );
884 }
885 else
886 pStateSet->AddState( AccessibleStateType::DEFUNC );
887 return pStateSet;
888}
889
890// XAccessibleTable -----------------------------------------------------------
891
893{
894 SolarMutexGuard aGuard;
895 ensureAlive();
896 return implGetRowCount();
897}
898
900{
901 SolarMutexGuard aGuard;
902 ensureAlive();
903 return implGetColumnCount();
904}
905
906OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleRowDescription( sal_Int32 nRow )
907{
908 SolarMutexGuard aGuard;
909 ensureAlive();
910 ensureValidPosition( nRow, 0 );
911 return implGetCellText( nRow, 0 );
912}
913
914OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnDescription( sal_Int32 nColumn )
915{
916 SolarMutexGuard aGuard;
917 ensureAlive();
918 ensureValidPosition( 0, nColumn );
919 return implGetCellText( 0, nColumn );
920}
921
922sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
923{
924 ensureAlive();
925 ensureValidPosition( nRow, nColumn );
926 return 1;
927}
928
929sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
930{
931 ensureAlive();
932 ensureValidPosition( nRow, nColumn );
933 return 1;
934}
935
936Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleRowHeaders()
937{
938 ensureAlive();
939 return nullptr;
940}
941
942Reference< XAccessibleTable > SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnHeaders()
943{
944 ensureAlive();
945 return nullptr;
946}
947
949{
950 ensureAlive();
951 return Sequence< sal_Int32 >();
952}
953
955{
956 SolarMutexGuard aGuard;
957 ensureAlive();
958
959 ScCsvGrid& rGrid = implGetGrid();
960 Sequence< sal_Int32 > aSeq( implGetColumnCount() );
961 auto pSeq = aSeq.getArray();
962
963 sal_Int32 nSeqIx = 0;
964 sal_uInt32 nColIx = rGrid.GetFirstSelected();
965 for( ; nColIx != CSV_COLUMN_INVALID; ++nSeqIx, nColIx = rGrid.GetNextSelected( nColIx ) )
966 pSeq[ nSeqIx ] = lcl_GetApiColumn( nColIx );
967
968 aSeq.realloc( nSeqIx );
969 return aSeq;
970}
971
973{
974 ensureAlive();
975 return false;
976}
977
979{
980 SolarMutexGuard aGuard;
981 ensureAlive();
982 ensureValidIndex( nColumn );
983 return implIsColumnSelected( nColumn );
984}
985
986Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
987{
988 SolarMutexGuard aGuard;
989 ensureAlive();
990 ensureValidPosition( nRow, nColumn );
991 return getAccessibleCell(nRow, nColumn);
992}
993
994Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCaption()
995{
996 ensureAlive();
997 return nullptr;
998}
999
1000Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleSummary()
1001{
1002 ensureAlive();
1003 return nullptr;
1004}
1005
1006sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleSelected( sal_Int32 /* nRow */, sal_Int32 nColumn )
1007{
1008 return isAccessibleColumnSelected( nColumn );
1009}
1010
1011sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
1012{
1013 SolarMutexGuard aGuard;
1014 ensureAlive();
1015 ensureValidPosition( nRow, nColumn );
1016 return implGetIndex( nRow, nColumn );
1017}
1018
1019sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRow( sal_Int32 nChildIndex )
1020{
1021 SolarMutexGuard aGuard;
1022 ensureAlive();
1023 ensureValidIndex( nChildIndex );
1024 return implGetRow( nChildIndex );
1025}
1026
1027sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumn( sal_Int32 nChildIndex )
1028{
1029 SolarMutexGuard aGuard;
1030 ensureAlive();
1031 ensureValidIndex( nChildIndex );
1032 return implGetColumn( nChildIndex );
1033}
1034
1035// XAccessibleSelection -------------------------------------------------------
1036
1037void SAL_CALL ScAccessibleCsvGrid::selectAccessibleChild( sal_Int32 nChildIndex )
1038{
1039 SolarMutexGuard aGuard;
1040 ensureAlive();
1041 ensureValidIndex( nChildIndex );
1042 sal_Int32 nColumn = implGetColumn( nChildIndex );
1043 if( nChildIndex == 0 )
1045 else
1046 implSelectColumn( nColumn, true );
1047}
1048
1050{
1051 SolarMutexGuard aGuard;
1052 ensureAlive();
1053 ensureValidIndex( nChildIndex );
1054 sal_Int32 nColumn = implGetColumn( nChildIndex );
1055 return implIsColumnSelected( nColumn );
1056}
1057
1059{
1060 SolarMutexGuard aGuard;
1061 ensureAlive();
1062 implGetGrid().SelectAll( false );
1063}
1064
1066{
1068}
1069
1071{
1072 SolarMutexGuard aGuard;
1073 ensureAlive();
1075}
1076
1077Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
1078{
1079 SolarMutexGuard aGuard;
1080 ensureAlive();
1081 sal_Int32 nColumns = implGetSelColumnCount();
1082 if( nColumns == 0 )
1083 throw IndexOutOfBoundsException();
1084
1085 sal_Int32 nRow = nSelectedChildIndex / nColumns;
1086 sal_Int32 nColumn = implGetSelColumn( nSelectedChildIndex % nColumns );
1087 return getAccessibleCellAt( nRow, nColumn );
1088}
1089
1090void SAL_CALL ScAccessibleCsvGrid::deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
1091{
1092 SolarMutexGuard aGuard;
1093 ensureAlive();
1094 sal_Int32 nColumns = implGetSelColumnCount();
1095 if( nColumns == 0 )
1096 throw IndexOutOfBoundsException();
1097
1098 sal_Int32 nColumn = implGetSelColumn( nSelectedChildIndex % nColumns );
1099 ensureValidPosition( nSelectedChildIndex / nColumns, nColumn );
1100 if( nColumn > 0 )
1101 implSelectColumn( nColumn, false );
1102}
1103
1104// XInterface -----------------------------------------------------------------
1105
1106Any SAL_CALL ScAccessibleCsvGrid::queryInterface( const css::uno::Type& rType )
1107{
1109 return aAny.hasValue() ? aAny : ScAccessibleCsvControl::queryInterface( rType );
1110}
1111
1112void SAL_CALL ScAccessibleCsvGrid::acquire() noexcept
1113{
1114 ScAccessibleCsvControl::acquire();
1115}
1116
1117void SAL_CALL ScAccessibleCsvGrid::release() noexcept
1118{
1119 ScAccessibleCsvControl::release();
1120}
1121
1122// XTypeProvider --------------------------------------------------------------
1123
1124Sequence< css::uno::Type > SAL_CALL ScAccessibleCsvGrid::getTypes()
1125{
1126 return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(),
1127 Sequence {
1130}
1131
1133{
1134 return css::uno::Sequence<sal_Int8>();
1135}
1136
1137// events ---------------------------------------------------------------------
1138
1140{
1142 Any aOldAny, aNewAny;
1143 (bFocused ? aNewAny : aOldAny) <<=
1144 getAccessibleCellAt( 0, lcl_GetApiColumn( implGetGrid().GetFocusColumn() ) );
1145 NotifyAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny);
1146}
1147
1148void ScAccessibleCsvGrid::SendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows )
1149{
1150 if( nFirstColumn <= nLastColumn )
1151 {
1152 AccessibleTableModelChange aModelChange(
1153 AccessibleTableModelChangeType::UPDATE, 0, bAllRows ? implGetRowCount() - 1 : 0,
1154 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1155 Any aOldAny, aNewAny;
1156 aNewAny <<= aModelChange;
1157 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1158 }
1159}
1160
1161void ScAccessibleCsvGrid::SendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
1162{
1163 if( nFirstColumn <= nLastColumn )
1164 {
1165 AccessibleTableModelChange aModelChange(
1166 AccessibleTableModelChangeType::COLUMNS_INSERTED, -1, -1,
1167 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1168 Any aOldAny, aNewAny;
1169 aNewAny <<= aModelChange;
1170 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1171 }
1172}
1173
1174void ScAccessibleCsvGrid::SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
1175{
1176 if( nFirstColumn <= nLastColumn )
1177 {
1178 AccessibleTableModelChange aModelChange(
1179 AccessibleTableModelChangeType::COLUMNS_REMOVED, -1, -1,
1180 lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) );
1181 Any aOldAny, aNewAny;
1182 aNewAny <<= aModelChange;
1183 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1184 }
1185}
1186
1187// helpers --------------------------------------------------------------------
1188
1190{
1191 return ScResId( STR_ACC_CSVGRID_NAME );
1192}
1193
1195{
1196 return ScResId( STR_ACC_CSVGRID_DESCR );
1197}
1198
1199void ScAccessibleCsvGrid::ensureValidIndex( sal_Int32 nIndex ) const
1200{
1201 if( (nIndex < 0) || (nIndex >= implGetCellCount()) )
1202 throw IndexOutOfBoundsException();
1203}
1204
1205void ScAccessibleCsvGrid::ensureValidPosition( sal_Int32 nRow, sal_Int32 nColumn ) const
1206{
1207 if( (nRow < 0) || (nRow >= implGetRowCount()) || (nColumn < 0) || (nColumn >= implGetColumnCount()) )
1208 throw IndexOutOfBoundsException();
1209}
1210
1212{
1213 return static_cast< ScCsvGrid& >( implGetControl() );
1214}
1215
1216bool ScAccessibleCsvGrid::implIsColumnSelected( sal_Int32 nColumn ) const
1217{
1218 return (nColumn > 0) && implGetGrid().IsSelected( lcl_GetGridColumn( nColumn ) );
1219}
1220
1221void ScAccessibleCsvGrid::implSelectColumn( sal_Int32 nColumn, bool bSelect )
1222{
1223 if( nColumn > 0 )
1224 implGetGrid().Select( lcl_GetGridColumn( nColumn ), bSelect );
1225}
1226
1228{
1229 return static_cast< sal_Int32 >( implGetGrid().GetLastVisLine() - implGetGrid().GetFirstVisLine() + 2 );
1230}
1231
1233{
1234 return static_cast< sal_Int32 >( implGetGrid().GetColumnCount() + 1 );
1235}
1236
1238{
1239 ScCsvGrid& rGrid = implGetGrid();
1240 sal_Int32 nCount = 0;
1241 for( sal_uInt32 nColIx = rGrid.GetFirstSelected(); nColIx != CSV_COLUMN_INVALID; nColIx = rGrid.GetNextSelected( nColIx ) )
1242 ++nCount;
1243 return nCount;
1244}
1245
1246sal_Int32 ScAccessibleCsvGrid::implGetSelColumn( sal_Int32 nSelColumn ) const
1247{
1248 ScCsvGrid& rGrid = implGetGrid();
1249 sal_Int32 nColumn = 0;
1250 for( sal_uInt32 nColIx = rGrid.GetFirstSelected(); nColIx != CSV_COLUMN_INVALID; nColIx = rGrid.GetNextSelected( nColIx ) )
1251 {
1252 if( nColumn == nSelColumn )
1253 return static_cast< sal_Int32 >( nColIx + 1 );
1254 ++nColumn;
1255 }
1256 return 0;
1257}
1258
1259OUString ScAccessibleCsvGrid::implGetCellText( sal_Int32 nRow, sal_Int32 nColumn ) const
1260{
1261 ScCsvGrid& rGrid = implGetGrid();
1262 sal_Int32 nLine = nRow + rGrid.GetFirstVisLine() - 1;
1263 OUString aCellStr;
1264 if( (nColumn > 0) && (nRow > 0) )
1265 aCellStr = rGrid.GetCellText( lcl_GetGridColumn( nColumn ), nLine );
1266 else if( nRow > 0 )
1267 aCellStr = OUString::number( nLine + 1 );
1268 else if( nColumn > 0 )
1269 aCellStr = rGrid.GetColumnTypeName( lcl_GetGridColumn( nColumn ) );
1270 return aCellStr;
1271}
1272
1274{
1275 return new ScAccessibleCsvCell(implGetGrid(), implGetCellText(nRow, nColumn), nRow, nColumn);
1276}
1277
1278css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvGrid::getAccessibleParent()
1279{
1281}
1282
1284 ScCsvGrid& rGrid,
1285 const OUString& rCellText,
1286 sal_Int32 nRow, sal_Int32 nColumn ) :
1287 ScAccessibleCsvControl( rGrid ),
1288 AccessibleStaticTextBase( SvxEditSourcePtr() ),
1289 maCellText( rCellText ),
1290 mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) : CSV_LINE_HEADER ),
1291 mnColumn( lcl_GetGridColumn( nColumn ) ),
1292 mnIndex( nRow * (rGrid.GetColumnCount() + 1) + nColumn )
1293{
1295}
1296
1298{
1299}
1300
1302{
1303 SolarMutexGuard aGuard;
1306}
1307
1308// XAccessibleComponent -------------------------------------------------------
1309
1311{
1312 SolarMutexGuard aGuard;
1313 ensureAlive();
1314 ScCsvGrid& rGrid = implGetGrid();
1316}
1317
1319{
1320 SolarMutexGuard aGuard;
1321 ensureAlive();
1322 return sal_Int32(Application::GetSettings().GetStyleSettings().GetButtonTextColor());
1323}
1324
1326{
1327 SolarMutexGuard aGuard;
1328 ensureAlive();
1329 return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
1330}
1331
1332// XAccessibleContext -----------------------------------------------------
1333
1335{
1336 return AccessibleStaticTextBase::getAccessibleChildCount();
1337}
1338
1339Reference< XAccessible > SAL_CALL ScAccessibleCsvCell::getAccessibleChild( sal_Int32 nIndex )
1340{
1341 return AccessibleStaticTextBase::getAccessibleChild( nIndex );
1342}
1343
1345{
1346 SolarMutexGuard aGuard;
1347 ensureAlive();
1348 return mnIndex;
1349}
1350
1351Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvCell::getAccessibleRelationSet()
1352{
1353 SolarMutexGuard aGuard;
1354 ensureAlive();
1355 return new AccessibleRelationSetHelper();
1356}
1357
1358Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvCell::getAccessibleStateSet()
1359{
1360 SolarMutexGuard aGuard;
1362 if( isAlive() )
1363 {
1364 const ScCsvGrid& rGrid = implGetGrid();
1365 pStateSet->AddState( AccessibleStateType::SINGLE_LINE );
1367 pStateSet->AddState( AccessibleStateType::SELECTABLE );
1368 if( rGrid.HasFocus() && (rGrid.GetFocusColumn() == mnColumn) && (mnLine == CSV_LINE_HEADER) )
1369 pStateSet->AddState( AccessibleStateType::ACTIVE );
1370 if( rGrid.IsSelected( mnColumn ) )
1371 pStateSet->AddState( AccessibleStateType::SELECTED );
1372 }
1373 return pStateSet;
1374}
1375
1376// XInterface -----------------------------------------------------------------
1377
1379
1380// XTypeProvider --------------------------------------------------------------
1381
1383
1384// helpers --------------------------------------------------------------------
1385
1386OUString SAL_CALL ScAccessibleCsvCell::getAccessibleName()
1387{
1388 return maCellText;
1389}
1390
1392{
1393 return OUString();
1394}
1395
1397{
1398 return static_cast< ScCsvGrid& >( implGetControl() );
1399}
1400
1402{
1403 ScCsvGrid& rGrid = implGetGrid();
1404 return Point(
1405 (mnColumn == CSV_COLUMN_HEADER) ? rGrid.GetHdrX() : rGrid.GetColumnX( mnColumn ),
1406 (mnLine == CSV_LINE_HEADER) ? 0 : rGrid.GetY( mnLine ) );
1407}
1408
1409sal_uInt32 ScAccessibleCsvCell::implCalcPixelWidth(sal_uInt32 nChars) const
1410{
1411 ScCsvGrid& rGrid = implGetGrid();
1412 return rGrid.GetCharWidth() * nChars;
1413}
1414
1416{
1417 ScCsvGrid& rGrid = implGetGrid();
1418 return Size(
1420 (mnLine == CSV_LINE_HEADER) ? rGrid.GetHdrHeight() : rGrid.GetLineHeight() );
1421}
1422
1424{
1425 ScCsvGrid& rGrid = implGetGrid();
1426 tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetOutputSizePixel() );
1428 {
1429 aClipRect.SetLeft( rGrid.GetFirstX() );
1430 aClipRect.SetRight( rGrid.GetLastX() );
1431 }
1432 if( mnLine != CSV_LINE_HEADER )
1433 aClipRect.SetTop( rGrid.GetHdrHeight() );
1434
1436 aRect.Intersection( aClipRect );
1437 if( aRect.IsEmpty() )
1438 aRect.SetSize( Size( -1, -1 ) );
1439
1440 return css::awt::Rectangle(aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight());
1441}
1442
1443::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource()
1444{
1445 ScCsvGrid& rGrid = implGetGrid();
1446
1447 ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( std::make_unique<ScAccessibleCsvTextData>(&rGrid.GetDrawingArea()->get_ref_device(), rGrid.GetEditEngine(), maCellText, implGetRealSize()) ) );
1448 return pEditSource;
1449}
1450
1451css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvCell::getAccessibleParent()
1452{
1453 ScCsvGrid& rGrid = implGetGrid();
1454
1455 ScAccessibleCsvGrid* pAcc = static_cast<ScAccessibleCsvGrid*>(rGrid.GetAccessible());
1456
1457 return pAcc;
1458}
1459
1460/* 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.
int mnIndex
static const AllSettings & GetSettings()
Accessible class representing a cell of the CSV grid control.
virtual ~ScAccessibleCsvCell() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleDescription() override
sal_Int32 mnIndex
The grid column index (core index).
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.
ScAccessibleCsvCell(ScCsvGrid &rGrid, const OUString &rCellText, sal_Int32 nRow, sal_Int32 nColumn)
The index of the cell in the table.
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
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 getAccessibleIndexInParent() override
Returns the index of this cell in the table.
virtual sal_Int32 SAL_CALL getBackground() override
sal_Int32 mnLine
The text contents of this cell.
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
Returns the child count.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Returns the specified child.
::std::unique_ptr< SvxEditSource > SvxEditSourcePtr
Accessible base class used for CSV controls.
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
rtl::Reference<::utl::AccessibleStateSetHelper > implCreateStateSet()
Creates a StateSetHelper 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 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int32 nSelectedChildIndex) override
Returns the child with the specified index in all selected children.
virtual void SAL_CALL clearAccessibleSelection() override
Deselects all cells.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int32 nChildIndex) override
Returns true, if the specified child is selected.
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 sal_Int32 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the child index of the cell at the specified position.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
Returns the summary description object of the table.
sal_Int32 implGetIndex(sal_Int32 nRow, sal_Int32 nColumn) const
Returns the child index from cell position (including header).
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.
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 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::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
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
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.
sal_Int32 implGetCellCount() const
Returns the total cell count in the table (including header).
void ensureValidIndex(sal_Int32 nIndex) const
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 css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
Returns the selected rows as a sequence.
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int32 nChildIndex) override
Returns the column index of the specified child.
ScAccessibleCsvGrid(ScCsvGrid &rGrid)
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
Returns the description text of the specified column in the table.
virtual void SAL_CALL selectAccessibleChild(sal_Int32 nChildIndex) override
Selects the specified child (selects the entire column or the entire table).
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Reference< css::accessibility::XAccessible > getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Returns a sequence with all supported interface types.
virtual void SAL_CALL deselectAccessibleChild(sal_Int32 nSelectedChildIndex) override
Deselects the child with the specified index in all selected children.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Returns an implementation ID.
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int32 nChildIndex) override
Returns the row index of the specified child.
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.
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
Returns the child count (count of cells in the table).
sal_Int32 implGetColumn(sal_Int32 nIndex) const
Returns the column index from cell index (including header).
bool implIsColumnSelected(sal_Int32 nColumn) const
Returns true, if the specified column (including header) is selected.
ScCsvGrid & implGetGrid() const
Returns the VCL grid control.
virtual void SAL_CALL acquire() noexcept override
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.
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 getSelectedAccessibleChildCount() override
Returns the count of selected children.
XAccessibleSet maAccessibleChildren
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Returns the specified child cell.
sal_Int32 implGetRow(sal_Int32 nIndex) const
Returns the row index from cell index (including header).
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 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 css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
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 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 nIndex) override
Throws an exception (the ruler does not have children).
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_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).
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
Returns the child count (the ruler does not have children).
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.
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:689
sal_Int32 GetColumnWidth(sal_uInt32 nColIndex) const
Returns the character width of the column with the specified index.
Definition: csvgrid.cxx:481
sal_Int32 GetColumnX(sal_uInt32 nColIndex) const
Returns X coordinate of the specified column.
Definition: csvgrid.cxx:464
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:634
void Select(sal_uInt32 nColIndex, bool bSelect=true)
Selects or deselects the specified column.
Definition: csvgrid.cxx:643
ScCsvTableBox * GetTableBox()
Definition: csvgrid.hxx:97
EditEngine * GetEditEngine()
Returns a pointer to the used edit engine.
Definition: csvgrid.cxx:1084
sal_uInt32 GetFirstSelected() const
Returns index of the first selected column.
Definition: csvgrid.cxx:629
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:624
OUString GetCellText(sal_uInt32 nColIndex, sal_Int32 nLine) const
Returns the text of the specified cell.
Definition: csvgrid.cxx:853
OUString GetColumnTypeName(sal_uInt32 nColIndex) const
Returns the UI type name of the specified column.
Definition: csvgrid.cxx:550
sal_uInt32 GetColumnFromX(sal_Int32 nX) const
Returns column index from output coordinate.
Definition: csvgrid.cxx:469
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)
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
virtual void SAL_CALL disposing() override
void NotifyAccessibleEvent(const sal_Int16 _nEventId, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
css::uno::Type const & get()
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
virtual a11yref get_accessible_parent()=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
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
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:249
unsigned char sal_uInt8
unsigned char sal_Bool
sal_uInt16 sal_Unicode
sal_Int32 nLength