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>
52using ::utl::AccessibleRelationSetHelper;
53using ::accessibility::AccessibleStaticTextBase;
54using ::com::sun::star::uno::Any;
55using ::com::sun::star::uno::Reference;
56using ::com::sun::star::uno::Sequence;
57using ::com::sun::star::uno::RuntimeException;
58using ::com::sun::star::uno::XInterface;
59using ::com::sun::star::lang::IndexOutOfBoundsException;
60using ::com::sun::star::beans::PropertyValue;
70 : mpControl(&rControl)
83 comphelper::OAccessibleComponentHelper::disposing();
105 Any aOldAny, aNewAny;
107 aNewAny <<= AccessibleStateType::FOCUSED;
109 aOldAny <<= AccessibleStateType::FOCUSED;
110 NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny);
115 OSL_FAIL(
"ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
120 NotifyAccessibleEvent(AccessibleEventId::VISIBLE_DATA_CHANGED,
Any(),
Any());
125 NotifyAccessibleEvent(AccessibleEventId::SELECTION_CHANGED,
Any(),
Any());
130 OSL_FAIL(
"ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
135 OSL_FAIL(
"ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
140 OSL_FAIL(
"ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
150 return css::awt::Rectangle(0, 0, aOutSize.
Width(), aOutSize.
Height());
155 assert(
mpControl &&
"ScAccessibleCsvControl::implGetControl - missing control");
162 sal_Int64 nStateSet = 0;
166 nStateSet |= AccessibleStateType::OPAQUE;
168 nStateSet |= AccessibleStateType::ENABLED;
170 nStateSet |= AccessibleStateType::SHOWING;
172 nStateSet |= AccessibleStateType::VISIBLE;
175 nStateSet |= AccessibleStateType::DEFUNC;
184 sal_Int32 nApiPos = nRulerPos;
185 sal_Int32 nStart = (nRulerPos - 1) / 10;
187 while( nStart >= nExp )
189 nApiPos += nStart - nExp + 1;
192 return ::std::max( nApiPos,
static_cast<sal_Int32
>(0) );
200 sal_Int32 nRulerPos = 0;
201 sal_Int32 nApiBase = 0;
202 sal_Int32 nApiLimit = 10;
203 while( nApiPos >= nApiLimit )
208 nApiBase = nApiLimit;
211 sal_Int32 nRelPos = nApiPos - nApiBase;
212 return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 );
218 OSL_ENSURE( nExp > 0,
"lcl_ExpandSequence - invalid value" );
219 rSeq.realloc( rSeq.getLength() + nExp );
220 return rSeq.getLength() - nExp;
226 rVal.Name = rPropName;
238 auto pSeq = rSeq.getArray();
249 : ImplInheritanceHelper(rRuler)
286 throw IndexOutOfBoundsException();
302 Sequence< Reference< XInterface > >
aSeq{ xAccObj };
303 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLER_FOR,
aSeq ) );
312 sal_Int64 nStateSet = implCreateStateSet();
315 nStateSet |= AccessibleStateType::FOCUSABLE;
316 nStateSet |= AccessibleStateType::SINGLE_LINE;
318 nStateSet |= AccessibleStateType::FOCUSED;
352 const css::uno::Sequence< OUString >& )
357 Sequence< PropertyValue >
aSeq;
372 if( aRect.X >= nWidth )
373 throw IndexOutOfBoundsException();
374 if( aRect.X + aRect.Width > nWidth )
375 aRect.Width = nWidth - aRect.X;
431 return OUString(
maBuffer.getStr() + nStartIndex, nEndIndex - nStartIndex );
440 aResult.SegmentStart = -1;
441 aResult.SegmentEnd = -1;
448 OUStringBuffer aResultText;
454 case AccessibleTextType::CHARACTER:
456 aResult.SegmentStart =
nIndex;
462 case AccessibleTextType::WORD:
463 case AccessibleTextType::GLYPH:
464 aResult.SegmentStart =
nIndex;
468 aResultText.append( nRulerPos );
472 case AccessibleTextType::SENTENCE:
473 case AccessibleTextType::PARAGRAPH:
474 case AccessibleTextType::LINE:
475 aResult.SegmentStart = 0;
480 case AccessibleTextType::ATTRIBUTE_RUN:
484 aResult.SegmentStart = nFirstIndex;
485 aResultText.append(
maBuffer.getStr() + nFirstIndex, nLastIndex - nFirstIndex + 1 );
493 aResult.SegmentText = aResultText.makeStringAndClear();
494 aResult.SegmentEnd = aResult.SegmentStart + aResult.SegmentText.getLength();
505 aResult.SegmentStart = -1;
506 aResult.SegmentEnd = -1;
513 case AccessibleTextType::CHARACTER:
520 case AccessibleTextType::WORD:
521 case AccessibleTextType::GLYPH:
528 case AccessibleTextType::SENTENCE:
529 case AccessibleTextType::PARAGRAPH:
530 case AccessibleTextType::LINE:
535 case AccessibleTextType::ATTRIBUTE_RUN:
538 if( nFirstIndex > 0 )
557 aResult.SegmentStart = -1;
558 aResult.SegmentEnd = -1;
566 case AccessibleTextType::CHARACTER:
573 case AccessibleTextType::WORD:
574 case AccessibleTextType::GLYPH:
581 case AccessibleTextType::SENTENCE:
582 case AccessibleTextType::PARAGRAPH:
583 case AccessibleTextType::LINE:
588 case AccessibleTextType::ATTRIBUTE_RUN:
591 if( nLastIndex < nLastValid )
621 Any aOldValue, aNewValue;
623 NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
631 return ScResId( STR_ACC_CSVRULER_NAME );
636 return ScResId( STR_ACC_CSVRULER_DESCR );
642 throw IndexOutOfBoundsException();
648 throw IndexOutOfBoundsException();
653 if( rnStartIndex > rnEndIndex )
654 ::std::swap( rnStartIndex, rnEndIndex );
656 throw IndexOutOfBoundsException();
661 return static_cast< ScCsvRuler&
>( implGetControl() );
671 for( ; nRulerPos <= nRulerCount; ++nRulerPos )
673 switch( nRulerPos % 10 )
675 case 0:
maBuffer.append( nRulerPos );
break;
696 while( (nApiPos > 0) && (
implHasSplit( nApiPos - 1 ) == bSplit) )
712 return implGetControl().GetDrawingArea()->get_accessible_parent();
720 return (nGridColumn !=
CSV_COLUMN_HEADER) ?
static_cast< sal_Int32
>( nGridColumn + 1 ) : 0;
726 return (nApiColumn > 0) ?
static_cast< sal_uInt32
>( nApiColumn - 1 ) :
CSV_COLUMN_HEADER;
730 : ImplInheritanceHelper(rGrid)
743 rEntry.second->dispose();
752 Reference< XAccessible > xRet;
753 if( containsPoint( rPoint ) )
760 sal_Int32 nColumn = ((rGrid.
GetFirstX() <= rPoint.X) && (rPoint.X <= rGrid.
GetLastX())) ?
780 return sal_Int32(
SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
832 Sequence< Reference< XInterface > >
aSeq{ xAccObj };
833 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLED_BY,
aSeq ) );
843 sal_Int64 nStateSet = implCreateStateSet();
846 nStateSet |= AccessibleStateType::FOCUSABLE;
847 nStateSet |= AccessibleStateType::MULTI_SELECTABLE;
848 nStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
850 nStateSet |= AccessibleStateType::FOCUSED;
853 nStateSet |= AccessibleStateType::DEFUNC;
918 return Sequence< sal_Int32 >();
928 auto pSeq =
aSeq.getArray();
930 sal_Int32 nSeqIx = 0;
935 aSeq.realloc( nSeqIx );
1010 if( nChildIndex == 0 )
1050 throw IndexOutOfBoundsException();
1052 sal_Int32 nRow = nSelectedChildIndex / nColumns;
1064 throw IndexOutOfBoundsException();
1077 Any aOldAny, aNewAny;
1078 (bFocused ? aNewAny : aOldAny) <<=
1080 NotifyAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny);
1085 if( nFirstColumn <= nLastColumn )
1087 AccessibleTableModelChange aModelChange(
1088 AccessibleTableModelChangeType::UPDATE, 0, bAllRows ?
implGetRowCount() - 1 : 0,
1090 Any aOldAny, aNewAny;
1091 aNewAny <<= aModelChange;
1092 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1098 if( nFirstColumn <= nLastColumn )
1100 AccessibleTableModelChange aModelChange(
1101 AccessibleTableModelChangeType::COLUMNS_INSERTED, -1, -1,
1103 Any aOldAny, aNewAny;
1104 aNewAny <<= aModelChange;
1105 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1111 if( nFirstColumn <= nLastColumn )
1113 AccessibleTableModelChange aModelChange(
1114 AccessibleTableModelChangeType::COLUMNS_REMOVED, -1, -1,
1116 Any aOldAny, aNewAny;
1117 aNewAny <<= aModelChange;
1118 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1126 return ScResId( STR_ACC_CSVGRID_NAME );
1131 return ScResId( STR_ACC_CSVGRID_DESCR );
1137 throw IndexOutOfBoundsException();
1143 throw IndexOutOfBoundsException();
1148 return static_cast< ScCsvGrid&
>( implGetControl() );
1184 sal_Int32 nColumn = 0;
1187 if( nColumn == nSelColumn )
1188 return static_cast< sal_Int32
>( nColIx + 1 );
1199 if( (nColumn > 0) && (nRow > 0) )
1202 aCellStr = OUString::number( nLine + 1 );
1203 else if( nColumn > 0 )
1215 return implGetControl().GetDrawingArea()->get_accessible_parent();
1221 sal_Int32 nRow, sal_Int32 nColumn ) :
1222 ImplInheritanceHelper( rGrid ),
1224 maCellText(
std::move( aCellText )),
1225 mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) :
CSV_LINE_HEADER ),
1227 mnIndex( nRow * (rGrid.GetColumnCount() + 1) + nColumn )
1264 return sal_Int32(
SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
1271 return AccessibleStaticTextBase::getAccessibleChildCount();
1276 return AccessibleStaticTextBase::getAccessibleChild(
nIndex );
1290 return new AccessibleRelationSetHelper();
1296 sal_Int64 nStateSet = implCreateStateSet();
1300 nStateSet |= AccessibleStateType::SINGLE_LINE;
1302 nStateSet |= AccessibleStateType::SELECTABLE;
1304 nStateSet |= AccessibleStateType::ACTIVE;
1306 nStateSet |= AccessibleStateType::SELECTED;
1333 return static_cast< ScCsvGrid&
>( implGetControl() );
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()
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.
void Execute(ScCsvCmdType eType, sal_Int32 nParam1=CSV_POS_INVALID, sal_Int32 nParam2=CSV_POS_INVALID)
Executes a command by calling command handler.
sal_Int32 GetPosCount() const
Returns the number of available positions.
sal_Int32 GetPosFromX(sal_Int32 nX) const
Returns position from output coordinate.
sal_Int32 GetLastVisLine() const
Returns index of last visible line.
sal_Int32 GetRulerCursorPos() const
Returns the ruler cursor position.
sal_Int32 GetCharWidth() const
Returns the width of one character column.
sal_Int32 GetLineHeight() const
Returns the height of one line.
sal_Int32 GetFirstVisLine() const
Returns index of first visible line.
sal_Int32 GetHdrWidth() const
Returns the width of the header column.
sal_Int32 GetX(sal_Int32 nPos) const
Returns output X coordinate of the specified position.
sal_Int32 GetLineFromY(sal_Int32 nY) const
Returns line index from output coordinate.
sal_Int32 GetHdrHeight() const
Returns the height of the header line.
sal_Int32 GetLastX() const
Returns the X position of the last pixel of the data area.
sal_Int32 GetHdrX() const
Returns the start position of the header column.
sal_Int32 GetFirstX() const
Returns the X position of the first pixel of the data area.
ScAccessibleCsvControl * GetAccessible()
sal_Int32 GetY(sal_Int32 nLine) const
Returns output Y coordinate of the specified line.
A data grid control for the CSV import dialog.
sal_Int32 GetColumnPos(sal_uInt32 nColIndex) const
Returns start position of the column with the specified index.
void SelectAll(bool bSelect=true)
Selects or deselects all columns.
sal_Int32 GetColumnWidth(sal_uInt32 nColIndex) const
Returns the character width of the column with the specified index.
sal_Int32 GetColumnX(sal_uInt32 nColIndex) const
Returns X coordinate of the specified column.
sal_uInt32 GetFocusColumn() const
Returns index of the focused column.
sal_uInt32 GetNextSelected(sal_uInt32 nFromIndex) const
Returns index of the first selected column really after nFromIndex.
void Select(sal_uInt32 nColIndex, bool bSelect=true)
Selects or deselects the specified column.
ScCsvTableBox * GetTableBox()
EditEngine * GetEditEngine()
Returns a pointer to the used edit engine.
sal_uInt32 GetFirstSelected() const
Returns index of the first selected column.
sal_uInt32 GetColumnCount() const
Returns the number of columns.
bool IsSelected(sal_uInt32 nColIndex) const
Returns true, if the specified column is selected.
OUString GetCellText(sal_uInt32 nColIndex, sal_Int32 nLine) const
Returns the text of the specified cell.
OUString GetColumnTypeName(sal_uInt32 nColIndex) const
Returns the UI type name of the specified column.
sal_uInt32 GetColumnFromX(sal_Int32 nX) const
Returns column index from output coordinate.
A ruler control for the CSV import dialog.
bool HasSplit(sal_Int32 nPos) const
Returns true if at position nPos is a split.
ScCsvTableBox * GetTableBox()
The control in the CSV import dialog that contains a ruler and a data grid to visualize and modify th...
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)
FontFamily GetFamilyType()
const OUString & GetStyleName() const
const OUString & GetFamilyName() const
const Size & GetFontSize() const
LanguageType GetLanguage() const
rtl_TextEncoding GetCharSet() const
virtual OutputDevice & get_ref_device()=0
@ CSVCMD_MOVEGRIDCURSOR
Move ruler cursor to new position. [position].
@ CSVCMD_MOVERULERCURSOR
Change data line pixel height. [height in pixel}.
const sal_uInt32 CSV_COLUMN_INVALID
const sal_Int32 CSV_POS_INVALID
Constant for an invalid ruler position.
Sequence< sal_Int8 > aSeq
#define MID_FONT_CHAR_SET
#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)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)