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();
108 aEvent.IndexHint = -1;
110 }
111 }
112}
113
115{
116 SolarMutexGuard aGuard;
117
118 OSL_ENSURE( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" );
119 if( mpChildWin && pWin == mpChildWin )
120 {
121 AccessibleEventObject aEvent;
122 aEvent.EventId = AccessibleEventId::CHILD;
123 aEvent.OldValue <<= mpChildWin->GetAccessible();
124 aEvent.IndexHint = -1;
126
127 mpChildWin = nullptr;
128 }
129}
130
132{
133 SolarMutexGuard aGuard;
134
135 // ThrowIfDisposed is called by parent
136
137 sal_Int64 nChildren = SwAccessibleContext::getAccessibleChildCount();
138 if( !IsDisposing() && mpChildWin )
139 nChildren++;
140
141 return nChildren;
142}
143
144uno::Reference< XAccessible> SAL_CALL
146{
147 SolarMutexGuard aGuard;
148
149 if( mpChildWin )
150 {
152
153 if ( nIndex == GetChildCount( *(GetMap()) ) )
154 {
155 return mpChildWin->GetAccessible();
156 }
157 }
158
160}
161
162uno::Reference< XAccessible> SAL_CALL SwAccessibleDocumentBase::getAccessibleParent()
163{
164 return mxParent;
165}
166
168{
169 SolarMutexGuard aGuard;
170
171 uno::Reference < XAccessibleContext > xAcc( mxParent->getAccessibleContext() );
172 uno::Reference < XAccessible > xThis( this );
173 sal_Int64 nCount = xAcc->getAccessibleChildCount();
174
175 for( sal_Int64 i=0; i < nCount; i++ )
176 {
177 try
178 {
179 if( xAcc->getAccessibleChild( i ) == xThis )
180 return i;
181 }
182 catch(const css::lang::IndexOutOfBoundsException &)
183 {
184 return -1;
185 }
186 }
187 return -1;
188}
189
191{
192 return GetResource( STR_ACCESS_DOC_DESC );
193}
194
196{
198
199 OUString sAccName = GetResource( STR_ACCESS_DOC_WORDPROCESSING );
200 SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
201 if ( pDoc )
202 {
203 OUString sFileName = pDoc->getDocAccTitle();
204 if ( sFileName.isEmpty() )
205 {
206 SwDocShell* pDocSh = pDoc->GetDocShell();
207 if ( pDocSh )
208 {
209 sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
210 }
211 }
212
213 if ( !sFileName.isEmpty() )
214 {
215 sAccName = sFileName + " - " + sAccName;
216 }
217 }
218
219 return sAccName;
220}
221
222awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
223{
224 try
225 {
226 SolarMutexGuard aGuard;
227
228 vcl::Window *pWin = GetWindow();
229 if (!pWin)
230 {
231 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
232 }
233
235 awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
236 aPixBounds.GetWidth(), aPixBounds.GetHeight() );
237
238 return aBox;
239 }
240 catch(const css::lang::IndexOutOfBoundsException &)
241 {
242 return awt::Rectangle();
243 }
244}
245
247{
248 SolarMutexGuard aGuard;
249
250 vcl::Window *pWin = GetWindow();
251 if (!pWin)
252 {
253 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
254 }
255
257 awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
258
259 return aLoc;
260}
261
263{
264 SolarMutexGuard aGuard;
265
266 vcl::Window *pWin = GetWindow();
267 if (!pWin)
268 {
269 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
270 }
271
272 Point aPixPos( pWin->GetWindowExtentsAbsolute().TopLeft() );
273 awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
274
275 return aLoc;
276}
277
278css::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
279{
280 SolarMutexGuard aGuard;
281
282 vcl::Window *pWin = GetWindow();
283 if (!pWin)
284 {
285 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
286 }
287
288 Size aPixSize( pWin->GetWindowExtentsAbsolute().GetSize() );
289 awt::Size aSize( aPixSize.Width(), aPixSize.Height() );
290
291 return aSize;
292}
293
295 const awt::Point& aPoint )
296{
297 SolarMutexGuard aGuard;
298
299 vcl::Window *pWin = GetWindow();
300 if (!pWin)
301 {
302 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
303 }
304
305 tools::Rectangle aPixBounds( pWin->GetWindowExtentsAbsolute() );
306 aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top());
307
308 Point aPixPoint( aPoint.X, aPoint.Y );
309 return aPixBounds.Contains( aPixPoint );
310}
311
312uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAtPoint(
313 const awt::Point& aPoint )
314{
315 SolarMutexGuard aGuard;
316
317 if( mpChildWin )
318 {
320
321 vcl::Window *pWin = GetWindow();
322 if (!pWin)
323 {
324 throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this));
325 }
326 if (pWin->isDisposed()) // tdf#147967
327 return nullptr;
328
329 Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to window
330 if( mpChildWin->GetWindowExtentsRelative( *pWin ).Contains( aPixPoint ) )
331 return mpChildWin->GetAccessible();
332 }
333
335}
336
337// SwAccessibleDocument
338
339void SwAccessibleDocument::GetStates( sal_Int64& rStateSet )
340{
342
343 // MULTISELECTABLE
344 rStateSet |= AccessibleStateType::MULTI_SELECTABLE;
345 rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
346}
347
349 std::shared_ptr<SwAccessibleMap> const& pInitMap)
350 : SwAccessibleDocumentBase(pInitMap)
351 , maSelectionHelper(*this)
352{
353 SetName(pInitMap->GetDocName());
354 vcl::Window *pWin = pInitMap->GetShell()->GetWin();
355 if( pWin )
356 {
357 pWin->AddChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
358 sal_uInt16 nCount = pWin->GetChildCount();
359 for( sal_uInt16 i=0; i < nCount; i++ )
360 {
361 vcl::Window* pChildWin = pWin->GetChild( i );
362 if( pChildWin &&
363 AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
364 AddChild( pChildWin, false );
365 }
366 }
367}
368
370{
371 vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
372 if( pWin )
373 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
374}
375
376void SwAccessibleDocument::Dispose(bool bRecursive, bool bCanSkipInvisible)
377{
378 OSL_ENSURE( GetFrame() && GetMap(), "already disposed" );
379
380 vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
381 if( pWin )
382 pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
383 SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
384}
385
386IMPL_LINK( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
387{
388 OSL_ENSURE( rEvent.GetWindow(), "Window???" );
389 switch ( rEvent.GetId() )
390 {
391 case VclEventId::WindowShow: // send create on show for direct accessible children
392 {
393 vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
394 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
395 {
396 AddChild( pChildWin );
397 }
398 }
399 break;
400 case VclEventId::WindowHide: // send destroy on hide for direct accessible children
401 {
402 vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
403 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
404 {
405 RemoveChild( pChildWin );
406 }
407 }
408 break;
409 case VclEventId::ObjectDying: // send destroy on hide for direct accessible children
410 {
411 vcl::Window* pChildWin = rEvent.GetWindow();
412 if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
413 {
414 RemoveChild( pChildWin );
415 }
416 }
417 break;
418 default: break;
419 }
420}
421
423{
424 return sImplementationName;
425}
426
427sal_Bool SAL_CALL SwAccessibleDocument::supportsService(const OUString& sTestServiceName)
428{
429 return cppu::supportsService(this, sTestServiceName);
430}
431
432uno::Sequence< OUString > SAL_CALL SwAccessibleDocument::getSupportedServiceNames()
433{
435}
436
437// XInterface
438
440 const uno::Type& rType )
441{
442 uno::Any aRet;
444 {
445 uno::Reference<XAccessibleSelection> aSelect = this;
446 aRet <<= aSelect;
447 }
449 {
450 uno::Reference<XAccessibleExtendedAttributes> aAttribute = this;
451 aRet <<= aAttribute;
452 }
453 else
454 aRet = SwAccessibleContext::queryInterface( rType );
455 return aRet;
456}
457
458// XTypeProvider
459uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
460{
463 SwAccessibleDocumentBase::getTypes() ).getTypes();
464}
465
466uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleDocument::getImplementationId()
467{
468 return css::uno::Sequence<sal_Int8>();
469}
470
471// XAccessibleSelection
472
474 sal_Int64 nChildIndex )
475{
477}
478
480 sal_Int64 nChildIndex )
481{
483}
484
486{
487}
488
490{
492}
493
495{
497}
498
500 sal_Int64 nSelectedChildIndex )
501{
502 return maSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
503}
504
505// index has to be treated as global child index.
507 sal_Int64 nChildIndex )
508{
510}
511
513{
515
516 uno::Any anyAttribute;
517 SwDoc *pDoc = GetMap() ? GetShell()->GetDoc() : nullptr;
518
519 if (!pDoc)
520 return anyAttribute;
521 SwCursorShell* pCursorShell = GetCursorShell();
522 if( !pCursorShell )
523 return anyAttribute;
524
525 SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCursorShell);
526 if( pFEShell )
527 {
528 OUString sDisplay;
529 sal_uInt16 nPage, nLogPage;
530 pFEShell->GetPageNumber(-1,true,nPage,nLogPage,sDisplay);
531
532 OUString sValue = "page-name:" + sDisplay +
533 ";page-number:" +
534 OUString::number( nPage ) +
535 ";total-pages:" +
536 OUString::number( pCursorShell->GetPageCnt() ) + ";";
537
538 // cursor position relative to the page
539 Point aCursorPagePos = pFEShell->GetCursorPagePos();
540 sValue += "cursor-position-in-page-horizontal:" + OUString::number(aCursorPagePos.getX())
541 + ";cursor-position-in-page-vertical:" + OUString::number(aCursorPagePos.getY()) + ";";
542
543 SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
544 SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
545 sal_Int32 nLineNum = 0;
546 SwTextFrame* pTextFrame = nullptr;
547 SwTextFrame* pCurrTextFrame = nullptr;
548 pTextFrame = static_cast< SwTextFrame* >(pCurrPage->ContainsContent());
549 if (pCurrFrame->IsInFly())//such as, graphic,chart
550 {
551 SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame();
552 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
553 RndStdIds eAnchorId = rAnchor.GetAnchorId();
554 if(eAnchorId == RndStdIds::FLY_AS_CHAR)
555 {
556 const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame();
557 if(pSwFrame->IsTextFrame())
558 pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSwFrame));
559 }
560 }
561 else
562 {
563 assert(dynamic_cast<SwTextFrame*>(pCurrFrame));
564 pCurrTextFrame = static_cast<SwTextFrame* >(pCurrFrame);
565 }
566 //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer
567 SwFrame* pFrame = pCurrTextFrame;
568 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
569 pFrame = pFrame->GetUpper();
570 if ( pFrame )
571 pCurrTextFrame = nullptr;
572 //check shape
573 if(pCursorShell->Imp()->GetDrawView())
574 {
575 const SdrMarkList &rMrkList = pCursorShell->Imp()->GetDrawView()->GetMarkedObjectList();
576 for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
577 {
578 SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
579 SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat();
580 const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
581 if( RndStdIds::FLY_AS_CHAR != rAnchor.GetAnchorId() )
582 pCurrTextFrame = nullptr;
583 }
584 }
585 //calculate line number
586 if (pCurrTextFrame && pTextFrame)
587 {
588 if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote()))
589 {
590 while( pTextFrame && pTextFrame != pCurrTextFrame )
591 {
592 //check header/footer
593 pFrame = pTextFrame;
594 while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() )
595 pFrame = pFrame->GetUpper();
596 if ( pFrame )
597 {
598 pTextFrame = static_cast< SwTextFrame*>(pTextFrame->GetNextContentFrame());
599 continue;
600 }
601 if (!(pTextFrame->IsInTab() || pTextFrame->IsInFootnote() || pTextFrame->IsInFly()))
602 nLineNum += pTextFrame->GetThisLines();
603 pTextFrame = static_cast< SwTextFrame* >(pTextFrame ->GetNextContentFrame());
604 }
605 SwPaM* pCaret = pCursorShell->GetCursor();
606 if (!pCurrTextFrame->IsEmpty() && pCaret)
607 {
608 assert(pCurrTextFrame->IsTextFrame());
609 const SwPosition* pPoint = nullptr;
610 if (pCurrTextFrame->IsInFly())
611 {
612 SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame();
613 const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
614 pPoint = rAnchor.GetContentAnchor();
615 SwContentNode *const pNode(pPoint->GetNode().GetContentNode());
616 pCurrTextFrame = pNode
617 ? static_cast<SwTextFrame*>(pNode->getLayoutFrame(
618 pCurrTextFrame->getRootFrame(), pPoint))
619 : nullptr;
620 }
621 else
622 pPoint = pCaret->GetPoint();
623 if (pCurrTextFrame)
624 {
625 TextFrameIndex const nActPos(pCurrTextFrame->MapModelToViewPos(*pPoint));
626 nLineNum += pCurrTextFrame->GetLineCount( nActPos );
627 }
628 }
629 else
630 ++nLineNum;
631 }
632 }
633
634 sValue += "line-number:" + OUString::number( nLineNum ) + ";";
635
636 SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
637
638 sValue += "column-number:";
639
640 int nCurrCol = 1;
641 if(pCurrCol!=nullptr)
642 {
643 //SwLayoutFrame* pParent = pCurrCol->GetUpper();
644 SwFrame* pCurrPageCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
645 while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrame())
646 {
647 pCurrPageCol = pCurrPageCol->GetUpper();
648 }
649
650 SwLayoutFrame* pParent = pCurrPageCol->GetUpper();
651
652 if(pParent!=nullptr)
653 {
654 SwFrame* pCol = pParent->Lower();
655 while(pCol&&(pCol!=pCurrPageCol))
656 {
657 pCol = pCol->GetNext();
658 ++nCurrCol;
659 }
660 }
661 }
662 sValue += OUString::number( nCurrCol ) + ";";
663
664 const SwFormatCol &rFormatCol=pCurrPage->GetAttrSet()->GetCol();
665 sal_uInt16 nColCount=rFormatCol.GetNumCols();
666 nColCount = nColCount>0?nColCount:1;
667 sValue += "total-columns:" + OUString::number( nColCount ) + ";";
668
669 SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame();
670 if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr )
671 {
672 OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName();
673
674 sectionName = sectionName.replaceFirst( "\\" , "\\\\" );
675 sectionName = sectionName.replaceFirst( "=" , "\\=" );
676 sectionName = sectionName.replaceFirst( ";" , "\\;" );
677 sectionName = sectionName.replaceFirst( "," , "\\," );
678 sectionName = sectionName.replaceFirst( ":" , "\\:" );
679
680 sValue += "section-name:" + sectionName + ";";
681
682 //section-columns-number
683
684 nCurrCol = 1;
685
686 if(pCurrCol!=nullptr)
687 {
688 SwLayoutFrame* pParent = pCurrCol->GetUpper();
689 if(pParent!=nullptr)
690 {
691 SwFrame* pCol = pParent->Lower();
692 while(pCol&&(pCol!=pCurrCol))
693 {
694 pCol = pCol->GetNext();
695 nCurrCol +=1;
696 }
697 }
698 }
699 sValue += "section-columns-number:" +
700 OUString::number( nCurrCol ) + ";";
701
702 //section-total-columns
703 const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol();
704 sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols();
705 nSctColCount = nSctColCount>0?nSctColCount:1;
706 sValue += "section-total-columns:" +
707 OUString::number( nSctColCount ) + ";";
708 }
709
710 anyAttribute <<= sValue;
711 }
712 return anyAttribute;
713}
714
716{
717 SolarMutexGuard aGuard;
718 return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
719}
720
721/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sAccessibleServiceName
Definition: acccontext.hxx:42
IMPL_LINK(SwAccessibleDocument, WindowChildEventListener, VclWindowEvent &, rEvent, void)
Definition: accdoc.cxx:386
constexpr OUStringLiteral sServiceName
Definition: accdoc.cxx:54
constexpr OUStringLiteral sImplementationName
Definition: accdoc.cxx:55
unotools::WeakReference< AnimationNode > mxParent
AnyEventRef aEvent
constexpr tools::Long getX() const
constexpr tools::Long getY() const
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:573
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
Definition: acccontext.cxx:819
void SetName(const OUString &rName)
Definition: acccontext.hxx:99
void FireAccessibleEvent(css::accessibility::AccessibleEventObject &rEvent)
Definition: acccontext.cxx:441
bool IsDisposing() const
Definition: acccontext.hxx:109
virtual void GetStates(sal_Int64 &rStateSet)
Definition: acccontext.cxx:481
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:583
virtual OUString SAL_CALL getAccessibleName() override
Definition: accdoc.cxx:195
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:262
virtual css::awt::Point SAL_CALL getLocation() override
Definition: accdoc.cxx:246
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
Definition: accdoc.cxx:131
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
Definition: accdoc.cxx:312
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
Definition: accdoc.cxx:167
virtual ~SwAccessibleDocumentBase() override
Definition: accdoc.cxx:74
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
Definition: accdoc.cxx:294
virtual css::awt::Size SAL_CALL getSize() override
Definition: accdoc.cxx:278
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:162
virtual css::awt::Rectangle SAL_CALL getBounds() override
Definition: accdoc.cxx:222
void RemoveChild(vcl::Window *pWin)
Definition: accdoc.cxx:114
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:145
virtual OUString SAL_CALL getAccessibleDescription() override
Definition: accdoc.cxx:190
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:512
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:473
virtual ~SwAccessibleDocument() override
Definition: accdoc.cxx:369
virtual void SAL_CALL selectAllAccessibleChildren() override
Definition: accdoc.cxx:489
SwAccessibleDocument(std::shared_ptr< SwAccessibleMap > const &pInitMap)
Definition: accdoc.cxx:348
sal_Int32 SAL_CALL getBackground() override
Definition: accdoc.cxx:715
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true) override
Definition: accdoc.cxx:376
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
Definition: accdoc.cxx:494
virtual void SAL_CALL clearAccessibleSelection() override
Definition: accdoc.cxx:485
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: accdoc.cxx:439
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:479
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
Definition: accdoc.cxx:499
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: accdoc.cxx:459
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nChildIndex) override
Definition: accdoc.cxx:506
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
Definition: accdoc.cxx:427
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: accdoc.cxx:432
virtual void GetStates(sal_Int64 &rStateSet) override
Definition: accdoc.cxx:339
virtual OUString SAL_CALL getImplementationName() override
Definition: accdoc.cxx:422
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: accdoc.cxx:466
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:3408
SwViewShell * GetShell() const
Definition: accmap.hxx:173
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:1223
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
Point GetCursorPagePos() const
Definition: crsrsh.cxx:1443
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
Definition: crsrsh.cxx:2771
sal_uInt16 GetPageCnt()
Definition: crsrsh.cxx:1591
Definition: doc.hxx:197
SwDocShell * GetDocShell()
Definition: doc.hxx:1370
const OUString & getDocAccTitle() const
Definition: doc.hxx:569
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:3119
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:72
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:188
const SwPosition * GetPoint() const
Definition: pam.hxx:253
A page of the document layout.
Definition: pagefrm.hxx:60
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:168
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
Definition: txtfrm.cxx:1354
sal_Int32 GetLineCount(TextFrameIndex nPos)
Determines the line count.
Definition: txtfrm.cxx:3908
sal_Int32 GetThisLines() const
Definition: txtfrm.hxx:686
bool IsEmpty() const
Definition: txtfrm.hxx:539
SwDrawView * GetDrawView()
Definition: viewimp.hxx:164
SwViewShellImp * Imp()
Definition: viewsh.hxx:211
vcl::Window * GetWin() const
Definition: viewsh.hxx:364
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
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
tools::Rectangle GetWindowExtentsAbsolute() const
sal_uInt16 GetAccessibleRole() const
sal_uInt16 GetChildCount() const
vcl::Window * GetAccessibleParentWindow() const
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
tools::Rectangle GetWindowExtentsRelative(const vcl::Window &rRelativeWindow) const
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
Marks a position in the document model.
Definition: pam.hxx:38
SwNode & GetNode() const
Definition: pam.hxx:81
RndStdIds
#define SW_MOD()
Definition: swmodule.hxx:254
unsigned char sal_Bool