20#include <com/sun/star/accessibility/XAccessibleContext.hpp>
25#include <com/sun/star/accessibility/AccessibleRole.hpp>
26#include <com/sun/star/accessibility/AccessibleRelation.hpp>
27#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
28#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
29#include <com/sun/star/accessibility/AccessibleEventId.hpp>
30#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
42using ::com::sun::star::accessibility::XAccessibleContext;
45 std::shared_ptr<SwAccessibleMap>
const& pInitMap,
70 case SfxHintId::Dying:
76 case SfxHintId::SwTitleChanged:
80 AccessibleEventObject
aEvent;
81 aEvent.EventId = AccessibleEventId::NAME_CHANGED;
82 aEvent.OldValue <<= rTitleChanged.m_sOld;
89 case SfxHintId::SwDescriptionChanged:
93 const OUString sOldDesc(
msDesc);
99 AccessibleEventObject
aEvent;
100 aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
101 aEvent.OldValue <<= sOldDesc;
111css::uno::Any SAL_CALL
114 css::uno::Any aReturn = SwAccessibleContext::queryInterface (rType);
115 if ( ! aReturn.hasValue())
116 aReturn = ::cppu::queryInterface (rType,
117 static_cast< css::accessibility::XAccessibleSelection*
>(
this)
126 SwAccessibleContext::acquire ();
133 SwAccessibleContext::release ();
140 SAL_WARN(
"sw.a11y",
"SwAccessibleTextFrame::selectAccessibleChild - missing implementation");
148 uno::Reference<XAccessibleContext> xContext;
150 xContext = xAcc->getAccessibleContext();
154 if( xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
156 uno::Reference< css::accessibility::XAccessibleText >
157 xText(xAcc, uno::UNO_QUERY);
160 if( xText->getSelectionStart() >= 0 )
return true;
170 SAL_WARN(
"sw.a11y",
"<SwAccessibleTextFrame::clearAccessibleSelection()> - missing implementation");
175 SAL_WARN(
"sw.a11y",
"<SwAccessibleTextFrame::selectAllAccessibleChildren()> - missing implementation");
182 for( sal_Int64
i = 0;
i < TotalCount;
i++ )
193 throw lang::IndexOutOfBoundsException();
198 if( i2 == nSelectedChildIndex )
202 return uno::Reference<XAccessible>();
207 SAL_WARN(
"sw.a11y",
"SwAccessibleTextFrame::selectAllAccessibleChildren - missing implementation");
237 return "com.sun.star.comp.Writer.SwAccessibleTextFrameView";
252 return css::uno::Sequence<sal_Int8>();
273 uno::Sequence<uno::Reference<XInterface> > aSequence {
GetMap()->
GetContext( pFrame ) };
274 return AccessibleRelation(
nType, aSequence );
291 if( pPrevFrame !=
nullptr )
293 AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrame ) );
296 if( pNextFrame !=
nullptr )
298 AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrame ) );
constexpr OUStringLiteral sAccessibleServiceName
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
const OUString & GetName() const
virtual OUString SAL_CALL getAccessibleName() override
void FireAccessibleEvent(css::accessibility::AccessibleEventObject &rEvent)
SwAccessibleMap * GetMap()
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
const SwFrame * GetFrame() const
css::uno::Reference< css::accessibility::XAccessible > GetContext(const SwFrame *pFrame, bool bCreate=true)
virtual ~SwAccessibleTextFrame() override
virtual OUString SAL_CALL getAccessibleName() override
virtual void SAL_CALL clearAccessibleSelection() override
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
SwAccessibleTextFrame(std::shared_ptr< SwAccessibleMap > const &pInitMap, const SwFlyFrame &rFlyFrame)
virtual void SAL_CALL selectAllAccessibleChildren() override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual OUString SAL_CALL getAccessibleDescription() override
Return this object's description.
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual void Notify(const SfxHint &) override
css::accessibility::AccessibleRelation makeRelation(sal_Int16 nType, const SwFlyFrame *pFrame)
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL acquire() noexcept override
SwFlyFrame * getFlyFrame() const
general base class for all free-flowing frames
SwFlyFrame * GetPrevLink() const
virtual const SwFlyFrameFormat * GetFormat() const override
SwFlyFrame * GetNextLink() const
Base class of the Writer layout elements.
#define SAL_WARN(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)