LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SwAccessibleMap Class Reference

#include <accmap.hxx>

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

Public Types

typedef std::set< SwAccessibleParagraph * > SET_PARA
 

Public Member Functions

 SwAccessibleMap (SwViewShell *pSh)
 
virtual ~SwAccessibleMap () override
 
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView ()
 
css::uno::Reference< css::accessibility::XAccessible > GetDocumentPreview (const std::vector< std::unique_ptr< PreviewPage >> &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
 
::rtl::Reference< SwAccessibleContextGetContextImpl (const SwFrame *pFrame, bool bCreate=true)
 
css::uno::Reference< css::accessibility::XAccessible > GetContext (const SwFrame *pFrame, bool bCreate=true)
 
::rtl::Reference< ::accessibility::AccessibleShapeGetContextImpl (const SdrObject *pObj, SwAccessibleContext *pParentImpl, bool bCreate=true)
 
css::uno::Reference< css::accessibility::XAccessible > GetContext (const SdrObject *pObj, SwAccessibleContext *pParentImpl, bool bCreate=true)
 
SwViewShellGetShell () const
 
void AddShapeContext (const SdrObject *pObj, css::uno::Reference< css::accessibility::XAccessible > const &xAccShape)
 
void AddGroupContext (const SdrObject *pParentObj, css::uno::Reference< css::accessibility::XAccessible > const &xAccParent)
 
void RemoveGroupContext (const SdrObject *pParentObj)
 
const SwRectGetVisArea () const
 
Size GetPreviewPageSize (sal_uInt16 _nPreviewPageNum) const
 get size of a dedicated preview page More...
 
void RemoveContext (const SwFrame *pFrame)
 
void RemoveContext (const SdrObject *pObj)
 
void A11yDispose (const SwFrame *pFrame, const SdrObject *pObj, vcl::Window *pWindow, bool bRecursive=false, bool bCanSkipInvisible=true)
 
void InvalidatePosOrSize (const SwFrame *pFrame, const SdrObject *pObj, vcl::Window *pWindow, const SwRect &rOldFrame)
 
void InvalidateContent (const SwFrame *pFrame)
 
void InvalidateAttr (const SwTextFrame &rTextFrame)
 
void InvalidateCursorPosition (const SwFrame *pFrame)
 
void InvalidateFocus ()
 
void SetCursorContext (const ::rtl::Reference< SwAccessibleContext > &rCursorContext)
 
void InvalidateEditableStates (const SwFrame *_pFrame)
 
void InvalidateRelationSet (const SwFrame *pMaster, const SwFrame *pFollow)
 
void InvalidateParaFlowRelation (const SwTextFrame &_rTextFrame, const bool _bFrom)
 invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph More...
 
void InvalidateParaTextSelection (const SwTextFrame &_rTextFrame)
 invalidation of text selection of a paragraph More...
 
void InvalidateTextSelectionOfAllParas ()
 invalidation of text selection of all paragraphs More...
 
sal_Int32 GetChildIndex (const SwFrame &rParentFrame, vcl::Window &rChild) const
 
void UpdatePreview (const std::vector< std::unique_ptr< PreviewPage >> &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
 
void InvalidatePreviewSelection (sal_uInt16 nSelPage)
 
bool IsPageSelected (const SwPageFrame *pPageFrame) const
 
void FireEvents ()
 
const OUString & GetDocName () const
 
virtual tools::Rectangle GetVisibleArea () const override
 
virtual Point LogicToPixel (const Point &rPoint) const override
 
virtual Size LogicToPixel (const Size &rSize) const override
 
virtual bool ReplaceChild (::accessibility::AccessibleShape *pCurrentChild, const css::uno::Reference< css::drawing::XShape > &_rxShape, const long _nIndex, const ::accessibility::AccessibleShapeTreeInfo &_rShapeTreeInfo) override
 
virtual ::accessibility::AccessibleControlShapeGetAccControlShapeFromModel (css::beans::XPropertySet *pSet) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessibleCaption (const css::uno::Reference< css::drawing::XShape > &xShape) override
 
Point PixelToCore (const Point &rPoint) const
 
tools::Rectangle CoreToPixel (const tools::Rectangle &rRect) const
 
bool Contains (const SwFrame *pFrame) const
 
virtual bool IsDocumentSelAll () override
 
const css::uno::WeakReference< css::accessibility::XAccessible > & GetCursorContext () const
 
- Public Member Functions inherited from accessibility::IAccessibleViewForwarder
 IAccessibleViewForwarder ()=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder const &)=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder &&)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder const &)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder &&)=default
 
