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>
53using ::utl::AccessibleRelationSetHelper;
54using ::accessibility::AccessibleStaticTextBase;
55using ::com::sun::star::uno::Any;
56using ::com::sun::star::uno::Reference;
57using ::com::sun::star::uno::Sequence;
58using ::com::sun::star::uno::RuntimeException;
59using ::com::sun::star::uno::XInterface;
60using ::com::sun::star::lang::IndexOutOfBoundsException;
61using ::com::sun::star::beans::PropertyValue;
71 : mpControl(&rControl)
84 comphelper::OAccessibleComponentHelper::disposing();
106 Any aOldAny, aNewAny;
108 aNewAny <<= AccessibleStateType::FOCUSED;
110 aOldAny <<= AccessibleStateType::FOCUSED;
111 NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny);
116 OSL_FAIL(
"ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
121 NotifyAccessibleEvent(AccessibleEventId::VISIBLE_DATA_CHANGED,
Any(),
Any());
126 NotifyAccessibleEvent(AccessibleEventId::SELECTION_CHANGED,
Any(),
Any());
131 OSL_FAIL(
"ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
136 OSL_FAIL(
"ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
141 OSL_FAIL(
"ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
151 return css::awt::Rectangle(0, 0, aOutSize.
Width(), aOutSize.
Height());
156 assert(
mpControl &&
"ScAccessibleCsvControl::implGetControl - missing control");
163 sal_Int64 nStateSet = 0;
167 nStateSet |= AccessibleStateType::OPAQUE;
169 nStateSet |= AccessibleStateType::ENABLED;
171 nStateSet |= AccessibleStateType::SHOWING;
173 nStateSet |= AccessibleStateType::VISIBLE;
176 nStateSet |= AccessibleStateType::DEFUNC;
185 sal_Int32 nApiPos = nRulerPos;
186 sal_Int32 nStart = (nRulerPos - 1) / 10;
188 while( nStart >= nExp )
190 nApiPos += nStart - nExp + 1;
193 return ::std::max( nApiPos,
static_cast<sal_Int32
>(0) );
201 sal_Int32 nRulerPos = 0;
202 sal_Int32 nApiBase = 0;
203 sal_Int32 nApiLimit = 10;
204 while( nApiPos >= nApiLimit )
209 nApiBase = nApiLimit;
212 sal_Int32 nRelPos = nApiPos - nApiBase;
213 return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 );
219 OSL_ENSURE( nExp > 0,
"lcl_ExpandSequence - invalid value" );
220 rSeq.realloc( rSeq.getLength() + nExp );
221 return rSeq.getLength() - nExp;
227 rVal.Name = rPropName;
239 auto pSeq = rSeq.getArray();
250 : ImplInheritanceHelper(rRuler)
287 throw IndexOutOfBoundsException();
303 Sequence< Reference< XInterface > >
aSeq{ xAccObj };
304 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLER_FOR,
aSeq ) );
313 sal_Int64 nStateSet = implCreateStateSet();
316 nStateSet |= AccessibleStateType::FOCUSABLE;
317 nStateSet |= AccessibleStateType::SINGLE_LINE;
319 nStateSet |= AccessibleStateType::FOCUSED;
353 const css::uno::Sequence< OUString >& )
358 Sequence< PropertyValue >
aSeq;
373 if( aRect.X >= nWidth )
374 throw IndexOutOfBoundsException();
375 if( aRect.X + aRect.Width > nWidth )
376 aRect.Width = nWidth - aRect.X;
432 return OUString(
maBuffer.getStr() + nStartIndex, nEndIndex - nStartIndex );
441 aResult.SegmentStart = -1;
442 aResult.SegmentEnd = -1;
449 OUStringBuffer aResultText;
455 case AccessibleTextType::CHARACTER:
457 aResult.SegmentStart =
nIndex;
458 aResult.SegmentEnd =
nIndex;
466 case AccessibleTextType::WORD:
467 case AccessibleTextType::GLYPH:
468 aResult.SegmentStart =
nIndex;
472 aResultText.append( nRulerPos );
476 case AccessibleTextType::SENTENCE:
477 case AccessibleTextType::PARAGRAPH:
478 case AccessibleTextType::LINE:
479 aResult.SegmentStart = 0;
484 case AccessibleTextType::ATTRIBUTE_RUN:
488 aResult.SegmentStart = nFirstIndex;
489 aResultText.append(
maBuffer.getStr() + nFirstIndex, nLastIndex - nFirstIndex + 1 );
497 aResult.SegmentText = aResultText.makeStringAndClear();
498 aResult.SegmentEnd = aResult.SegmentStart + aResult.SegmentText.getLength();
509 aResult.SegmentStart = -1;
510 aResult.SegmentEnd = -1;
517 case AccessibleTextType::CHARACTER:
527 case AccessibleTextType::WORD:
528 case AccessibleTextType::GLYPH:
535 case AccessibleTextType::SENTENCE:
536 case AccessibleTextType::PARAGRAPH:
537 case AccessibleTextType::LINE:
542 case AccessibleTextType::ATTRIBUTE_RUN:
545 if( nFirstIndex > 0 )
564 aResult.SegmentStart = -1;
565 aResult.SegmentEnd = -1;
573 case AccessibleTextType::CHARACTER:
583 case AccessibleTextType::WORD:
584 case AccessibleTextType::GLYPH:
591 case AccessibleTextType::SENTENCE:
592 case AccessibleTextType::PARAGRAPH:
593 case AccessibleTextType::LINE:
598 case AccessibleTextType::ATTRIBUTE_RUN:
601 if( nLastIndex < nLastValid )
631 Any aOldValue, aNewValue;
633 NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
641 return ScResId( STR_ACC_CSVRULER_NAME );
646 return ScResId( STR_ACC_CSVRULER_DESCR );
652 throw IndexOutOfBoundsException();
658 throw IndexOutOfBoundsException();
663 if( rnStartIndex > rnEndIndex )
664 ::std::swap( rnStartIndex, rnEndIndex );
666 throw IndexOutOfBoundsException();
671 return static_cast< ScCsvRuler&
>( implGetControl() );
681 for( ; nRulerPos <= nRulerCount; ++nRulerPos )
683 switch( nRulerPos % 10 )
685 case 0:
maBuffer.append( nRulerPos );
break;
706 while( (nApiPos > 0) && (
implHasSplit( nApiPos - 1 ) == bSplit) )
722 return implGetControl().GetDrawingArea()->get_accessible_parent();
730 return (nGridColumn !=
CSV_COLUMN_HEADER) ?
static_cast< sal_Int32
>( nGridColumn + 1 ) : 0;
736 return (nApiColumn > 0) ?
static_cast< sal_uInt32
>( nApiColumn - 1 ) :
CSV_COLUMN_HEADER;
740 : ImplInheritanceHelper(rGrid)
753 rEntry.second->dispose();
762 Reference< XAccessible > xRet;
763 if( containsPoint( rPoint ) )
770 sal_Int32 nColumn = ((rGrid.
GetFirstX() <= rPoint.X) && (rPoint.X <= rGrid.
GetLastX())) ?
790 return sal_Int32(
SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
842 Sequence< Reference< XInterface > >
aSeq{ xAccObj };
843 pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLED_BY,
aSeq ) );
853 sal_Int64 nStateSet = implCreateStateSet();
856 nStateSet |= AccessibleStateType::FOCUSABLE;
857 nStateSet |= AccessibleStateType::MULTI_SELECTABLE;
858 nStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
860 nStateSet |= AccessibleStateType::FOCUSED;
863 nStateSet |= AccessibleStateType::DEFUNC;
928 return Sequence< sal_Int32 >();
938 auto pSeq =
aSeq.getArray();
940 sal_Int32 nSeqIx = 0;
945 aSeq.realloc( nSeqIx );
1020 if( nChildIndex == 0 )
1060 throw IndexOutOfBoundsException();
1062 sal_Int32 nRow = nSelectedChildIndex / nColumns;
1074 throw IndexOutOfBoundsException();
1087 Any aOldAny, aNewAny;
1088 (bFocused ? aNewAny : aOldAny) <<=
1090 NotifyAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny);
1095 if( nFirstColumn <= nLastColumn )
1097 AccessibleTableModelChange aModelChange(
1098 AccessibleTableModelChangeType::UPDATE, 0, bAllRows ?
implGetRowCount() - 1 : 0,
1100 Any aOldAny, aNewAny;
1101 aNewAny <<= aModelChange;
1102 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1108 if( nFirstColumn <= nLastColumn )
1110 AccessibleTableModelChange aModelChange(
1111 AccessibleTableModelChangeType::COLUMNS_INSERTED, -1, -1,
1113 Any aOldAny, aNewAny;
1114 aNewAny <<= aModelChange;
1115 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1121 if( nFirstColumn <= nLastColumn )
1123 AccessibleTableModelChange aModelChange(
1124 AccessibleTableModelChangeType::COLUMNS_REMOVED, -1, -1,
1126 Any aOldAny, aNewAny;
1127 aNewAny <<= aModelChange;
1128 NotifyAccessibleEvent(AccessibleEventId::TABLE_MODEL_CHANGED, aOldAny, aNewAny);
1136 return ScResId( STR_ACC_CSVGRID_NAME );
1141 return ScResId( STR_ACC_CSVGRID_DESCR );
1147 throw IndexOutOfBoundsException();
1153 throw IndexOutOfBoundsException();
1158 return static_cast< ScCsvGrid&
>( implGetControl() );
1194 sal_Int32 nColumn = 0;
1197 if( nColumn == nSelColumn )
1198 return static_cast< sal_Int32
>( nColIx + 1 );
1209 if( (nColumn > 0) && (nRow > 0) )
1212 aCellStr = OUString::number( nLine + 1 );
1213 else if( nColumn > 0 )
1225 return implGetControl().GetDrawingArea()->get_accessible_parent();
1231 sal_Int32 nRow, sal_Int32 nColumn ) :
1232 ImplInheritanceHelper( rGrid ),
1234 maCellText(
std::move( aCellText )),
1235 mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) :
CSV_LINE_HEADER ),
1237 mnIndex( nRow * (rGrid.GetColumnCount() + 1) + nColumn )
1274 return sal_Int32(
SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
1281 return AccessibleStaticTextBase::getAccessibleChildCount();
1286 return AccessibleStaticTextBase::getAccessibleChild(
nIndex );
1300 return new AccessibleRelationSetHelper();
1306 sal_Int64 nStateSet = implCreateStateSet();
1310 nStateSet |= AccessibleStateType::SINGLE_LINE;
1312 nStateSet |= AccessibleStateType::SELECTABLE;
1314 nStateSet |= AccessibleStateType::ACTIVE;
1316 nStateSet |= AccessibleStateType::SELECTED;
1343 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()
constexpr tools::Long Y() const
constexpr tools::Long X() const
Accessible class representing a cell of the CSV grid control.
virtual ~ScAccessibleCsvCell() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Returns the specified child.
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleDescription() override
sal_Int32 mnIndex
The grid column index (core index).
ScAccessibleCsvCell(ScCsvGrid &rGrid, OUString aCellText, sal_Int32 nRow, sal_Int32 nColumn)
The index of the cell in the table.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the ruler control.
Point implGetRealPos() const
Returns the pixel position of the cell (rel.
Size implGetRealSize() const
Returns the pixel size of the cell, regardless of visibility.
sal_uInt32 implCalcPixelWidth(sal_uInt32 nChars) const
Returns the width of the character count.
sal_uInt32 mnColumn
The grid line index (core index).
ScCsvGrid & implGetGrid() const
Returns the VCL grid control.
::std::unique_ptr< SvxEditSource > implCreateEditSource()
Creates the edit source the text helper needs.
virtual css::awt::Rectangle implGetBounds() override
Returns the bounding box of the cell relative in the table.
virtual void SAL_CALL grabFocus() override
Sets the focus to the column of this cell.
virtual sal_Int32 SAL_CALL getBackground() override
sal_Int32 mnLine
The text contents of this cell.
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Returns the index of this cell in the table.
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
::std::unique_ptr< SvxEditSource > SvxEditSourcePtr
virtual void SAL_CALL grabFocus() override
void SendVisibleEvent()
Sends a visible area changed event to all listeners.
virtual void SendInsertColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
Sends a table model changed event for an inserted column to all listeners.
virtual void SendCaretEvent()
Sends a caret changed event to all listeners.
void SendSelectionEvent()
Sends a selection changed event to all listeners.
virtual css::awt::Rectangle implGetBounds() override
ScAccessibleCsvControl(ScCsvControl &rControl)
Pointer to the VCL control.
virtual void SendTableUpdateEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows)
Sends a table model changed event for changed cell contents to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual ~ScAccessibleCsvControl() override
virtual void SendRemoveColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
Sends a table model changed event for a removed column to all listeners.
virtual void SendFocusEvent(bool bFocused)
Sends a GetFocus or LoseFocus event to all listeners.
ScCsvControl & implGetControl() const
Returns the VCL control.
virtual void SAL_CALL disposing() override
sal_Int64 implCreateStateSet()
Creates a StateSet and fills it with DEFUNC, OPAQUE, ENABLED, SHOWING and VISIBLE.
Accessible class representing the CSV grid control.
virtual sal_Bool SAL_CALL isAccessibleRowSelected(sal_Int32 nRow) override
Returns true, if the specified row is selected.
virtual void SAL_CALL clearAccessibleSelection() override
Deselects all cells.
virtual sal_Bool SAL_CALL isAccessibleColumnSelected(sal_Int32 nColumn) override
Returns true, if the specified column is selected.
virtual void SendRemoveColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) override
Sends a table model changed event for a removed column to all listeners.
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
Selects the specified child (selects the entire column or the entire table).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary() override
Returns the summary description object of the table.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption() override
Returns the caption object of the table.
void implSelectColumn(sal_Int32 nColumn, bool bSelect)
Selects the specified column (including header).
virtual void SendFocusEvent(bool bFocused) override
Sends a GetFocus or LoseFocus event to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override
Returns the column headers as an AccessibleTable.
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleRowDescription(sal_Int32 nRow) override
Returns the description of the specified row in the table.
sal_Int32 implGetRow(sal_Int64 nIndex) const
Returns the row index from cell index (including header).
virtual void SAL_CALL selectAllAccessibleChildren() override
Selects all cells.
virtual OUString SAL_CALL getAccessibleName() override
sal_Int32 implGetSelColumn(sal_Int32 nSelColumn) const
Returns the absolute column index of the nSelColumn-th selected column.
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count (count of cells in the table).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
Returns the cell at the specified point.
virtual void SendInsertColumnEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) override
Sends a table model changed event for an inserted column to all listeners.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
Returns the child with the specified index in all selected children.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
Returns true, if the specified child is selected.
OUString implGetCellText(sal_Int32 nRow, sal_Int32 nColumn) const
Returns the contents of the specified cell (including header).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
sal_Int32 implGetRowCount() const
Returns the count of visible rows in the table (including header).
sal_Int32 implGetColumnCount() const
Returns the total column count in the table (including header).
void ensureValidPosition(sal_Int32 nRow, sal_Int32 nColumn) const
@Throws css::lang::IndexOutOfBoundsException if the specified position is invalid.
virtual ~ScAccessibleCsvGrid() override
sal_Int64 implGetCellCount() const
Returns the total cell count in the table (including header).
void ensureValidIndex(sal_Int64 nIndex) const
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns() override
Returns the selected columns as a sequence.
virtual void SendTableUpdateEvent(sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows) override
Sends a table model changed event for changed cell contents to all listeners.
virtual sal_Int32 SAL_CALL getAccessibleColumnCount() override
Returns the number of columns in the table.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the accessible cell object at the specified position.
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
Deselects the child with the specified index in all selected children.
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override
Returns the selected rows as a sequence.
ScAccessibleCsvGrid(ScCsvGrid &rGrid)
virtual OUString SAL_CALL getAccessibleColumnDescription(sal_Int32 nColumn) override
Returns the description text of the specified column in the table.
virtual sal_Int64 SAL_CALL getAccessibleIndex(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the child index of the cell at the specified position.
css::uno::Reference< css::accessibility::XAccessible > getAccessibleCell(sal_Int32 nRow, sal_Int32 nColumn)
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of rows occupied at a specified row and column.
virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(sal_Int32 nRow, sal_Int32 nColumn) override
Returns the number of rows occupied at a specified row and column.
virtual sal_Bool SAL_CALL isAccessibleSelected(sal_Int32 nRow, sal_Int32 nColumn) override
Returns true, if the cell at a specified position is selected.
virtual sal_Int32 SAL_CALL getAccessibleRowCount() override
Returns the number of rows in the table.
bool implIsColumnSelected(sal_Int32 nColumn) const
Returns true, if the specified column (including header) is selected.
sal_Int64 implGetIndex(sal_Int32 nRow, sal_Int32 nColumn) const
Returns the child index from cell position (including header).
ScCsvGrid & implGetGrid() const
Returns the VCL grid control.
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
Returns the count of selected children.
virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override
Returns the row headers as an AccessibleTable.
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the ruler control.
sal_Int32 implGetColumn(sal_Int64 nIndex) const
Returns the column index from cell index (including header).
rtl::Reference< ScAccessibleCsvCell > implCreateCellObj(sal_Int32 nRow, sal_Int32 nColumn)
Creates a new accessible object of the specified cell.
sal_Int32 implGetSelColumnCount() const
Returns the count of selected columns in the table.
virtual void SAL_CALL disposing() override
virtual sal_Int32 SAL_CALL getAccessibleRow(sal_Int64 nChildIndex) override
Returns the row index of the specified child.
XAccessibleSet maAccessibleChildren
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Returns the specified child cell.
virtual sal_Int32 SAL_CALL getAccessibleColumn(sal_Int64 nChildIndex) override
Returns the column index of the specified child.
sal_Int32 implGetTextLength() const
Returns the character count of the text.
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
Returns the current set of states.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Returns the relation to the grid control.
virtual sal_Int32 SAL_CALL getBackground() override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
Sets the position of the caret.
bool implHasSplit(sal_Int32 nApiPos)
Returns true, if the character at the specified index has a split.
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &rPoint) override
Returns the character index at the specified coordinate (object's coordinate system).
void ensureValidIndex(sal_Int32 nIndex) const
void constructStringBuffer()
Builds the entire string buffer.
virtual OUString SAL_CALL getSelectedText() override
Returns the selected text (ruler returns empty string).
virtual sal_Int32 SAL_CALL getSelectionStart() override
Returns the start index of the selection (ruler returns -1).
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
Returns the specified text portion.
virtual OUString SAL_CALL getAccessibleName() override
void ensureValidIndexWithEnd(sal_Int32 nIndex) const
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Returns the specified range [Start,End) of the text.
virtual ~ScAccessibleCsvRuler() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
Returns the attributes of the specified character.
virtual OUString SAL_CALL getText() override
Returns the entire text.
ScCsvRuler & implGetRuler() const
Returns the VCL ruler control.
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
Returns the screen coordinates of the specified character.
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Returns the child count (the ruler does not have children).
virtual sal_Int32 SAL_CALL getCaretPosition() override
Return the position of the caret.
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
sal_Int32 implGetLastEqualFormatted(sal_Int32 nApiPos)
Returns the last character index with equal formatting as at nApiPos.
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int32 SAL_CALL getCharacterCount() override
Returns the count of characters.
virtual void SendCaretEvent() override
Sends a caret changed event to all listeners.
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Selects a part of the text (ruler does nothing).
ScAccessibleCsvRuler(ScCsvRuler &rRuler)
Contains the text representation of the ruler.
void ensureValidRange(sal_Int32 &rnStartIndex, sal_Int32 &rnEndIndex) const
virtual sal_Int32 SAL_CALL getSelectionEnd() override
Returns the end index of the selection (ruler returns -1).
sal_Int32 implGetFirstEqualFormatted(sal_Int32 nApiPos)
Returns the first character index with equal formatting as at nApiPos.
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
Copies the specified text range into the clipboard (ruler does nothing).
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
Returns the specified character.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Throws an exception (the ruler does not have children).
Base class for the CSV ruler and the data grid control.
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
sal_uInt32 iterateCodePoints(std::u16string_view string, sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints=1)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)