LibreOffice Module sc (master) 1
|
Accessible class representing the CSV ruler control. More...
#include <AccessibleCsvControl.hxx>
Public Member Functions | |
ScAccessibleCsvRuler (ScCsvRuler &rRuler) | |
Contains the text representation of the ruler. More... | |
virtual | ~ScAccessibleCsvRuler () override |
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL | getAccessibleContext () override |
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL | getAccessibleParent () override |
virtual OUString SAL_CALL | getAccessibleDescription () override |
virtual OUString SAL_CALL | getAccessibleName () override |
virtual sal_Int32 SAL_CALL | getForeground () override |
virtual sal_Int32 SAL_CALL | getBackground () override |
virtual sal_Int64 SAL_CALL | getAccessibleChildCount () override |
Returns the child count (the ruler does not have children). More... | |
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL | getAccessibleChild (sal_Int64 nIndex) override |
Throws an exception (the ruler does not have children). More... | |
virtual sal_Int16 SAL_CALL | getAccessibleRole () override |
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL | getAccessibleRelationSet () override |
Returns the relation to the grid control. More... | |
virtual sal_Int64 SAL_CALL | getAccessibleStateSet () override |
Returns the current set of states. More... | |
virtual sal_Int32 SAL_CALL | getCaretPosition () override |
Return the position of the caret. More... | |
virtual sal_Bool SAL_CALL | setCaretPosition (sal_Int32 nIndex) override |
Sets the position of the caret. More... | |
virtual sal_Unicode SAL_CALL | getCharacter (sal_Int32 nIndex) override |
Returns the specified character. More... | |
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. More... | |
virtual css::awt::Rectangle SAL_CALL | getCharacterBounds (sal_Int32 nIndex) override |
Returns the screen coordinates of the specified character. More... | |
virtual sal_Int32 SAL_CALL | getCharacterCount () override |
Returns the count of characters. More... | |
virtual sal_Int32 SAL_CALL | getIndexAtPoint (const css::awt::Point &rPoint) override |
Returns the character index at the specified coordinate (object's coordinate system). More... | |
virtual OUString SAL_CALL | getSelectedText () override |
Returns the selected text (ruler returns empty string). More... | |
virtual sal_Int32 SAL_CALL | getSelectionStart () override |
Returns the start index of the selection (ruler returns -1). More... | |
virtual sal_Int32 SAL_CALL | getSelectionEnd () override |
Returns the end index of the selection (ruler returns -1). More... | |
virtual sal_Bool SAL_CALL | setSelection (sal_Int32 nStartIndex, sal_Int32 nEndIndex) override |
Selects a part of the text (ruler does nothing). More... | |
virtual OUString SAL_CALL | getText () override |
Returns the entire text. More... | |
virtual OUString SAL_CALL | getTextRange (sal_Int32 nStartIndex, sal_Int32 nEndIndex) override |
Returns the specified range [Start,End) of the text. More... | |
virtual css::accessibility::TextSegment SAL_CALL | getTextAtIndex (sal_Int32 nIndex, sal_Int16 aTextType) override |
Returns the specified text portion. More... | |
virtual css::accessibility::TextSegment SAL_CALL | getTextBeforeIndex (sal_Int32 nIndex, sal_Int16 aTextType) override |
virtual css::accessibility::TextSegment SAL_CALL | getTextBehindIndex (sal_Int32 nIndex, sal_Int16 aTextType) override |
virtual sal_Bool SAL_CALL | copyText (sal_Int32 nStartIndex, sal_Int32 nEndIndex) override |
Copies the specified text range into the clipboard (ruler does nothing). More... | |
virtual sal_Bool SAL_CALL | scrollSubstringTo (sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override |
virtual void | SendCaretEvent () override |
Sends a caret changed event to all listeners. More... | |
Private Member Functions | |
void | ensureValidIndex (sal_Int32 nIndex) const |
void | ensureValidIndexWithEnd (sal_Int32 nIndex) const |
void | ensureValidRange (sal_Int32 &rnStartIndex, sal_Int32 &rnEndIndex) const |
ScCsvRuler & | implGetRuler () const |
Returns the VCL ruler control. More... | |
void | constructStringBuffer () |
Builds the entire string buffer. More... | |
sal_Int32 | implGetTextLength () const |
Returns the character count of the text. More... | |
bool | implHasSplit (sal_Int32 nApiPos) |
Returns true, if the character at the specified index has a split. More... | |
sal_Int32 | implGetFirstEqualFormatted (sal_Int32 nApiPos) |
Returns the first character index with equal formatting as at nApiPos. More... | |
sal_Int32 | implGetLastEqualFormatted (sal_Int32 nApiPos) |
Returns the last character index with equal formatting as at nApiPos. More... | |
Private Attributes | |
OUStringBuffer | maBuffer |
Accessible class representing the CSV ruler control.
Definition at line 85 of file AccessibleCsvControl.hxx.
|
explicit |
Contains the text representation of the ruler.
Definition at line 249 of file AccessibleCsvControl.cxx.
References constructStringBuffer().
|
overridevirtual |
Definition at line 255 of file AccessibleCsvControl.cxx.
|
private |
Builds the entire string buffer.
css::uno::RuntimeException |
Definition at line 674 of file AccessibleCsvControl.cxx.
References cRulerDot, cRulerLine, ScCsvControl::GetPosCount(), implGetRuler(), lcl_GetRulerPos(), and maBuffer.
Referenced by ScAccessibleCsvRuler().
|
overridevirtual |
Copies the specified text range into the clipboard (ruler does nothing).
Definition at line 613 of file AccessibleCsvControl.cxx.
|
private |
css::lang::IndexOutOfBoundsException | if the specified character position is invalid (outside 0..len-1). |
Definition at line 649 of file AccessibleCsvControl.cxx.
References implGetTextLength(), and nIndex.
Referenced by getCharacter(), getTextAtIndex(), and setCaretPosition().
|
private |
css::lang::IndexOutOfBoundsException | if the specified character position is invalid (outside 0..len). |
Definition at line 655 of file AccessibleCsvControl.cxx.
References implGetTextLength(), and nIndex.
Referenced by getCharacterAttributes(), getCharacterBounds(), getTextBeforeIndex(), and getTextBehindIndex().
|
private |
css::lang::IndexOutOfBoundsException | if the specified character range [Start,End) is invalid. @descr If Start>End, swaps Start and End before checking. |
Definition at line 661 of file AccessibleCsvControl.cxx.
References implGetTextLength().
Referenced by getTextRange().
|
overridevirtual |
Throws an exception (the ruler does not have children).
Definition at line 284 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Returns the child count (the ruler does not have children).
Definition at line 278 of file AccessibleCsvControl.cxx.
|
inlineoverridevirtual |
Definition at line 98 of file AccessibleCsvControl.hxx.
|
overridevirtual |
Definition at line 644 of file AccessibleCsvControl.cxx.
References ScResId().
|
overridevirtual |
Definition at line 639 of file AccessibleCsvControl.cxx.
References ScResId().
|
overridevirtual |
Definition at line 720 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Returns the relation to the grid control.
Definition at line 290 of file AccessibleCsvControl.cxx.
References aSeq, ScCsvControl::GetAccessible(), ScCsvTableBox::GetGrid(), ScCsvRuler::GetTableBox(), and implGetRuler().
|
inlineoverridevirtual |
Definition at line 117 of file AccessibleCsvControl.hxx.
|
overridevirtual |
Returns the current set of states.
Definition at line 310 of file AccessibleCsvControl.cxx.
References implGetRuler(), and isAlive().
|
overridevirtual |
Definition at line 269 of file AccessibleCsvControl.cxx.
References Application::GetSettings().
|
overridevirtual |
Return the position of the caret.
Definition at line 326 of file AccessibleCsvControl.cxx.
References implGetRuler(), and lcl_GetApiPos().
|
overridevirtual |
Returns the specified character.
Definition at line 344 of file AccessibleCsvControl.cxx.
References ensureValidIndex(), maBuffer, and nIndex.
|
overridevirtual |
Returns the attributes of the specified character.
Definition at line 352 of file AccessibleCsvControl.cxx.
References aSeq, ensureValidIndexWithEnd(), GetFont(), implGetRuler(), lcl_FillFontAttributes(), and nIndex.
|
overridevirtual |
Returns the screen coordinates of the specified character.
Definition at line 363 of file AccessibleCsvControl.cxx.
References ensureValidIndexWithEnd(), ScCsvControl::GetCharWidth(), weld::CustomWidgetController::GetOutputSizePixel(), ScCsvControl::GetX(), Size::Height(), implGetRuler(), lcl_GetRulerPos(), nIndex, Size::Width(), Point::X(), and Point::Y().
|
overridevirtual |
Returns the count of characters.
Definition at line 380 of file AccessibleCsvControl.cxx.
References implGetTextLength().
|
overridevirtual |
Definition at line 262 of file AccessibleCsvControl.cxx.
References Application::GetSettings().
|
overridevirtual |
Returns the character index at the specified coordinate (object's coordinate system).
Definition at line 387 of file AccessibleCsvControl.cxx.
References ScCsvControl::GetPosCount(), ScCsvControl::GetPosFromX(), implGetRuler(), and lcl_GetApiPos().
|
overridevirtual |
Returns the selected text (ruler returns empty string).
Definition at line 396 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Returns the end index of the selection (ruler returns -1).
Definition at line 408 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Returns the start index of the selection (ruler returns -1).
Definition at line 402 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Returns the entire text.
Definition at line 420 of file AccessibleCsvControl.cxx.
References implGetTextLength(), and maBuffer.
|
overridevirtual |
Returns the specified text portion.
Definition at line 435 of file AccessibleCsvControl.cxx.
References ensureValidIndex(), implGetFirstEqualFormatted(), implGetLastEqualFormatted(), implGetTextLength(), o3tl::iterateCodePoints(), lcl_GetRulerPos(), maBuffer, and nIndex.
Referenced by getTextBeforeIndex(), and getTextBehindIndex().
|
overridevirtual |
Definition at line 502 of file AccessibleCsvControl.cxx.
References ensureValidIndexWithEnd(), getTextAtIndex(), implGetFirstEqualFormatted(), o3tl::iterateCodePoints(), lcl_GetApiPos(), lcl_GetRulerPos(), maBuffer, and nIndex.
|
overridevirtual |
Definition at line 557 of file AccessibleCsvControl.cxx.
References ensureValidIndexWithEnd(), getTextAtIndex(), implGetLastEqualFormatted(), implGetRuler(), implGetTextLength(), o3tl::iterateCodePoints(), lcl_GetApiPos(), lcl_GetRulerPos(), maBuffer, and nIndex.
|
overridevirtual |
Returns the specified range [Start,End) of the text.
Definition at line 427 of file AccessibleCsvControl.cxx.
References ensureValidRange(), and maBuffer.
|
private |
Returns the first character index with equal formatting as at nApiPos.
Definition at line 703 of file AccessibleCsvControl.cxx.
References implHasSplit().
Referenced by getTextAtIndex(), and getTextBeforeIndex().
|
private |
Returns the last character index with equal formatting as at nApiPos.
Definition at line 711 of file AccessibleCsvControl.cxx.
References implGetTextLength(), implHasSplit(), and nLength.
Referenced by getTextAtIndex(), and getTextBehindIndex().
|
private |
Returns the VCL ruler control.
Assumes a living object.
Definition at line 669 of file AccessibleCsvControl.cxx.
Referenced by constructStringBuffer(), getAccessibleRelationSet(), getAccessibleStateSet(), getCaretPosition(), getCharacterAttributes(), getCharacterBounds(), getIndexAtPoint(), getTextBehindIndex(), implGetTextLength(), implHasSplit(), SendCaretEvent(), and setCaretPosition().
|
private |
Returns the character count of the text.
Definition at line 692 of file AccessibleCsvControl.cxx.
References implGetRuler(), and lcl_GetApiPos().
Referenced by ensureValidIndex(), ensureValidIndexWithEnd(), ensureValidRange(), getCharacterCount(), getText(), getTextAtIndex(), getTextBehindIndex(), and implGetLastEqualFormatted().
|
private |
Returns true, if the character at the specified index has a split.
Definition at line 697 of file AccessibleCsvControl.cxx.
References ScCsvRuler::HasSplit(), implGetRuler(), lcl_GetApiPos(), and lcl_GetRulerPos().
Referenced by implGetFirstEqualFormatted(), and implGetLastEqualFormatted().
|
overridevirtual |
Definition at line 619 of file AccessibleCsvControl.cxx.
|
overridevirtual |
Sends a caret changed event to all listeners.
Definition at line 626 of file AccessibleCsvControl.cxx.
References Any, CSV_POS_INVALID, ScCsvControl::GetRulerCursorPos(), implGetRuler(), and nPos.
|
overridevirtual |
Sets the position of the caret.
Definition at line 333 of file AccessibleCsvControl.cxx.
References CSVCMD_MOVERULERCURSOR, ensureValidIndex(), ScCsvControl::Execute(), ScCsvControl::GetRulerCursorPos(), implGetRuler(), lcl_GetRulerPos(), and nIndex.
|
overridevirtual |
Selects a part of the text (ruler does nothing).
Definition at line 414 of file AccessibleCsvControl.cxx.
|
private |
Definition at line 91 of file AccessibleCsvControl.hxx.
Referenced by constructStringBuffer(), getCharacter(), getText(), getTextAtIndex(), getTextBeforeIndex(), getTextBehindIndex(), and getTextRange().