virtual ~IAccessibleViewForwarder ()
 
- Public Member Functions inherited from accessibility::IAccessibleParent
virtual ~IAccessibleParent ()
 
virtual bool ReplaceChild (AccessibleShape *pCurrentChild, const css::uno::Reference< css::drawing::XShape > &_rxShape, const long _nIndex, const AccessibleShapeTreeInfo &_rShapeTreeInfo)=0
 

Static Public Member Functions

static bool IsInSameLevel (const SdrObject *pObj, const SwFEShell *pFESh)
 

Public Attributes

SET_PARA m_setParaAdd
 
SET_PARA m_setParaRemove
 

Private Member Functions

void FireEvent (const SwAccessibleEvent_Impl &rEvent)
 
void AppendEvent (const SwAccessibleEvent_Impl &rEvent)
 
void InvalidateCursorPosition (const css::uno::Reference< css::accessibility::XAccessible > &rAcc)
 
void DoInvalidateShapeSelection (bool bInvalidateFocusMode=false)
 
void InvalidateShapeSelection ()
 
void InvalidateShapeInParaSelection ()
 
void InvalidateRelationSet_ (const SwFrame *pFrame, bool bFrom)
 
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView_ (bool bPagePreview)
 
std::unique_ptr< SwAccessibleSelectedParas_ImplBuildSelectedParas ()
 method to build up a new data structure of the accessible paragraphs, which have a selection More...
 
void GetMapMode (const Point &_rPoint, MapMode &_orMapMode) const
 get mapping mode for LogicToPixel and PixelToLogic conversions More...
 

Private Attributes

mutable::osl::Mutex maMutex
 
::osl::Mutex maEventMutex
 
std::unique_ptr< SwAccessibleContextMap_ImplmpFrameMap
 
std::unique_ptr< SwAccessibleShapeMap_ImplmpShapeMap
 
SwShapeList_Impl mvShapes
 
std::unique_ptr< SwAccessibleEventList_ImplmpEvents
 
std::unique_ptr< SwAccessibleEventMap_ImplmpEventMap
 
std::unique_ptr< SwAccessibleSelectedParas_ImplmpSelectedParas
 
SwViewShellmpVSh
 
std::unique_ptr< SwAccPreviewDatampPreview
 for page preview: store preview data, VisArea, and mapping of preview-to-display coordinates More...
 
css::uno::WeakReference< css::accessibility::XAccessible > mxCursorContext
 
bool mbShapeSelected
 
std::unique_ptr< SwAccessibleContextMap_ImplmpSeletedFrameMap
 
OUString const maDocName
 

Detailed Description

Definition at line 88 of file accmap.hxx.

Member Typedef Documentation

Definition at line 310 of file accmap.hxx.

Constructor & Destructor Documentation

SwAccessibleMap::SwAccessibleMap ( SwViewShell pSh)

Definition at line 1642 of file accmap.cxx.

References SwRootFrame::AddAccessibleShell(), and SwViewShell::GetLayout().

SwAccessibleMap::~SwAccessibleMap ( )
overridevirtual

Member Function Documentation

void SwAccessibleMap::A11yDispose ( const SwFrame pFrame,
const SdrObject pObj,
vcl::Window pWindow,
bool  bRecursive = false,
bool  bCanSkipInvisible = true 
)
void SwAccessibleMap::AddGroupContext ( const SdrObject pParentObj,
css::uno::Reference< css::accessibility::XAccessible > const &  xAccParent 
)
void SwAccessibleMap::AddShapeContext ( const SdrObject pObj,
css::uno::Reference< css::accessibility::XAccessible > const &  xAccShape 
)

Definition at line 2003 of file accmap.cxx.

References maMutex, and mpShapeMap.

Referenced by AddGroupContext().

void SwAccessibleMap::AppendEvent ( const SwAccessibleEvent_Impl rEvent)
private
std::unique_ptr< SwAccessibleSelectedParas_Impl > SwAccessibleMap::BuildSelectedParas ( )
private

method to build up a new data structure of the accessible paragraphs, which have a selection

method to build up a new data structure of the accessible paragraphs, which have a selection Important note: method has to be used inside a mutual exclusive section

Important note: method has to used inside a mutual exclusive section

