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_Int32 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_Int32 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 css::uno::Reference< css::accessibility::XAccessibleStateSet > 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...
 
- Public Member Functions inherited from ScAccessibleCsvControl
 ScAccessibleCsvControl (ScCsvControl &rControl)
 Pointer to the VCL control. More...
 
virtual ~ScAccessibleCsvControl () override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL grabFocus () override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint (const css::awt::Point &aPoint) override
 
virtual void SendFocusEvent (bool bFocused)
 Sends a GetFocus or LoseFocus event to all listeners. More...
 
void SendVisibleEvent ()
 Sends a visible area changed event to all listeners. More...
 
void SendSelectionEvent ()
 Sends a selection changed event to all listeners. More...
 
virtual void SendTableUpdateEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows)
 Sends a table model changed event for changed cell contents to all listeners. More...
 
virtual void SendInsertColumnEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
 Sends a table model changed event for an inserted column to all listeners. More...
 
virtual void SendRemoveColumnEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn)
 Sends a table model changed event for a removed column to all listeners. More...
 
- Public Member Functions inherited from comphelper::OAccessibleComponentHelper
virtual sal_Bool SAL_CALL containsPoint (const css::awt::Point &aPoint) override
 
virtual css::awt::Point SAL_CALL getLocation () override
 
virtual css::awt::Point SAL_CALL getLocationOnScreen () override
 
virtual css::awt::Size SAL_CALL getSize () override
 
virtual css::awt::Rectangle SAL_CALL getBounds () override
 
- Public Member Functions inherited from comphelper::OAccessibleContextHelper
virtual void SAL_CALL addAccessibleEventListener (const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
 
virtual void SAL_CALL removeAccessibleEventListener (const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
 
virtual OUString SAL_CALL getAccessibleId () override
 
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent () override
 
virtual css::lang::Locale SAL_CALL getLocale () override
 
- Public Member Functions inherited from cppu::ImplHelper2< class, class >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from ScAccessibleCsvControl
virtual css::awt::Rectangle implGetBounds () override
 
ScCsvControlimplGetControl () const
 Returns the VCL control. More...
 
::utl::AccessibleStateSetHelperimplCreateStateSet ()
 Creates a StateSetHelper and fills it with DEFUNC, OPAQUE, ENABLED, SHOWING and VISIBLE. More...
 
- Protected Member Functions inherited from comphelper::OAccessibleComponentHelper
 OAccessibleComponentHelper ()
 
- Protected Member Functions inherited from comphelper::OCommonAccessibleComponent
 OCommonAccessibleComponent ()
 
virtual ~OCommonAccessibleComponent () override
 
bool containsPoint (const css::awt::Point &aPoint)
 
css::awt::Point getLocation ()
 
css::awt::Point getLocationOnScreen ()
 
css::awt::Size getSize ()
 
css::awt::Rectangle getBounds ()
 
- Protected Member Functions inherited from comphelper::OAccessibleContextHelper
virtual ~OAccessibleContextHelper () override
 
 OAccessibleContextHelper ()
 
void lateInit (const css::uno::Reference< css::accessibility::XAccessible > &_rxAccessible)
 
css::uno::Reference< css::accessibility::XAccessible > getAccessibleCreator () const
 
void NotifyAccessibleEvent (const sal_Int16 _nEventId, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
 
bool isAlive () const
 
void ensureAlive () const
 
void ensureDisposed ()
 
css::uno::Reference< css::accessibility::XAccessibleContext > implGetParentContext ()
 
::osl::Mutex & GetMutex ()
 
- Protected Member Functions inherited from comphelper::OAccessibleComponentHelper_Base
 ~OAccessibleComponentHelper_Base ()
 
- Protected Member Functions inherited from cppu::ImplHelper2< class, class >
 ~ImplHelper2 ()
 

Detailed Description

Accessible class representing the CSV ruler control.

Definition at line 93 of file AccessibleCsvControl.hxx.

Constructor & Destructor Documentation

ScAccessibleCsvRuler::ScAccessibleCsvRuler ( ScCsvRuler rRuler)
explicit

Contains the text representation of the ruler.

Definition at line 249 of file AccessibleCsvControl.cxx.

References constructStringBuffer().

ScAccessibleCsvRuler::~ScAccessibleCsvRuler ( )
overridevirtual

Member Function Documentation

void ScAccessibleCsvRuler::constructStringBuffer ( )
private

Builds the entire string buffer.

Exceptions
css::uno::RuntimeException

Definition at line 697 of file AccessibleCsvControl.cxx.

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

Referenced by ScAccessibleCsvRuler().

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 605 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

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 672 of file AccessibleCsvControl.cxx.

References implGetTextLength().

Referenced by getCharacter(), getTextAtIndex(), and setCaretPosition().

void ScAccessibleCsvRuler::ensureValidIndexWithEnd ( sal_Int32  nIndex) const
private
Exceptions
css::lang::IndexOutOfBoundsExceptionif the specified character position is invalid (outside 0..len).

Definition at line 678 of file AccessibleCsvControl.cxx.

References implGetTextLength().

Referenced by getCharacterAttributes(), getCharacterBounds(), getTextBeforeIndex(), and getTextBehindIndex().

void ScAccessibleCsvRuler::ensureValidRange ( sal_Int32 &  rnStartIndex,
sal_Int32 &  rnEndIndex 
) const
private
Exceptions
css::lang::IndexOutOfBoundsExceptionif the specified character range [Start,End) is invalid. If Start>End, swaps Start and End before checking.

Definition at line 684 of file AccessibleCsvControl.cxx.

References implGetTextLength().

Referenced by getTextRange().

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

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

Implements comphelper::OAccessibleContextHelper.

Definition at line 284 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getAccessibleChildCount ( )
overridevirtual

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

Implements comphelper::OAccessibleContextHelper.

Definition at line 278 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

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

Definition at line 103 of file AccessibleCsvControl.hxx.

OUString SAL_CALL ScAccessibleCsvRuler::getAccessibleDescription ( )
overridevirtual

Implements comphelper::OAccessibleContextHelper.

Definition at line 667 of file AccessibleCsvControl.cxx.

References ScResId().

OUString SAL_CALL ScAccessibleCsvRuler::getAccessibleName ( )
overridevirtual

Implements comphelper::OAccessibleContextHelper.

Definition at line 662 of file AccessibleCsvControl.cxx.

References ScResId().

css::uno::Reference< css::accessibility::XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleParent ( )
overridevirtual
Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleRelationSet ( )
overridevirtual
virtual sal_Int16 SAL_CALL ScAccessibleCsvRuler::getAccessibleRole ( )
inlineoverridevirtual

Implements comphelper::OAccessibleContextHelper.

Definition at line 122 of file AccessibleCsvControl.hxx.

Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleStateSet ( )
overridevirtual
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getBackground ( )
overridevirtual
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCaretPosition ( )
overridevirtual

Return the position of the caret.

Definition at line 327 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), implGetRuler(), and lcl_GetApiPos().

sal_Unicode SAL_CALL ScAccessibleCsvRuler::getCharacter ( sal_Int32  nIndex)
overridevirtual

Returns the specified character.

Definition at line 345 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), ensureValidIndex(), and maBuffer.

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 353 of file AccessibleCsvControl.cxx.

References aSeq, comphelper::OAccessibleContextHelper::ensureAlive(), ensureValidIndexWithEnd(), implGetRuler(), and lcl_FillFontAttributes().

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

Returns the count of characters.

Definition at line 381 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), and implGetTextLength().

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getForeground ( )
overridevirtual
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 388 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), ScCsvControl::GetPosCount(), ScCsvControl::GetPosFromX(), implGetRuler(), and lcl_GetApiPos().

