LibreOffice Module sd (master) 1
AccessibleDrawDocumentView.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/ShapeCollection.hpp>
22#include <com/sun/star/drawing/XDrawView.hpp>
23#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
24#include <com/sun/star/drawing/XShapes.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/accessibility/AccessibleEventId.hpp>
27#include <com/sun/star/accessibility/AccessibleStateType.hpp>
28#include <com/sun/star/frame/XController.hpp>
29#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
30#include <com/sun/star/lang/XMultiServiceFactory.hpp>
31#include <com/sun/star/view/XSelectionSupplier.hpp>
34#include <sal/log.hxx>
35#include <tools/debug.hxx>
36
39#include <svx/svdobj.hxx>
40#include <vcl/svapp.hxx>
41
42#include <ViewShell.hxx>
43#include <View.hxx>
44#include <DrawDocShell.hxx>
45#include <drawdoc.hxx>
46#include <algorithm>
47#include <slideshow.hxx>
48#include <anminfo.hxx>
50
51#include <strings.hrc>
52#include <sdresid.hxx>
53#include <osl/mutex.hxx>
54
55using namespace ::com::sun::star;
56using namespace ::com::sun::star::uno;
57using namespace ::com::sun::star::accessibility;
58
59namespace accessibility {
60
61namespace {
62
63struct XShapePosCompareHelper
64{
65 bool operator() ( const uno::Reference<drawing::XShape>& xshape1,
66 const uno::Reference<drawing::XShape>& xshape2 ) const
67 {
68 // modify the compare method to return the Z-Order, not layout order
71 if(pObj1 && pObj2)
72 return pObj1->GetOrdNum() < pObj2->GetOrdNum();
73 else
74 return false;
75 }
76};
77
78}
79
80//===== internal ============================================================
81
83 ::sd::Window* pSdWindow,
84 ::sd::ViewShell* pViewShell,
85 const uno::Reference<frame::XController>& rxController,
86 const uno::Reference<XAccessible>& rxParent)
87 : AccessibleDocumentViewBase (pSdWindow, pViewShell, rxController, rxParent),
88 mpSdViewSh( pViewShell )
89{
91}
92
94{
95 DBG_ASSERT (rBHelper.bDisposed || rBHelper.bInDispose,
96 "~AccessibleDrawDocumentView: object has not been disposed");
97}
98
100{
102
103 // Determine the list of shapes on the current page.
104 uno::Reference<drawing::XShapes> xShapeList;
105 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
106 if (xView.is())
107 xShapeList = xView->getCurrentPage();
108
109 // Create the children manager.
110 mpChildrenManager.reset(new ChildrenManager(this, xShapeList, maShapeTreeInfo, *this));
111
113 if (xPage.is())
114 {
115 xPage->Init();
116 mpChildrenManager->AddAccessibleShape (xPage);
117 mpChildrenManager->Update ();
118 }
119
120 mpChildrenManager->UpdateSelection ();
121}
122
124{
126 if (mpChildrenManager != nullptr)
127 mpChildrenManager->ViewForwarderChanged();
128}
129
134{
136
137 // Create a shape that represents the actual draw page.
138 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
139 if (xView.is())
140 {
141 uno::Reference<beans::XPropertySet> xSet (
142 uno::Reference<beans::XPropertySet> (xView->getCurrentPage(), uno::UNO_QUERY));
143 if (xSet.is())
144 {
145 // Create a rectangle shape that will represent the draw page.
146 uno::Reference<lang::XMultiServiceFactory> xFactory (mxModel, uno::UNO_QUERY);
147 uno::Reference<drawing::XShape> xRectangle;
148 if (xFactory.is())
149 xRectangle.set(xFactory->createInstance ("com.sun.star.drawing.RectangleShape"),
150 uno::UNO_QUERY);
151
152 // Set the shape's size and position.
153 if (xRectangle.is())
154 {
155 uno::Any aValue;
156 awt::Point aPosition;
157 awt::Size aSize;
158
159 // Set size and position of the shape to those of the draw
160 // page.
161 aValue = xSet->getPropertyValue ("BorderLeft");
162 aValue >>= aPosition.X;
163 aValue = xSet->getPropertyValue ("BorderTop");
164 aValue >>= aPosition.Y;
165 xRectangle->setPosition (aPosition);
166
167 aValue = xSet->getPropertyValue ("Width");
168 aValue >>= aSize.Width;
169 aValue = xSet->getPropertyValue ("Height");
170 aValue >>= aSize.Height;
171 xRectangle->setSize (aSize);
172
173 // Create the accessible object for the shape and
174 // initialize it.
175 xShape = new AccessiblePageShape (
176 xView->getCurrentPage(), this, maShapeTreeInfo);
177 }
178 }
179 }
180 return xShape;
181}
182
183//===== XAccessibleContext ==================================================
184
185sal_Int64 SAL_CALL
187{
189
191
192 // Forward request to children manager.
193 if (mpChildrenManager != nullptr)
194 nChildCount += mpChildrenManager->GetChildCount();
195
196 return nChildCount;
197}
198
199uno::Reference<XAccessible> SAL_CALL
201{
203
204 ::osl::ClearableMutexGuard aGuard (m_aMutex);
205
206 // Take care of children of the base class.
208 if (nCount > 0)
209 {
210 if (nIndex < nCount)
212 else
213 nIndex -= nCount;
214 }
215
216 // Create a copy of the pointer to the children manager and release the
217 // mutex before calling any of its methods.
218 ChildrenManager* pChildrenManager = mpChildrenManager.get();
219 aGuard.clear();
220
221 // Forward request to children manager.
222 if (pChildrenManager == nullptr)
223 throw lang::IndexOutOfBoundsException (
224 "no accessible child with index " + OUString::number(nIndex),
225 static_cast<uno::XWeak*>(this));
226
227 return pChildrenManager->GetChild (nIndex);
228}
229
230OUString SAL_CALL
232{
234
235 OUString sName = SdResId(SID_SD_A11Y_D_PRESENTATION);
236 ::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
237 if ( pSdView )
238 {
239 SdDrawDocument& rDoc = pSdView->GetDoc();
240 OUString sFileName = rDoc.getDocAccTitle();
241 if ( !sFileName.getLength() )
242 {
243 ::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
244 if ( pDocSh )
245 {
246 sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
247 }
248 }
249
250 OUString sReadOnly;
251 if(rDoc.getDocReadOnly())
252 {
253 sReadOnly = SdResId(SID_SD_A11Y_D_PRESENTATION_READONLY);
254 }
255
256 if ( sFileName.getLength() )
257 {
258 sName = sFileName + sReadOnly + " - " + sName;
259 }
260 }
261
262 return sName;
263}
264
265//===== XEventListener ======================================================
266
267void SAL_CALL
268 AccessibleDrawDocumentView::disposing (const lang::EventObject& rEventObject)
269{
271
273 if (rEventObject.Source == mxModel)
274 {
275 ::osl::Guard< ::osl::Mutex> aGuard (::osl::Mutex::getGlobalMutex());
276 // maShapeTreeInfo has been modified in base class.
277 if (mpChildrenManager != nullptr)
279 }
280}
281
282//===== XPropertyChangeListener =============================================
283
284void SAL_CALL
285 AccessibleDrawDocumentView::propertyChange (const beans::PropertyChangeEvent& rEventObject)
286{
288
290
291 // add page switch event for slide show mode
292 if (rEventObject.PropertyName == "CurrentPage" ||
293 rEventObject.PropertyName == "PageChange")
294 {
295 // Update the accessible name to reflect the current slide.
297
298 // The current page changed. Update the children manager accordingly.
299 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
300 if (xView.is() && mpChildrenManager!=nullptr)
301 {
302 // Inform the children manager to forget all children and give
303 // him the new ones.
304 mpChildrenManager->ClearAccessibleShapeList ();
305 mpChildrenManager->SetShapeList (xView->getCurrentPage());
306
308 if (xPage.is())
309 {
310 xPage->Init();
311 mpChildrenManager->AddAccessibleShape (xPage);
312 mpChildrenManager->Update (false);
313 }
314 }
315 else
316 SAL_WARN("sd", "View invalid");
317 CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue, -1);
318 }
319 else if ( rEventObject.PropertyName == "VisibleArea" )
320 {
321 if (mpChildrenManager != nullptr)
322 mpChildrenManager->ViewForwarderChanged();
323 }
324 else if (rEventObject.PropertyName == "ActiveLayer")
325 {
326 CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue, -1);
327 }
328 else if (rEventObject.PropertyName == "UpdateAcc")
329 {
330 // The current page changed. Update the children manager accordingly.
331 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
332 if (xView.is() && mpChildrenManager!=nullptr)
333 {
334 // Inform the children manager to forget all children and give
335 // him the new ones.
336 mpChildrenManager->ClearAccessibleShapeList ();
337 // update the slide show page's accessible info
338 //mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
339 // xView->getCurrentPage(), uno::UNO_QUERY));
341 if( xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->isFullScreen() )
342 {
343 css::uno::Reference< drawing::XDrawPage > xSlide;
344 // MT IA2: Not used...
345 // sal_Int32 currentPageIndex = xSlideshow->getCurrentPageIndex();
346 css::uno::Reference< css::presentation::XSlideShowController > xSlideController = xSlideshow->getController();
347 if( xSlideController.is() )
348 {
349 xSlide = xSlideController->getCurrentSlide();
350 if (xSlide.is())
351 {
352 mpChildrenManager->SetShapeList (xSlide);
353 }
354 }
355 }
357 if (xPage.is())
358 {
359 xPage->Init();
360 mpChildrenManager->AddAccessibleShape (xPage);
361 mpChildrenManager->Update (false);
362 }
363 }
364 }
365 else
366 {
367 SAL_INFO("sd", "unhandled");
368 }
369}
370
371// XServiceInfo
372
373OUString SAL_CALL
375{
376 return "AccessibleDrawDocumentView";
377}
378
379css::uno::Sequence< OUString> SAL_CALL
381{
383 const css::uno::Sequence<OUString> vals { "com.sun.star.drawing.AccessibleDrawDocumentView" };
384 uno::Sequence<OUString> aServiceNames =
386
388}
389
390//===== XInterface ==========================================================
391
392uno::Any SAL_CALL
394{
396 if ( ! aReturn.hasValue())
397 aReturn = ::cppu::queryInterface (rType,
398 static_cast<XAccessibleGroupPosition*>(this)
399 );
400 return aReturn;
401}
402
403void SAL_CALL
405 noexcept
406{
408}
409void SAL_CALL
411 noexcept
412{
414}
415//===== XAccessibleGroupPosition =========================================
416uno::Sequence< sal_Int32 > SAL_CALL
418{
420
421 // we will return the:
422 // [0] group level(always be 0 now)
423 // [1] similar items counts in the group
424 // [2] the position of the object in the group
425 uno::Sequence< sal_Int32 > aRet( 3 );
426 //get the xShape of the current selected drawing object
427 uno::Reference<XAccessibleContext> xAccContent;
428 rAny >>= xAccContent;
429 if ( !xAccContent.is() )
430 {
431 return aRet;
432 }
433 AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( xAccContent );
434 if ( !pAcc )
435 {
436 return aRet;
437 }
438 uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
439 if ( !xCurShape.is() )
440 {
441 return aRet;
442 }
443 //find all the child in the page, insert them into a vector and sort
444 if ( mpChildrenManager == nullptr )
445 {
446 return aRet;
447 }
448 std::vector< uno::Reference<drawing::XShape> > vXShapes;
449 sal_Int32 nCount = mpChildrenManager->GetChildCount();
450 //get pointer of SdView & SdrPageView for further use.
451 SdrPageView* pPV = nullptr;
452 ::sd::View* pSdView = nullptr;
453 if ( mpSdViewSh )
454 {
455 pSdView = mpSdViewSh->GetView();
456 pPV = pSdView->GetSdrPageView();
457 }
458 for ( sal_Int32 i = 0; i < nCount; i++ )
459 {
460 uno::Reference< drawing::XShape > xShape = mpChildrenManager->GetChildShape(i);
461 if ( xShape.is() )
462 {
463 //if the object is visible in the page, we add it into the group list.
465 if ( pObj && pPV && pSdView && pSdView->IsObjMarkable( pObj, pPV ) )
466 {
467 vXShapes.push_back( xShape );
468 }
469 }
470 }
471 std::sort( vXShapes.begin(), vXShapes.end(), XShapePosCompareHelper() );
472 //get the index of the selected object in the group
473 auto aIter = std::find_if(vXShapes.begin(), vXShapes.end(),
474 [&xCurShape](const uno::Reference<drawing::XShape>& rxShape) { return rxShape.get() == xCurShape.get(); });
475 if (aIter != vXShapes.end())
476 {
477 sal_Int32* pArray = aRet.getArray();
478 pArray[0] = 1; //it should be 1 based, not 0 based.
479 pArray[1] = vXShapes.size();
480 pArray[2] = static_cast<sal_Int32>(std::distance(vXShapes.begin(), aIter)) + 1; //we start counting position from 1
481 }
482 return aRet;
483}
484
486{
488
489 OUString aRet;
490 //get the xShape of the current selected drawing object
491 uno::Reference<XAccessibleContext> xAccContent;
492 rAny >>= xAccContent;
493 if ( !xAccContent.is() )
494 {
495 return aRet;
496 }
497 AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( xAccContent );
498 if ( !pAcc )
499 {
500 return aRet;
501 }
502 uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
503 if ( !xCurShape.is() )
504 {
505 return aRet;
506 }
508 if (pObj)
509 {
511 if( pInfo && (pInfo->meClickAction == presentation::ClickAction_DOCUMENT) )
512 aRet = pInfo->GetBookmark();
513 }
514 return aRet;
515}
516
519{
520 OUString sName;
521
522 uno::Reference<lang::XServiceInfo> xInfo (mxController, uno::UNO_QUERY);
523 if (xInfo.is())
524 {
525 uno::Sequence< OUString > aServices( xInfo->getSupportedServiceNames() );
526 OUString sFirstService = aServices[0];
527 if ( sFirstService == "com.sun.star.drawing.DrawingDocumentDrawView" )
528 {
529 if( aServices.getLength() >= 2 && aServices[1] == "com.sun.star.presentation.PresentationView")
530 {
531 SolarMutexGuard aGuard;
532
533 sName = SdResId(SID_SD_A11Y_I_DRAWVIEW_N);
534 }
535 else
536 {
537 SolarMutexGuard aGuard;
538
539 sName = SdResId(SID_SD_A11Y_D_DRAWVIEW_N);
540 }
541 }
542 else if ( sFirstService == "com.sun.star.presentation.NotesView" )
543 {
544 SolarMutexGuard aGuard;
545
546 sName = SdResId(SID_SD_A11Y_I_NOTESVIEW_N);
547 }
548 else if ( sFirstService == "com.sun.star.presentation.HandoutView" )
549 {
550 SolarMutexGuard aGuard;
551
552 sName = SdResId(SID_SD_A11Y_I_HANDOUTVIEW_N);
553 }
554 else
555 {
556 sName = sFirstService;
557 }
558 }
559 else
560 {
561 sName = "AccessibleDrawDocumentView";
562 }
563 return sName;
564}
565
568bool
569 AccessibleDrawDocumentView::implIsSelected( sal_Int64 nAccessibleChildIndex )
570{
571 const SolarMutexGuard aSolarGuard;
572 uno::Reference< view::XSelectionSupplier > xSel( mxController, uno::UNO_QUERY );
573 bool bRet = false;
574
575 OSL_ENSURE( 0 <= nAccessibleChildIndex, "AccessibleDrawDocumentView::implIsSelected: invalid index!" );
576
577 if( xSel.is() && ( 0 <= nAccessibleChildIndex ) )
578 {
579 uno::Any aAny( xSel->getSelection() );
580 uno::Reference< drawing::XShapes > xShapes;
581
582 aAny >>= xShapes;
583
584 if( xShapes.is() )
585 {
586 AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( getAccessibleChild( nAccessibleChildIndex ) );
587
588 if( pAcc )
589 {
590 uno::Reference< drawing::XShape > xShape( pAcc->GetXShape() );
591
592 if( xShape.is() )
593 {
594 for( sal_Int32 i = 0, nCount = xShapes->getCount(); ( i < nCount ) && !bRet; ++i )
595 if( xShapes->getByIndex( i ) == xShape )
596 bRet = true;
597 }
598 }
599 }
600 }
601
602 return bRet;
603}
604
609void
610 AccessibleDrawDocumentView::implSelect( sal_Int64 nAccessibleChildIndex, bool bSelect )
611{
612 const SolarMutexGuard aSolarGuard;
613 uno::Reference< view::XSelectionSupplier > xSel( mxController, uno::UNO_QUERY );
614
615 if( !xSel.is() )
616 return;
617
618 uno::Any aAny;
619
620 if( ACCESSIBLE_SELECTION_CHILD_ALL == nAccessibleChildIndex )
621 {
622 // Select or deselect all children.
623
624 if( !bSelect )
625 xSel->select( aAny );
626 else
627 {
628 uno::Reference< drawing::XShapes > xShapes = drawing::ShapeCollection::create(
630
631 for(sal_Int64 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
632 {
633 AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( getAccessibleChild( i ) );
634
635 if( pAcc && pAcc->GetXShape().is() )
636 xShapes->add( pAcc->GetXShape() );
637 }
638
639 if( xShapes->getCount() )
640 {
641 xSel->select( Any(xShapes) );
642 }
643 }
644 }
645 else if( nAccessibleChildIndex >= 0 )
646 {
647 // Select or deselect only the child with index
648 // nAccessibleChildIndex.
649
650 AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>(
651 getAccessibleChild( nAccessibleChildIndex ));
652
653 // Add or remove the shape that is made accessible from the
654 // selection of the controller.
655 if( pAcc )
656 {
657 uno::Reference< drawing::XShape > xShape( pAcc->GetXShape() );
658
659 if( xShape.is() )
660 {
661 uno::Reference< drawing::XShapes > xShapes;
662 bool bFound = false;
663
664 aAny = xSel->getSelection();
665 aAny >>= xShapes;
666
667 // Search shape to be selected in current selection.
668 if (xShapes.is())
669 {
670 sal_Int32 nCount = xShapes->getCount();
671 for (sal_Int32 i=0; ( i < nCount ) && !bFound; ++i )
672 if( xShapes->getByIndex( i ) == xShape )
673 bFound = true;
674 }
675 else
676 // Create an empty selection to add the shape to.
677 xShapes = drawing::ShapeCollection::create(
679
680 // Update the selection.
681 if( !bFound && bSelect )
682 xShapes->add( xShape );
683 else if( bFound && !bSelect )
684 xShapes->remove( xShape );
685
686 xSel->select( Any(xShapes) );
687 }
688 }
689 }
690}
691
693{
694 if (mpChildrenManager == nullptr)
695 return;
696
697 bool bChange = false;
698 // When none of the children has the focus then claim it for the
699 // view.
700 if ( ! mpChildrenManager->HasFocus())
701 {
702 SetState (AccessibleStateType::FOCUSED);
703 bChange = true;
704 }
705 else
706 ResetState (AccessibleStateType::FOCUSED);
707 mpChildrenManager->UpdateSelection();
708 // if the child gets focus in UpdateSelection(), needs to reset the focus on document.
709 if (mpChildrenManager->HasFocus() && bChange)
710 ResetState (AccessibleStateType::FOCUSED);
711}
712
714{
715 if (mpChildrenManager != nullptr)
716 mpChildrenManager->RemoveFocus();
717 ResetState (AccessibleStateType::FOCUSED);
718}
719
721{
722 mpChildrenManager.reset();
724}
725
730{
731 // Release resources.
732 mpChildrenManager.reset();
733
734 // Forward call to base classes.
736}
737
739{
740 OUString sNewName (CreateAccessibleName() + ": ");
741
742 // Add the number of the current slide.
743 uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
744 if (xView.is())
745 {
746 uno::Reference<beans::XPropertySet> xProperties (xView->getCurrentPage(), UNO_QUERY);
747 if (xProperties.is())
748 try
749 {
750 sal_Int16 nPageNumber (0);
751 if (xProperties->getPropertyValue("Number") >>= nPageNumber)
752 {
753 sNewName += OUString::number(nPageNumber);
754 }
755 }
756 catch (const beans::UnknownPropertyException&)
757 {
758 }
759 }
760
761 // Add the number of pages/slides.
762 Reference<drawing::XDrawPagesSupplier> xPagesSupplier (mxModel, UNO_QUERY);
763 if (xPagesSupplier.is())
764 {
765 Reference<container::XIndexAccess> xPages = xPagesSupplier->getDrawPages();
766 if (xPages.is())
767 {
768 sNewName += " / " + OUString::number(xPages->getCount());
769 }
770 }
771
773}
774
775} // end of namespace accessibility
776
777/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define ACCESSIBLE_SELECTION_CHILD_ALL
constexpr OUStringLiteral sReadOnly
css::presentation::ClickAction meClickAction
Action at mouse click.
Definition: anminfo.hxx:48
OUString GetBookmark() const
Definition: anminfo.cxx:110
static SdAnimationInfo * GetShapeUserData(SdrObject &rObject, bool bCreate=false)
Definition: drawdoc2.cxx:959
SAL_DLLPRIVATE bool getDocReadOnly() const
Definition: drawdoc.hxx:125
SAL_DLLPRIVATE const OUString & getDocAccTitle() const
Definition: drawdoc.hxx:124
bool IsObjMarkable(SdrObject const *pObj, SdrPageView const *pPV) const
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
sal_uInt32 GetOrdNum() const
SdrPageView * GetSdrPageView() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
virtual bool SetState(sal_Int64 aState)
virtual bool ResetState(sal_Int64 aState)
void CommitChange(sal_Int16 aEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue, sal_Int32 nValueIndex)
void SetAccessibleName(const OUString &rsName, StringOrigin eNameOrigin)
Base class for the various document views of the Draw and Impress applications.
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 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 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::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void Init()
Initialize a new object.
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 acquire() noexcept override
std::unique_ptr< ChildrenManager > mpChildrenManager
This object manages the shapes of the represented draw page.
virtual void SAL_CALL disposing() override
This method is called from the component helper base class while disposing.
virtual void implSelect(sal_Int64 nAccessibleChildIndex, bool bSelect) override
Select or deselect the specified child or all children if the given index has the special value ACCES...
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
This implementation returns either 1 or 0 depending on whether there is an active accessible OLE obje...
rtl::Reference< AccessiblePageShape > CreateDrawPageShape()
Create a shape the represents the page as seen on the screen.
virtual bool implIsSelected(sal_Int64 nAccessibleChildIndex) override
Return selection state of specified child.
virtual void ViewForwarderChanged() override
A view forwarder change is signalled for instance when any of the window events is received.
virtual OUString CreateAccessibleName() override
Create an accessible name that contains the current view mode.
virtual void SAL_CALL acquire() noexcept override
virtual void Activated() override
Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has ...
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
AccessibleDrawDocumentView(::sd::Window *pSdWindow, ::sd::ViewShell *pViewShell, const css::uno::Reference< css::frame::XController > &rxController, const css::uno::Reference< css::accessibility::XAccessible > &rxParent)
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &rEventObject) override
virtual OUString SAL_CALL getObjectLink(const css::uno::Any &accoject) override
virtual void Deactivated() override
Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has ...
virtual OUString SAL_CALL getAccessibleName() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getGroupPosition(const css::uno::Any &rAny) override
virtual void Init() override
Complete the initialization begun in the constructor.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 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 ...
A page shape represents the actual page as seen on the screen.
const css::uno::Reference< css::drawing::XShape > & GetXShape() const
css::uno::Reference< css::accessibility::XAccessible > GetChild(sal_Int64 nIndex)
static rtl::Reference< SlideShow > GetSlideShow(SdDrawDocument const *pDocument)
Definition: slideshow.cxx:157
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
::sd::View * GetView() const
Definition: ViewShell.hxx:144
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
Definition: viewshel.cxx:1397
DrawDocShell * GetDocSh() const
Definition: View.hxx:142
SdDrawDocument & GetDoc() const
Definition: View.hxx:293
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
int nCount
#define DBG_ASSERT(sCon, aError)
Reference< XSingleServiceFactory > xFactory
Sequence< OUString > aServiceNames
OUString sName
std::mutex m_aMutex
sal_Int32 nIndex
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
Reference< XComponentContext > getProcessComponentContext()
int i
#define SFX_TITLE_APINAME
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
bool hasValue()