LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScAccessibleCsvRuler Class Reference

Accessible class representing the CSV ruler control. More...

#include <AccessibleCsvControl.hxx>

Inheritance diagram for ScAccessibleCsvRuler:
[legend]
Collaboration diagram for ScAccessibleCsvRuler:
[legend]

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
 
ScCsvRulerimplGetRuler () 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
 

Detailed Description

Accessible class representing the CSV ruler control.

Definition at line 85 of file AccessibleCsvControl.hxx.

Constructor & Destructor Documentation

◆ ScAccessibleCsvRuler()

ScAccessibleCsvRuler::ScAccessibleCsvRuler ( ScCsvRuler rRuler)
explicit

Contains the text representation of the ruler.

Definition at line 249 of file AccessibleCsvControl.cxx.

References constructStringBuffer().

◆ ~ScAccessibleCsvRuler()

ScAccessibleCsvRuler::~ScAccessibleCsvRuler ( )
overridevirtual

Definition at line 255 of file AccessibleCsvControl.cxx.

Member Function Documentation

◆ constructStringBuffer()

void ScAccessibleCsvRuler::constructStringBuffer ( )
private

Builds the entire string buffer.

Exceptions
css::uno::RuntimeException

Definition at line 674 of file AccessibleCsvControl.cxx.

References cRulerDot, cRulerLine, ScCsvControl::GetPosCount(), implGetRuler(), lcl_GetRulerPos(), and maBuffer.

Referenced by ScAccessibleCsvRuler().

◆ copyText()

sal_Bool SAL_CALL ScAccessibleCsvRuler::copyText ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
)
overridevirtual

Copies the specified text range into the clipboard (ruler does nothing).

Definition at line 613 of file AccessibleCsvControl.cxx.

◆ ensureValidIndex()

void ScAccessibleCsvRuler::ensureValidIndex ( sal_Int32  nIndex) const
private
Exceptions
css::lang::IndexOutOfBoundsExceptionif 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().

◆ ensureValidIndexWithEnd()

void ScAccessibleCsvRuler::ensureValidIndexWithEnd ( sal_Int32  nIndex) const
private
Exceptions
css::lang::IndexOutOfBoundsExceptionif 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().

◆ ensureValidRange()

void ScAccessibleCsvRuler::ensureValidRange ( sal_Int32 &  rnStartIndex,
sal_Int32 &  rnEndIndex 
) const
private
Exceptions
css::lang::IndexOutOfBoundsExceptionif 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().

◆ getAccessibleChild()

Reference< XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleChild ( sal_Int64  nIndex)
overridevirtual

Throws an exception (the ruler does not have children).

Definition at line 284 of file AccessibleCsvControl.cxx.

◆ getAccessibleChildCount()

sal_Int64 SAL_CALL ScAccessibleCsvRuler::getAccessibleChildCount ( )
overridevirtual

Returns the child count (the ruler does not have children).

Definition at line 278 of file AccessibleCsvControl.cxx.

◆ getAccessibleContext()

virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL ScAccessibleCsvRuler::getAccessibleContext ( )
inlineoverridevirtual

Definition at line 98 of file AccessibleCsvControl.hxx.

◆ getAccessibleDescription()

OUString SAL_CALL ScAccessibleCsvRuler::getAccessibleDescription ( )
overridevirtual

Definition at line 644 of file AccessibleCsvControl.cxx.

References ScResId().

◆ getAccessibleName()

OUString SAL_CALL ScAccessibleCsvRuler::getAccessibleName ( )
overridevirtual

Definition at line 639 of file AccessibleCsvControl.cxx.

References ScResId().

◆ getAccessibleParent()

css::uno::Reference< css::accessibility::XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleParent ( )
overridevirtual

Definition at line 720 of file AccessibleCsvControl.cxx.

◆ getAccessibleRelationSet()

Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleRelationSet ( )
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().

◆ getAccessibleRole()

virtual sal_Int16 SAL_CALL ScAccessibleCsvRuler::getAccessibleRole ( )
inlineoverridevirtual

Definition at line 117 of file AccessibleCsvControl.hxx.

◆ getAccessibleStateSet()

sal_Int64 SAL_CALL ScAccessibleCsvRuler::getAccessibleStateSet ( )
overridevirtual

Returns the current set of states.

Definition at line 310 of file AccessibleCsvControl.cxx.

References implGetRuler(), and isAlive().

