LibreOffice Module sd (master) 1
AccessibleDocumentViewBase.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
21#include <com/sun/star/drawing/XDrawView.hpp>
22#include <com/sun/star/frame/XController.hpp>
23#include <com/sun/star/document/XShapeEventBroadcaster.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/accessibility/AccessibleEventId.hpp>
26#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
27#include <rtl/ustrbuf.hxx>
28#include <sfx2/viewfrm.hxx>
29#include <com/sun/star/accessibility/AccessibleStateType.hpp>
30#include <com/sun/star/accessibility/AccessibleRole.hpp>
31#include <sfx2/objsh.hxx>
32#include <tools/debug.hxx>
33
35#include <svx/svdobj.hxx>
37#include <Window.hxx>
38#include <OutlineViewShell.hxx>
39
40#include <svx/svdlayer.hxx>
41#include <editeng/editobj.hxx>
42#include <LayerTabBar.hxx>
43#include <svtools/colorcfg.hxx>
44#include <ViewShell.hxx>
45#include <View.hxx>
46#include <drawdoc.hxx>
47#include <editeng/outlobj.hxx>
48#include <sdpage.hxx>
49#include <DrawViewShell.hxx>
51#include <utility>
52
53using namespace ::com::sun::star;
54using namespace ::com::sun::star::accessibility;
55using ::com::sun::star::uno::Reference;
56
57namespace accessibility {
58
59//===== internal ============================================================
61 ::sd::Window* pSdWindow,
62 ::sd::ViewShell* pViewShell,
63 uno::Reference<frame::XController> xController,
64 const uno::Reference<XAccessible>& rxParent)
65 : AccessibleContextBase (rxParent,
66 pViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress ?
67 AccessibleRole::DOCUMENT_PRESENTATION :
68 AccessibleRole::DOCUMENT),
69 mxController (std::move(xController)),
70 maViewForwarder (
71 static_cast<SdrPaintView*>(pViewShell->GetView()),
72 *pSdWindow->GetOutDev())
73{
74 if (mxController.is())
75 mxModel = mxController->getModel();
76
77 // Fill the shape tree info.
79 uno::Reference<document::XShapeEventBroadcaster>(
80 mxModel, uno::UNO_QUERY_THROW));
82 maShapeTreeInfo.SetSdrView (pViewShell->GetView());
83 maShapeTreeInfo.SetWindow (pSdWindow);
85
87 mpViewShell = pViewShell;
88}
89
91{
92 // At this place we should be disposed. You may want to add a
93 // corresponding assertion into the destructor of a derived class.
94}
95
97{
98 // Finish the initialization of the shape tree info container.
100
101 // Register as window listener to stay up to date with its size and
102 // position.
103 mxWindow->addWindowListener (this);
104 // Register as focus listener to
105 mxWindow->addFocusListener (this);
106
107 // Determine the list of shapes on the current page.
108 uno::Reference<drawing::XShapes> xShapeList;
109 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
110 if (xView.is())
111 xShapeList = xView->getCurrentPage();
112
113 // Register this object as dispose event listener at the model.
114 if (mxModel.is())
115 mxModel->addEventListener (
116 static_cast<awt::XWindowListener*>(this));
117
118 // Register as property change listener at the controller.
119 uno::Reference<beans::XPropertySet> xSet (mxController, uno::UNO_QUERY);
120 if (xSet.is())
121 xSet->addPropertyChangeListener (
122 "",
123 static_cast<beans::XPropertyChangeListener*>(this));
124
125 // Register this object as dispose event listener at the controller.
126 if (mxController.is())
127 mxController->addEventListener (
128 static_cast<awt::XWindowListener*>(this));
129
130 // Register at VCL Window to be informed of activated and deactivated
131 // OLE objects.
133 if (pWindow != nullptr)
134 {
136 this, AccessibleDocumentViewBase, WindowChildEventListener);
137
139
140 sal_uInt16 nCount = pWindow->GetChildCount();
141 for (sal_uInt16 i=0; i<nCount; i++)
142 {
143 vcl::Window* pChildWindow = pWindow->GetChild (i);
144 if (pChildWindow &&
145 (AccessibleRole::EMBEDDED_OBJECT
146 ==pChildWindow->GetAccessibleRole()))
147 {
148 SetAccessibleOLEObject (pChildWindow->GetAccessible());
149 }
150 }
151 }
153 if(!pObjShell->IsReadOnly())
154 SetState(AccessibleStateType::EDITABLE);
155}
156
157IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
158 VclWindowEvent&, rEvent, void)
159{
160 // DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
161 switch (rEvent.GetId())
162 {
163 case VclEventId::ObjectDying:
164 {
165 // Window is dying. Unregister from VCL Window.
166 // This is also attempted in the disposing() method.
167 vcl::Window* pWindow = maShapeTreeInfo.GetWindow();
168 vcl::Window* pDyingWindow = rEvent.GetWindow();
169 if (pWindow==pDyingWindow && pWindow!=nullptr && maWindowLink.IsSet())
170 {
171 pWindow->RemoveChildEventListener (maWindowLink);
172 maWindowLink = Link<VclWindowEvent&,void>();
173 }
174 }
175 break;
176
177 case VclEventId::WindowShow:
178 {
179 // A new window has been created. Is it an OLE object?
180 vcl::Window* pChildWindow = static_cast<vcl::Window*>(
181 rEvent.GetData());
182 if (pChildWindow!=nullptr
183 && (pChildWindow->GetAccessibleRole()
184 == AccessibleRole::EMBEDDED_OBJECT))
185 {
186 SetAccessibleOLEObject (pChildWindow->GetAccessible());
187 }
188 }
189 break;
190
191 case VclEventId::WindowHide:
192 {
193 // A window has been destroyed. Has that been an OLE
194 // object?
195 vcl::Window* pChildWindow = static_cast<vcl::Window*>(
196 rEvent.GetData());
197 if (pChildWindow!=nullptr
198 && (pChildWindow->GetAccessibleRole()
199 == AccessibleRole::EMBEDDED_OBJECT))
200 {
201 SetAccessibleOLEObject (nullptr);
202 }
203 }
204 break;
205
206 default: break;
207 }
208}
209
210//===== IAccessibleViewForwarderListener ====================================
211
213{
214 // Empty
215}
216
217//===== XAccessibleContext ==================================================
218
219Reference<XAccessible> SAL_CALL
221{
223
225}
226
227sal_Int64 SAL_CALL
229{
231
232 if (mxAccessibleOLEObject.is())
233 return 1;
234 else
235 return 0;
236}
237
238Reference<XAccessible> SAL_CALL
240{
242
243 ::osl::MutexGuard aGuard (m_aMutex);
244 if (mxAccessibleOLEObject.is())
245 if (nIndex == 0)
247
248 throw lang::IndexOutOfBoundsException ( "no child with index " + OUString::number(nIndex) );
249}
250
251//===== XAccessibleComponent ================================================
252
257uno::Reference<XAccessible > SAL_CALL
259 const awt::Point& aPoint)
260{
262
263 ::osl::MutexGuard aGuard (m_aMutex);
264 uno::Reference<XAccessible> xChildAtPosition;
265
266 sal_Int64 nChildCount = getAccessibleChildCount ();
267 for (sal_Int64 i=nChildCount-1; i>=0; --i)
268 {
269 Reference<XAccessible> xChild (getAccessibleChild (i));
270 if (xChild.is())
271 {
272 Reference<XAccessibleComponent> xChildComponent (
273 xChild->getAccessibleContext(), uno::UNO_QUERY);
274 if (xChildComponent.is())
275 {
276 awt::Rectangle aBBox (xChildComponent->getBounds());
277 if ( (aPoint.X >= aBBox.X)
278 && (aPoint.Y >= aBBox.Y)
279 && (aPoint.X < aBBox.X+aBBox.Width)
280 && (aPoint.Y < aBBox.Y+aBBox.Height) )
281 {
282 xChildAtPosition = xChild;
283 break;
284 }
285 }
286 }
287 }
288
289 // Have not found a child under the given point. Returning empty
290 // reference to indicate this.
291 return xChildAtPosition;
292}
293
294awt::Rectangle SAL_CALL
296{
298
299 // Transform visible area into screen coordinates.
300 ::tools::Rectangle aVisibleArea (
302 ::Point aPixelTopLeft (
304 aVisibleArea.TopLeft()));
305 ::Point aPixelSize (
307 aVisibleArea.BottomRight())
308 - aPixelTopLeft);
309
310 // Prepare to subtract the parent position to transform into relative
311 // coordinates.
312 awt::Point aParentPosition;
313 Reference<XAccessible> xParent = getAccessibleParent ();
314 if (xParent.is())
315 {
316 Reference<XAccessibleComponent> xParentComponent (
317 xParent->getAccessibleContext(), uno::UNO_QUERY);
318 if (xParentComponent.is())
319 aParentPosition = xParentComponent->getLocationOnScreen();
320 }
321
322 return awt::Rectangle (
323 aPixelTopLeft.X() - aParentPosition.X,
324 aPixelTopLeft.Y() - aParentPosition.Y,
325 aPixelSize.X(),
326 aPixelSize.Y());
327}
328
329awt::Point SAL_CALL
331{
333 awt::Rectangle aBoundingBox (getBounds());
334 return awt::Point (aBoundingBox.X, aBoundingBox.Y);
335}
336
337awt::Point SAL_CALL
339{
342 ::Point aPixelPoint (maShapeTreeInfo.GetViewForwarder()->LogicToPixel (aLogicalPoint));
343 return awt::Point (aPixelPoint.X(), aPixelPoint.Y());
344}
345
346awt::Size SAL_CALL
348{
350
351 // Transform visible area into screen coordinates.
352 ::tools::Rectangle aVisibleArea (
354 ::Point aPixelTopLeft (
356 aVisibleArea.TopLeft()));
357 ::Point aPixelSize (
359 aVisibleArea.BottomRight())
360 - aPixelTopLeft);
361
362 return awt::Size (aPixelSize.X(), aPixelSize.Y());
363}
364
365//===== XInterface ==========================================================
366
367uno::Any SAL_CALL
369{
370 uno::Any aReturn = AccessibleContextBase::queryInterface (rType);
371 if ( ! aReturn.hasValue())
372 aReturn = ::cppu::queryInterface (rType,
373 static_cast<XAccessibleComponent*>(this),
374 static_cast<XAccessibleSelection*>(this),
375 static_cast<lang::XEventListener*>(
376 static_cast<awt::XWindowListener*>(this)),
377 static_cast<beans::XPropertyChangeListener*>(this),
378 static_cast<awt::XWindowListener*>(this),
379 static_cast<awt::XFocusListener*>(this)
380 ,static_cast<XAccessibleExtendedAttributes*>(this)
381 );
382 return aReturn;
383}
384
385void SAL_CALL
387 noexcept
388{
389 AccessibleContextBase::acquire ();
390}
391
392void SAL_CALL
394 noexcept
395{
396 AccessibleContextBase::release ();
397}
398
399// XServiceInfo
400
401OUString SAL_CALL
403{
404 return "AccessibleDocumentViewBase";
405}
406
407css::uno::Sequence< OUString> SAL_CALL
409{
412}
413
414//===== XTypeProvider =======================================================
415
416css::uno::Sequence< css::uno::Type> SAL_CALL
418{
420
422 // Get list of types from the context base implementation, ...
423 AccessibleContextBase::getTypes(),
424 // ... get list of types from component base implementation, ...
426 // ...and add the additional type for the component, ...
427 css::uno::Sequence {
433}
434
436{
437 // Unregister from VCL Window.
439 if (maWindowLink.IsSet())
440 {
441 if (pWindow)
444 }
445 else
446 {
447 DBG_ASSERT (pWindow, "AccessibleDocumentViewBase::disposing");
448 }
449
450 // Unregister from window.
451 if (mxWindow.is())
452 {
453 mxWindow->removeWindowListener (this);
454 mxWindow->removeFocusListener (this);
455 mxWindow = nullptr;
456 }
457
458 // Unregister from the model.
459 if (mxModel.is())
460 mxModel->removeEventListener (
461 static_cast<awt::XWindowListener*>(this));
462
463 // Unregister from the controller.
464 if (mxController.is())
465 {
466 uno::Reference<beans::XPropertySet> xSet (mxController, uno::UNO_QUERY);
467 if (xSet.is())
468 xSet->removePropertyChangeListener ("", static_cast<beans::XPropertyChangeListener*>(this));
469
470 mxController->removeEventListener (
471 static_cast<awt::XWindowListener*>(this));
472 }
473
474 // Propagate change of controller down the shape tree.
476
477 // Reset the model reference.
478 mxModel = nullptr;
479 // Reset the model reference.
480 mxController = nullptr;
481
484 mxAccessibleOLEObject.clear();
485}
486
487//===== XEventListener ======================================================
488
489void SAL_CALL
490 AccessibleDocumentViewBase::disposing (const lang::EventObject& rEventObject)
491{
493
494 // Register this object as dispose event and document::XEventListener
495 // listener at the model.
496
497 if ( ! rEventObject.Source.is())
498 {
499 // Paranoia. Can this really happen?
500 }
501 else if (rEventObject.Source == mxModel || rEventObject.Source == mxController)
502 {
503 impl_dispose();
504 }
505}
506
507//===== XPropertyChangeListener =============================================
508
509void SAL_CALL AccessibleDocumentViewBase::propertyChange (const beans::PropertyChangeEvent& )
510{
511 // Empty
512}
513
514//===== XWindowListener =====================================================
515
516void SAL_CALL
517 AccessibleDocumentViewBase::windowResized (const css::awt::WindowEvent& )
518{
519 if( IsDisposed() )
520 return;
521
523}
524
525void SAL_CALL
526 AccessibleDocumentViewBase::windowMoved (const css::awt::WindowEvent& )
527{
528 if( IsDisposed() )
529 return;
530
532}
533
534void SAL_CALL
535 AccessibleDocumentViewBase::windowShown (const css::lang::EventObject& )
536{
537 if( IsDisposed() )
538 return;
539
541}
542
543void SAL_CALL
544 AccessibleDocumentViewBase::windowHidden (const css::lang::EventObject& )
545{
546 if( IsDisposed() )
547 return;
548
550}
551
552//===== XFocusListener ==================================================
553
554void AccessibleDocumentViewBase::focusGained (const css::awt::FocusEvent& e)
555{
557 if (e.Source == mxWindow)
558 Activated ();
559}
560
561void AccessibleDocumentViewBase::focusLost (const css::awt::FocusEvent& e)
562{
564 if (e.Source == mxWindow)
565 Deactivated ();
566}
567
568//===== protected internal ==================================================
569
570// This method is called from the component helper base class while disposing.
572{
573 impl_dispose();
574
576}
577
579OUString
581{
582 return "AccessibleDocumentViewBase";
583}
584
586{
587 // Empty. Overwrite to do something useful.
588}
589
591{
592 // Empty. Overwrite to do something useful.
593}
594
596 const Reference <XAccessible>& xOLEObject)
597{
598 // Send child event about removed accessible OLE object if necessary.
599 if (mxAccessibleOLEObject != xOLEObject)
600 if (mxAccessibleOLEObject.is())
602 AccessibleEventId::CHILD,
603 uno::Any(),
605
606 // Assume that the accessible OLE Object disposes itself correctly.
607
608 {
609 ::osl::MutexGuard aGuard (m_aMutex);
610 mxAccessibleOLEObject = xOLEObject;
611 }
612
613 // Send child event about new accessible OLE object if necessary.
614 if (mxAccessibleOLEObject.is())
616 AccessibleEventId::CHILD,
618 uno::Any(), -1);
619}
620
621//===== methods from AccessibleSelectionBase ==================================================
622
623// return the member maMutex;
624::osl::Mutex&
626{
627 return m_aMutex;
628}
629
630// return ourself as context in default case
631uno::Reference< XAccessibleContext >
633{
634 return this;
635}
636
637// return false in default case
638bool
640{
641 return false;
642}
643
644// do nothing in default case
645void
647{
648}
649
651{
652 ::osl::MutexGuard aGuard (m_aMutex);
653
654 uno::Any anyAttribute;
655 OUStringBuffer sValue;
656 if (auto pDrViewSh = dynamic_cast<::sd::DrawViewShell* > (mpViewShell))
657 {
658 OUString sDisplay;
659 OUString sName = "page-name:";
660 // MT IA2: Not used...
661 // SdPage* pCurrPge = pDrViewSh->getCurrentPage();
662 SdDrawDocument* pDoc = pDrViewSh->GetDoc();
663 sDisplay = pDrViewSh->getCurrentPage()->GetName();
664 sDisplay = sDisplay.replaceFirst( "\\", "\\\\" );
665 sDisplay = sDisplay.replaceFirst( "=", "\\=" );
666 sDisplay = sDisplay.replaceFirst( ";", "\\;" );
667 sDisplay = sDisplay.replaceFirst( ",", "\\," );
668 sDisplay = sDisplay.replaceFirst( ":", "\\:" );
669 sValue = sName + sDisplay
670 + ";page-number:"
671 + OUString::number(static_cast<sal_Int32>(static_cast<sal_uInt16>((pDrViewSh->getCurrentPage()->GetPageNum()-1)>>1) + 1))
672 + ";total-pages:"
673 + OUString::number(static_cast<sal_Int32>(pDrViewSh->GetPageTabControl().GetPageCount()))
674 + ";";
675 if(pDrViewSh->IsLayerModeActive() && pDrViewSh->GetLayerTabControl()) // #i87182#
676 {
677 sName = "page-name:";
678 sValue = sName;
679 OUString sLayerName(pDrViewSh->GetLayerTabControl()->GetLayerName(pDrViewSh->GetLayerTabControl()->GetCurPageId()) );
680 sDisplay = pDrViewSh->GetLayerTabControl()->GetPageText(pDrViewSh->GetLayerTabControl()->GetCurPageId());
681 if( pDoc )
682 {
683 SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
684 SdrLayer* aSdrLayer = rLayerAdmin.GetLayer(sLayerName);
685 if( aSdrLayer )
686 {
687 const OUString& layerAltText = aSdrLayer->GetTitle();
688 if (!layerAltText.isEmpty())
689 {
690 sName = " ";
691 sDisplay += sName + layerAltText;
692 }
693 }
694 }
695 sDisplay = sDisplay.replaceFirst( "\\", "\\\\" );
696 sDisplay = sDisplay.replaceFirst( "=", "\\=" );
697 sDisplay = sDisplay.replaceFirst( ";", "\\;" );
698 sDisplay = sDisplay.replaceFirst( ",", "\\," );
699 sDisplay = sDisplay.replaceFirst( ":", "\\:" );
700 sValue.append(sDisplay
701 + ";page-number:"
702 + OUString::number(static_cast<sal_Int32>(pDrViewSh->GetActiveTabLayerIndex()+1))
703 + ";total-pages:"
704 + OUString::number(static_cast<sal_Int32>(pDrViewSh->GetLayerTabControl()->GetPageCount()))
705 + ";");
706 }
707 }
708 if (auto pPresViewSh = dynamic_cast<::sd::PresentationViewShell* >(mpViewShell))
709 {
710 SdPage* pCurrPge = pPresViewSh->getCurrentPage();
711 SdDrawDocument* pDoc = pPresViewSh->GetDoc();
712 SdPage* pNotesPge = pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PageKind::Notes);
713 if (pNotesPge)
714 {
715 SdrObject* pNotesObj = pNotesPge->GetPresObj(PresObjKind::Notes);
716 if (pNotesObj)
717 {
718 OutlinerParaObject* pPara = pNotesObj->GetOutlinerParaObject();
719 if (pPara)
720 {
721 sValue.append("note:");
722 const EditTextObject& rEdit = pPara->GetTextObject();
723 for (sal_Int32 i=0;i<rEdit.GetParagraphCount();i++)
724 {
725 OUString strNote = rEdit.GetText(i);
726 strNote = strNote.replaceFirst( "\\", "\\\\" );
727 strNote = strNote.replaceFirst( "=", "\\=" );
728 strNote = strNote.replaceFirst( ";", "\\;" );
729 strNote = strNote.replaceFirst( ",", "\\," );
730 strNote = strNote.replaceFirst( ":", "\\:" );
731 sValue.append(strNote
732 + ";");//to divide each paragraph
733 }
734 }
735 }
736 }
737 }
738 if (dynamic_cast<const ::sd::OutlineViewShell* >(mpViewShell ) != nullptr )
739 {
740 SdPage* pCurrPge = mpViewShell->GetActualPage();
742 if(pCurrPge && pDoc)
743 {
744 OUString sDisplay;
745 sDisplay = pCurrPge->GetName();
746 sDisplay = sDisplay.replaceFirst( "=", "\\=" );
747 sDisplay = sDisplay.replaceFirst( ";", "\\;" );
748 sDisplay = sDisplay.replaceFirst( ",", "\\," );
749 sDisplay = sDisplay.replaceFirst( ":", "\\:" );
750 sValue = "page-name:" + sDisplay
751 + ";page-number:"
752 + OUString::number(static_cast<sal_Int32>(static_cast<sal_uInt16>((pCurrPge->GetPageNum()-1)>>1) + 1))
753 + ";total-pages:"
754 + OUString::number(static_cast<sal_Int32>(pDoc->GetSdPageCount(PageKind::Standard)))
755 + ";";
756 }
757 }
758 if (sValue.getLength())
759 anyAttribute <<= sValue.makeStringAndClear();
760 return anyAttribute;
761}
762
764{
765 return sal_Int32(COL_BLACK);
766}
767
769{
771 ::osl::MutexGuard aGuard (m_aMutex);
772 return sal_Int32(mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
773}
774} // end of namespace accessibility
775
776/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
const EditTextObject & GetTextObject() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
Definition: drawdoc2.cxx:207
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
Definition: drawdoc2.cxx:212
SdrObject * GetPresObj(PresObjKind eObjKind, int nIndex=1, bool bFuzzySearch=false)
returns the nIndex'th object from the given PresObjKind, index starts with 1
Definition: sdpage.cxx:203
const OUString & GetName() const
Definition: sdpage.cxx:2505
SdrLayer * GetLayer(sal_uInt16 i)
const OUString & GetTitle() const
const SdrLayerAdmin & GetLayerAdmin() const
virtual OutlinerParaObject * GetOutlinerParaObject() const
sal_uInt16 GetPageNum() const
const svtools::ColorConfig & getColorConfig() const
bool IsReadOnly() const
virtual SfxObjectShell * GetObjectShell() override
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
virtual bool SetState(sal_Int64 aState)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
void CommitChange(sal_Int16 aEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue, sal_Int32 nValueIndex)
virtual void SAL_CALL disposing() override
Base class for the various document views of the Draw and Impress applications.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual void SAL_CALL windowShown(const css::lang::EventObject &e) override
virtual sal_Int32 SAL_CALL getBackground() override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
This implementation either returns the active accessible OLE object if it exists and the given index ...
virtual void SAL_CALL focusLost(const css::awt::FocusEvent &e) override
virtual void SAL_CALL windowHidden(const css::lang::EventObject &e) override
void SetAccessibleOLEObject(const css::uno::Reference< css::accessibility::XAccessible > &xOLEObject)
Set or remove the currently active accessible OLE object.
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
Iterate over all children and test whether the specified point lies within one of their bounding boxe...
virtual css::awt::Size SAL_CALL getSize() override
virtual sal_Int32 SAL_CALL getForeground() override
AccessibleDocumentViewBase(::sd::Window *pSdWindow, ::sd::ViewShell *pViewShell, css::uno::Reference< css::frame::XController > xController, const css::uno::Reference< css::accessibility::XAccessible > &rxParent)
Create a new object.
virtual css::awt::Point SAL_CALL getLocation() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
This implementation returns either 1 or 0 depending on whether there is an active accessible OLE obje...
virtual void Deactivated()
This method is called when (before or after?) the frame containing this document has been deactivated...
virtual void Activated()
This method is called when (after) the frame containing this document has been activated.
virtual css::uno::Any SAL_CALL getExtendedAttributes() override
virtual bool implIsSelected(sal_Int64 nAccessibleChildIndex) override
virtual void ViewForwarderChanged() override
A view forwarder change is signalled for instance when any of the window events is received.
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &rEventObject) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > implGetAccessibleContext() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void implSelect(sal_Int64 nAccessibleChildIndex, bool bSelect) override
virtual void Init()
Initialize a new object.
css::uno::Reference< css::awt::XWindow > mxWindow
The API window that is made accessible.
css::uno::Reference< css::frame::XModel > mxModel
Model of the document.
css::uno::Reference< css::frame::XController > mxController
The controller of the window in which this view is displayed.
virtual void SAL_CALL focusGained(const css::awt::FocusEvent &e) override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &e) override
css::uno::Reference< css::accessibility::XAccessible > mxAccessibleOLEObject
Accessible OLE object.
AccessibleViewForwarder maViewForwarder
The view forwarder passed to the children manager.
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
virtual void SAL_CALL acquire() noexcept override
virtual OUString CreateAccessibleName() override
Create a name string.
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &e) override
const IAccessibleViewForwarder * GetViewForwarder() const
void SetViewForwarder(const IAccessibleViewForwarder *pViewForwarder)
void SetWindow(vcl::Window *pWindow)
void SetModelBroadcaster(const css::uno::Reference< css::document::XShapeEventBroadcaster > &rxModelBroadcaster)
void SetDocumentWindow(const css::uno::Reference< css::accessibility::XAccessibleComponent > &rxViewWindow)
void SetController(const css::uno::Reference< css::frame::XController > &rxController)
virtual Point LogicToPixel(const Point &rPoint) const=0
virtual tools::Rectangle GetVisibleArea() const=0
css::uno::Type const & get()
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
Show a textual overview of the text contents of all slides.
This view shell is responsible for showing the presentation of an Impress document.
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
SdDrawDocument * GetDoc() const
Definition: viewshel.cxx:1412
virtual SdPage * GetActualPage()=0
::sd::View * GetView() const
Definition: ViewShell.hxx:144
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
constexpr Point TopLeft() const
constexpr Point BottomRight() const
sal_uInt16 GetAccessibleRole() const
sal_uInt16 GetChildCount() const
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
vcl::Window * GetChild(sal_uInt16 nChild) const
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
int nCount
#define DBG_ASSERT(sCon, aError)
OUString sName
std::mutex m_aMutex
const char sDisplay[]
sal_Int32 nIndex
IMPL_LINK(AccessibleListBoxEntry, WindowEventListener, VclWindowEvent &, rEvent, void)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
int i
DocumentType
DOCUMENT
bool hasValue()
Reference< XController > xController