LibreOffice Module sw (master) 1
accdoc.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 <vcl/window.hxx>
21#include <rootfrm.hxx>
22
23#include <com/sun/star/accessibility/AccessibleRole.hpp>
24#include <com/sun/star/accessibility/AccessibleStateType.hpp>
25#include <com/sun/star/accessibility/AccessibleEventId.hpp>
26#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
28#include <vcl/svapp.hxx>
30#include <viewsh.hxx>
31#include <doc.hxx>
32#include <accmap.hxx>
33#include "accdoc.hxx"
34#include <strings.hrc>
35#include <pagefrm.hxx>
36
37#include <swatrset.hxx>
38#include <docsh.hxx>
39#include <crsrsh.hxx>
40#include <fesh.hxx>
41#include <fmtclds.hxx>
42#include <flyfrm.hxx>
43#include <txtfrm.hxx>
44#include <sectfrm.hxx>
45#include <section.hxx>
46#include <swmodule.hxx>
47#include <svtools/colorcfg.hxx>
48
49#include <fmtanchr.hxx>
50#include <viewimp.hxx>
51#include <dview.hxx>
52#include <dcontact.hxx>
53#include <svx/svdmark.hxx>
54constexpr OUStringLiteral sServiceName = u"com.sun.star.text.AccessibleTextDocumentView";
55constexpr OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleDocumentView";
56
57using namespace ::com::sun::star;
58using namespace ::com::sun::star::accessibility;
59
60using lang::IndexOutOfBoundsException;
61
62// SwAccessibleDocumentBase: base class for SwAccessibleDocument and
63// SwAccessiblePreview
64
66 std::shared_ptr<SwAccessibleMap> const& pMap)
67 : SwAccessibleContext(pMap, AccessibleRole::DOCUMENT_TEXT,
68 pMap->GetShell()->GetLayout())
69 , mxParent(pMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible())
70 , mpChildWin(nullptr)
71{
72}
73
75{
76}
77
79{
80 SolarMutexGuard aGuard;
81
82 SwRect aOldVisArea( GetVisArea() );
83 const SwRect& rNewVisArea = GetMap()->GetVisArea();
84 if( aOldVisArea != rNewVisArea )
85 {
87 // #i58139# - showing state of document view needs also be updated.
88 // Thus, call method <Scrolled(..)> instead of <ChildrenScrolled(..)>
89 // ChildrenScrolled( GetFrame(), aOldVisArea );
90 Scrolled( aOldVisArea );
91 }
92}
93
94void SwAccessibleDocumentBase::AddChild( vcl::Window *pWin, bool bFireEvent )
95{
96 SolarMutexGuard aGuard;
97
98 OSL_ENSURE( !mpChildWin, "only one child window is supported" );
99 if( !mpChildWin )
100 {
101 mpChildWin = pWin;
102
103 if( bFireEvent )
104 {
105 AccessibleEventObject aEvent;
106 aEvent.EventId = AccessibleEventId::CHILD;
107 aEvent.NewValue <<= mpChildWin->GetAccessible();
109 }
110 }
111}
112
114{
115 SolarMutexGuard aGuard;
116
117 OSL_ENSURE( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" );
118 if( mpChildWin && pWin == mpChildWin )
119 {
120 AccessibleEventObject aEvent;
121 aEvent.EventId = AccessibleEventId::CHILD;
122 aEvent.OldValue <<= mpChildWin->GetAccessible();
124
125 mpChildWin = nullptr;
126 }
127}
128
130{
131 SolarMutexGuard aGuard;
132
133 // ThrowIfDisposed is called by parent
134
135 sal_Int64 nChildren = SwAccessibleContext::getAccessibleChildCount();
136 if( !IsDisposing() && mpChildWin )
137 nChildren++;
138
139 return nChildren;
140}
141
142uno::Reference< XAccessible> SAL_CALL
144{
145 SolarMutexGuard aGuard;
146
147 if( mpChildWin )
148 {
150
151 if ( nIndex == GetChildCount( *(GetMap()) ) )
152 {
153 return mpChildWin->GetAccessible();
154 }
155 }
156
158}
159
160uno::Reference< XAccessible> SAL_CALL SwAccessibleDocumentBase::getAccessibleParent()
161{
162 return mxParent;
163}
164
166{
167 SolarMutexGuard aGuard;
168
169 uno::Reference < XAccessibleContext > xAcc( mxParent->getAccessibleContext() );
170 uno::Reference < XAccessible > xThis( this );
171 sal_Int64 nCount = xAcc->getAccessibleChildCount();
172
173 for( sal_Int64 i=0; i < nCount; i++ )
174 {
175 try
176 {
177 if( xAcc->getAccessibleChild( i ) == xThis )
178 return i;
179 }
180 catch(const css::lang::IndexOutOfBoundsException &)
181 {
182 return -1;
183 }
184 }
185 return -1;
186}
187
189{
190 return GetResource( STR_ACCESS_DOC_DESC );
191}
192
194{
196
197 OUString sAccName = GetResource( STR_ACCESS_DOC_WORDPROCESSING );
198 SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
199 if ( pDoc )
200 {
201 OUString sFileName = pDoc->getDocAccTitle();
202 if ( sFileName.isEmpty() )
203 {
204 SwDocShell* pDocSh = pDoc->GetDocShell();
205 if ( pDocSh )
206 {
207 sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
208 }
209 }
210
211 if ( !sFileName.isEmpty() )
212 {
213 sAccName = sFileName + " - " + sAccName;
214 }
215 }
216
217 return sAccName;
218}
219
220awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
221{
222 try
223 {
224 SolarMutexGuard aGuard;
225
226 vcl::Window *pWin = GetWindow();
227 if (!pWin)
228 {
229 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
230 }
231
233 awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
234 aPixBounds.GetWidth(), aPixBounds.GetHeight() );
235
236 return aBox;
237 }
238 catch(const css::lang::IndexOutOfBoundsException &)
239 {
240 return awt::Rectangle();
241 }
242}
243
245{
246 SolarMutexGuard aGuard;
247
248 vcl::Window *pWin = GetWindow();
249 if (!pWin)
250 {
251 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
252 }
253
255 awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
256
257 return aLoc;
258}
259
261{
262 SolarMutexGuard aGuard;
263
264 vcl::Window *pWin = GetWindow();
265 if (!pWin)
266 {
267 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
268 }
269
270 Point aPixPos( pWin->GetWindowExtentsRelative( nullptr ).TopLeft() );
271 awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
272
273 return aLoc;
274}
275
276css::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
277{
278 SolarMutexGuard aGuard;
279
280 vcl::Window *pWin = GetWindow();
281 if (!pWin)
282 {
283 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
284 }
285
286 Size aPixSize( pWin->GetWindowExtentsRelative( nullptr ).GetSize() );
287 awt::Size aSize( aPixSize.Width(), aPixSize.Height() );
288
289 return aSize;
290}
291
293 const awt::Point& aPoint )
294{
295 SolarMutexGuard aGuard;
296
297 vcl::Window *pWin = GetWindow();
298 if (!pWin)
299 {
300 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
301 }
302
303 tools::Rectangle aPixBounds( pWin->GetWindowExtentsRelative( nullptr ) );
304 aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top());
305
306 Point aPixPoint( aPoint.X, aPoint.Y );
307 return aPixBounds.Contains( aPixPoint );
308}
309
310uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAtPoint(
311 const awt::Point& aPoint )
312{
313 SolarMutexGuard aGuard;
314
315 if( mpChildWin )
316 {
318
319 vcl::Window *pWin = GetWindow();
320 if (!pWin)
321 {
322 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
323 }
324 if (pWin->isDisposed()) // tdf#147967
325 return nullptr;
326
327 Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to window
328 if( mpChildWin->GetWindowExtentsRelative( pWin ).Contains( aPixPoint ) )
329 return mpChildWin->GetAccessible();
330 }
331
333}
334
335// SwAccessibleDocument
336
337void SwAccessibleDocument::GetStates( sal_Int64& rStateSet )
338{
340
341 // MULTISELECTABLE
342 rStateSet |= AccessibleStateType::MULTI_SELECTABLE;
343 rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
344}
345
347 std::shared_ptr<SwAccessibleMap> const& pInitMap)
348 : SwAccessibleDocumentBase(pInitMap)
349 , maSelectionHelper(*this)
350{
351 SetName(pInitMap->GetDocName());
352 vcl::Window *pWin = pInitMap->GetShell()->GetWin();
353 if( pWin )
354 {
355 pWin->AddChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
356 sal_uInt16 nCount = pWin->GetChildCount();
357 for( sal_uInt16 i=0; i < nCount; i++ )
358 {
359 vcl::Window* pChildWin = pWin->GetChild( i );
360 if( pChildWin &&
361 AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
362 AddChild( pChildWin, false );
363 }
364 }
365}
366
368{
369 vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
370 if( pWin )
371 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
372}
373
374void SwAccessibleDocument::Dispose(bool bRecursive, bool bCanSkipInvisible)
375{
376 OSL_ENSURE( GetFrame() && GetMap(), "already disposed" );
377
378 vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
379 if( pWin )
380 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
381 SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
382}
383
384IMPL_LINK( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
385{
386 OSL_ENSURE( rEvent.GetWindow(), "Window???" );
387 switch ( rEvent.GetId() )
388 {
389 case VclEventId::WindowShow: // send create on show for direct accessible children
390 {
391 vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
392 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
393 {
394 AddChild( pChildWin );
395 }
396 }
397 break;
398 case VclEventId::WindowHide: // send destroy on hide for direct accessible children
399 {
400 vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
401 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
402 {
403 RemoveChild( pChildWin );
404 }
405 }
406 break;
407 case VclEventId::ObjectDying: // send destroy on hide for direct accessible children
408 {
409 vcl::Window* pChildWin = rEvent.GetWindow();
410 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
411 {
412 RemoveChild( pChildWin );
413 }
414 }
415 break;
416 default: break;
417 }
418}
419
421{
422 return sImplementationName;
423}
424
425sal_Bool SAL_CALL SwAccessibleDocument::supportsService(const OUString& sTestServiceName)
426{
427 return cppu::supportsService(this, sTestServiceName);
428}
429
430uno::Sequence< OUString > SAL_CALL SwAccessibleDocument::getSupportedServiceNames()
431{
433}
434
435// XInterface
436
438 const uno::Type& rType )
439{
440 uno::Any aRet;
442 {
443 uno::Reference<XAccessibleSelection> aSelect = this;
444 aRet <<= aSelect;
445 }
447 {
448 uno::Reference<XAccessibleExtendedAttributes> aAttribute = this;
449 aRet <<= aAttribute;
450 }
451 else
452 aRet = SwAccessibleContext::queryInterface( rType );
453 return aRet;
454}
455
456// XTypeProvider
457uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
458{
461 SwAccessibleDocumentBase::getTypes() ).getTypes();
462}
463
464uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleDocument::getImplementationId()
465{
466 return css::uno::Sequence<sal_Int8>();
467}
468
469// XAccessibleSelection
470
472 sal_Int64 nChildIndex )
473{
475}
476
478 sal_Int64 nChildIndex )
479{
481}
482
484{
485}
486
488{
490}
491
493{
495}
496
498 sal_Int64 nSelectedChildIndex )
499{
500 return maSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
501}
502
503// index has to be treated as global child index.
505 sal_Int64 nChildIndex )
506{
508}
509
511{
513
514 uno::Any anyAttribute;
515 SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
516
517 if (!pDoc)
518 return anyAttribute;
519 SwCursorShell* pCursorShell = GetCursorShell();
520 if( !pCursorShell )
521 return anyAttribute;
522
523 SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCursorShell);
524 if( pFEShell )
525 {
526 OUString sDisplay;
527 sal_uInt16 nPage, nLogPage;
528 pFEShell->GetPageNumber(-1,true,nPage,nLogPage,sDisplay);
529
530 OUString sValue = "page-name:" + sDisplay +
531 ";page-number:" +
532 OUString::number( nPage ) +
533 ";total-pages:" +
534 OUString::number( pCursorShell->GetPageCnt() ) + ";";
535
536 // cursor position relative to the page
537 Point aCursorPagePos = pFEShell->GetCursorPagePos();
538 sValue += "cursor-position-in-page-horizontal:" + OUString::number(aCursorPagePos.getX())
539 + ";cursor-position-in-page-vertical:" + OUString::number(aCursorPagePos.getY()) + ";";
540
541 SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
542 SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
543 sal_uLong nLineNum = 0;
544 SwTextFrame* pTextFrame = nullptr;
545 SwTextFrame* pCurrTextFrame = nullptr;
546 pTextFrame = static_cast< SwTextFrame* >(pCurrPage->ContainsContent());
547 if (pCurrFrame->IsInFly())//such as, graphic,chart
548 {
549 SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame();
550 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
551 RndStdIds eAnchorId = rAnchor.GetAnchorId();
552 if(eAnchorId == RndStdIds::FLY_AS_CHAR)
553 {
554 const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame();
555 if(pSwFrame->IsTextFrame())
556 pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSwFrame));
557 }
558 }
559 else
560 {
561 assert(dynamic_cast<SwTextFrame*>(pCurrFrame));
562 pCurrTextFrame = static_cast<SwTextFrame* >(pCurrFrame);
563 }
564 //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer
565 SwFrame* pFrame = pCurrTextFrame;
566 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
567 pFrame = pFrame->GetUpper();
568 if ( pFrame )
569 pCurrTextFrame = nullptr;
570 //check shape
571 if(pCursorShell->Imp()->GetDrawView())
572 {
573 const SdrMarkList &rMrkList = pCursorShell->Imp()->GetDrawView()->GetMarkedObjectList();
574 for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
575 {
576 SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
577 SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat();
578 const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
579 if( RndStdIds::FLY_AS_CHAR != rAnchor.GetAnchorId() )
580 pCurrTextFrame = nullptr;
581 }
582 }
583 //calculate line number
584 if (pCurrTextFrame && pTextFrame)
585 {
586 if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote()))
587 {
588 while( pTextFrame && pTextFrame != pCurrTextFrame )
589 {
590 //check header/footer
591 pFrame = pTextFrame;
592 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
593 pFrame = pFrame->GetUpper();
594 if ( pFrame )
595 {
596 pTextFrame = static_cast< SwTextFrame*>(pTextFrame->GetNextContentFrame());
597 continue;
598 }
599 if (!(pTextFrame->IsInTab() || pTextFrame->IsInFootnote() || pTextFrame->IsInFly()))
600 nLineNum += pTextFrame->GetThisLines();
601 pTextFrame = static_cast< SwTextFrame* >(pTextFrame ->GetNextContentFrame());
602 }
603 SwPaM* pCaret = pCursorShell->GetCursor();
604 if (!pCurrTextFrame->IsEmpty() && pCaret)
605 {
606 assert(pCurrTextFrame->IsTextFrame());
607 const SwPosition* pPoint = nullptr;
608 if (pCurrTextFrame->IsInFly())
609 {
610 SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame();
611 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
612 pPoint = rAnchor.GetContentAnchor();
613 SwContentNode *const pNode(pPoint->GetNode().GetContentNode());
614 pCurrTextFrame = pNode
615 ? static_cast<SwTextFrame*>(pNode->getLayoutFrame(
616 pCurrTextFrame->getRootFrame(), pPoint))
617 : nullptr;
618 }
619 else
620 pPoint = pCaret->GetPoint();
621 if (pCurrTextFrame)
622 {
623 TextFrameIndex const nActPos(pCurrTextFrame->MapModelToViewPos(*pPoint));
624 nLineNum += pCurrTextFrame->GetLineCount( nActPos );
625 }
626 }
627 else
628 ++nLineNum;
629 }
630 }
631
632 sValue += "line-number:" + OUString::number( nLineNum ) + ";";
633
634 SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
635
636 sValue += "column-number:";
637
638 int nCurrCol = 1;
639 if(pCurrCol!=nullptr)
640 {
641 //SwLayoutFrame* pParent = pCurrCol->GetUpper();
642 SwFrame* pCurrPageCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
643 while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrame())
644 {
645 pCurrPageCol = pCurrPageCol->GetUpper();
646 }
647
648 SwLayoutFrame* pParent = pCurrPageCol->GetUpper();
649
650 if(pParent!=nullptr)
651 {
652 SwFrame* pCol = pParent->Lower();
653 while(pCol&&(pCol!=pCurrPageCol))
654 {
655 pCol = pCol->GetNext();
656 ++nCurrCol;
657 }
658 }
659 }
660 sValue += OUString::number( nCurrCol ) + ";";
661
662 const SwFormatCol &rFormatCol=pCurrPage->GetAttrSet()->GetCol();
663 sal_uInt16 nColCount=rFormatCol.GetNumCols();
664 nColCount = nColCount>0?nColCount:1;
665 sValue += "total-columns:" + OUString::number( nColCount ) + ";";
666
667 SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame();
668 if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr )
669 {
670 OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName();
671
672 sectionName = sectionName.replaceFirst( "\\" , "\\\\" );
673 sectionName = sectionName.replaceFirst( "=" , "\\=" );
674 sectionName = sectionName.replaceFirst( ";" , "\\;" );
675 sectionName = sectionName.replaceFirst( "," , "\\," );
676 sectionName = sectionName.replaceFirst( ":" , "\\:" );
677
678 sValue += "section-name:" + sectionName + ";";
679
680 //section-columns-number
681
682 nCurrCol = 1;
683
684 if(pCurrCol!=nullptr)
685 {
686 SwLayoutFrame* pParent = pCurrCol->GetUpper();
687 if(pParent!=nullptr)
688 {
689 SwFrame* pCol = pParent->Lower();
690 while(pCol&&(pCol!=pCurrCol))
691 {
692 pCol = pCol->GetNext();
693 nCurrCol +=1;
694 }
695 }
696 }
697 sValue += "section-columns-number:" +
698 OUString::number( nCurrCol ) + ";";
699
700 //section-total-columns
701 const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol();
702 sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols();
703 nSctColCount = nSctColCount>0?nSctColCount:1;
704 sValue += "section-total-columns:" +
705 OUString::number( nSctColCount ) + ";";
706 }
707
708 anyAttribute <<= sValue;
709 }
710 return anyAttribute;
711}
712
714{
715 SolarMutexGuard aGuard;
716 return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
717}
718
719/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sAccessibleServiceName
Definition: acccontext.hxx:42
IMPL_LINK(SwAccessibleDocument, WindowChildEventListener, VclWindowEvent &, rEvent, void)
Definition: accdoc.cxx:384
constexpr OUStringLiteral sServiceName
Definition: accdoc.cxx:54
constexpr OUStringLiteral sImplementationName
Definition: accdoc.cxx:55
unotools::WeakReference< AnimationNode > mxParent
AnyEventRef aEvent
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
SdrObjUserCall * GetUserCall() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true)
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Definition: acccontext.cxx:567
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
Definition: acccontext.cxx:813
void SetName(const OUString &rName)
Definition: acccontext.hxx:99
void FireAccessibleEvent(css::accessibility::AccessibleEventObject &rEvent)
Definition: acccontext.cxx:440
bool IsDisposing() const
Definition: acccontext.hxx:109
virtual void GetStates(sal_Int64 &rStateSet)
Definition: acccontext.cxx:480
vcl::Window * GetWindow()
Definition: acccontext.cxx:80
SwAccessibleMap * GetMap()
Definition: acccontext.hxx:112
SwCursorShell * GetCursorShell()
convenience method to get SwCursorShell through accessibility map
Definition: acccontext.cxx:98
void Scrolled(const SwRect &rOldVisArea)
Definition: acccontext.cxx:261
static OUString GetResource(TranslateId pResId, const OUString *pArg1=nullptr, const OUString *pArg2=nullptr)
SwViewShell * GetShell()
convenience method to get the SwViewShell through accessibility map
Definition: acccontext.hxx:116
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Definition: acccontext.cxx:577
virtual OUString SAL_CALL getAccessibleName() override
Definition: accdoc.cxx:193
css::uno::Reference< css::accessibility::XAccessible > mxParent
Definition: accdoc.hxx:32
void AddChild(vcl::Window *pWin, bool bFireEvent=true)
Definition: accdoc.cxx:94
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
Definition: accdoc.cxx:260
virtual css::awt::Point SAL_CALL getLocation() override
Definition: accdoc.cxx:244
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Definition: accdoc.cxx:129
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
Definition: accdoc.cxx:310
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Definition: accdoc.cxx:165
virtual ~SwAccessibleDocumentBase() override
Definition: accdoc.cxx:74
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
Definition: accdoc.cxx:292
virtual css::awt::Size SAL_CALL getSize() override
Definition: accdoc.cxx:276
SwAccessibleDocumentBase(std::shared_ptr< SwAccessibleMap > const &pInitMap)
Definition: accdoc.cxx:65
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
Definition: accdoc.cxx:160
virtual css::awt::Rectangle SAL_CALL getBounds() override
Definition: accdoc.cxx:220
void RemoveChild(vcl::Window *pWin)
Definition: accdoc.cxx:113
VclPtr< vcl::Window > mpChildWin
Definition: accdoc.hxx:34
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
Definition: accdoc.cxx:143
virtual OUString SAL_CALL getAccessibleDescription() override
Definition: accdoc.cxx:188
access to an accessible Writer document
Definition: accdoc.hxx:95
SwAccessibleSelectionHelper maSelectionHelper
Definition: accdoc.hxx:97
virtual css::uno::Any SAL_CALL getExtendedAttributes() override
Definition: accdoc.cxx:510
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:471
virtual ~SwAccessibleDocument() override
Definition: accdoc.cxx:367
virtual void SAL_CALL selectAllAccessibleChildren() override
Definition: accdoc.cxx:487
SwAccessibleDocument(std::shared_ptr< SwAccessibleMap > const &pInitMap)
Definition: accdoc.cxx:346
sal_Int32 SAL_CALL getBackground() override
Definition: accdoc.cxx:713
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true) override
Definition: accdoc.cxx:374
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
Definition: accdoc.cxx:492
virtual void SAL_CALL clearAccessibleSelection() override
Definition: accdoc.cxx:483
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: accdoc.cxx:437
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:477
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
Definition: accdoc.cxx:497
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: accdoc.cxx:457
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:504
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
Definition: accdoc.cxx:425
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: accdoc.cxx:430
virtual void GetStates(sal_Int64 &rStateSet) override
Definition: accdoc.cxx:337
virtual OUString SAL_CALL getImplementationName() override
Definition: accdoc.cxx:420
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: accdoc.cxx:464
static sal_Int32 GetChildCount(SwAccessibleMap &rAccMap, const SwRect &rVisArea, const SwFrame *pFrame, bool bInPagePreviewr)
Definition: accframe.cxx:41
const SwFrame * GetFrame() const
Definition: accframe.hxx:102
void SetVisArea(const SwRect &rNewVisArea)
Definition: accframe.hxx:130
const SwRect & GetVisArea() const
Definition: accframe.hxx:135
const SwRect & GetVisArea() const
Definition: accmap.cxx:3444
SwViewShell * GetShell() const
Definition: accmap.hxx:174
bool isAccessibleChildSelected(sal_Int64 nChildIndex)
void selectAccessibleChild(sal_Int64 nChildIndex)
css::uno::Reference< css::accessibility::XAccessible > getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex)
void deselectAccessibleChild(sal_Int64 nChildIndex)
const SwFrame * GetAnchorFrame() const
const SwFormatCol & GetCol(bool=true) const
Definition: fmtclds.hxx:165
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
SwContentFrame * GetNextContentFrame() const
Definition: cntfrm.hxx:120
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Definition: node.cxx:1225
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
Point GetCursorPagePos() const
Definition: crsrsh.cxx:1171
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
Definition: crsrsh.cxx:2497
sal_uInt16 GetPageCnt()
Definition: crsrsh.cxx:1319
Definition: doc.hxx:195
SwDocShell * GetDocShell()
Definition: doc.hxx:1364
const OUString & getDocAccTitle() const
Definition: doc.hxx:567
ContactObject for connection of formats as representatives of draw objects in SwClient and the object...
Definition: dcontact.hxx:305
sal_uInt16 GetPageNumber(const Point &rPoint) const
Page number of the page containing Point, O if no page.
Definition: fews.cxx:185
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:3058
FlyAnchors.
Definition: fmtanchr.hxx:37
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:67
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:74
sal_uInt16 GetNumCols() const
Definition: fmtclds.hxx:114
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:88
Style of a layout element.
Definition: frmfmt.hxx:62
Base class of the Writer layout elements.
Definition: frame.hxx:315
bool IsTextFrame() const
Definition: frame.hxx:1240
SwFlyFrame * FindFlyFrame()
Definition: frame.hxx:1117
SwFrame * GetNext()
Definition: frame.hxx:682
bool IsPageFrame() const
Definition: frame.hxx:1184
bool IsInFootnote() const
Definition: frame.hxx:955
bool IsHeaderFrame() const
Definition: frame.hxx:1196
bool IsInTab() const
Definition: frame.hxx:961
bool IsInFly() const
Definition: frame.hxx:967
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
Definition: findfrm.cxx:762
bool IsFooterFrame() const
Definition: frame.hxx:1200
SwLayoutFrame * GetUpper()
Definition: frame.hxx:684
SwRootFrame * getRootFrame()
Definition: frame.hxx:685
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
Definition: layfrm.hxx:36
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
Definition: findfrm.cxx:72
const SwFrame * Lower() const
Definition: layfrm.hxx:101
SwContentNode * GetContentNode()
Definition: node.hxx:666
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:187
const SwPosition * GetPoint() const
Definition: pam.hxx:261
A page of the document layout.
Definition: pagefrm.hxx:59
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SwSection * GetSection()
Definition: sectfrm.hxx:97
const OUString & GetSectionName() const
Definition: section.hxx:171
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:166
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:678
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
Definition: txtfrm.cxx:1267
sal_uInt16 GetLineCount(TextFrameIndex nPos)
Determines the line count.
Definition: txtfrm.cxx:3836
bool IsEmpty() const
Definition: txtfrm.hxx:531
SwDrawView * GetDrawView()
Definition: viewimp.hxx:164
SwViewShellImp * Imp()
Definition: viewsh.hxx:190
vcl::Window * GetWin() const
Definition: viewsh.hxx:346
SwDoc * GetDoc() const
Definition: viewsh.hxx:290
bool isDisposed() const
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
constexpr tools::Long GetWidth() const
bool Contains(const Point &rPOINT) const
constexpr tools::Long Top() const
constexpr Point TopLeft() const
constexpr Size GetSize() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
constexpr tools::Long GetHeight() const
constexpr tools::Long Left() const
sal_uInt16 GetAccessibleRole() const
sal_uInt16 GetChildCount() const
vcl::Window * GetAccessibleParentWindow() const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
vcl::Window * GetChild(sal_uInt16 nChild) const
int nCount
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
float u
const char sDisplay[]
sal_Int32 nIndex
Shell * GetShell()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
#define SFX_TITLE_APINAME
sal_uIntPtr sal_uLong
Marks a position in the document model.
Definition: pam.hxx:37
SwNode & GetNode() const
Definition: pam.hxx:80
RndStdIds
#define SW_MOD()
Definition: swmodule.hxx:256
unsigned char sal_Bool