◆ getBackground()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getBackground ( )
overridevirtual

Definition at line 269 of file AccessibleCsvControl.cxx.

References Application::GetSettings().

◆ getCaretPosition()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCaretPosition ( )
overridevirtual

Return the position of the caret.

Definition at line 326 of file AccessibleCsvControl.cxx.

References implGetRuler(), and lcl_GetApiPos().

◆ getCharacter()

sal_Unicode SAL_CALL ScAccessibleCsvRuler::getCharacter ( sal_Int32  nIndex)
overridevirtual

Returns the specified character.

Definition at line 344 of file AccessibleCsvControl.cxx.

References ensureValidIndex(), maBuffer, and nIndex.

◆ getCharacterAttributes()

Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes ( sal_Int32  nIndex,
const css::uno::Sequence< OUString > &  aRequestedAttributes 
)
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.

◆ getCharacterBounds()

css::awt::Rectangle SAL_CALL ScAccessibleCsvRuler::getCharacterBounds ( sal_Int32  nIndex)
overridevirtual

◆ getCharacterCount()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCharacterCount ( )
overridevirtual

Returns the count of characters.

Definition at line 380 of file AccessibleCsvControl.cxx.

References implGetTextLength().

◆ getForeground()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getForeground ( )
overridevirtual

Definition at line 262 of file AccessibleCsvControl.cxx.

References Application::GetSettings().

◆ getIndexAtPoint()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getIndexAtPoint ( const css::awt::Point &  rPoint)
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().

◆ getSelectedText()

OUString SAL_CALL ScAccessibleCsvRuler::getSelectedText ( )
overridevirtual

Returns the selected text (ruler returns empty string).

Definition at line 396 of file AccessibleCsvControl.cxx.

◆ getSelectionEnd()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getSelectionEnd ( )
overridevirtual

Returns the end index of the selection (ruler returns -1).

Definition at line 408 of file AccessibleCsvControl.cxx.

◆ getSelectionStart()

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getSelectionStart ( )
overridevirtual

Returns the start index of the selection (ruler returns -1).

Definition at line 402 of file AccessibleCsvControl.cxx.

◆ getText()

OUString SAL_CALL ScAccessibleCsvRuler::getText ( )
overridevirtual

Returns the entire text.

Definition at line 420 of file AccessibleCsvControl.cxx.

References implGetTextLength(), and maBuffer.

◆ getTextAtIndex()

TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual

◆ getTextBeforeIndex()

TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual

◆ getTextBehindIndex()

TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBehindIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual

◆ getTextRange()

OUString SAL_CALL ScAccessibleCsvRuler::getTextRange ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
)
overridevirtual

Returns the specified range [Start,End) of the text.

Definition at line 427 of file AccessibleCsvControl.cxx.

References ensureValidRange(), and maBuffer.

◆ implGetFirstEqualFormatted()

sal_Int32 ScAccessibleCsvRuler::implGetFirstEqualFormatted ( sal_Int32  nApiPos)
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().

◆ implGetLastEqualFormatted()

sal_Int32 ScAccessibleCsvRuler::implGetLastEqualFormatted ( sal_Int32  nApiPos)
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().

◆ implGetRuler()

ScCsvRuler & ScAccessibleCsvRuler::implGetRuler ( ) const
private

◆ implGetTextLength()

sal_Int32 ScAccessibleCsvRuler::implGetTextLength ( ) const
private

◆ implHasSplit()

bool ScAccessibleCsvRuler::implHasSplit ( sal_Int32  nApiPos)
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().

◆ scrollSubstringTo()

sal_Bool SAL_CALL ScAccessibleCsvRuler::scrollSubstringTo ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex,
css::accessibility::AccessibleScrollType  aScrollType 
)
overridevirtual

Definition at line 619 of file AccessibleCsvControl.cxx.

◆ SendCaretEvent()

void ScAccessibleCsvRuler::SendCaretEvent ( )
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.

◆ setCaretPosition()

sal_Bool SAL_CALL ScAccessibleCsvRuler::setCaretPosition ( sal_Int32  nIndex)
overridevirtual

◆ setSelection()

sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
)
overridevirtual

Selects a part of the text (ruler does nothing).

Definition at line 414 of file AccessibleCsvControl.cxx.

Member Data Documentation

◆ maBuffer

OUStringBuffer ScAccessibleCsvRuler::maBuffer
private

The documentation for this class was generated from the following files: