24#include <com/sun/star/accessibility/AccessibleEventId.hpp>
25#include <com/sun/star/accessibility/AccessibleRole.hpp>
26#include <com/sun/star/accessibility/AccessibleStateType.hpp>
27#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
28#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
29#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
52 :m_pTabControl( pTabControl )
68 bool bFocused =
false;
79 bool bSelected =
false;
92 Any aOldValue, aNewValue;
94 aOldValue <<= AccessibleStateType::FOCUSED;
96 aNewValue <<= AccessibleStateType::FOCUSED;
98 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
107 Any aOldValue, aNewValue;
109 aOldValue <<= AccessibleStateType::SELECTED;
111 aNewValue <<= AccessibleStateType::SELECTED;
113 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
120 Any aOldValue, aNewValue;
121 if ( OCommonAccessibleText::implInitTextChangedEvent(
m_sPageText, sPageText, aOldValue, aNewValue ) )
123 Any aOldName, aNewName;
125 aNewName <<= sPageText;
127 NotifyAccessibleEvent( AccessibleEventId::NAME_CHANGED, aOldName, aNewName );
128 NotifyAccessibleEvent( AccessibleEventId::TEXT_CHANGED, aOldValue, aNewValue );
155 Any aOldValue, aNewValue;
157 aNewValue <<= xChild;
159 aOldValue <<= xChild;
160 NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue );
167 rStateSet |= AccessibleStateType::ENABLED;
168 rStateSet |= AccessibleStateType::SENSITIVE;
170 rStateSet |= AccessibleStateType::FOCUSABLE;
173 rStateSet |= AccessibleStateType::FOCUSED;
175 rStateSet |= AccessibleStateType::VISIBLE;
177 rStateSet |= AccessibleStateType::SHOWING;
179 rStateSet |= AccessibleStateType::SELECTABLE;
182 rStateSet |= AccessibleStateType::SELECTED;
191 awt::Rectangle aBounds( 0, 0, 0, 0 );
227 AccessibleTextHelper_BASE::disposing();
239 return "com.sun.star.comp.toolkit.AccessibleTabPage";
251 return {
"com.sun.star.awt.AccessibleTabPage" };
260 OExternalLockGuard aGuard(
this );
271 OExternalLockGuard aGuard(
this );
291 OExternalLockGuard aGuard(
this );
294 throw IndexOutOfBoundsException();
310 OExternalLockGuard aGuard(
this );
322 OExternalLockGuard aGuard(
this );
324 sal_Int64 nIndexInParent = -1;
328 return nIndexInParent;
333 OExternalLockGuard aGuard(
this );
335 return AccessibleRole::PAGE_TAB;
340 OExternalLockGuard aGuard(
this );
342 OUString sDescription;
351 OExternalLockGuard aGuard(
this );
362 OExternalLockGuard aGuard(
this );
370 OExternalLockGuard aGuard(
this );
372 sal_Int64 nStateSet = 0;
374 if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
380 nStateSet |= AccessibleStateType::DEFUNC;
389 OExternalLockGuard aGuard(
this );
400 OExternalLockGuard aGuard(
this );
408 Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY );
428 OExternalLockGuard aGuard(
this );
440 OExternalLockGuard aGuard(
this );
442 sal_Int32 nColor = 0;
446 Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY );
447 if ( xParentComp.is() )
448 nColor = xParentComp->getForeground();
457 OExternalLockGuard aGuard(
this );
459 sal_Int32 nColor = 0;
463 Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY );
464 if ( xParentComp.is() )
465 nColor = xParentComp->getBackground();
477 OExternalLockGuard aGuard(
this );
479 Reference< awt::XFont > xFont;
483 Reference< XAccessibleExtendedComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY );
484 if ( xParentComp.is() )
485 xFont = xParentComp->getFont();
494 OExternalLockGuard aGuard(
this );
502 OExternalLockGuard aGuard(
this );
512 OExternalLockGuard aGuard(
this );
519 OExternalLockGuard aGuard(
this );
521 return OCommonAccessibleText::implGetTextRange(
GetPageText(), nStartIndex, nEndIndex);
526 OExternalLockGuard aGuard(
this );
538 OExternalLockGuard aGuard(
this );
546 OExternalLockGuard aGuard(
this );
549 throw IndexOutOfBoundsException();
557 OExternalLockGuard aGuard(
this );
559 Sequence< PropertyValue > aValues;
562 if ( !implIsValidIndex(
nIndex, sText.getLength() ) )
563 throw IndexOutOfBoundsException();
580 OExternalLockGuard aGuard(
this );
583 throw IndexOutOfBoundsException();
585 awt::Rectangle aBounds( 0, 0, 0, 0 );
590 aCharRect.
Move( -aPageRect.
Left(), -aPageRect.
Top() );
600 OExternalLockGuard aGuard(
this );
620 OExternalLockGuard aGuard(
this );
623 throw IndexOutOfBoundsException();
631 OExternalLockGuard aGuard(
this );
633 bool bReturn =
false;
637 Reference< datatransfer::clipboard::XClipboard > xClipboard =
m_pTabControl->GetClipboard();
638 if ( xClipboard.is() )
640 OUString sText( implGetTextRange(
GetPageText(), nStartIndex, nEndIndex ) );
645 xClipboard->setContents( pDataObj,
nullptr );
647 Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
648 if( xFlushableClipboard.is() )
649 xFlushableClipboard->flushClipboard();
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
std::vector< css::beans::PropertyValue > GetCharacterAttributes()
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
VclPtr< TabControl > m_pTabControl
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual ~VCLXAccessibleTabPage() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual OUString SAL_CALL getTitledBorderText() override
void FillAccessibleStateSet(sal_Int64 &rStateSet)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual void implGetSelection(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex) override
virtual sal_Int32 SAL_CALL getCaretPosition() override
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
void SetFocused(bool bFocused)
virtual void SAL_CALL grabFocus() override
sal_Int64 implGetAccessibleChildCount()
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
VCLXAccessibleTabPage(TabControl *pTabControl, sal_uInt16 nPageId)
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Int32 SAL_CALL getCharacterCount() override
void SetPageText(const OUString &sPageText)
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual sal_Int32 SAL_CALL getForeground() override
virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
void SetSelected(bool bSelected)
virtual OUString SAL_CALL getText() override
virtual css::lang::Locale implGetLocale() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &aPoint) override
virtual void SAL_CALL disposing() override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual css::awt::Rectangle implGetBounds() override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual OUString SAL_CALL getToolTipText() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual OUString implGetText() override
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
css::awt::Rectangle AWTRectangle(const ::tools::Rectangle &rVCLRect)
inline ::tools::Rectangle VCLRectangle(const css::awt::Rectangle &rAWTRect)
inline ::Point VCLPoint(const css::awt::Point &rAWTPoint)
VCL_DLLPUBLIC OUString removeMnemonicFromString(OUString const &rStr, sal_Int32 &rMnemonicPos)
double getLength(const B2DPolygon &rCandidate)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)