Definition at line 3258 of file accmap.cxx.

References COMPLETE_STRING, SwPaM::End(), SwIterator< TElementType, TSource, eMode >::First(), sw::FrameContainsNode(), SwCursorShell::GetCursor(), SwNodeIndex::GetIndex(), SwPaM::GetMark(), SwPaM::GetNext(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetShell(), SwNode::GetTextNode(), SwPaM::HasMark(), SwFEShell::IsFrameSelected(), SwFEShell::IsObjSelected(), SwNode::IsTextNode(), mpFrameMap, SwIterator< TElementType, TSource, eMode >::Next(), SwPosition::nNode, and SwPaM::Start().

Referenced by InvalidateTextSelectionOfAllParas().

bool SwAccessibleMap::Contains ( const SwFrame pFrame) const

Definition at line 2153 of file accmap.cxx.

References mpFrameMap.

Referenced by A11yDispose().

tools::Rectangle SwAccessibleMap::CoreToPixel ( const tools::Rectangle rRect) const
void SwAccessibleMap::DoInvalidateShapeSelection ( bool  bInvalidateFocusMode = false)
private
void SwAccessibleMap::FireEvent ( const SwAccessibleEvent_Impl rEvent)
private
void SwAccessibleMap::FireEvents ( )
accessibility::AccessibleControlShape * SwAccessibleMap::GetAccControlShapeFromModel ( css::beans::XPropertySet pSet)
overridevirtual
css::uno::Reference< XAccessible > SwAccessibleMap::GetAccessibleCaption ( const css::uno::Reference< css::drawing::XShape > &  xShape)
overridevirtual

Reimplemented from accessibility::IAccessibleParent.

Definition at line 3161 of file accmap.cxx.

sal_Int32 SwAccessibleMap::GetChildIndex ( const SwFrame rParentFrame,
vcl::Window rChild 
) const
uno::Reference< XAccessible > SwAccessibleMap::GetContext ( const SwFrame pFrame,
bool  bCreate = true 
)
uno::Reference< XAccessible > SwAccessibleMap::GetContext ( const SdrObject pObj,
SwAccessibleContext pParentImpl,
bool  bCreate = true 
)
rtl::Reference< SwAccessibleContext > SwAccessibleMap::GetContextImpl ( const SwFrame pFrame,
bool  bCreate = true 
)
rtl::Reference<::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl ( const SdrObject pObj,
SwAccessibleContext pParentImpl,
bool  bCreate = true 
)

Definition at line 2080 of file accmap.cxx.

References GetContext().

const css::uno::WeakReference< css::accessibility::XAccessible >& SwAccessibleMap::GetCursorContext ( ) const
inline

Definition at line 307 of file accmap.hxx.

References mxCursorContext.

Referenced by SwAccessibleDocument::getAccFlowTo().

const OUString& SwAccessibleMap::GetDocName ( ) const
inline

Definition at line 255 of file accmap.hxx.

References maDocName.

uno::Reference< XAccessible > SwAccessibleMap::GetDocumentPreview ( const std::vector< std::unique_ptr< PreviewPage >> &  _rPreviewPages,
const Fraction _rScale,
const SwPageFrame _pSelectedPageFrame,
const Size _rPreviewWinSize 
)

Definition at line 1781 of file accmap.cxx.

References GetDocumentView_(), and mpPreview.

Referenced by SwViewShell::CreateAccessiblePreview().

uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView ( )
uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView_ ( bool  bPagePreview)
private
void SwAccessibleMap::GetMapMode ( const Point _rPoint,
MapMode _orMapMode 
) const
private

get mapping mode for LogicToPixel and PixelToLogic conversions

Replacement method <PreviewAdjust(..)> by new method <GetMapMode>. Method returns mapping mode of current output device and adjusts it, if the shell is in page/print preview. Necessary, because <PreviewAdjust(..)> changes mapping mode at current output device for mapping logic document positions to page preview window positions and vice versa and doesn't take care to recover its changes.

Parameters
_rPointinput parameter - constant reference to point to determine the mapping mode adjustments for page/print preview.
_orMapModeoutput parameter - reference to the mapping mode, which is determined by the method

Method returns mapping mode of current output device and adjusts it, if the shell is in page/print preview. Necessary, because <PreviewAdjust(..)> changes mapping mode at current output device for mapping logic document positions to page preview window positions and vice versa and doesn't take care to recover its changes.

Definition at line 3235 of file accmap.cxx.

References OutputDevice::GetMapMode(), GetShell(), SwViewShell::GetWin(), and mpPreview.

Referenced by CoreToPixel(), LogicToPixel(), and PixelToCore().

Size SwAccessibleMap::GetPreviewPageSize ( sal_uInt16  _nPreviewPageNum) const

get size of a dedicated preview page

Parameters
_nPreviewPageNuminput parameter - physical page number of page visible in the page preview
Returns
an object of class <Size>

Definition at line 3247 of file accmap.cxx.

References SwPagePreviewLayout::GetPreviewPageSizeByPageNum(), SwViewShell::IsPreview(), mpPreview, mpVSh, and SwViewShell::PagePreviewLayout().

SwViewShell* SwAccessibleMap::GetShell ( ) const
inline
const SwRect & SwAccessibleMap::GetVisArea ( ) const
tools::Rectangle SwAccessibleMap::GetVisibleArea ( ) const
overridevirtual

Implements accessibility::IAccessibleViewForwarder.

Definition at line 3018 of file accmap.cxx.

References GetVisArea(), and OutputDevice::LogicToLogic().

void SwAccessibleMap::InvalidateAttr ( const SwTextFrame rTextFrame)
void SwAccessibleMap::InvalidateContent ( const SwFrame pFrame)
void SwAccessibleMap::InvalidateCursorPosition ( const css::uno::Reference< css::accessibility::XAccessible > &  rAcc)
private
void SwAccessibleMap::InvalidateCursorPosition ( const SwFrame pFrame)
void SwAccessibleMap::InvalidateEditableStates ( const SwFrame _pFrame)
void SwAccessibleMap::InvalidateFocus ( )
void SwAccessibleMap::InvalidateParaFlowRelation ( const SwTextFrame _rTextFrame,
const bool  _bFrom 
)

invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph

Parameters
_rTextFrameinput parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO has to be invalidated.
_bFrominput parameter - boolean indicating, if relation CONTENT_FLOWS_FROM (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated.

Definition at line 2830 of file accmap.cxx.

References InvalidateRelationSet_().

void SwAccessibleMap::InvalidateParaTextSelection ( const SwTextFrame _rTextFrame)
void SwAccessibleMap::InvalidatePosOrSize ( const SwFrame pFrame,
const SdrObject pObj,
vcl::Window pWindow,
const SwRect rOldFrame 
)
void SwAccessibleMap::InvalidatePreviewSelection ( sal_uInt16  nSelPage)
void SwAccessibleMap::InvalidateRelationSet ( const SwFrame pMaster,
const SwFrame pFollow 
)

Definition at line 2822 of file accmap.cxx.

References InvalidateRelationSet_().

void SwAccessibleMap::InvalidateRelationSet_ ( const SwFrame pFrame,
bool  bFrom 
)
private
void SwAccessibleMap::InvalidateShapeInParaSelection ( )
private
void SwAccessibleMap::InvalidateShapeSelection ( )
private
void SwAccessibleMap::InvalidateTextSelectionOfAllParas ( )

invalidation of text selection of all paragraphs

Definition at line 3347 of file accmap.cxx.

References BuildSelectedParas(), InvalidateParaTextSelection(), maMutex, and mpSelectedParas.

bool SwAccessibleMap::IsDocumentSelAll ( )
overridevirtual

Reimplemented from accessibility::IAccessibleParent.

Definition at line 3457 of file accmap.cxx.

References SwViewShell::GetDoc(), GetShell(), and SwDoc::IsPrepareSelAll().

Referenced by InvalidateShapeInParaSelection().

bool SwAccessibleMap::IsInSameLevel ( const SdrObject pObj,
const SwFEShell pFESh 
)
static

Definition at line 1996 of file accmap.cxx.

References SwFEShell::IsObjSameLevelWithMarked().

Referenced by DoInvalidateShapeSelection().

bool SwAccessibleMap::IsPageSelected ( const SwPageFrame pPageFrame) const

Definition at line 2986 of file accmap.cxx.

References mpPreview.

Referenced by SwAccessiblePage::IsSelected().

Point SwAccessibleMap::LogicToPixel ( const Point rPoint) const
overridevirtual
Size SwAccessibleMap::LogicToPixel ( const Size rSize) const
overridevirtual
Point SwAccessibleMap::PixelToCore ( const Point rPoint) const
void SwAccessibleMap::RemoveContext ( const SwFrame pFrame)
void SwAccessibleMap::RemoveContext ( const SdrObject pObj)

Definition at line 2129 of file accmap.cxx.

References maMutex, mpShapeMap, and RemoveGroupContext().

void SwAccessibleMap::RemoveGroupContext ( const SdrObject pParentObj)

Definition at line 2015 of file accmap.cxx.

References SdrObject::GetSubList(), i, SdrObject::IsGroupObject(), maMutex, mpShapeMap, and RemoveContext().

Referenced by RemoveContext().

bool SwAccessibleMap::ReplaceChild ( ::accessibility::AccessibleShape pCurrentChild,
const css::uno::Reference< css::drawing::XShape > &  _rxShape,
const long  _nIndex,
const ::accessibility::AccessibleShapeTreeInfo _rShapeTreeInfo 
)
overridevirtual
void SwAccessibleMap::SetCursorContext ( const ::rtl::Reference< SwAccessibleContext > &  rCursorContext)
void SwAccessibleMap::UpdatePreview ( const std::vector< std::unique_ptr< PreviewPage >> &  _rPreviewPages,
const Fraction _rScale,
const SwPageFrame _pSelectedPageFrame,
const Size _rPreviewWinSize 
)

Member Data Documentation

SET_PARA SwAccessibleMap::m_setParaAdd

Definition at line 311 of file accmap.hxx.

Referenced by DoInvalidateShapeSelection(), and InvalidateShapeInParaSelection().

SET_PARA SwAccessibleMap::m_setParaRemove

Definition at line 312 of file accmap.hxx.

Referenced by DoInvalidateShapeSelection(), and InvalidateShapeInParaSelection().

OUString const SwAccessibleMap::maDocName
private

Definition at line 123 of file accmap.hxx.

Referenced by GetDocName().

::osl::Mutex SwAccessibleMap::maEventMutex
private

Definition at line 93 of file accmap.hxx.

Referenced by A11yDispose(), AppendEvent(), FireEvents(), and ~SwAccessibleMap().

mutable ::osl::Mutex SwAccessibleMap::maMutex
private
bool SwAccessibleMap::mbShapeSelected
private

Definition at line 109 of file accmap.hxx.

Referenced by GetContext(), and InvalidateCursorPosition().

std::unique_ptr<SwAccessibleEventMap_Impl> SwAccessibleMap::mpEventMap
private

Definition at line 98 of file accmap.hxx.

Referenced by A11yDispose(), AppendEvent(), FireEvents(), and ~SwAccessibleMap().

std::unique_ptr<SwAccessibleEventList_Impl> SwAccessibleMap::mpEvents
private

Definition at line 97 of file accmap.hxx.

Referenced by A11yDispose(), AppendEvent(), FireEvents(), and ~SwAccessibleMap().

std::unique_ptr<SwAccessibleContextMap_Impl> SwAccessibleMap::mpFrameMap
private
std::unique_ptr<SwAccPreviewData> SwAccessibleMap::mpPreview
private

for page preview: store preview data, VisArea, and mapping of preview-to-display coordinates

Definition at line 105 of file accmap.hxx.

Referenced by A11yDispose(), GetDocumentPreview(), GetMapMode(), GetPreviewPageSize(), GetVisArea(), InvalidatePreviewSelection(), IsPageSelected(), UpdatePreview(), and ~SwAccessibleMap().

std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::mpSelectedParas
private

Definition at line 101 of file accmap.hxx.

Referenced by InvalidateTextSelectionOfAllParas(), and ~SwAccessibleMap().

std::unique_ptr<SwAccessibleContextMap_Impl> SwAccessibleMap::mpSeletedFrameMap
private

Definition at line 121 of file accmap.hxx.

Referenced by InvalidateShapeInParaSelection().

std::unique_ptr<SwAccessibleShapeMap_Impl> SwAccessibleMap::mpShapeMap
private
SwViewShell* SwAccessibleMap::mpVSh
private

Definition at line 102 of file accmap.hxx.

Referenced by GetPreviewPageSize(), GetShell(), and ~SwAccessibleMap().

SwShapeList_Impl SwAccessibleMap::mvShapes
private

Definition at line 96 of file accmap.hxx.

Referenced by A11yDispose(), FireEvents(), and ~SwAccessibleMap().

css::uno::WeakReference< css::accessibility::XAccessible > SwAccessibleMap::mxCursorContext
private

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