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 SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
537 SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
538 sal_uLong nLineNum = 0;
539 SwTextFrame* pTextFrame = nullptr;
540 SwTextFrame* pCurrTextFrame = nullptr;
541 pTextFrame = static_cast< SwTextFrame* >(pCurrPage->ContainsContent());
542 if (pCurrFrame->IsInFly())//such as, graphic,chart
543 {
544 SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame();
545 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
546 RndStdIds eAnchorId = rAnchor.GetAnchorId();
547 if(eAnchorId == RndStdIds::FLY_AS_CHAR)
548 {
549 const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame();
550 if(pSwFrame->IsTextFrame())
551 pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSwFrame));
552 }
553 }
554 else
555 {
556 assert(dynamic_cast<SwTextFrame*>(pCurrFrame));
557 pCurrTextFrame = static_cast<SwTextFrame* >(pCurrFrame);
558 }
559 //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer
560 SwFrame* pFrame = pCurrTextFrame;
561 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
562 pFrame = pFrame->GetUpper();
563 if ( pFrame )
564 pCurrTextFrame = nullptr;
565 //check shape
566 if(pCursorShell->Imp()->GetDrawView())
567 {
568 const SdrMarkList &rMrkList = pCursorShell->Imp()->GetDrawView()->GetMarkedObjectList();
569 for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
570 {
571 SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
572 SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat();
573 const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
574 if( RndStdIds::FLY_AS_CHAR != rAnchor.GetAnchorId() )
575 pCurrTextFrame = nullptr;
576 }
577 }
578 //calculate line number
579 if (pCurrTextFrame && pTextFrame)
580 {
581 if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote()))
582 {
583 while( pTextFrame && pTextFrame != pCurrTextFrame )
584 {
585 //check header/footer
586 pFrame = pTextFrame;
587 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
588 pFrame = pFrame->GetUpper();
589 if ( pFrame )
590 {
591 pTextFrame = static_cast< SwTextFrame*>(pTextFrame->GetNextContentFrame());
592 continue;
593 }
594 if (!(pTextFrame->IsInTab() || pTextFrame->IsInFootnote() || pTextFrame->IsInFly()))
595 nLineNum += pTextFrame->GetThisLines();
596 pTextFrame = static_cast< SwTextFrame* >(pTextFrame ->GetNextContentFrame());
597 }
598 SwPaM* pCaret = pCursorShell->GetCursor();
599 if (!pCurrTextFrame->IsEmpty() && pCaret)
600 {
601 assert(pCurrTextFrame->IsTextFrame());
602 const SwPosition* pPoint = nullptr;
603 if (pCurrTextFrame->IsInFly())
604 {
605 SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame();
606 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
607 pPoint = rAnchor.GetContentAnchor();
608 SwContentNode *const pNode(pPoint->GetNode().GetContentNode());
609 pCurrTextFrame = pNode
610 ? static_cast<SwTextFrame*>(pNode->getLayoutFrame(
611 pCurrTextFrame->getRootFrame(), pPoint))
612 : nullptr;
613 }
614 else
615 pPoint = pCaret->GetPoint();
616 if (pCurrTextFrame)
617 {
618 TextFrameIndex const nActPos(pCurrTextFrame->MapModelToViewPos(*pPoint));
619 nLineNum += pCurrTextFrame->GetLineCount( nActPos );
620 }
621 }
622 else
623 ++nLineNum;
624 }
625 }
626
627 sValue += "line-number:" + OUString::number( nLineNum ) + ";";
628
629 SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
630
631 sValue += "column-number:";
632
633 int nCurrCol = 1;
634 if(pCurrCol!=nullptr)
635 {
636 //SwLayoutFrame* pParent = pCurrCol->GetUpper();
637 SwFrame* pCurrPageCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
638 while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrame())
639 {
640 pCurrPageCol = pCurrPageCol->GetUpper();
641 }
642
643 SwLayoutFrame* pParent = pCurrPageCol->GetUpper();
644
645 if(pParent!=nullptr)
646 {
647 SwFrame* pCol = pParent->Lower();
648 while(pCol&&(pCol!=pCurrPageCol))
649 {
650 pCol = pCol->GetNext();
651 ++nCurrCol;
652 }
653 }
654 }
655 sValue += OUString::number( nCurrCol ) + ";";
656
657 const SwFormatCol &rFormatCol=pCurrPage->GetAttrSet()->GetCol();
658 sal_uInt16 nColCount=rFormatCol.GetNumCols();
659 nColCount = nColCount>0?nColCount:1;
660 sValue += "total-columns:" + OUString::number( nColCount ) + ";";
661
662 SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame();
663 if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr )
664 {
665 OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName();
666
667 sectionName = sectionName.replaceFirst( "\\" , "\\\\" );
668 sectionName = sectionName.replaceFirst( "=" , "\\=" );
669 sectionName = sectionName.replaceFirst( ";" , "\\;" );
670 sectionName = sectionName.replaceFirst( "," , "\\," );
671 sectionName = sectionName.replaceFirst( ":" , "\\:" );
672
673 sValue += "section-name:" + sectionName + ";";
674
675 //section-columns-number
676
677 nCurrCol = 1;
678
679 if(pCurrCol!=nullptr)
680 {
681 SwLayoutFrame* pParent = pCurrCol->GetUpper();
682 if(pParent!=nullptr)
683 {
684 SwFrame* pCol = pParent->Lower();
685 while(pCol&&(pCol!=pCurrCol))
686 {
687 pCol = pCol->GetNext();
688 nCurrCol +=1;
689 }
690 }
691 }
692 sValue += "section-columns-number:" +
693 OUString::number( nCurrCol ) + ";";
694
695 //section-total-columns
696 const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol();
697 sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols();
698 nSctColCount = nSctColCount>0?nSctColCount:1;
699 sValue += "section-total-columns:" +
700 OUString::number( nSctColCount ) + ";";
701 }
702
703 anyAttribute <<= sValue;
704 }
705 return anyAttribute;
706}
707
709{
710 SolarMutexGuard aGuard;
711 return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
712}
713
714/* 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
WeakReference< XInterface > 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:708
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:103
void SetVisArea(const SwRect &rNewVisArea)
Definition: accframe.hxx:131
const SwRect & GetVisArea() const
Definition: accframe.hxx:136
const SwRect & GetVisArea() const
Definition: accmap.cxx:3433
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:58
SwContentFrame * GetNextContentFrame() const
Definition: cntfrm.hxx:119
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Definition: node.cxx:1230
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
Definition: crsrsh.cxx:2469
sal_uInt16 GetPageCnt()
Definition: crsrsh.cxx:1291
Definition: doc.hxx:194
SwDocShell * GetDocShell()
Definition: doc.hxx:1359
const OUString & getDocAccTitle() const
Definition: doc.hxx:564
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:2905
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:1234
SwFlyFrame * FindFlyFrame()
Definition: frame.hxx:1111
SwFrame * GetNext()
Definition: frame.hxx:676
bool IsPageFrame() const
Definition: frame.hxx:1178
bool IsInFootnote() const
Definition: frame.hxx:949
bool IsHeaderFrame() const
Definition: frame.hxx:1190
bool IsInTab() const
Definition: frame.hxx:955
bool IsInFly() const
Definition: frame.hxx:961
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
Definition: findfrm.cxx:731
bool IsFooterFrame() const
Definition: frame.hxx:1194
SwLayoutFrame * GetUpper()
Definition: frame.hxx:678
SwRootFrame * getRootFrame()
Definition: frame.hxx:679
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:70
const SwFrame * Lower() const
Definition: layfrm.hxx:101
SwContentNode * GetContentNode()
Definition: node.hxx:664
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:58
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SwSection * GetSection()
Definition: sectfrm.hxx:97
const OUString & GetSectionName() const
Definition: section.hxx:169
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:165
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:674
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
Definition: txtfrm.cxx:1267
sal_uInt16 GetLineCount(TextFrameIndex nPos)
Determines the line count.
Definition: txtfrm.cxx:3811
bool IsEmpty() const
Definition: txtfrm.hxx:527
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