OUString SAL_CALL ScAccessibleCsvRuler::getSelectedText ( )
overridevirtual

Returns the selected text (ruler returns empty string).

Definition at line 397 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getSelectionEnd ( )
overridevirtual

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

Definition at line 409 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

sal_Int32 SAL_CALL ScAccessibleCsvRuler::getSelectionStart ( )
overridevirtual

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

Definition at line 403 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

OUString SAL_CALL ScAccessibleCsvRuler::getText ( )
overridevirtual

Returns the entire text.

Definition at line 421 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), implGetTextLength(), and maBuffer.

TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual
TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual
TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBehindIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
overridevirtual
OUString SAL_CALL ScAccessibleCsvRuler::getTextRange ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
)
overridevirtual

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

Definition at line 428 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive(), ensureValidRange(), and maBuffer.

sal_Int32 ScAccessibleCsvRuler::implGetFirstEqualFormatted ( sal_Int32  nApiPos)
private

Returns the first character index with equal formatting as at nApiPos.

Definition at line 726 of file AccessibleCsvControl.cxx.

References implHasSplit().

Referenced by getTextAtIndex(), and getTextBeforeIndex().

sal_Int32 ScAccessibleCsvRuler::implGetLastEqualFormatted ( sal_Int32  nApiPos)
private

Returns the last character index with equal formatting as at nApiPos.

Definition at line 734 of file AccessibleCsvControl.cxx.

References implGetTextLength(), implHasSplit(), and nLength.

Referenced by getTextAtIndex(), and getTextBehindIndex().

ScCsvRuler & ScAccessibleCsvRuler::implGetRuler ( ) const
private
sal_Int32 ScAccessibleCsvRuler::implGetTextLength ( ) const
private
bool ScAccessibleCsvRuler::implHasSplit ( sal_Int32  nApiPos)
private

Returns true, if the character at the specified index has a split.

Definition at line 720 of file AccessibleCsvControl.cxx.

References ScCsvRuler::HasSplit(), implGetRuler(), lcl_GetApiPos(), and lcl_GetRulerPos().

Referenced by implGetFirstEqualFormatted(), and implGetLastEqualFormatted().

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

Definition at line 611 of file AccessibleCsvControl.cxx.

void ScAccessibleCsvRuler::SendCaretEvent ( )
overridevirtual

Sends a caret changed event to all listeners.

Reimplemented from ScAccessibleCsvControl.

Definition at line 649 of file AccessibleCsvControl.cxx.

References Any, CSV_POS_INVALID, ScCsvControl::GetRulerCursorPos(), implGetRuler(), comphelper::OAccessibleContextHelper::NotifyAccessibleEvent(), and nPos.

sal_Bool SAL_CALL ScAccessibleCsvRuler::setCaretPosition ( sal_Int32  nIndex)
overridevirtual
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 415 of file AccessibleCsvControl.cxx.

References comphelper::OAccessibleContextHelper::ensureAlive().

Member Data Documentation

OUStringBuffer ScAccessibleCsvRuler::maBuffer
private

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