LibreOffice Module winaccessibility (master) 1
|
#include <AccObject.hxx>
Public Member Functions | |
AccObject (css::accessibility::XAccessible *pXAcc=nullptr, AccObjectManagerAgent *pAgent=nullptr, AccEventListener *accListener=nullptr) | |
Constructor. More... | |
virtual | ~AccObject () |
Destructor. More... | |
bool | UpdateAccessibleInfoFromUnoToMSAA () |
Public method to mapping information between MSAA and UNO. More... | |
void | UpdateDefaultAction () |
Set special default action description string via UNO role. More... | |
IMAccessible * | GetIMAccessible () |
css::uno::Reference< css::accessibility::XAccessible > const & | GetXAccessible () |
void | SetResID (long id) |
long | GetResID () |
void | SetParentHWND (HWND hWnd) |
HWND | GetParentHWND () |
::rtl::Reference< AccEventListener > | SetListener (::rtl::Reference< AccEventListener > const &pListener) |
AccEventListener * | getListener () |
void | SetParentObj (AccObject *pParentAccObj) |
AccObject * | GetParentObj () |
void | InsertChild (AccObject *pChild, short pos=LAST_CHILD) |
Insert a child element. More... | |
void | DeleteChild (AccObject *pChild) |
Delete a child element. More... | |
AccObject * | NextChild () |
Get next child element. More... | |
void | NotifyDestroy () |
void | DecreaseState (sal_Int64 xState) |
Decrease state of com object. More... | |
void | IncreaseState (sal_Int64 xState) |
Increase state of com object. More... | |
void | SetName (css::uno::Any newName) |
Set name property via pAny. More... | |
void | SetValue (css::uno::Any pAny) |
Set value property via pAny. More... | |
short | GetRole () const |
Get role property via pAny. More... | |
void | UpdateState () |
update state information from uno to com More... | |
void | UpdateName () |
Update name property to com object. More... | |
void | UpdateValue () |
Update value property to com object. More... | |
void | UpdateAction () |
Update default action property to com object. More... | |
void | UpdateValidWindow () |
In order to windows API WindowFromAccessibleObject, we sometimes to set a pure top window accessible object created by windows system as top ancestor. More... | |
void | setFocus () |
Set self to focus object in parent child list. More... | |
void | unsetFocus () |
Unset self from focus object in parent child list. More... | |
void | setLocalizedResourceString () |
Private Member Functions | |
void | ImplInitializeCreateObj () |
Translate all UNO basic information into MSAA com information. More... | |
void | UpdateActionDesc () |
update action description desc More... | |
void | UpdateRole () |
update role information from uno to com More... | |
DWORD | GetMSAAStateFromUNO (sal_Int64 xState) |
Get MSAA state from UNO state @Role nState UNO state. More... | |
css::accessibility::XAccessibleSelection * | GetXAccessibleSelection () |
void | GetExpandedState (sal_Bool *isExpandable, sal_Bool *isExpanded) |
OUString | GetMAccessibleValueFromAny (css::uno::Any pAny) |
Private Attributes | |
short | m_accRole |
long | m_resID |
HWND | m_pParantID |
IMAccessible *const | m_pIMAcc |
AccObject * | m_pParentObj |
IAccChildList | m_childrenList |
::rtl::Reference< AccEventListener > | m_pListener |
css::uno::Reference< css::accessibility::XAccessible > | m_xAccRef |
css::uno::Reference< css::accessibility::XAccessibleAction > | m_xAccActionRef |
css::uno::Reference< css::accessibility::XAccessibleContext > | m_xAccContextRef |
Definition at line 46 of file AccObject.hxx.
AccObject::AccObject | ( | css::accessibility::XAccessible * | pXAcc = nullptr , |
AccObjectManagerAgent * | pAgent = nullptr , |
||
AccEventListener * | accListener = nullptr |
||
) |
Constructor.
pXAcc | Uno XAccessible interface of control. |
Agent | The agent kept in all listeners,it's the sole interface by which listener communicate with windows manager. |
listener | listener that registers in UNO system. |
Definition at line 161 of file AccObject.cxx.
References ImplInitializeCreateObj(), m_accRole, m_pIMAcc, m_xAccActionRef, m_xAccContextRef, m_xAccRef, IMAccessible::Put_XAccAgent(), IMAccessible::SetDefaultAction(), and IMAccessible::SetXAccessible().
|
virtual |
Destructor.
return
Definition at line 187 of file AccObject.cxx.
References m_xAccActionRef, m_xAccContextRef, and m_xAccRef.
void AccObject::DecreaseState | ( | sal_Int64 | xState | ) |
Decrease state of com object.
xState | The lost state. |
Definition at line 615 of file AccObject.cxx.
References IMAccessible::DecreaseState(), GetMSAAStateFromUNO(), IMAccessible::IncreaseState(), m_accRole, m_pIMAcc, m_pParentObj, and UNO_MSAA_UNMAPPING.
Referenced by AccObjectWinManager::DecreaseState(), unsetFocus(), and UpdateState().
void AccObject::DeleteChild | ( | AccObject * | pChild | ) |
Delete a child element.
pChild | Child element that should be inserted into child list. |
pos | Insert position. |
Definition at line 227 of file AccObject.cxx.
References m_childrenList, m_pIMAcc, and SetParentObj().
Referenced by AccObjectWinManager::DeleteAccChildNode().
Definition at line 986 of file AccObject.cxx.
References m_xAccContextRef.
Referenced by GetMSAAStateFromUNO().
IMAccessible * AccObject::GetIMAccessible | ( | ) |
Definition at line 1033 of file AccObject.cxx.
References m_pIMAcc.
Referenced by AccObjectWinManager::DeleteAccObj(), AccObjectWinManager::GetIAccessibleFromResID(), AccObjectWinManager::GetIMAccByXAcc(), AccObjectWinManager::GetTopWindowIMAccessible(), AccObjectWinManager::InsertAccObj(), and SetParentObj().
AccEventListener * AccObject::getListener | ( | ) |
Definition at line 1055 of file AccObject.cxx.
References m_pListener.
|
private |
Definition at line 406 of file AccObject.cxx.
References m_pIMAcc.
Referenced by SetName(), and SetValue().
|
private |
Get MSAA state from UNO state @Role nState UNO state.
Definition at line 495 of file AccObject.cxx.
References CHECKED, IMAccessible::DecreaseState(), DEFAULT, EDITABLE, FOCUSED, GetExpandedState(), m_accRole, m_pIMAcc, m_xAccContextRef, MENU, MOVEABLE, nState, PRESSED, SELECTED, and UNO_MSAA_UNMAPPING.
Referenced by DecreaseState(), and IncreaseState().
HWND AccObject::GetParentHWND | ( | ) |
Definition at line 1065 of file AccObject.cxx.
References m_pParantID.
Referenced by AccObjectWinManager::DeleteAccObj(), AccObjectWinManager::GetAccDocByAccTopWin(), AccObjectWinManager::InsertAccObj(), and AccObjectWinManager::NotifyAccEvent().
AccObject * AccObject::GetParentObj | ( | ) |
Definition at line 1070 of file AccObject.cxx.
References m_pParentObj.
Referenced by AccObjectWinManager::DeleteAccChildNode(), AccObjectWinManager::GetParentRole(), AccObjectWinManager::GetParentXAccessible(), AccObjectWinManager::InsertAccObj(), and AccObjectWinManager::IsTopWinAcc().
long AccObject::GetResID | ( | ) |
Definition at line 1060 of file AccObject.cxx.
References m_resID.
Referenced by AccObjectWinManager::DeleteAccObj(), AccObjectWinManager::InsertAccObj(), and AccObjectWinManager::NotifyAccEvent().
short AccObject::GetRole | ( | ) | const |
Get role property via pAny.
return accessible role
Definition at line 485 of file AccObject.cxx.
References m_accRole.
Referenced by AccObjectWinManager::DeleteAccObj(), and AccObjectWinManager::InsertAccObj().
Reference< XAccessible > const & AccObject::GetXAccessible | ( | ) |
Definition at line 1038 of file AccObject.cxx.
References m_xAccRef.
Referenced by AccObjectWinManager::DeleteChildrenAccObj(), AccObjectWinManager::GetParentRole(), AccObjectWinManager::GetParentXAccessible(), and AccObjectWinManager::InsertAccObj().
|
private |
|
private |
Translate all UNO basic information into MSAA com information.
return If the method is correctly processed.
Definition at line 256 of file AccObject.cxx.
References m_pIMAcc.
Referenced by AccObject().
void AccObject::IncreaseState | ( | sal_Int64 | xState | ) |
Increase state of com object.
xState | The new state. |
Definition at line 658 of file AccObject.cxx.
References IMAccessible::DecreaseState(), GetMSAAStateFromUNO(), IMAccessible::IncreaseState(), m_pIMAcc, and UNO_MSAA_UNMAPPING.
Referenced by AccObjectWinManager::IncreaseState(), setFocus(), and UpdateState().
void AccObject::InsertChild | ( | AccObject * | pChild, |
short | pos = LAST_CHILD |
||
) |
Insert a child element.
pChild | Child element that should be inserted into child list. |
pos | Insert position. |
Definition at line 201 of file AccObject.cxx.
References LAST_CHILD, m_childrenList, pos, and SetParentObj().
Referenced by AccObjectWinManager::InsertAccChildNode().
AccObject * AccObject::NextChild | ( | ) |
Get next child element.
return AccObject Object interface.
Definition at line 687 of file AccObject.cxx.
References m_childrenList.
Referenced by AccObjectWinManager::DeleteChildrenAccObj().
void AccObject::NotifyDestroy | ( | ) |
Definition at line 1003 of file AccObject.cxx.
References m_pIMAcc, and IMAccessible::NotifyDestroy().
Referenced by AccObjectWinManager::DeleteAccObj(), and AccObjectWinManager::NotifyDestroy().
void AccObject::setFocus | ( | ) |
Set self to focus object in parent child list.
return
Definition at line 961 of file AccObject.cxx.
References FOCUSED, IncreaseState(), m_pIMAcc, IMAccessible::Put_XAccFocus(), and UpdateRole().
Referenced by AccObjectWinManager::UpdateAccFocus().
rtl::Reference< AccEventListener > AccObject::SetListener | ( | ::rtl::Reference< AccEventListener > const & | pListener | ) |
Definition at line 1048 of file AccObject.cxx.
References m_pListener.
Referenced by AccObjectWinManager::DeleteAccListener(), and AccObjectWinManager::InsertAccObj().
void AccObject::setLocalizedResourceString | ( | ) |
void AccObject::SetName | ( | css::uno::Any | newName | ) |
Set name property via pAny.
pAny | New accessible name. |
Definition at line 471 of file AccObject.cxx.
References GetMAccessibleValueFromAny(), m_pIMAcc, and IMAccessible::Put_XAccName().
Referenced by AccObjectWinManager::SetAccName().
void AccObject::SetParentHWND | ( | HWND | hWnd | ) |
Definition at line 1043 of file AccObject.cxx.
References m_pParantID.
Referenced by AccObjectWinManager::InsertAccObj().
void AccObject::SetParentObj | ( | AccObject * | pParentAccObj | ) |
Definition at line 1009 of file AccObject.cxx.
References GetIMAccessible(), m_pIMAcc, m_pParentObj, and IMAccessible::Put_XAccParent().
Referenced by DeleteChild(), AccObjectWinManager::InsertAccObj(), and InsertChild().
void AccObject::SetResID | ( | long | id | ) |
Definition at line 1026 of file AccObject.cxx.
References m_pIMAcc, m_resID, and IMAccessible::Put_XAccChildID().
Referenced by AccObjectWinManager::InsertAccObj().
void AccObject::SetValue | ( | css::uno::Any | pAny | ) |
Set value property via pAny.
pAny | New value. |
Definition at line 362 of file AccObject.cxx.
References COMBO_BOX, GetMAccessibleValueFromAny(), m_accRole, m_pIMAcc, m_pParentObj, m_xAccContextRef, NOTE, PARAGRAPH, IMAccessible::Put_XAccValue(), TABLE_CELL, and TEXT.
Referenced by AccObjectWinManager::SetValue(), and UpdateValue().
void AccObject::unsetFocus | ( | ) |
Unset self from focus object in parent child list.
return
Definition at line 977 of file AccObject.cxx.
References DecreaseState(), FOCUSED, m_pIMAcc, IMAccessible::Put_XAccFocus(), and UACC_NO_FOCUS.
Referenced by AccObjectWinManager::UpdateAccFocus().
bool AccObject::UpdateAccessibleInfoFromUnoToMSAA | ( | ) |
Public method to mapping information between MSAA and UNO.
return If the method is correctly processed.
Definition at line 934 of file AccObject.cxx.
References m_pIMAcc, m_xAccContextRef, UpdateActionDesc(), UpdateName(), UpdateRole(), UpdateState(), and UpdateValue().
Referenced by AccObjectWinManager::InsertAccObj().
void AccObject::UpdateAction | ( | ) |
Update default action property to com object.
return
Definition at line 292 of file AccObject.cxx.
References m_pIMAcc, m_xAccActionRef, m_xAccContextRef, IMAccessible::SetDefaultAction(), and UpdateDefaultAction().
Referenced by AccObjectWinManager::UpdateAction().
|
private |
update action description desc
return
Definition at line 699 of file AccObject.cxx.
References COMBO_BOX, m_accRole, m_pIMAcc, m_xAccActionRef, IMAccessible::Put_ActionDescription(), TEXT, and UpdateDefaultAction().
Referenced by UpdateAccessibleInfoFromUnoToMSAA().
void AccObject::UpdateDefaultAction | ( | ) |
Set special default action description string via UNO role.
Role | UNO role |
Definition at line 335 of file AccObject.cxx.
References m_accRole, m_pIMAcc, m_xAccActionRef, and IMAccessible::Put_ActionDescription().
Referenced by AccObjectWinManager::NotifyAccEvent(), UpdateAction(), and UpdateActionDesc().
void AccObject::UpdateName | ( | ) |
Update name property to com object.
return
Definition at line 266 of file AccObject.cxx.
References m_accRole, m_pIMAcc, m_pParentObj, m_xAccContextRef, PARAGRAPH, IMAccessible::Put_XAccName(), and TEXT_FRAME.
Referenced by UpdateAccessibleInfoFromUnoToMSAA(), and AccObjectWinManager::UpdateAccName().
|
private |
update role information from uno to com
return
Definition at line 737 of file AccObject.cxx.
References m_pIMAcc, m_xAccContextRef, o3tl::make_unsigned(), IMAccessible::Put_XAccRole(), ROLE_TABLE, and SAL_N_ELEMENTS.
Referenced by setFocus(), and UpdateAccessibleInfoFromUnoToMSAA().
void AccObject::UpdateState | ( | ) |
update state information from uno to com
return
Definition at line 759 of file AccObject.cxx.
References COLUMN_HEADER, IMAccessible::DecreaseState(), DecreaseState(), DOCUMENT, EDITABLE, EMBEDDED_OBJECT, ENABLED, FOOTER, FOOTNOTE, GRAPHIC, HEADER, i, ICON, IMAccessible::IncreaseState(), IncreaseState(), m_accRole, m_pIMAcc, m_pParentObj, m_xAccContextRef, MENU, nState, PARAGRAPH, RULER, SEPARATOR, IMAccessible::SetState(), SHAPE, STATIC, TABLE, TABLE_CELL, TEXT, TEXT_FRAME, and VISIBLE.
Referenced by UpdateAccessibleInfoFromUnoToMSAA(), AccObjectWinManager::UpdateChildState(), and AccObjectWinManager::UpdateState().
void AccObject::UpdateValidWindow | ( | ) |
In order to windows API WindowFromAccessibleObject, we sometimes to set a pure top window accessible object created by windows system as top ancestor.
. |
Definition at line 245 of file AccObject.cxx.
References m_pIMAcc, m_pParantID, and IMAccessible::Put_XAccWindowHandle().
Referenced by AccObjectWinManager::InsertAccChildNode().
void AccObject::UpdateValue | ( | ) |
Update value property to com object.
return
Definition at line 312 of file AccObject.cxx.
References Any, m_pIMAcc, m_xAccContextRef, and SetValue().
Referenced by UpdateAccessibleInfoFromUnoToMSAA(), and AccObjectWinManager::UpdateValue().
|
private |
Definition at line 50 of file AccObject.hxx.
Referenced by AccObject(), DecreaseState(), GetMSAAStateFromUNO(), GetRole(), SetValue(), UpdateActionDesc(), UpdateDefaultAction(), UpdateName(), and UpdateState().
|
private |
Definition at line 55 of file AccObject.hxx.
Referenced by DeleteChild(), InsertChild(), and NextChild().
|
private |
Definition at line 53 of file AccObject.hxx.
Referenced by AccObject(), DecreaseState(), DeleteChild(), GetIMAccessible(), GetMAccessibleValueFromAny(), GetMSAAStateFromUNO(), ImplInitializeCreateObj(), IncreaseState(), NotifyDestroy(), setFocus(), SetName(), SetParentObj(), SetResID(), SetValue(), unsetFocus(), UpdateAccessibleInfoFromUnoToMSAA(), UpdateAction(), UpdateActionDesc(), UpdateDefaultAction(), UpdateName(), UpdateRole(), UpdateState(), UpdateValidWindow(), and UpdateValue().
|
private |
Definition at line 56 of file AccObject.hxx.
Referenced by getListener(), and SetListener().
|
private |
Definition at line 52 of file AccObject.hxx.
Referenced by GetParentHWND(), SetParentHWND(), and UpdateValidWindow().
|
private |
Definition at line 54 of file AccObject.hxx.
Referenced by DecreaseState(), GetParentObj(), SetParentObj(), SetValue(), UpdateName(), and UpdateState().
|
private |
Definition at line 51 of file AccObject.hxx.
Referenced by GetResID(), and SetResID().
|
private |
Definition at line 59 of file AccObject.hxx.
Referenced by AccObject(), UpdateAction(), UpdateActionDesc(), UpdateDefaultAction(), and ~AccObject().
|
private |
Definition at line 60 of file AccObject.hxx.
Referenced by AccObject(), GetExpandedState(), GetMSAAStateFromUNO(), SetValue(), UpdateAccessibleInfoFromUnoToMSAA(), UpdateAction(), UpdateName(), UpdateRole(), UpdateState(), UpdateValue(), and ~AccObject().
|
private |
Definition at line 58 of file AccObject.hxx.
Referenced by AccObject(), GetXAccessible(), and ~AccObject().