24#include <document.hxx>
32#include <com/sun/star/accessibility/AccessibleRole.hpp>
33#include <com/sun/star/accessibility/AccessibleStateType.hpp>
34#include <com/sun/star/accessibility/AccessibleEventId.hpp>
35#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
53 mpViewShell( pViewShell ),
98 if (rHint.
GetId() == SfxHintId::ScDataChanged)
100 std::vector<rtl::Reference<ScAccessiblePageHeaderArea>> aOldAreas(
maAreas);
108 if (aOldAreas[
i].is() && aOldAreas[
i]->GetEditTextObject())
110 AccessibleEventObject
aEvent;
111 aEvent.EventId = AccessibleEventId::CHILD;
112 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
113 aEvent.OldValue <<= uno::Reference<XAccessible>(aOldAreas[
i]);
117 aOldAreas[
i]->dispose();
121 AccessibleEventObject
aEvent;
122 aEvent.EventId = AccessibleEventId::CHILD;
123 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
132 else if (rHint.
GetId() == SfxHintId::ScAccVisAreaChanged)
134 AccessibleEventObject
aEvent;
135 aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
136 aEvent.Source = uno::Reference< XAccessibleContext >(
this);
147 uno::Reference<XAccessible> xRet;
180 if (xAccessibleComponent.is())
181 xAccessibleComponent->grabFocus();
201 sal_uInt16 nPageWhichId(0);
222 uno::Reference<XAccessible> xRet;
228 for (
const auto& rxArea :
maAreas)
243 throw lang::IndexOutOfBoundsException();
256 sal_Int64 nParentStates = 0;
259 uno::Reference<XAccessibleContext> xParentContext =
getAccessibleParent()->getAccessibleContext();
260 nParentStates = xParentContext->getAccessibleStateSet();
262 sal_Int64 nStateSet = 0;
264 nStateSet |= AccessibleStateType::DEFUNC;
267 nStateSet |= AccessibleStateType::ENABLED;
268 nStateSet |= AccessibleStateType::OPAQUE;
270 nStateSet |= AccessibleStateType::SHOWING;
272 nStateSet |= AccessibleStateType::VISIBLE;
281 return "ScAccessiblePageHeader";
286 const css::uno::Sequence<OUString> vals {
"com.sun.star.text.AccessibleHeaderFooterView" };
295 return sDesc.replaceFirst(
"%1",
ScResId(SCSTR_UNKNOWN));
301 return sName.replaceFirst(
"%1",
ScResId(SCSTR_UNKNOWN));
346 (nParentStates & AccessibleStateType::DEFUNC);
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
===== XAccessibleComponent ============================================
void IsObjectValid() const
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
===== XAccessible =====================================================
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Return a reference to the parent.
void CommitChange(const css::accessibility::AccessibleEventObject &rEvent) const
Calls all Listener to tell they the change.
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
static bool EETextObjEqual(const EditTextObject *pObj1, const EditTextObject *pObj2)
const EditTextObject * GetCenterArea() const
const EditTextObject * GetLeftArea() const
const EditTextObject * GetRightArea() const
bool GetHeaderPosition(tools::Rectangle &rHeaderRect) const
bool IsFooterLeft() const
bool IsHeaderLeft() const
bool GetFooterPosition(tools::Rectangle &rFooterRect) const
SCTAB GetPrintTab() const
const ScPreviewLocationData & GetLocationData()
void AddAccessibilityObject(SfxListener &rObject)
ScDocument & GetDocument()
void RemoveAccessibilityObject(SfxListener &rObject)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
vcl::Window * GetWindow() const
tools::Rectangle GetWindowExtentsAbsolute() const
vcl::Window * GetAccessibleParentWindow() const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window &rRelativeWindow) const
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(179)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(178)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
constexpr OUStringLiteral STR_ACC_HEADER_DESCR
constexpr OUStringLiteral STR_ACC_FOOTER_DESCR