28#include <unordered_map>
61#include <com/sun/star/accessibility/AccessibleEventId.hpp>
62#include <com/sun/star/accessibility/AccessibleStateType.hpp>
63#include <com/sun/star/accessibility/AccessibleRole.hpp>
64#include <com/sun/star/beans/XPropertySet.hpp>
65#include <com/sun/star/document/XShapeEventBroadcaster.hpp>
91 typedef std::pair<const key_type,mapped_type>
value_type;
92 typedef std::unordered_map<key_type, mapped_type>::iterator
iterator;
93 typedef std::unordered_map<key_type, mapped_type>::const_iterator
const_iterator;
95 std::unordered_map <key_type, mapped_type>
maMap;
98#if OSL_DEBUG_LEVEL > 0
103#if OSL_DEBUG_LEVEL > 0
113 template<
class... Args>
114 std::pair<iterator,bool>
emplace(Args&&... args) {
return maMap.emplace(std::forward<Args>(
args)...); }
120class SwDrawModellListener_Impl :
public SfxListener,
121 public ::cppu::WeakImplHelper< document::XShapeEventBroadcaster >
123 mutable std::mutex maListenerMutex;
125 std::unordered_multimap<css::uno::Reference< css::drawing::XShape >, css::uno::Reference< css::document::XShapeEventListener >> maShapeListeners;
128 virtual ~SwDrawModellListener_Impl()
override;
131 explicit SwDrawModellListener_Impl(
SdrModel *pDrawModel );
134 virtual void SAL_CALL addEventListener(
const uno::Reference< document::XEventListener >& xListener )
override;
135 virtual void SAL_CALL removeEventListener(
const uno::Reference< document::XEventListener >& xListener )
override;
137 virtual void SAL_CALL addShapeEventListener(
const css::uno::Reference< css::drawing::XShape >& xShape,
const css::uno::Reference< css::document::XShapeEventListener >& xListener )
override;
138 virtual void SAL_CALL removeShapeEventListener(
const css::uno::Reference< css::drawing::XShape >& xShape,
const css::uno::Reference< css::document::XShapeEventListener >& xListener )
override;
146SwDrawModellListener_Impl::SwDrawModellListener_Impl(
SdrModel *pDrawModel ) :
147 mpDrawModel( pDrawModel )
152SwDrawModellListener_Impl::~SwDrawModellListener_Impl()
157void SAL_CALL SwDrawModellListener_Impl::addEventListener(
const uno::Reference< document::XEventListener >& xListener )
159 std::unique_lock g(maListenerMutex);
160 maEventListeners.addInterface( g, xListener );
163void SAL_CALL SwDrawModellListener_Impl::removeEventListener(
const uno::Reference< document::XEventListener >& xListener )
165 std::unique_lock g(maListenerMutex);
166 maEventListeners.removeInterface( g, xListener );
169void SAL_CALL SwDrawModellListener_Impl::addShapeEventListener(
170 const css::uno::Reference< css::drawing::XShape >& xShape,
171 const uno::Reference< document::XShapeEventListener >& xListener )
173 assert(xShape.is() &&
"no shape?");
174 std::unique_lock aGuard(maListenerMutex);
175 maShapeListeners.emplace(xShape, xListener);
178void SAL_CALL SwDrawModellListener_Impl::removeShapeEventListener(
179 const css::uno::Reference< css::drawing::XShape >& xShape,
180 const uno::Reference< document::XShapeEventListener >& xListener )
182 std::unique_lock aGuard(maListenerMutex);
183 auto [itBegin, itEnd] = maShapeListeners.equal_range(xShape);
184 for (
auto it = itBegin; it != itEnd; ++it)
185 if (it->second == xListener)
187 maShapeListeners.erase(it);
197 if (rHint.
GetId() != SfxHintId::ThisIsAnSdrHint)
209 OSL_ENSURE( mpDrawModel,
"draw model listener is disposed" );
213 document::EventObject
aEvent;
218 std::unique_lock g(maListenerMutex);
221 while( aIter.hasMoreElements() )
225 aIter.next()->notifyEvent( aEvent );
227 catch( uno::RuntimeException
const & )
235 if (pSdrHint->
GetKind() == SdrHintKind::ObjectChange)
238 uno::Reference<drawing::XShape> xShape(pSdrObject->getUnoShape(), uno::UNO_QUERY);
239 std::unique_lock aGuard(maListenerMutex);
240 auto [itBegin, itEnd] = maShapeListeners.equal_range(xShape);
241 for (
auto it = itBegin; it != itEnd; ++it)
242 it->second->notifyShapeEvent(aEvent);
246void SwDrawModellListener_Impl::Dispose()
248 if (mpDrawModel !=
nullptr) {
249 EndListening( *mpDrawModel );
251 mpDrawModel =
nullptr;
263 typedef std::map<key_type, mapped_type>::iterator
iterator;
269 std::map<key_type, mapped_type>
maMap;
278 uno::Reference < document::XShapeEventBroadcaster > xModelBroadcaster =
279 new SwDrawModellListener_Impl(
286 const ::accessibility::AccessibleShapeTreeInfo&
GetInfo()
const {
return maInfo; }
288 std::unique_ptr<SwAccessibleObjShape_Impl[]>
Copy(
size_t& rSize,
297 template<
class... Args>
298 std::pair<iterator,bool>
emplace(Args&&... args) {
return maMap.emplace(std::forward<Args>(
args)...); }
306 static_cast < SwDrawModellListener_Impl *
>( xBrd.get() )->
Dispose();
309std::unique_ptr<SwAccessibleObjShape_Impl[]>
314 std::unique_ptr<SwAccessibleObjShape_Impl[]> pShapes;
318 rSize =
maMap.size();
325 pSelShape = &(pShapes[rSize]);
326 for(
const auto& rEntry :
maMap )
329 uno::Reference < XAccessible > xAcc( rEntry.second );
334 pSelShape->first = pObj;
342 pShape->first = pObj;
349 assert(pSelShape == pShape);
353 *pSelStart = pSelShape;
372 uno::WeakReference < XAccessible >
mxAcc;
389 SwAccessibleChild aFrameOrObj )
398 SwAccessibleChild aFrameOrObj )
405 "wrong event constructor, DISPOSE only");
414 "wrong event constructor, SHAPE_SELECTION only" );
419 SwAccessibleChild aFrameOrObj,
430 "wrong event constructor, (CHILD_)POS_CHANGED only" );
435 SwAccessibleChild aFrameOrObj,
444 "wrong event constructor, CARET_OR_STATES only" );
448 SwAccessibleChild aFrameOrObj,
const SwRect& rR ) :
456 "wrong event constructor, CHILD_POS_CHANGED only" );
471 uno::Reference < XAccessible > xTmp(
mxAcc );
554 std::list<SwAccessibleEvent_Impl>::iterator
begin() {
return maEvents.begin(); }
555 std::list<SwAccessibleEvent_Impl>::iterator
end() {
return maEvents.end(); }
556 std::list<SwAccessibleEvent_Impl>::iterator
insert(
const std::list<SwAccessibleEvent_Impl>::iterator& aIter,
559 return maEvents.insert( aIter, rEvent );
561 std::list<SwAccessibleEvent_Impl>::iterator
erase(
const std::list<SwAccessibleEvent_Impl>::iterator& aPos )
571 size_t nSize =
size();
577 for (
auto li =
begin(); li !=
end(); )
579 if (li->IsNoXaccParentFrame())
587 assert(
size() + lstEvent.
size() == nSize);
589 assert(
size() == nSize);
594struct SwAccessibleChildFunc
596 bool operator()(
const SwAccessibleChild& r1,
597 const SwAccessibleChild& r2 )
const
599 const void *p1 = r1.GetSwFrame()
600 ?
static_cast < const void *
>( r1.GetSwFrame())
601 : ( r1.GetDrawObject()
602 ?
static_cast < const void *
>( r1.GetDrawObject() )
603 :
static_cast < const void *
>( r1.GetWindow() ) );
604 const void *p2 = r2.GetSwFrame()
605 ?
static_cast < const void *
>( r2.GetSwFrame())
606 : ( r2.GetDrawObject()
607 ?
static_cast < const void *
>( r2.GetDrawObject() )
608 :
static_cast < const void *
>( r2.GetWindow() ) );
622 typedef std::map<key_type,mapped_type,key_compare>::iterator
iterator;
623 typedef std::map<key_type,mapped_type,key_compare>::const_iterator
const_iterator;
625 std::map <key_type,mapped_type,key_compare>
maMap;
629 template<
class... Args>
630 std::pair<iterator,bool>
emplace(Args&&... args) {
return maMap.emplace(std::forward<Args>(
args)...); }
636struct SwAccessibleParaSelection
641 SwAccessibleParaSelection(
const TextFrameIndex nStartOfSelection_,
643 : nStartOfSelection(nStartOfSelection_)
644 , nEndOfSelection(nEndOfSelection_)
648struct SwXAccWeakRefComp
650 bool operator()(
const uno::WeakReference<XAccessible>& _rXAccWeakRef1,
651 const uno::WeakReference<XAccessible>& _rXAccWeakRef2 )
const
653 return _rXAccWeakRef1.
get() < _rXAccWeakRef2.get();
662 typedef uno::WeakReference < XAccessible >
key_type;
666 typedef std::map<key_type,mapped_type,key_compare>::iterator
iterator;
667 typedef std::map<key_type,mapped_type,key_compare>::const_iterator
const_iterator;
669 std::map<key_type,mapped_type,key_compare>
maMap;
674 template<
class... Args>
675 std::pair<iterator,bool>
emplace(Args&&... args) {
return maMap.emplace(std::forward<Args>(
args)...); }
706 const SwRect& _rPreviewPgSwRect,
707 const Size& _rPreviewWinSize );
713 const std::vector<std::unique_ptr<PreviewPage>>& _rPreviewPages,
716 const Size& _rPreviewWinSize );
727 const Point& rPoint )
const;
740 const std::vector<std::unique_ptr<PreviewPage>>& _rPreviewPages,
743 const Size& _rPreviewWinSize )
752 SwAccessibleChild aPage;
757 for (
auto & rpPreviewPage : _rPreviewPages )
759 aPage = rpPreviewPage->pPage;
762 tools::Rectangle aPreviewPgRect( rpPreviewPage->aPreviewWinPos, rpPreviewPage->aPageSize );
766 SwRect aLogicPgSwRect( aPage.GetBox( rAccMap ) );
770 if ( rpPreviewPage->bVisible )
772 if ( !rpPreviewPage->pPage->IsEmptyPage() )
794struct ContainsPredicate
797 explicit ContainsPredicate(
const Point& rPoint ) :
mrPoint(rPoint) {}
807 const Point& rPoint )
const
814 Rectangles::const_iterator aBegin =
maLogicRects.begin();
816 Rectangles::const_iterator aFound = std::find_if( aBegin, aEnd,
817 ContainsPredicate( rPoint ) );
823 aPoint -= (
maLogicRects.begin() + (aFound-aBegin))->TopLeft();
837 SwRect& _iorLogicPgSwRect,
838 const SwRect& _rPreviewPgSwRect,
839 const Size& _rPreviewWinSize )
842 const SwRect aPreviewWinSwRect(
Point( 0, 0 ), _rPreviewWinSize );
844 SwRect aVisPreviewPgSwRect( _rPreviewPgSwRect );
849 nTmpDiff = aVisPreviewPgSwRect.
Left() - _rPreviewPgSwRect.
Left();
850 _iorLogicPgSwRect.
AddLeft( nTmpDiff );
852 nTmpDiff = aVisPreviewPgSwRect.
Top() - _rPreviewPgSwRect.
Top();
853 _iorLogicPgSwRect.
AddTop( nTmpDiff );
855 nTmpDiff = _rPreviewPgSwRect.
Right() - aVisPreviewPgSwRect.
Right();
856 _iorLogicPgSwRect.
AddRight( - nTmpDiff );
858 nTmpDiff = _rPreviewPgSwRect.
Bottom() - aVisPreviewPgSwRect.
Bottom();
859 _iorLogicPgSwRect.
AddBottom( - nTmpDiff );
891 bRet = (pTabFrame1 == pTabFrame2);
907 uno::Reference < XAccessible > xAcc( (*aIter).second );
910 uno::Reference < XAccessibleContext > xContext(xAcc,uno::UNO_QUERY);
911 if (xContext.is() && xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
922 else if( xAccImpl.is() && xAccImpl->GetFrame() )
927 xAccImpl->InvalidateAttr();
932 xAccImpl->InvalidateContent();
935 xAccImpl->InvalidatePosOrSize( rEvent.
GetOldBox() );
942 assert(!
"dispose event has been stored");
953 xAccImpl->InvalidateCursorPos();
955 xAccImpl->InvalidateStates( rEvent.
GetStates() );
962 xAccImpl->InvalidateRelation(
963 AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED );
967 xAccImpl->InvalidateRelation(
968 AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED );
974 xAccImpl->InvalidateTextSelection();
994 "dispose event while firing events" );
1006 "dispose events should not be stored" );
1007 bool bAppendEvent =
true;
1015 "invalid event combination" );
1028 "invalid event combination" );
1044 "invalid event combination" );
1055 "invalid event combination" );
1059 "invalid event combination" );
1066 bAppendEvent =
false;
1076 "invalid event combination" );
1082 mpEvents->erase( (*aIter).second );
1087 mpEvents->erase( (*aIter).second );
1100 const uno::Reference< XAccessible >& rAcc )
1110 SwAccessibleChild(pAccImpl->
GetFrame()),
1149 std::unique_ptr<SwAccessibleObjShape_Impl[]> pShapes;
1160 pShapes =
mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
1172 while( aIter != aEndIter )
1174 uno::Reference < XAccessible > xAcc( (*aIter).second );
1183 while( aIter != aEndIter )
1194 if(rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1196 uno::Reference < XAccessible > xAcc( (*aIter).second );
1212 bool bMarked =
false;
1213 if( pCursor !=
nullptr )
1221 nLastNode = pMerged->pLastNode->GetIndex();
1225 nLastNode = nFirstNode;
1233 if( rTmpCursor.HasMark() )
1241 if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
1243 if( rAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
1246 &&( ((nHere == nEndIndex) && (nIndex < pEnd->GetContentIndex())) || (nHere < nEndIndex) ) )
1248 uno::Reference < XAccessible > xAcc( (*aIter).second );
1254 uno::Reference < XAccessible > xAcc( (*aIter).second );
1259 else if( rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PARA )
1261 uno::Reference<XAccessible>
const xAcc((*aIter).second);
1274 else if (rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_CHAR)
1276 uno::Reference<XAccessible>
const xAcc((*aIter).second);
1296 size_t nNumShapes = nShapes;
1299 if( pShape < pSelShape && (pShape->first==(*aIter).first) )
1301 uno::Reference < XAccessible > xAcc( (*aIter).second );
1324 const SwFrame *pFrame = (*aIter).first;
1327 uno::Reference < XAccessible > xAcc = (*aIter).second;
1340 if( rAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
1343 if (xAccParent.is())
1345 uno::Reference< XAccessibleContext > xAccContext = xAccParent->getAccessibleContext();
1346 if(xAccContext.is() && xAccContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
1368 typedef std::vector< SwAccessibleContext* > VEC_PARA;
1372 bool bMarkChanged =
false;
1374 if( pCursor !=
nullptr )
1378 if( rTmpCursor.HasMark() )
1380 SwNodeIndex nStartIndex( rTmpCursor.Start()->GetNode() );
1381 SwNodeIndex nEndIndex( rTmpCursor.End()->GetNode() );
1382 for (; nStartIndex <= nEndIndex; ++nStartIndex)
1389 if (mapTemp.
find(pFrame) != mapTemp.
end())
1406 uno::Reference < XAccessible > xAcc = (*aIter).second;
1407 bool isChanged =
false;
1420 bMarkChanged =
true;
1424 mapTemp.
emplace( pFrame, xAcc );
1438 uno::Reference < XAccessible > xAcc = (*aIter).second;
1444 bMarkChanged =
true;
1449 while( aIter != mapTemp.
end() )
1461 AccessibleEventObject
aEvent;
1462 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
1465 pAccPara->FireAccessibleEvent(
aEvent );
1470 AccessibleEventObject
aEvent;
1471 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
1474 pAccPara->FireAccessibleEvent(
aEvent );
1484 std::unique_ptr<SwAccessibleObjShape_Impl[]> pShapes;
1490 const size_t nSelShapes = pFESh ? pFESh->
IsObjSelected() : 0;
1494 if (bInvalidateFocusMode && nSelShapes != 1)
1499 pShapes =
mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
1504 typedef std::vector< ::rtl::Reference < ::accessibility::AccessibleShape > > VEC_SHAPE;
1505 VEC_SHAPE vecxShapeAdd;
1506 VEC_SHAPE vecxShapeRemove;
1507 int nCountSelectedShape=0;
1510 bool bFocused = pWin && pWin->
HasFocus();
1512 int nShapeCount = nShapes;
1513 while( nShapeCount )
1515 if (pShape->second.is() &&
IsInSameLevel(pShape->first, pFESh))
1517 if( pShape < pSelShape )
1519 if(pShape->second->ResetState( AccessibleStateType::SELECTED ))
1521 vecxShapeRemove.push_back(pShape->second);
1523 pShape->second->ResetState( AccessibleStateType::FOCUSED );
1530 for (
const auto& rpShape : vecxShapeRemove)
1535 pAccShape->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE,
uno::Any(),
uno::Any(), -1);
1539 pShape = pShapes.get();
1543 if (pShape->second.is() &&
IsInSameLevel(pShape->first, pFESh))
1545 if( pShape >= pSelShape )
1548 if( bFocused && 1 == nSelShapes )
1549 pShape->second->
SetState( AccessibleStateType::FOCUSED );
1551 pShape->second->ResetState( AccessibleStateType::FOCUSED );
1553 if(pShape->second->SetState( AccessibleStateType::SELECTED ))
1555 vecxShapeAdd.push_back(pShape->second);
1557 ++nCountSelectedShape;
1572 AccessibleEventObject
aEvent;
1573 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
1579 short nEventID = AccessibleEventId::SELECTION_CHANGED_ADD;
1580 if (nCountSelectedShape <= 1 && vecxShapeAdd.size() == 1 )
1582 nEventID = AccessibleEventId::SELECTION_CHANGED;
1584 for (
const auto& rpShape : vecxShapeAdd)
1594 for (
const auto& rpShape : vecxShapeAdd)
1604 if( rAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
1606 uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
1609 uno::Reference< XAccessibleContext > xParaContext = xPara->getAccessibleContext();
1610 if (xParaContext.is() && xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
1623 for (
const auto& rpShape : vecxShapeRemove)
1626 if (pAccShape && !pAccShape->IsDisposed())
1628 uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
1629 uno::Reference< XAccessibleContext > xParaContext = xPara->getAccessibleContext();
1630 if (xParaContext.is() && xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
1644 mbShapeSelected( false ),
1654 uno::Reference < XAccessible > xAcc;
1660 xAcc = (*aIter).second;
1672#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
1678 uno::Reference < XAccessible > xTmp = (*aIter).second;
1682 assert(pTmp->
GetMap() ==
nullptr);
1689 "Frame map should be empty after disposing the root frame");
1691 "Object map should be empty after disposing the root frame");
1714 uno::Reference < XAccessible > xAcc;
1715 bool bSetVisArea =
false;
1720#if OSL_DEBUG_LEVEL > 0
1725#if OSL_DEBUG_LEVEL > 0
1733 xAcc = (*aIter).second;
1747 (*aIter).second = xAcc;
1755#if OSL_DEBUG_LEVEL > 0
1775 const std::vector<std::unique_ptr<PreviewPage>>& _rPreviewPages,
1778 const Size& _rPreviewWinSize )
1783 mpPreview->Update( *
this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize );
1794 uno::Reference < XAccessible > xAcc;
1795 uno::Reference < XAccessible > xOldCursorAcc;
1796 bool bOldShapeSelected =
false;
1804 xAcc = (*aIter).second;
1806 if( !xAcc.is() && bCreate )
1837 static_cast < const SwFlyFrame *
>( pFrame );
1858 static_cast< const SwTabFrame *
>( pFrame ) );
1861 OSL_ENSURE(
GetShell()->IsPreview(),
1862 "accessible page frames only in PagePreview" );
1872 (*aIter).second = xAcc;
1879 if( pAcc->HasCursor() &&
1906 if( xOldCursorAcc.is() )
1908 if( bOldShapeSelected )
1918 uno::Reference < XAccessible > xAcc(
GetContext( pFrame, bCreate ) );
1933 uno::Reference < XAccessible > xAcc;
1934 uno::Reference < XAccessible > xOldCursorAcc;
1942 xAcc = (*aIter).second;
1944 if( !xAcc.is() && bCreate )
1947 uno::Reference < drawing::XShape > xShape(
1948 const_cast< SdrObject *
>( pObj )->getUnoShape(),
1954 uno::Reference < XAccessible > xParent( pParentImpl );
1956 xShape, xParent,
this );
1966 (*aIter).second = xAcc;
1978 if( xOldCursorAcc.is() )
2015 for (
size_t i = 0; pChildren &&
i < pChildren->
GetObjCount(); ++
i)
2036 if (!xAccParent.is())
2039 uno::Reference < XAccessibleContext > xContext = xAccParent->getAccessibleContext();
2043 sal_Int64 nChildren = xContext->getAccessibleChildCount();
2044 for(sal_Int64
i = 0;
i<nChildren;
i++)
2046 uno::Reference < XAccessible > xChild = xContext->getAccessibleChild(
i);
2049 uno::Reference < XAccessibleContext > xChildContext = xChild->getAccessibleContext();
2050 if (xChildContext.is())
2052 short nRole = xChildContext->getAccessibleRole();
2053 if (nRole == AccessibleRole::SHAPE)
2056 uno::Reference < drawing::XShape > xShape = pAccShape->
GetXShape();
2074 uno::Reference < XAccessible > xAcc(
GetContext( pObj, pParentImpl, bCreate ) );
2111 OSL_ENSURE( pOldAccImpl->
GetFrame(),
"old caret context is disposed" );
2112 if( pOldAccImpl->
GetFrame() == pFrame )
2136 uno::Reference < XAccessible > xTempHold( (*aIter).second );
2158 bool bCanSkipInvisible )
2162 SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow );
2168 OSL_ENSURE( !aFrameOrObj.GetSwFrame() || aFrameOrObj.GetSwFrame()->IsAccessibleFrame(),
2169 "non accessible frame should be disposed" );
2171 if (!(aFrameOrObj.IsAccessible(
GetShell()->IsPreview())
2185 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2188 uno::Reference < XAccessible > xAcc( (*aIter).second );
2205 uno::Reference < XAccessible > xAcc( (*aIter).second );
2211 if( !xParentAccImpl.is() && !aFrameOrObj.GetSwFrame() &&
mpShapeMap )
2214 mpShapeMap->find( aFrameOrObj.GetDrawObject() );
2217 uno::Reference < XAccessible > xAcc( (*aIter).second );
2223 (xParentAccImpl.is() || xShapeAccImpl.is()) )
2227 uno::Reference < drawing::XShape > xShape(
2228 const_cast< SdrObject *
>( pObj )->getUnoShape(),
2259 xAccImpl->Dispose( bRecursive );
2261 else if( xParentAccImpl.is() )
2268 xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive, bCanSkipInvisible );
2270 else if( xShapeAccImpl.is() )
2273 xShapeAccImpl->dispose();
2287 SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow );
2288 if( !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2293 const SwFrame *pParent =
nullptr;
2296 if( aFrameOrObj.GetSwFrame() )
2299 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2304 uno::Reference < XAccessible > xAcc( (*aIter).second );
2309 if( !xAccImpl.is() )
2323 uno::Reference < XAccessible > xAcc( (*aIter).second );
2337 aFrameOrObj, rOldBox );
2343 if (xAccImpl->GetFrame())
2345 xAccImpl->InvalidatePosOrSize(rOldBox);
2349 else if( xParentAccImpl.is() )
2355 if (!SwAccessibleChild(pParent).IsVisibleChildrenOnly()
2356 || xParentAccImpl->IsShowing(rOldBox)
2357 || xParentAccImpl->IsShowing(*
this, aFrameOrObj))
2361 xParentAccImpl.get(), aFrameOrObj, rOldBox );
2368 xParentAccImpl->InvalidateChildPosOrSize( aFrameOrObj,
2382 bool bIsValidFrame =
false;
2383 bool bIsTextParent =
false;
2384 if (aFrameOrObj.GetSwFrame())
2388 bIsValidFrame =
true;
2395 bIsTextParent =
true;
2398 if( bIsValidFrame || bIsTextParent )
2404 pParent, aFrameOrObj, rOldBox );
2409 OSL_ENSURE(
false,
"");
2419 SwAccessibleChild aFrameOrObj( pFrame );
2420 if( !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2426 uno::Reference < XAccessible > xAcc;
2428 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2430 xAcc = (*aIter).second;
2441 std::move(aFrameOrObj) );
2455 SwAccessibleChild aFrameOrObj( &rTextFrame );
2456 if( !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2462 uno::Reference < XAccessible > xAcc;
2464 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2466 xAcc = (*aIter).second;
2476 pAccImpl, std::move(aFrameOrObj) );
2491 SwAccessibleChild aFrameOrObj( pFrame );
2492 bool bShapeSelected =
false;
2496 if( pCSh->IsTableMode() )
2498 while( aFrameOrObj.GetSwFrame() && !aFrameOrObj.GetSwFrame()->IsCellFrame() )
2499 aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper();
2501 else if(
auto pFESh =
dynamic_cast<const SwFEShell*
>(pVSh) )
2503 const SwFrame *pFlyFrame = pFESh->GetSelectedFlyFrame();
2506 OSL_ENSURE( !pFrame || pFrame->
FindFlyFrame() == pFlyFrame,
2507 "cursor is not contained in fly frame" );
2508 aFrameOrObj = pFlyFrame;
2510 else if( pFESh->IsObjSelected() > 0 )
2512 bShapeSelected =
true;
2513 aFrameOrObj =
static_cast<const SwFrame *
>( nullptr );
2518 OSL_ENSURE( bShapeSelected || aFrameOrObj.IsAccessible(
GetShell()->IsPreview()),
2519 "frame is not accessible" );
2521 uno::Reference < XAccessible > xOldAcc;
2522 uno::Reference < XAccessible > xAcc;
2523 bool bOldShapeSelected =
false;
2535 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2537 xAcc = (*aIter).second;
2551 aIter =
mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2554 xAcc = (*aIter).second;
2571 if( aFrameOrObj.GetSwFrame()->IsCellFrame() )
2582 xAcc =
GetContext( aFrameOrObj.GetSwFrame() );
2585 else if (bShapeSelected)
2589 if (pMarkList !=
nullptr && pMarkList->
GetMarkCount() == 1)
2593 if (!pAccShapeImpl.is())
2599 if (pObj !=
nullptr)
2605 if (!xParentAccImpl.is())
2611 uno::Reference< XAccessible> xAccParentTab =
GetContext(pTabFrame);
2617 if(xParentAccImplRoot.is())
2619 AccessibleEventObject
aEvent;
2620 aEvent.EventId = AccessibleEventId::CHILD;
2621 aEvent.NewValue <<= xAccParentTab;
2623 xParentAccImplRoot->FireAccessibleEvent(
aEvent );
2638 if(xParentAccImplRoot.is())
2640 AccessibleEventObject
aEvent;
2641 aEvent.EventId = AccessibleEventId::CHILD;
2642 aEvent.NewValue <<= uno::Reference< XAccessible>(xParentAccImpl);
2644 xParentAccImplRoot->FireAccessibleEvent(
aEvent );
2648 if (xParentAccImpl.is())
2650 uno::Reference< XAccessible> xAccShape =
2653 AccessibleEventObject
aEvent;
2654 aEvent.EventId = AccessibleEventId::CHILD;
2655 aEvent.NewValue <<= xAccShape;
2657 xParentAccImpl->FireAccessibleEvent(
aEvent );
2668 if( xOldAcc.is() && xOldAcc != xAcc )
2670 if( bOldShapeSelected || bShapeSelected )
2679 if (pAccPara && !pAccPara->IsDisposed() &&
2680 pAccPara->getSelectedAccessibleChildCount() == 0 &&
2681 pAccPara->getSelectedText().getLength() == 0)
2683 if(pAccPara->SetSelectedState(
false))
2685 AccessibleEventObject
aEvent;
2686 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
2687 pAccPara->FireAccessibleEvent(
aEvent );
2693 if(pAccPara && pAccPara->SetSelectedState(
true))
2695 AccessibleEventObject
aEvent;
2696 aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
2697 pAccPara->FireAccessibleEvent(
aEvent );
2733 const ::rtl::Reference < SwAccessibleContext >& rCursorContext )
2736 uno::Reference < XAccessible > xAcc( rCursorContext );
2743 SwAccessibleChild aFrameOrObj( _pFrame );
2744 while( aFrameOrObj.GetSwFrame() &&
2745 !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2746 aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper();
2747 if( !aFrameOrObj.GetSwFrame() )
2750 uno::Reference< XAccessible > xAcc(
GetContext( aFrameOrObj.GetSwFrame() ) );
2756 SwAccessibleChild(pAccImpl->
GetFrame()),
2773 SwAccessibleChild aFrameOrObj( pFrame );
2774 if( !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2780 uno::Reference < XAccessible > xAcc;
2782 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2785 xAcc = (*aIter).second;
2797 pAccImpl, SwAccessibleChild(pFrame),
2807 ? AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED
2808 : AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED );
2832 SwAccessibleChild aFrameOrObj( &_rTextFrame );
2833 if( !aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2839 uno::Reference < XAccessible > xAcc;
2841 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2844 xAcc = (*aIter).second;
2858 SwAccessibleChild( &_rTextFrame ),
2876 SwAccessibleChild aFrameOrObj( &rParentFrame );
2877 if( aFrameOrObj.IsAccessible(
GetShell()->IsPreview() ) )
2879 uno::Reference < XAccessible > xAcc;
2884 mpFrameMap->find( aFrameOrObj.GetSwFrame() );
2887 xAcc = (*aIter).second;
2897 SwAccessibleChild( &rChild ) );
2907 const Size& _rPreviewWinSize )
2910 assert(
GetShell()->IsPreview() &&
"no preview?");
2911 assert(
mpPreview !=
nullptr &&
"no preview data?");
2913 mpPreview->Update( *
this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize );
2923 uno::Reference < XAccessible > xAcc;
2931 xAcc = (*aIter).second;
2934 if( xOldAcc.is() && xOldAcc != xAcc )
2946 mpPreview->InvalidateSelection(
GetShell()->GetLayout()->GetPageByPageNum( nSelPage ) );
2949 uno::Reference < XAccessible > xAcc;
2956 xAcc = (*aIter).second;
2959 if( xOldAcc.is() && xOldAcc != xAcc )
3008 aPoint = pWin->LogicToPixel( aPoint, aMapMode );
3009 aPoint = pWin->OutputToAbsoluteScreenPixel( aPoint );
3022 aSize = pWin->LogicToPixel( aSize, aMapMode );
3030 const uno::Reference< drawing::XShape >& _rxShape,
3032 const ::accessibility::AccessibleShapeTreeInfo&
3042 while( aIter != aEndIter && !pObj )
3044 uno::Reference < XAccessible > xAcc( (*aIter).second );
3047 if( pAccShape == pCurrentChild )
3049 pObj = (*aIter).first;
3057 uno::Reference < drawing::XShape > xShape( _rxShape );
3061 uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
3062 pCurrentChild =
nullptr;
3072 xShape, xParent,
this );
3077 uno::Reference < XAccessible > xAcc( pReplacement );
3080 pReplacement->Init();
3085 (*aIter).second = xAcc;
3106 while( aIter != aEndIter)
3108 uno::Reference < XAccessible > xAcc( (*aIter).second );
3115 return pCtlAccShape;
3123css::uno::Reference< XAccessible >
3136 aPoint = pWin->PixelToLogic( rPoint, aMapMode );
3148 if (aFineValue < aRefValue)
3153 if (aFineValue > aRefValue)
3165 rInGrid.
Left(),
false) );
3167 rInGrid.
Top(),
false) );
3169 rInGrid.
Right(),
true) );
3171 rInGrid.
Bottom(),
true) );
3181 aRect = pWin->LogicToPixel( rRect.
SVRect(), aMapMode );
3205 mpPreview->AdjustMapMode( aMapMode, _rPoint );
3207 _orMapMode = aMapMode;
3230 SwPaM* pCursor(
nullptr );
3241 pCursor = pCursorShell->
GetCursor(
false );
3251 std::unique_ptr<SwAccessibleSelectedParas_Impl> pRetSelectedParas;
3254 SwPaM* pRingStart = pCursor;
3263 auto [pStartPos, pEndPos] = pCursor->
StartEnd();
3266 for ( ; aIdx.
GetIndex() <= pEndPos->GetNodeIndex(); ++aIdx )
3275 uno::WeakReference < XAccessible > xWeakAcc;
3280 xWeakAcc = (*aMapIter).second;
3281 SwAccessibleParaSelection aDataEntry(
3283 ? pTextFrame->MapModelToViewPos(*pStartPos)
3287 ? pTextFrame->MapModelToViewPos(*pEndPos)
3289 if ( !pRetSelectedParas )
3291 pRetSelectedParas.reset(
3295 pRetSelectedParas->emplace( xWeakAcc, aDataEntry );
3304 }
while ( pCursor != pRingStart );
3306 return pRetSelectedParas;
3314 std::unique_ptr<SwAccessibleSelectedParas_Impl> pPrevSelectedParas( std::move(
mpSelectedParas) );
3329 bool bSubmitEvent(
false );
3330 if ( !pPrevSelectedParas )
3333 bSubmitEvent =
true;
3338 pPrevSelectedParas->find( (*aIter).first );
3339 if ( aPrevSelected != pPrevSelectedParas->end() )
3342 if ( (*aIter).second.nStartOfSelection !=
3343 (*aPrevSelected).second.nStartOfSelection ||
3344 (*aIter).second.nEndOfSelection !=
3345 (*aPrevSelected).second.nEndOfSelection )
3348 bSubmitEvent =
true;
3350 pPrevSelectedParas->erase( aPrevSelected );
3355 bSubmitEvent =
true;
3361 uno::Reference < XAccessible > xAcc( (*aIter).first );
3366 if ( xAccImpl.is() && xAccImpl->GetFrame() )
3368 const SwTextFrame* pTextFrame = xAccImpl->GetFrame()->DynCastTextFrame();
3369 OSL_ENSURE( pTextFrame,
3370 "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" );
3383 if ( !pPrevSelectedParas )
3387 for ( ; aIter != pPrevSelectedParas->end(); ++aIter )
3389 uno::Reference < XAccessible > xAcc( (*aIter).first );
3394 if ( xAccImpl.is() && xAccImpl->GetFrame() )
3396 const SwTextFrame* pTextFrame = xAccImpl->GetFrame()->DynCastTextFrame();
3397 OSL_ENSURE( pTextFrame,
3398 "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" );
static void lcl_CorrectRectangle(tools::Rectangle &rRect, const tools::Rectangle &rSource, const tools::Rectangle &rInGrid)
static tools::Long lcl_CorrectCoarseValue(tools::Long aCoarseValue, tools::Long aFineValue, tools::Long aRefValue, bool bToLower)
static bool AreInSameTable(const uno::Reference< XAccessible > &rAcc, const SwFrame *pFrame)
std::pair< const SdrObject *, ::rtl::Reference< ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl
const unsigned int SELECTION_WITH_NUM
virtual SwDrawModel * GetOrCreateDrawModel()=0
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
void SetScaleX(const Fraction &rScaleX)
SdrHintKind GetKind() const
const SdrObject * GetObject() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual SdrObjList * GetSubList() const
bool IsGroupObject() const
virtual SdrObjKind GetObjIdentifier() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
static bool createEvent(const SdrModel *pDoc, const SdrHint *pSdrHint, css::document::EventObject &aEvent)
const SwPageFrame * mpSelPage
void DisposePage(const SwPageFrame *pPageFrame)
void AdjustMapMode(MapMode &rMapMode, const Point &rPoint) const
Adjust the MapMode so that the preview page appears at the proper position.
void Update(const SwAccessibleMap &rAccMap, const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
std::vector< tools::Rectangle > Rectangles
const SwRect & GetVisArea() const
static void AdjustLogicPgRectToVisibleArea(SwRect &_iorLogicPgSwRect, const SwRect &_rPreviewPgSwRect, const Size &_rPreviewWinSize)
adjust logic page rectangle to its visible part
Rectangles maPreviewRects
void InvalidateSelection(const SwPageFrame *_pSelectedPageFrame)
const SwPageFrame * GetSelPage() const
std::unordered_map< key_type, mapped_type >::const_iterator const_iterator
std::pair< iterator, bool > emplace(Args &&... args)
uno::WeakReference< XAccessible > mapped_type
iterator erase(const_iterator const &pos)
SwAccessibleContextMap_Impl()
std::unordered_map< key_type, mapped_type > maMap
std::pair< const key_type, mapped_type > value_type
iterator find(const key_type &key)
std::unordered_map< key_type, mapped_type >::iterator iterator
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible=true)
void FireAccessibleEvent(css::accessibility::AccessibleEventObject &rEvent)
void InvalidateRelation(sal_uInt16 nType)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
void InvalidateCursorPos()
SwAccessibleMap * GetMap()
bool IsSelectedInDoc() const
void InvalidateTextSelection()
#i27301# - text selection has changed
void InvalidateAttr()
#i88069# - attributes has changed
void InvalidateStates(AccessibleStates _nStates)
access to an accessible Writer document
std::list< SwAccessibleEvent_Impl >::iterator erase(const std::list< SwAccessibleEvent_Impl >::iterator &aPos)
SwAccessibleEventList_Impl()
void MoveMissingXAccToEnd()
std::list< SwAccessibleEvent_Impl >::iterator end()
std::list< SwAccessibleEvent_Impl >::iterator insert(const std::list< SwAccessibleEvent_Impl >::iterator &aIter, const SwAccessibleEvent_Impl &rEvent)
std::list< SwAccessibleEvent_Impl > maEvents
std::list< SwAccessibleEvent_Impl >::iterator begin()
SwAccessibleChildFunc key_compare
iterator erase(const_iterator const &pos)
iterator find(const key_type &key)
std::map< key_type, mapped_type, key_compare > maMap
std::pair< const key_type, mapped_type > value_type
SwAccessibleChild key_type
std::pair< iterator, bool > emplace(Args &&... args)
std::map< key_type, mapped_type, key_compare >::const_iterator const_iterator
std::list< SwAccessibleEvent_Impl >::iterator mapped_type
std::map< key_type, mapped_type, key_compare >::iterator iterator
virtual bool SetSelectedState(bool bSelected) override
static SwNodeType GetNodeType(const SwFlyFrame *pFlyFrame)
static bool GetChildIndex(SwAccessibleMap &rAccMap, const SwRect &rVisArea, const SwFrame &rFrame, const sw::access::SwAccessibleChild &rChild, sal_Int32 &rPos, bool bInPagePreview)
const SwFrame * GetFrame() const
const SwFrame * GetParent() const
virtual tools::Rectangle GetVisibleArea() const override
std::unique_ptr< SwAccessibleShapeMap_Impl > mpShapeMap
void AddShapeContext(const SdrObject *pObj, css::uno::Reference< css::accessibility::XAccessible > const &xAccShape)
void InvalidateRelationSet(const SwFrame *pMaster, const SwFrame *pFollow)
o3tl::sorted_vector< SwAccessibleParagraph * > m_setParaAdd
void InvalidateShapeInParaSelection()
tools::Rectangle CoreToPixel(const SwRect &rRect) const
void InvalidatePosOrSize(const SwFrame *pFrame, const SdrObject *pObj, vcl::Window *pWindow, const SwRect &rOldFrame)
std::unique_ptr< SwAccessibleSelectedParas_Impl > mpSelectedParas
std::unique_ptr< SwAccessibleSelectedParas_Impl > BuildSelectedParas()
method to build up a new data structure of the accessible paragraphs, which have a selection
std::unique_ptr< SwAccessibleContextMap_Impl > mpFrameMap
std::unique_ptr< SwAccessibleEventMap_Impl > mpEventMap
void UpdatePreview(const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
void InvalidateParaTextSelection(const SwTextFrame &_rTextFrame)
invalidation of text selection of a paragraph
void InvalidateCursorPosition(const css::uno::Reference< css::accessibility::XAccessible > &rAcc)
void InvalidatePreviewSelection(sal_uInt16 nSelPage)
void InvalidateRelationSet_(const SwFrame *pFrame, bool bFrom)
void FireEvent(const SwAccessibleEvent_Impl &rEvent)
::osl::Mutex maEventMutex
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessibleCaption(const css::uno::Reference< css::drawing::XShape > &xShape) override
bool Contains(const SwFrame *pFrame) const
void InvalidateEditableStates(const SwFrame *_pFrame)
o3tl::sorted_vector< SwAccessibleParagraph * > m_setParaRemove
SwAccessibleMap(SwViewShell *pSh)
void SetCursorContext(const ::rtl::Reference< SwAccessibleContext > &rCursorContext)
void GetMapMode(const Point &_rPoint, MapMode &_orMapMode) const
get mapping mode for LogicToPixel and PixelToLogic conversions
SwShapeList_Impl mvShapes
css::uno::WeakReference< css::accessibility::XAccessible > mxCursorContext
virtual bool ReplaceChild(::accessibility::AccessibleShape *pCurrentChild, const css::uno::Reference< css::drawing::XShape > &_rxShape, const tools::Long _nIndex, const ::accessibility::AccessibleShapeTreeInfo &_rShapeTreeInfo) override
static bool IsInSameLevel(const SdrObject *pObj, const SwFEShell *pFESh)
void A11yDispose(const SwFrame *pFrame, const SdrObject *pObj, vcl::Window *pWindow, bool bRecursive=false, bool bCanSkipInvisible=true)
void RemoveGroupContext(const SdrObject *pParentObj)
virtual bool IsDocumentSelAll() override
void InvalidateAttr(const SwTextFrame &rTextFrame)
virtual ~SwAccessibleMap() override
std::unique_ptr< SwAccPreviewData > mpPreview
for page preview: store preview data, VisArea, and mapping of preview-to-display coordinates
std::unique_ptr< SwAccessibleEventList_Impl > mpEvents
sal_Int32 GetChildIndex(const SwFrame &rParentFrame, vcl::Window &rChild) const
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView_(bool bPagePreview)
void InvalidateContent(const SwFrame *pFrame)
Size GetPreviewPageSize(sal_uInt16 _nPreviewPageNum) const
get size of a dedicated preview page
css::uno::Reference< css::accessibility::XAccessible > GetDocumentPreview(const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
Point PixelToCore(const Point &rPoint) const
void InvalidateShapeSelection()
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView()
void DoInvalidateShapeSelection(bool bInvalidateFocusMode=false)
::rtl::Reference< SwAccessibleContext > GetContextImpl(const SwFrame *pFrame, bool bCreate=true)
virtual ::accessibility::AccessibleControlShape * GetAccControlShapeFromModel(css::beans::XPropertySet *pSet) override
void AppendEvent(const SwAccessibleEvent_Impl &rEvent)
void InvalidateParaFlowRelation(const SwTextFrame &_rTextFrame, const bool _bFrom)
invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
const SwRect & GetVisArea() const
void RemoveContext(const SwFrame *pFrame)
void InvalidateTextSelectionOfAllParas()
invalidation of text selection of all paragraphs
bool IsPageSelected(const SwPageFrame *pPageFrame) const
std::unique_ptr< SwAccessibleContextMap_Impl > mpSelectedFrameMap
css::uno::Reference< css::accessibility::XAccessible > GetContext(const SwFrame *pFrame, bool bCreate=true)
void AddGroupContext(const SdrObject *pParentObj, css::uno::Reference< css::accessibility::XAccessible > const &xAccParent)
virtual Point LogicToPixel(const Point &rPoint) const override
SwViewShell * GetShell() const
accessibility implementation for the page (SwPageFrame) The page is only visible in the page preview.
accessibility implementation for the page preview.
std::map< key_type, mapped_type, key_compare >::const_iterator const_iterator
std::map< key_type, mapped_type, key_compare > maMap
std::pair< iterator, bool > emplace(Args &&... args)
std::map< key_type, mapped_type, key_compare >::iterator iterator
SwXAccWeakRefComp key_compare
uno::WeakReference< XAccessible > key_type
iterator erase(const_iterator const &pos)
SwAccessibleParaSelection mapped_type
iterator find(const key_type &key)
std::pair< const key_type, mapped_type > value_type
uno::WeakReference< XAccessible > mapped_type
const_iterator cend() const
const SdrObject * key_type
SwAccessibleShapeMap_Impl(SwAccessibleMap const *pMap)
const_iterator cbegin() const
std::map< key_type, mapped_type >::const_iterator const_iterator
std::unique_ptr< SwAccessibleObjShape_Impl[]> Copy(size_t &rSize, const SwFEShell *pFESh, SwAccessibleObjShape_Impl **pSelShape) const
~SwAccessibleShapeMap_Impl()
::accessibility::AccessibleShapeTreeInfo maInfo
iterator find(const key_type &key)
std::map< key_type, mapped_type > maMap
const ::accessibility::AccessibleShapeTreeInfo & GetInfo() const
std::pair< const key_type, mapped_type > value_type
iterator erase(const_iterator const &pos)
std::map< key_type, mapped_type >::iterator iterator
std::pair< iterator, bool > emplace(Args &&... args)
SwCellFrame is one table cell in the document layout.
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
bool IsPrepareSelAll() const
bool IsObjSameLevelWithMarked(const SdrObject *pObj) const
bool IsFrameSelected() const
const SdrMarkList * GetMarkList() const
size_t IsObjSelected() const
general base class for all free-flowing frames
virtual const SwFlyFrameFormat * GetFormat() const override
Base class of the Writer layout elements.
SwFlyFrame * FindFlyFrame()
SwTabFrame * FindTabFrame()
SwFrameType GetType() const
Marks a node in the document model.
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
bool IsContentNode() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
std::pair< const SwPosition *, const SwPosition * > StartEnd() const
Because sometimes the cost of the operator<= can add up.
const SwPosition * GetPoint() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
A page of the document layout.
Size GetPreviewPageSizeByPageNum(sal_uInt16 _nPageNum) const
get size of a preview page by its physical page number
Of course Writer needs its own rectangles.
SwRect & Intersection(const SwRect &rRect)
SwRect & Union(const SwRect &rRect)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void AddLeft(const tools::Long nAdd)
void AddBottom(const tools::Long nAdd)
void AddRight(const tools::Long nAdd)
void AddTop(const tools::Long nAdd)
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
The root element of a Writer document layout.
void AddAccessibleShell()
void RemoveAccessibleShell()
SwTabFrame is one table in the document layout, containing rows (which contain cells).
const SwTabFrame * GetFollow() const
const SwTable & GetTable() const
SwTableFormat * GetFrameFormat()
Represents the visualization of a paragraph.
sw::MergedPara * GetMergedPara()
SwTextNode * GetTextNodeFirst()
SwTextNode is a paragraph in the document model.
SwPagePreviewLayout * PagePreviewLayout()
SwRootFrame * GetLayout() const
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
const SwRect & VisArea() const
const css::uno::Reference< css::beans::XPropertySet > & GetControlModel() const
void SetViewForwarder(const IAccessibleViewForwarder *pViewForwarder)
void SetSdrView(SdrView *pView)
void SetWindow(vcl::Window *pWindow)
void SetModelBroadcaster(const css::uno::Reference< css::document::XShapeEventBroadcaster > &rxModelBroadcaster)
const css::uno::Reference< css::document::XShapeEventBroadcaster > & GetModelBroadcaster() const
const css::uno::Reference< css::drawing::XShape > & GetXShape() const
virtual bool SetState(sal_Int64 aState) override
rtl::Reference< AccessibleShape > CreateAccessibleObject(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo) const
ShapeTypeId GetTypeId(const OUString &aServiceName) const
static ShapeTypeHandler & Instance()
size_type count(const Value &v) const
std::pair< const_iterator, bool > insert(Value &&x)
ring_container GetRingContainer()
const MapMode & GetMapMode() const
svx::diagram::Point & mrPoint
#define DBG_TESTSOLARMUTEX()
#define TOOLS_WARN_EXCEPTION(area, stream)
void Dispose(const T &xInterface)
constexpr auto toTwips(N number, Length from)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
bool FrameContainsNode(SwContentFrame const &rFrame, SwNodeOffset nNodeIndex)
bool IsInvalidateRelation() const
SwAccessibleEvent_Impl(EventType eT, const SwFrame *pParentFrame, SwAccessibleChild aFrameOrObj, const SwRect &rR)
SwAccessibleEvent_Impl(EventType eT, SwAccessibleChild aFrameOrObj)
AccessibleStates mnStates
SwAccessibleEvent_Impl(EventType eT, SwAccessibleContext *pA, SwAccessibleChild aFrameOrObj, const SwRect &rR)
const SwAccessibleChild & GetFrameOrObj() const
void SetOldBox(const SwRect &rOldBox)
AccessibleStates GetAllStates() const
bool IsNoXaccParentFrame() const
SwAccessibleChild maFrameOrObj
SwAccessibleEvent_Impl(EventType eT, SwAccessibleContext *pA, SwAccessibleChild aFrameOrObj, const AccessibleStates _nStates)
SwAccessibleEvent_Impl(EventType eT)
void SetType(EventType eT)
AccessibleStates GetStates() const
const SwRect & GetOldBox() const
bool IsInvalidateTextSelection() const
SwAccessibleEvent_Impl(EventType eT, SwAccessibleContext *pA, SwAccessibleChild aFrameOrObj)
::rtl::Reference< SwAccessibleContext > GetContext() const
uno::WeakReference< XAccessible > mxAcc
EventType GetType() const
const SwFrame * mpParentFrame
bool IsInvalidateTextAttrs() const
void SetStates(AccessibleStates _nStates)
bool IsInvalidateStates() const
bool IsUpdateCursorPos() const
Marks a position in the document model.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
UNDERLYING_TYPE get() const
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
constexpr sal_Int32 COMPLETE_STRING
bool IsSelectFrameAnchoredAtPara(SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
is a fly anchored at paragraph at rAnchorPos selected?
bool IsDestroyFrameAnchoredAtChar(SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
will DelContentIndex destroy a frame anchored at character at rAnchorPos?