LibreOffice Module starmath (master) 1
accessibility.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <com/sun/star/accessibility/AccessibleRole.hpp>
21#include <com/sun/star/accessibility/AccessibleStateType.hpp>
22#include <com/sun/star/accessibility/AccessibleTextType.hpp>
23#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
24#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
26
27#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
28#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
31#include <osl/diagnose.h>
33#include <vcl/kernarray.hxx>
34#include <vcl/svapp.hxx>
35#include <vcl/unohelp2.hxx>
36#include <vcl/settings.hxx>
37
38#include <tools/gen.hxx>
39
40#include <editeng/editobj.hxx>
41
42
43#include "accessibility.hxx"
44#include <document.hxx>
45#include <view.hxx>
46#include <strings.hrc>
47#include <smmod.hxx>
48
49using namespace com::sun::star;
50using namespace com::sun::star::lang;
51using namespace com::sun::star::uno;
52using namespace com::sun::star::accessibility;
53
55 aAccName (SmResId(RID_DOCUMENTSTR)),
56 nClientId (0),
57 pWin (pGraphicWin)
58{
59 OSL_ENSURE( pWin, "SmGraphicAccessible: window missing" );
60}
61
63{
64}
65
67{
68 SmViewShell *pView = pWin ? &pWin->GetView() : nullptr;
69 return pView ? pView->GetDoc() : nullptr;
70}
71
73{
74 OUString aTxt;
75 SmDocShell *pDoc = GetDoc_Impl();
76 if (pDoc)
77 aTxt = pDoc->GetAccessibleText();
78 return aTxt;
79}
80
82{
83 pWin = nullptr; // implicitly results in AccessibleStateType::DEFUNC set
84
85 if ( nClientId )
86 {
88 }
89}
90
92 const sal_Int16 nAccessibleEventId,
93 const uno::Any &rOldVal,
94 const uno::Any &rNewVal)
95{
96 AccessibleEventObject aEvt;
97 aEvt.Source = static_cast<XAccessible *>(this);
98 aEvt.EventId = nAccessibleEventId;
99 aEvt.OldValue = rOldVal;
100 aEvt.NewValue = rNewVal ;
101
102 // pass event on to event-listener's
103 if (nClientId)
105}
106
107uno::Reference< XAccessibleContext > SAL_CALL SmGraphicAccessible::getAccessibleContext()
108{
109 return this;
110}
111
112sal_Bool SAL_CALL SmGraphicAccessible::containsPoint( const awt::Point& aPoint )
113{
116
117 SolarMutexGuard aGuard;
118 if (!pWin)
119 throw RuntimeException();
120
121 Size aSz( pWin->GetOutputSizePixel() );
122 return aPoint.X >= 0 && aPoint.Y >= 0 &&
123 aPoint.X < aSz.Width() && aPoint.Y < aSz.Height();
124}
125
126uno::Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleAtPoint(
127 const awt::Point& aPoint )
128{
129 SolarMutexGuard aGuard;
130 XAccessible *pRes = nullptr;
131 if (containsPoint( aPoint ))
132 pRes = this;
133 return pRes;
134}
135
136awt::Rectangle SAL_CALL SmGraphicAccessible::getBounds()
137{
138 SolarMutexGuard aGuard;
139 if (!pWin)
140 throw RuntimeException();
141
142 const Point aOutPos;
143 const Size aOutSize(pWin->GetOutputSizePixel());
144 css::awt::Rectangle aRet;
145
146 aRet.X = aOutPos.X();
147 aRet.Y = aOutPos.Y();
148 aRet.Width = aOutSize.Width();
149 aRet.Height = aOutSize.Height();
150
151 return aRet;
152}
153
155{
156 SolarMutexGuard aGuard;
157 if (!pWin)
158 throw RuntimeException();
159
160 const css::awt::Rectangle aRect(getBounds());
161 css::awt::Point aRet;
162
163 aRet.X = aRect.X;
164 aRet.Y = aRect.Y;
165
166 return aRet;
167}
168
170{
171 SolarMutexGuard aGuard;
172 if (!pWin)
173 throw RuntimeException();
174
175 css::awt::Point aScreenLoc(0, 0);
176
177 css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent());
178 if (xParent)
179 {
180 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext(
181 xParent->getAccessibleContext());
182 css::uno::Reference<css::accessibility::XAccessibleComponent> xParentComponent(
183 xParentContext, css::uno::UNO_QUERY);
184 OSL_ENSURE(xParentComponent.is(),
185 "WeldEditAccessible::getLocationOnScreen: no parent component!");
186 if (xParentComponent.is())
187 {
188 css::awt::Point aParentScreenLoc(xParentComponent->getLocationOnScreen());
189 css::awt::Point aOwnRelativeLoc(getLocation());
190 aScreenLoc.X = aParentScreenLoc.X + aOwnRelativeLoc.X;
191 aScreenLoc.Y = aParentScreenLoc.Y + aOwnRelativeLoc.Y;
192 }
193 }
194
195 return aScreenLoc;
196}
197
199{
200 SolarMutexGuard aGuard;
201 if (!pWin)
202 throw RuntimeException();
204 return css::awt::Size(aSz.Width(), aSz.Height());
205}
206
208{
209 SolarMutexGuard aGuard;
210 if (!pWin)
211 throw RuntimeException();
212
213 pWin->GrabFocus();
214}
215
217{
218 SolarMutexGuard aGuard;
219 if (!pWin)
220 throw RuntimeException();
221
222 weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
223 OutputDevice& rDevice = pDrawingArea->get_ref_device();
224
225 return static_cast<sal_Int32>(rDevice.GetTextColor());
226}
227
229{
230 SolarMutexGuard aGuard;
231 if (!pWin)
232 throw RuntimeException();
233
234 weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
235 OutputDevice& rDevice = pDrawingArea->get_ref_device();
236
237 Wallpaper aWall(rDevice.GetBackground());
238 Color nCol;
239 if (aWall.IsBitmap() || aWall.IsGradient())
241 else
242 nCol = aWall.GetColor();
243 return static_cast<sal_Int32>(nCol);
244}
245
247{
248 return 0;
249}
250
252 sal_Int64 /*i*/ )
253{
254 throw IndexOutOfBoundsException(); // there is no child...
255}
256
258{
259 SolarMutexGuard aGuard;
260 if (!pWin)
261 throw RuntimeException();
262
264}
265
267{
268 SolarMutexGuard aGuard;
269
270 // -1 for child not found/no parent (according to specification)
271 sal_Int64 nRet = -1;
272
273 css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent());
274 if (!xParent)
275 return nRet;
276
277 try
278 {
279 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext(
280 xParent->getAccessibleContext());
281
282 // iterate over parent's children and search for this object
283 if (xParentContext.is())
284 {
285 sal_Int64 nChildCount = xParentContext->getAccessibleChildCount();
286 for (sal_Int64 nChild = 0; (nChild < nChildCount) && (-1 == nRet); ++nChild)
287 {
288 css::uno::Reference<css::accessibility::XAccessible> xChild(
289 xParentContext->getAccessibleChild(nChild));
290 if (xChild.get() == this)
291 nRet = nChild;
292 }
293 }
294 }
295 catch (const css::uno::Exception&)
296 {
297 TOOLS_WARN_EXCEPTION("svx", "WeldEditAccessible::getAccessibleIndexInParent");
298 }
299
300 return nRet;
301}
302
304{
305 return AccessibleRole::DOCUMENT;
306}
307
309{
310 SolarMutexGuard aGuard;
311 SmDocShell *pDoc = GetDoc_Impl();
312 return pDoc ? pDoc->GetText() : OUString();
313}
314
316{
317 SolarMutexGuard aGuard;
318 return aAccName;
319}
320
322{
323 return new utl::AccessibleRelationSetHelper(); // empty relation set
324}
325
327{
328 SolarMutexGuard aGuard;
329 sal_Int64 nStateSet = 0;
330
331 if (!pWin)
332 nStateSet |= AccessibleStateType::DEFUNC;
333 else
334 {
335 nStateSet |= AccessibleStateType::ENABLED;
336 nStateSet |= AccessibleStateType::FOCUSABLE;
337 if (pWin->HasFocus())
338 nStateSet |= AccessibleStateType::FOCUSED;
339 if (pWin->IsActive())
340 nStateSet |= AccessibleStateType::ACTIVE;
341 if (pWin->IsVisible())
342 nStateSet |= AccessibleStateType::SHOWING;
343 if (pWin->IsReallyVisible())
344 nStateSet |= AccessibleStateType::VISIBLE;
345 weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
346 OutputDevice& rDevice = pDrawingArea->get_ref_device();
347 if (COL_TRANSPARENT != rDevice.GetBackground().GetColor())
348 nStateSet |= AccessibleStateType::OPAQUE;
349 }
350
351 return nStateSet;
352}
353
355{
356 SolarMutexGuard aGuard;
357 // should be the document language...
358 // We use the language of the localized symbol names here.
360}
361
362
365{
366 if (xListener.is())
367 {
368 SolarMutexGuard aGuard;
369 if (pWin)
370 {
371 if (!nClientId)
374 }
375 }
376}
377
380{
381 if (!(xListener.is() && nClientId))
382 return;
383
384 SolarMutexGuard aGuard;
385 sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( nClientId, xListener );
386 if ( !nListenerCount )
387 {
388 // no listeners anymore
389 // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
390 // and at least to us not firing any events anymore, in case somebody calls
391 // NotifyAccessibleEvent, again
393 }
394}
395
397{
398 return 0;
399}
400
402{
403 SolarMutexGuard aGuard;
404 OUString aTxt( GetAccessibleText_Impl() );
405 if (nIndex >= aTxt.getLength())
406 throw IndexOutOfBoundsException();
407 return false;
408}
409
411{
412 SolarMutexGuard aGuard;
413 OUString aTxt( GetAccessibleText_Impl() );
414 if (nIndex >= aTxt.getLength())
415 throw IndexOutOfBoundsException();
416 return aTxt[nIndex];
417}
418
420 sal_Int32 nIndex,
421 const uno::Sequence< OUString > & /*rRequestedAttributes*/ )
422{
423 SolarMutexGuard aGuard;
424 sal_Int32 nLen = GetAccessibleText_Impl().getLength();
425 if (0 > nIndex || nIndex >= nLen)
426 throw IndexOutOfBoundsException();
428}
429
430awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nIndex )
431{
432 SolarMutexGuard aGuard;
433
434 awt::Rectangle aRes;
435
436 if (!pWin)
437 throw RuntimeException();
438
439 // get accessible text
440 SmDocShell* pDoc = pWin->GetView().GetDoc();
441 if (!pDoc)
442 throw RuntimeException();
443 OUString aTxt( GetAccessibleText_Impl() );
444 if (0 > nIndex || nIndex > aTxt.getLength()) // aTxt.getLength() is valid
445 throw IndexOutOfBoundsException();
446
447 // find a reasonable rectangle for position aTxt.getLength().
448 bool bWasBehindText = (nIndex == aTxt.getLength());
449 if (bWasBehindText && nIndex)
450 --nIndex;
451
452 const SmNode *pTree = pDoc->GetFormulaTree();
453 const SmNode *pNode = pTree->FindNodeWithAccessibleIndex( nIndex );
456 if (pNode)
457 {
458 sal_Int32 nAccIndex = pNode->GetAccessibleIndex();
459 OSL_ENSURE( nAccIndex >= 0, "invalid accessible index" );
460 OSL_ENSURE( nIndex >= nAccIndex, "index out of range" );
461
462 OUStringBuffer aBuf;
463 pNode->GetAccessibleText(aBuf);
464 OUString aNodeText = aBuf.makeStringAndClear();
465 sal_Int32 nNodeIndex = nIndex - nAccIndex;
466 if (0 <= nNodeIndex && nNodeIndex < aNodeText.getLength())
467 {
468 // get appropriate rectangle
469 Point aOffset(pNode->GetTopLeft() - pTree->GetTopLeft());
470 Point aTLPos (pWin->GetFormulaDrawPos() + aOffset);
471 Size aSize (pNode->GetSize());
472
473 weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
474 OutputDevice& rDevice = pDrawingArea->get_ref_device();
475
476 KernArray aXAry;
477 rDevice.SetFont( pNode->GetFont() );
478 rDevice.GetTextArray( aNodeText, &aXAry, 0, aNodeText.getLength() );
479 aTLPos.AdjustX(nNodeIndex > 0 ? aXAry[nNodeIndex - 1] : 0 );
480 aSize.setWidth( nNodeIndex > 0 ? aXAry[nNodeIndex] - aXAry[nNodeIndex - 1] : aXAry[nNodeIndex] );
481
482 aTLPos = rDevice.LogicToPixel( aTLPos );
483 aSize = rDevice.LogicToPixel( aSize );
484 aRes.X = aTLPos.X();
485 aRes.Y = aTLPos.Y();
486 aRes.Width = aSize.Width();
487 aRes.Height = aSize.Height();
488 }
489 }
490
491 // take rectangle from last character and move it to the right
492 if (bWasBehindText)
493 aRes.X += aRes.Width;
494
495 return aRes;
496}
497
499{
500 SolarMutexGuard aGuard;
501 return GetAccessibleText_Impl().getLength();
502}
503
504sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoint )
505{
506 SolarMutexGuard aGuard;
507
508 sal_Int32 nRes = -1;
509 if (pWin)
510 {
511 const SmNode *pTree = pWin->GetView().GetDoc()->GetFormulaTree();
512 // can be NULL! e.g. if one clicks within the window already during loading of the
513 // document (before the parser even started)
514 if (!pTree)
515 return nRes;
516
517 weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
518 OutputDevice& rDevice = pDrawingArea->get_ref_device();
519
520 // get position relative to formula draw position
521 Point aPos( aPoint.X, aPoint.Y );
522 aPos = rDevice.PixelToLogic( aPos );
523 aPos -= pWin->GetFormulaDrawPos();
524
525 // if it was inside the formula then get the appropriate node
526 const SmNode *pNode = nullptr;
527 if (pTree->OrientedDist(aPos) <= 0)
528 pNode = pTree->FindRectClosestTo(aPos);
529
530 if (pNode)
531 {
532 // get appropriate rectangle
533 Point aOffset( pNode->GetTopLeft() - pTree->GetTopLeft() );
534 Point aTLPos ( aOffset );
535 Size aSize( pNode->GetSize() );
536
537 tools::Rectangle aRect( aTLPos, aSize );
538 if (aRect.Contains( aPos ))
539 {
540 OSL_ENSURE( pNode->IsVisible(), "node is not a leaf" );
541 OUStringBuffer aBuf;
542 pNode->GetAccessibleText(aBuf);
543 OUString aTxt = aBuf.makeStringAndClear();
544 OSL_ENSURE( !aTxt.isEmpty(), "no accessible text available" );
545
546 tools::Long nNodeX = pNode->GetLeft();
547
548 KernArray aXAry;
549 rDevice.SetFont( pNode->GetFont() );
550 rDevice.GetTextArray( aTxt, &aXAry, 0, aTxt.getLength() );
551 for (sal_Int32 i = 0; i < aTxt.getLength() && nRes == -1; ++i)
552 {
553 if (aXAry[i] + nNodeX > aPos.X())
554 nRes = i;
555 }
556 OSL_ENSURE( nRes >= 0 && nRes < aTxt.getLength(), "index out of range" );
557 OSL_ENSURE( pNode->GetAccessibleIndex() >= 0,
558 "invalid accessible index" );
559
560 nRes = pNode->GetAccessibleIndex() + nRes;
561 }
562 }
563 }
564 return nRes;
565}
566
568{
569 return OUString();
570}
571
573{
574 return -1;
575}
576
578{
579 return -1;
580}
581
583 sal_Int32 nStartIndex,
584 sal_Int32 nEndIndex )
585{
586 SolarMutexGuard aGuard;
587 sal_Int32 nLen = GetAccessibleText_Impl().getLength();
588 if (0 > nStartIndex || nStartIndex >= nLen ||
589 0 > nEndIndex || nEndIndex >= nLen)
590 throw IndexOutOfBoundsException();
591 return false;
592}
593
595{
596 SolarMutexGuard aGuard;
597 return GetAccessibleText_Impl();
598}
599
601 sal_Int32 nStartIndex,
602 sal_Int32 nEndIndex )
603{
607
608 SolarMutexGuard aGuard;
609 OUString aTxt( GetAccessibleText_Impl() );
610 sal_Int32 nStart = std::min(nStartIndex, nEndIndex);
611 sal_Int32 nEnd = std::max(nStartIndex, nEndIndex);
612 if ((nStart > aTxt.getLength()) ||
613 (nEnd > aTxt.getLength()))
614 throw IndexOutOfBoundsException();
615 return aTxt.copy( nStart, nEnd - nStart );
616}
617
618css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType )
619{
620 SolarMutexGuard aGuard;
621 OUString aTxt( GetAccessibleText_Impl() );
623 if (nIndex > aTxt.getLength())
624 throw IndexOutOfBoundsException();
625
626 css::accessibility::TextSegment aResult;
627 aResult.SegmentStart = -1;
628 aResult.SegmentEnd = -1;
629 if ( (AccessibleTextType::CHARACTER == aTextType) && (nIndex < aTxt.getLength()) )
630 {
631 auto nIndexEnd = nIndex;
632 aTxt.iterateCodePoints(&nIndexEnd);
633
634 aResult.SegmentText = aTxt.copy(nIndex, nIndexEnd - nIndex);
635 aResult.SegmentStart = nIndex;
636 aResult.SegmentEnd = nIndexEnd;
637 }
638 return aResult;
639}
640
641css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType )
642{
643 SolarMutexGuard aGuard;
644 OUString aTxt( GetAccessibleText_Impl() );
646 if (nIndex > aTxt.getLength())
647 throw IndexOutOfBoundsException();
648
649 css::accessibility::TextSegment aResult;
650 aResult.SegmentStart = -1;
651 aResult.SegmentEnd = -1;
652
653 if ( (AccessibleTextType::CHARACTER == aTextType) && nIndex > 0 )
654 {
655 aTxt.iterateCodePoints(&nIndex, -1);
656 auto nIndexEnd = nIndex;
657 aTxt.iterateCodePoints(&nIndexEnd);
658 aResult.SegmentText = aTxt.copy(nIndex, nIndexEnd - nIndex);
659 aResult.SegmentStart = nIndex;
660 aResult.SegmentEnd = nIndexEnd;
661 }
662 return aResult;
663}
664
665css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType )
666{
667 SolarMutexGuard aGuard;
668 OUString aTxt( GetAccessibleText_Impl() );
670 if (nIndex > aTxt.getLength())
671 throw IndexOutOfBoundsException();
672
673 css::accessibility::TextSegment aResult;
674 aResult.SegmentStart = -1;
675 aResult.SegmentEnd = -1;
676
677 if ( (AccessibleTextType::CHARACTER == aTextType) && (nIndex + 1 < aTxt.getLength()) )
678 {
679 aTxt.iterateCodePoints(&nIndex);
680 auto nIndexEnd = nIndex;
681 aTxt.iterateCodePoints(&nIndexEnd);
682 aResult.SegmentText = aTxt.copy(nIndex, nIndexEnd - nIndex);
683 aResult.SegmentStart = nIndex;
684 aResult.SegmentEnd = nIndexEnd;
685 }
686 return aResult;
687}
688
690 sal_Int32 nStartIndex,
691 sal_Int32 nEndIndex )
692{
693 SolarMutexGuard aGuard;
694 bool bReturn = false;
695
696 if (!pWin)
697 throw RuntimeException();
698
700 if ( xClipboard.is() )
701 {
702 OUString sText( getTextRange(nStartIndex, nEndIndex) );
703
705 SolarMutexReleaser aReleaser;
706 xClipboard->setContents( pDataObj, nullptr );
707
708 Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
709 if( xFlushableClipboard.is() )
710 xFlushableClipboard->flushClipboard();
711
712 bReturn = true;
713 }
714
715
716 return bReturn;
717}
718
719sal_Bool SAL_CALL SmGraphicAccessible::scrollSubstringTo( sal_Int32, sal_Int32, AccessibleScrollType )
720{
721 return false;
722}
723
725{
726 return "SmGraphicAccessible";
727}
728
730 const OUString& rServiceName )
731{
732 return cppu::supportsService(this, rServiceName);
733}
734
736{
737 return {
738 "css::accessibility::Accessible",
739 "css::accessibility::AccessibleComponent",
740 "css::accessibility::AccessibleContext",
741 "css::accessibility::AccessibleText"
742 };
743}
744
745/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const LanguageTag & GetUILanguageTag() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
void SetFont(const vcl::Font &rNewFont)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const Wallpaper & GetBackground() const
tools::Long GetTextArray(const OUString &rStr, KernArray *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, bool bCaret=false, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const Color & GetTextColor() const
constexpr tools::Long Y() const
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
constexpr tools::Long Width() const
OUString const & GetAccessibleText()
Definition: document.cxx:207
const SmTableNode * GetFormulaTree() const
Definition: document.hxx:176
const OUString & GetText() const
Definition: document.hxx:170
virtual void SAL_CALL removeAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual OUString SAL_CALL getText() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Int32 SAL_CALL getCaretPosition() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
virtual sal_Int32 SAL_CALL getForeground() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
SmDocShell * GetDoc_Impl()
virtual sal_Int32 SAL_CALL getSelectionStart() override
virtual sal_Int32 SAL_CALL getSelectionEnd() override
void LaunchEvent(const sal_Int16 nAccessibleEventId, const css::uno::Any &rOldVal, const css::uno::Any &rNewVal)
virtual sal_Int32 SAL_CALL getBackground() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &aPoint) override
virtual void SAL_CALL grabFocus() override
virtual css::awt::Size SAL_CALL getSize() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
virtual css::awt::Point SAL_CALL getLocation() override
virtual css::lang::Locale SAL_CALL getLocale() override
sal_uInt32 nClientId
client id in the AccessibleEventNotifier queue
SmGraphicAccessible(const SmGraphicAccessible &)=delete
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Int32 SAL_CALL getCharacterCount() override
virtual ~SmGraphicAccessible() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual OUString SAL_CALL getSelectedText() override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
SmGraphicWidget * pWin
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
OUString GetAccessibleText_Impl()
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
const Point & GetFormulaDrawPos() const
Definition: view.hxx:119
SmViewShell & GetView()
Definition: view.hxx:115
Definition: node.hxx:125
sal_Int32 GetAccessibleIndex() const
Gets the node accessible index.
Definition: node.hxx:326
virtual bool IsVisible() const =0
Checks node visibility.
const SmNode * FindRectClosestTo(const Point &rPoint) const
Finds the closest rectangle in the screen.
Definition: node.cxx:280
virtual void GetAccessibleText(OUStringBuffer &rText) const =0
Appends to rText the node text.
const SmNode * FindNodeWithAccessibleIndex(sal_Int32 nAccIndex) const
Finds the node with accessible index nAccIndex.
Definition: node.cxx:322
const SmFace & GetFont() const
Gets the font.
Definition: node.hxx:227
const Point & GetTopLeft() const
Definition: rect.hxx:124
tools::Long OrientedDist(const Point &rPoint) const
Definition: rect.cxx:552
tools::Long GetLeft() const
Definition: rect.hxx:127
const Size & GetSize() const
Definition: rect.hxx:153
SmDocShell * GetDoc() const
Definition: view.hxx:297
const Color & GetWindowColor() const
const Color & GetColor() const
bool IsBitmap() const
bool IsGradient() const
static sal_Int32 addEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
static void addEvent(const TClientId _nClient, const css::accessibility::AccessibleEventObject &_rEvent)
static sal_Int32 removeEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
static void revokeClient(const TClientId _nClient)
static void revokeClientNotifyDisposing(const TClientId _nClient, const css::uno::Reference< css::uno::XInterface > &_rxEventSource)
bool Contains(const Point &rPOINT) const
weld::DrawingArea * GetDrawingArea() const
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard() const
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
virtual a11yref get_accessible_parent()=0
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
sal_Int32 nIndex
aBuf
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
long Long
OUString SmResId(TranslateId aId)
Definition: smmod.cxx:42
unsigned char sal_Bool
sal_uInt16 sal_Unicode