diff options
Diffstat (limited to 'sw/source/core/access')
40 files changed, 1359 insertions, 1359 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 8faf03b222ff..64315c280bbc 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -60,16 +60,16 @@ bool SwAccessibleCell::IsSelected() assert(GetMap()); const SwViewShell *pVSh = GetMap()->GetShell(); assert(pVSh); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) { - const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh ); + const SwCursorShell *pCSh = static_cast< const SwCursorShell * >( pVSh ); if( pCSh->IsTableMode() ) { - const SwCellFrm *pCFrm = - static_cast< const SwCellFrm * >( GetFrm() ); + const SwCellFrame *pCFrame = + static_cast< const SwCellFrame * >( GetFrame() ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); - SwSelBoxes const& rBoxes(pCSh->GetTableCrsr()->GetSelectedBoxes()); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); + SwSelBoxes const& rBoxes(pCSh->GetTableCursor()->GetSelectedBoxes()); bRet = rBoxes.find(pBox) != rBoxes.end(); } } @@ -84,7 +84,7 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) // SELECTABLE const SwViewShell *pVSh = GetMap()->GetShell(); assert(pVSh); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) rStateSet.AddState( AccessibleStateType::SELECTABLE ); //Add resizable state to table cell. rStateSet.AddState( AccessibleStateType::RESIZABLE ); @@ -100,13 +100,13 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) } SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap, - const SwCellFrm *pCellFrm ) - : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ) + const SwCellFrame *pCellFrame ) + : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrame ) , aSelectionHelper( *this ) , bIsSelected( false ) { SolarMutexGuard aGuard; - OUString sBoxName( pCellFrm->GetTabBox()->GetName() ); + OUString sBoxName( pCellFrame->GetTabBox()->GetName() ); SetName( sBoxName ); bIsSelected = IsSelected(); @@ -151,16 +151,16 @@ bool SwAccessibleCell::_InvalidateMyCursorPos() return bChanged; } -bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) +bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrame *pFrame ) { bool bChanged = false; - const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *GetMap() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *GetMap() ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { if( rLower.IsAccessible( GetMap()->GetShell()->IsPreview() ) ) @@ -169,7 +169,7 @@ bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) GetMap()->GetContextImpl( pLower, false ) ); if( xAccImpl.is() ) { - assert(xAccImpl->GetFrm()->IsCellFrm()); + assert(xAccImpl->GetFrame()->IsCellFrame()); bChanged = static_cast< SwAccessibleCell *>( xAccImpl.get() )->_InvalidateMyCursorPos(); } @@ -195,9 +195,9 @@ void SwAccessibleCell::_InvalidateCursorPos() if (IsSelected()) { const SwAccessibleChild aChild( GetChild( *(GetMap()), 0 ) ); - if( aChild.IsValid() && aChild.GetSwFrm() ) + if( aChild.IsValid() && aChild.GetSwFrame() ) { - ::rtl::Reference < SwAccessibleContext > xChildImpl( GetMap()->GetContextImpl( aChild.GetSwFrm()) ); + ::rtl::Reference < SwAccessibleContext > xChildImpl( GetMap()->GetContextImpl( aChild.GetSwFrame()) ); if (xChildImpl.is()) { AccessibleEventObject aEvent; @@ -208,16 +208,16 @@ void SwAccessibleCell::_InvalidateCursorPos() } } - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); - assert(pParent->IsTabFrm()); - const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent ); - if( pTabFrm->IsFollow() ) - pTabFrm = pTabFrm->FindMaster(); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); + assert(pParent->IsTabFrame()); + const SwTabFrame *pTabFrame = static_cast< const SwTabFrame * >( pParent ); + if( pTabFrame->IsFollow() ) + pTabFrame = pTabFrame->FindMaster(); - while( pTabFrm ) + while( pTabFrame ) { - _InvalidateChildrenCursorPos( pTabFrm ); - pTabFrm = pTabFrm->GetFollow(); + _InvalidateChildrenCursorPos( pTabFrame ); + pTabFrame = pTabFrame->GetFollow(); } if (m_pAccTable.is()) { @@ -265,21 +265,21 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() void SwAccessibleCell::Dispose( bool bRecursive ) { - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, false ) ); if( xAccImpl.is() ) - xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive ); + xAccImpl->DisposeChild( SwAccessibleChild(GetFrame()), bRecursive ); SwAccessibleContext::Dispose( bRecursive ); } void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox ) { - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, false ) ); if( xAccImpl.is() ) - xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox ); + xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrame()), rOldBox ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } @@ -339,11 +339,11 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleCell::getImplementationId() SwFrameFormat* SwAccessibleCell::GetTableBoxFormat() const { - assert(GetFrm()); - assert(GetFrm()->IsCellFrm()); + assert(GetFrame()); + assert(GetFrame()->IsCellFrame()); - const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>( GetFrm() ); - return pCellFrm->GetTabBox()->GetFrameFormat(); + const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>( GetFrame() ); + return pCellFrame->GetTabBox()->GetFrameFormat(); } //Implement TableCell currentValue @@ -437,7 +437,7 @@ sal_Int32 SAL_CALL SwAccessibleCell::getBackground() { SolarMutexGuard g; - const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = GetFrame()->GetAttrSet()->GetBackground(); sal_uInt32 crBack = rBack.GetColor().GetColor(); if (COL_AUTO == crBack) diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx index 6814270b172b..6d66f33e35b9 100644 --- a/sw/source/core/access/acccell.hxx +++ b/sw/source/core/access/acccell.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleValue.hpp> #include <accselectionhelper.hxx> -class SwCellFrm; +class SwCellFrame; class SwAccessibleTable; class SwFrameFormat; @@ -40,7 +40,7 @@ class SwAccessibleCell : public SwAccessibleContext, bool IsSelected(); bool _InvalidateMyCursorPos(); - bool _InvalidateChildrenCursorPos( const SwFrm *pFrm ); + bool _InvalidateChildrenCursorPos( const SwFrame *pFrame ); rtl::Reference<SwAccessibleTable> m_pAccTable; @@ -54,7 +54,7 @@ protected: virtual ~SwAccessibleCell(); public: - SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm ); + SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrame *pCellFrame ); virtual bool HasCursor() override; // required by map to remember that object @@ -85,7 +85,7 @@ public: virtual void Dispose( bool bRecursive = false ) override; - virtual void InvalidatePosOrSize( const SwRect& rFrm ) override; + virtual void InvalidatePosOrSize( const SwRect& rFrame ) override; // XInterface diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index f10e16acd7dc..e200104967dc 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -97,43 +97,43 @@ vcl::Window *SwAccessibleContext::GetWindow() } // get SwViewShell from accessibility map, and cast to cursor shell -SwCrsrShell* SwAccessibleContext::GetCrsrShell() +SwCursorShell* SwAccessibleContext::GetCursorShell() { - SwCrsrShell* pCrsrShell; + SwCursorShell* pCursorShell; SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr; OSL_ENSURE( pViewShell, "no view shell" ); - if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr ) - pCrsrShell = static_cast<SwCrsrShell*>( pViewShell ); + if( pViewShell && dynamic_cast<const SwCursorShell*>( pViewShell) != nullptr ) + pCursorShell = static_cast<SwCursorShell*>( pViewShell ); else - pCrsrShell = nullptr; + pCursorShell = nullptr; - return pCrsrShell; + return pCursorShell; } -const SwCrsrShell* SwAccessibleContext::GetCrsrShell() const +const SwCursorShell* SwAccessibleContext::GetCursorShell() const { - // just like non-const GetCrsrShell - const SwCrsrShell* pCrsrShell; + // just like non-const GetCursorShell + const SwCursorShell* pCursorShell; const SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr; OSL_ENSURE( pViewShell, "no view shell" ); - if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr ) - pCrsrShell = static_cast<const SwCrsrShell*>( pViewShell ); + if( pViewShell && dynamic_cast<const SwCursorShell*>( pViewShell) != nullptr ) + pCursorShell = static_cast<const SwCursorShell*>( pViewShell ); else - pCrsrShell = nullptr; + pCursorShell = nullptr; - return pCrsrShell; + return pCursorShell; } enum class Action { NONE, SCROLLED, SCROLLED_WITHIN, SCROLLED_IN, SCROLLED_OUT }; -void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, +void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame, const SwRect& rOldVisArea ) { const SwRect& rNewVisArea = GetVisArea(); - const bool bVisibleChildrenOnly = SwAccessibleChild( pFrm ).IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( pFrame ).IsVisibleChildrenOnly(); - const SwAccessibleChildSList aList( *pFrm, *(GetMap()) ); + const SwAccessibleChildSList aList( *pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); while( aIter != aList.end() ) { @@ -182,11 +182,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } if( Action::NONE != eAction ) { - if ( rLower.GetSwFrm() ) + if ( rLower.GetSwFrame() ) { OSL_ENSURE( !rLower.AlwaysIncludeAsChild(), "<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" ); - const SwFrm* pLower( rLower.GetSwFrm() ); + const SwFrame* pLower( rLower.GetSwFrame() ); ::rtl::Reference< SwAccessibleContext > xAccImpl = GetMap()->GetContextImpl( pLower ); if( xAccImpl.is() ) @@ -256,13 +256,13 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } } } - else if ( rLower.GetSwFrm() && + else if ( rLower.GetSwFrame() && ( !bVisibleChildrenOnly || aBox.IsOver( rOldVisArea ) || aBox.IsOver( rNewVisArea ) ) ) { // There are no unaccessible SdrObjects that need to be notified - ChildrenScrolled( rLower.GetSwFrm(), rOldVisArea ); + ChildrenScrolled( rLower.GetSwFrame(), rOldVisArea ); } ++aIter; } @@ -272,7 +272,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea ) { SetVisArea( GetMap()->GetVisArea() ); - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); @@ -291,7 +291,7 @@ void SwAccessibleContext::ScrolledWithin( const SwRect& rOldVisArea ) { SetVisArea( GetMap()->GetVisArea() ); - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); FireVisibleDataEvent(); } @@ -305,7 +305,7 @@ void SwAccessibleContext::ScrolledIn() "Vis area of child is wrong. Did it exist already?" ); // Send child event at parent. That's all we have to do here. - const SwFrm* pParent = GetParent(); + const SwFrame* pParent = GetParent(); ::rtl::Reference< SwAccessibleContext > xParentImpl( GetMap()->GetContextImpl( pParent, false ) ); uno::Reference < XAccessibleContext > xThis( this ); @@ -341,7 +341,7 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea ) // because this call will only dispose children that are in the // new vis area. The children we want to dispose however are in the // old vis area all. - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); // Broadcast a state changed event for the showing state. // It might be that the child is freshly created just to send @@ -350,16 +350,16 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea ) } // #i27301# - use new type definition for <_nStates> -void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, +void SwAccessibleContext::InvalidateChildrenStates( const SwFrame* _pFrame, AccessibleStates _nStates ) { - const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrm, *(GetMap()) ); + const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm* pLower = rLower.GetSwFrm(); + const SwFrame* pLower = rLower.GetSwFrame(); if( pLower ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; @@ -383,15 +383,15 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, } } -void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm, +void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame, bool bRecursive ) { - const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *(GetMap()) ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm* pLower = rLower.GetSwFrm(); + const SwFrame* pLower = rLower.GetSwFrame(); if( pLower ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; @@ -432,8 +432,8 @@ void SwAccessibleContext::_InvalidateFocus() void SwAccessibleContext::FireAccessibleEvent( AccessibleEventObject& rEvent ) { - OSL_ENSURE( GetFrm(), "fire event for disposed frame?" ); - if( !GetFrm() ) + OSL_ENSURE( GetFrame(), "fire event for disposed frame?" ); + if( !GetFrame() ) return; if( !rEvent.Source.is() ) @@ -512,7 +512,7 @@ bool SwAccessibleContext::IsEditableState() SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *const pMap, sal_Int16 const nRole, - const SwFrm *pF ) + const SwFrame *pF ) : SwAccessibleFrame( pMap->GetVisArea().SVRect(), pF, pMap->GetShell()->IsPreview() ) , m_pMap( pMap ) @@ -528,7 +528,7 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *const pMap, SwAccessibleContext::~SwAccessibleContext() { SolarMutexGuard aGuard; - RemoveFrmFromAccessibleMap(); + RemoveFrameFromAccessibleMap(); } uno::Reference< XAccessibleContext > SAL_CALL @@ -575,10 +575,10 @@ uno::Reference< XAccessible> SAL_CALL } uno::Reference< XAccessible > xChild; - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { ::rtl::Reference < SwAccessibleContext > xChildImpl( - GetMap()->GetContextImpl( aChild.GetSwFrm(), !m_isDisposing ) ); + GetMap()->GetContextImpl( aChild.GetSwFrame(), !m_isDisposing ) ); if( xChildImpl.is() ) { xChildImpl->SetParent( this ); @@ -608,7 +608,7 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent() CHECK_FOR_DEFUNC( XAccessibleContext ) - const SwFrm *pUpper = GetParent(); + const SwFrame *pUpper = GetParent(); OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" ); uno::Reference< XAccessible > xAcc; @@ -633,7 +633,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent() CHECK_FOR_DEFUNC( XAccessibleContext ) - const SwFrm *pUpper = GetParent(); + const SwFrame *pUpper = GetParent(); OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" ); sal_Int32 nIndex = -1; @@ -643,7 +643,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent() GetMap()->GetContextImpl(pUpper, !m_isDisposing) ); OSL_ENSURE( xAccImpl.is() || m_isDisposing, "no parent found" ); if( xAccImpl.is() ) - nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrm()) ); + nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrame()) ); } return nIndex; @@ -776,18 +776,18 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint CHECK_FOR_WINDOW( XAccessibleComponent, pWin ) Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent - if( !GetFrm()->IsRootFrm() ) + if( !GetFrame()->IsRootFrame() ) { - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPixPoint.setX(aPixPoint.getX() + aPixPos.getX()); aPixPoint.setY(aPixPoint.getY() + aPixPos.getY()); } const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) ); - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { - xAcc = GetMap()->GetContext( aChild.GetSwFrm() ); + xAcc = GetMap()->GetContext( aChild.GetSwFrame() ); } else if( aChild.GetDrawObject() ) { @@ -826,30 +826,30 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(bool bRelative) CHECK_FOR_DEFUNC( XAccessibleComponent ) - const SwFrm *pParent = GetParent(); + const SwFrame *pParent = GetParent(); OSL_ENSURE( pParent, "no Parent found" ); vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent ) - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Rectangle aPixBounds( 0, 0, 0, 0 ); - if( GetFrm()->IsPageFrm() && - static_cast < const SwPageFrm * >( GetFrm() )->IsEmptyPage() ) + if( GetFrame()->IsPageFrame() && + static_cast < const SwPageFrame * >( GetFrame() )->IsEmptyPage() ) { OSL_ENSURE( GetShell()->IsPreview(), "empty page accessible?" ); if( GetShell()->IsPreview() ) { // adjust method call <GetMap()->GetPreviewPageSize()> sal_uInt16 nPageNum = - static_cast < const SwPageFrm * >( GetFrm() )->GetPhyPageNum(); + static_cast < const SwPageFrame * >( GetFrame() )->GetPhyPageNum(); aLogBounds.SSize( GetMap()->GetPreviewPageSize( nPageNum ) ); } } if( !aLogBounds.IsEmpty() ) { aPixBounds = GetMap()->CoreToPixel( aLogBounds.SVRect() ); - if( !pParent->IsRootFrm() && bRelative) + if( !pParent->IsRootFrame() && bRelative) { SwRect aParentLogBounds( GetBounds( *(GetMap()), pParent ) ); // twip rel to doc root Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() ); @@ -910,30 +910,30 @@ void SAL_CALL SwAccessibleContext::grabFocus() CHECK_FOR_DEFUNC( XAccessibleContext ); - if( GetFrm()->IsFlyFrm() ) + if( GetFrame()->IsFlyFrame() ) { const SdrObject *pObj = - static_cast < const SwFlyFrm * >( GetFrm() )->GetVirtDrawObj(); + static_cast < const SwFlyFrame * >( GetFrame() )->GetVirtDrawObj(); if( pObj ) Select( const_cast < SdrObject * >( pObj ), false ); } else { - const SwContentFrm *pCFrm = nullptr; - if( GetFrm()->IsContentFrm() ) - pCFrm = static_cast< const SwContentFrm * >( GetFrm() ); - else if( GetFrm()->IsLayoutFrm() ) - pCFrm = static_cast< const SwLayoutFrm * >( GetFrm() )->ContainsContent(); + const SwContentFrame *pCFrame = nullptr; + if( GetFrame()->IsContentFrame() ) + pCFrame = static_cast< const SwContentFrame * >( GetFrame() ); + else if( GetFrame()->IsLayoutFrame() ) + pCFrame = static_cast< const SwLayoutFrame * >( GetFrame() )->ContainsContent(); - if( pCFrm && pCFrm->IsTextFrm() ) + if( pCFrame && pCFrame->IsTextFrame() ) { - const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pCFrm ); - const SwTextNode *pTextNd = pTextFrm->GetTextNode(); + const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pCFrame ); + const SwTextNode *pTextNd = pTextFrame->GetTextNode(); if( pTextNd ) { // create pam for selection SwIndex aIndex( const_cast< SwTextNode * >( pTextNd ), - pTextFrm->GetOfst() ); + pTextFrame->GetOfst() ); SwPosition aStartPos( *pTextNd, aIndex ); SwPaM aPaM( aStartPos ); @@ -1026,7 +1026,7 @@ void SwAccessibleContext::Dispose( bool bRecursive ) { SolarMutexGuard aGuard; - OSL_ENSURE( GetFrm() && GetMap(), "already disposed" ); + OSL_ENSURE( GetFrame() && GetMap(), "already disposed" ); OSL_ENSURE( GetMap()->GetVisArea() == GetVisArea(), "invalid vis area for dispose" ); @@ -1034,7 +1034,7 @@ void SwAccessibleContext::Dispose( bool bRecursive ) // dispose children if( bRecursive ) - DisposeChildren( GetFrm(), bRecursive ); + DisposeChildren( GetFrame(), bRecursive ); // get parent uno::Reference< XAccessible > xParent( GetWeakParent() ); @@ -1065,58 +1065,58 @@ void SwAccessibleContext::Dispose( bool bRecursive ) m_nClientId = 0; } - RemoveFrmFromAccessibleMap(); - ClearFrm(); + RemoveFrameFromAccessibleMap(); + ClearFrame(); m_pMap = nullptr; m_isDisposing = false; } -void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrObj, bool bRecursive ) { SolarMutexGuard aGuard; - if ( IsShowing( *(GetMap()), rChildFrmOrObj ) || - rChildFrmOrObj.AlwaysIncludeAsChild() || - !SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly() ) + if ( IsShowing( *(GetMap()), rChildFrameOrObj ) || + rChildFrameOrObj.AlwaysIncludeAsChild() || + !SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly() ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefore no one is interested to // get notified of the movement. - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->Dispose( bRecursive ); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); - DisposeShape( rChildFrmOrObj.GetDrawObject(), + DisposeShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; uno::Reference< XAccessible > xAcc = - rChildFrmOrObj.GetWindow()->GetAccessible(); + rChildFrameOrObj.GetWindow()->GetAccessible(); aEvent.OldValue <<= xAcc; FireAccessibleEvent( aEvent ); } } - else if( bRecursive && rChildFrmOrObj.GetSwFrm() ) - DisposeChildren( rChildFrmOrObj.GetSwFrm(), bRecursive ); + else if( bRecursive && rChildFrameOrObj.GetSwFrame() ) + DisposeChildren( rChildFrameOrObj.GetSwFrame(), bRecursive ); } void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) { SolarMutexGuard aGuard; - OSL_ENSURE( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" ); + OSL_ENSURE( GetFrame() && !GetFrame()->Frame().IsEmpty(), "context should have a size" ); bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); @@ -1144,47 +1144,47 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) } void SwAccessibleContext::InvalidateChildPosOrSize( - const SwAccessibleChild& rChildFrmOrObj, - const SwRect& rOldFrm ) + const SwAccessibleChild& rChildFrameOrObj, + const SwRect& rOldFrame ) { SolarMutexGuard aGuard; - OSL_ENSURE( !rChildFrmOrObj.GetSwFrm() || - !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(), + OSL_ENSURE( !rChildFrameOrObj.GetSwFrame() || + !rChildFrameOrObj.GetSwFrame()->Frame().IsEmpty(), "child context should have a size" ); - if ( rChildFrmOrObj.AlwaysIncludeAsChild() ) + if ( rChildFrameOrObj.AlwaysIncludeAsChild() ) { // nothing to do; return; } - const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly(); - const bool bNew = rOldFrm.IsEmpty() || - ( rOldFrm.Left() == 0 && rOldFrm.Top() == 0 ); - if( IsShowing( *(GetMap()), rChildFrmOrObj ) ) + const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly(); + const bool bNew = rOldFrame.IsEmpty() || + ( rOldFrame.Left() == 0 && rOldFrame.Top() == 0 ); + if( IsShowing( *(GetMap()), rChildFrameOrObj ) ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefore no one is interested to // get notified of the movement. - if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrm )) ) + if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrame )) ) { - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { // The frame becomes visible. A child event must be send. ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->ScrolledIn(); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); // #i37790# if ( xAccImpl.is() ) { - ScrolledInShape( rChildFrmOrObj.GetDrawObject(), + ScrolledInShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } else @@ -1192,11 +1192,11 @@ void SwAccessibleContext::InvalidateChildPosOrSize( OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." ); } } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; - aEvent.NewValue <<= (rChildFrmOrObj.GetWindow()->GetAccessible()); + aEvent.NewValue <<= (rChildFrameOrObj.GetWindow()->GetAccessible()); FireAccessibleEvent( aEvent ); } } @@ -1208,24 +1208,24 @@ void SwAccessibleContext::InvalidateChildPosOrSize( // no notifications for grandchildren are required. If the are // grandgrandchildren, they would be notified by the layout. if( bVisibleChildrenOnly && - !bNew && IsShowing( rOldFrm ) ) + !bNew && IsShowing( rOldFrame ) ) { - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->SetParent( this ); xAccImpl->Dispose( true ); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); - DisposeShape( rChildFrmOrObj.GetDrawObject(), + DisposeShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <vcl::Window>." ); } @@ -1292,7 +1292,7 @@ void SwAccessibleContext::InvalidateStates( AccessibleStates _nStates ) } } - InvalidateChildrenStates( GetFrm(), _nStates ); + InvalidateChildrenStates( GetFrame(), _nStates ); } } @@ -1330,19 +1330,19 @@ bool SwAccessibleContext::HasCursor() bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, bool bAdd ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( !pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( !pCursorShell ) return false; - SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast<SwFEShell*>( pCrsrShell ) + SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast<SwFEShell*>( pCursorShell ) : nullptr; // Get rid of activated OLE object if( pFEShell ) pFEShell->FinishOLEObj(); - SwWrtShell* pWrtShell = dynamic_cast<const SwWrtShell*>( pCrsrShell) != nullptr - ? static_cast<SwWrtShell*>( pCrsrShell ) + SwWrtShell* pWrtShell = dynamic_cast<const SwWrtShell*>( pCursorShell) != nullptr + ? static_cast<SwWrtShell*>( pCursorShell ) : nullptr; bool bRet = false; @@ -1360,28 +1360,28 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, { // Get rid of frame selection. If there is one, make text cursor // visible again. - bool bCallShowCrsr = false; - if( pFEShell && (pFEShell->IsFrmSelected() || + bool bCallShowCursor = false; + if( pFEShell && (pFEShell->IsFrameSelected() || pFEShell->IsObjSelected()) ) { Point aPt( LONG_MIN, LONG_MIN ); pFEShell->SelectObj( aPt ); - bCallShowCrsr = true; + bCallShowCursor = true; } - pCrsrShell->KillPams(); + pCursorShell->KillPams(); if( pWrtShell && pPaM->HasMark() ) // We have to do this or SwWrtShell can't figure out that it needs // to kill the selection later, when the user moves the cursor. pWrtShell->SttSelect(); - pCrsrShell->SetSelection( *pPaM ); + pCursorShell->SetSelection( *pPaM ); if( pPaM->HasMark() && *pPaM->GetPoint() == *pPaM->GetMark()) // Setting a "Selection" that starts and ends at the same spot // should remove the selection rather than create an empty one, so // that we get defined behavior if accessibility sets the cursor // later. - pCrsrShell->ClearMark(); - if( bCallShowCrsr ) - pCrsrShell->ShowCrsr(); + pCursorShell->ClearMark(); + if( bCallShowCursor ) + pCursorShell->ShowCursor(); bRet = true; } @@ -1411,22 +1411,22 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, return sStr; } -void SwAccessibleContext::RemoveFrmFromAccessibleMap() +void SwAccessibleContext::RemoveFrameFromAccessibleMap() { - if (m_isRegisteredAtAccessibleMap && GetFrm() && GetMap()) - GetMap()->RemoveContext( GetFrm() ); + if (m_isRegisteredAtAccessibleMap && GetFrame() && GetMap()) + GetMap()->RemoveContext( GetFrame() ); } bool SwAccessibleContext::HasAdditionalAccessibleChildren() { bool bRet( false ); - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { - bRet = pPostItMgr->HasFrmConnectedSidebarWins( *(GetFrm()) ); + bRet = pPostItMgr->HasFrameConnectedSidebarWins( *(GetFrame()) ); } } @@ -1438,13 +1438,13 @@ vcl::Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 { vcl::Window* pAdditionalAccessibleChild( nullptr ); - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { pAdditionalAccessibleChild = - pPostItMgr->GetSidebarWinForFrmByIndex( *(GetFrm()), nIndex ); + pPostItMgr->GetSidebarWinForFrameByIndex( *(GetFrame()), nIndex ); } } @@ -1454,12 +1454,12 @@ vcl::Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 /** #i88070# - get all additional accessible children */ void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< vcl::Window* >* pChildren ) { - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { - pPostItMgr->GetAllSidebarWinForFrm( *(GetFrm()), pChildren ); + pPostItMgr->GetAllSidebarWinForFrame( *(GetFrame()), pChildren ); } } } diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index e52daa569fed..e703bf4e6c29 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -31,7 +31,7 @@ namespace vcl { class Window; } class SwAccessibleMap; -class SwCrsrShell; +class SwCursorShell; class SdrObject; class SwPaM; namespace utl { @@ -55,7 +55,7 @@ class SwAccessibleContext : { // The implements for the XAccessibleSelection interface has been // 'externalized' and wants access to the protected members like - // GetMap, GetChild, GetParent, and GetFrm. + // GetMap, GetChild, GetParent, and GetFrame. friend class SwAccessibleSelectionHelper; protected: @@ -117,15 +117,15 @@ protected: return GetMap()->GetShell(); } - /** convenience method to get SwCrsrShell through accessibility map - * @returns SwCrsrShell, or NULL if none is found */ - SwCrsrShell* GetCrsrShell(); - const SwCrsrShell* GetCrsrShell() const; + /** convenience method to get SwCursorShell through accessibility map + * @returns SwCursorShell, or NULL if none is found */ + SwCursorShell* GetCursorShell(); + const SwCursorShell* GetCursorShell() const; // Notify all children that the vis area has changed. - // The SwFrm might belong to the current object or to any other child or + // The SwFrame might belong to the current object or to any other child or // grandchild. - void ChildrenScrolled( const SwFrm *pFrm, const SwRect& rOldVisArea ); + void ChildrenScrolled( const SwFrame *pFrame, const SwRect& rOldVisArea ); // The context's showing state changed. May only be called for context that // exist even if they aren't visible. @@ -140,15 +140,15 @@ protected: // The context has to be removed while setting the vis area void ScrolledOut( const SwRect& rOldVisArea ); - // Invalidate the states of all children of the specified SwFrm. The - // SwFrm might belong the current object or to any child or grandchild! + // Invalidate the states of all children of the specified SwFrame. The + // SwFrame might belong the current object or to any child or grandchild! // #i27301# - use new type definition for <_nStates> - void InvalidateChildrenStates( const SwFrm* _pFrm, + void InvalidateChildrenStates( const SwFrame* _pFrame, AccessibleStates _nStates ); - // Dispose children of the specified SwFrm. The SwFrm might belong to + // Dispose children of the specified SwFrame. The SwFrame might belong to // the current object or to any other child or grandchild. - void DisposeChildren( const SwFrm *pFrm, + void DisposeChildren( const SwFrame *pFrame, bool bRecursive ); void DisposeShape( const SdrObject *pObj, @@ -188,13 +188,13 @@ protected: { m_isRegisteredAtAccessibleMap = false; } - void RemoveFrmFromAccessibleMap(); + void RemoveFrameFromAccessibleMap(); virtual ~SwAccessibleContext(); public: SwAccessibleContext( SwAccessibleMap *m_pMap, sal_Int16 nRole, - const SwFrm *pFrm ); + const SwFrame *pFrame ); // XAccessible @@ -319,14 +319,14 @@ public: virtual void Dispose( bool bRecursive = false ); // The child object is not visible an longer and should be destroyed - virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, bool bRecursive ); + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive ); // The object has been moved by the layout - virtual void InvalidatePosOrSize( const SwRect& rFrm ); + virtual void InvalidatePosOrSize( const SwRect& rFrame ); // The child object has been moved by the layout - virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, - const SwRect& rFrm ); + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj, + const SwRect& rFrame ); // The content may have changed (but it hasn't to have changed) void InvalidateContent(); @@ -386,7 +386,7 @@ public: throw aExcept; #define CHECK_FOR_DEFUNC_THIS( ifc, ths ) \ - if( !(GetFrm() && GetMap()) ) \ + if( !(GetFrame() && GetMap()) ) \ { \ css::uno::Reference < ifc > xThis( ths ); \ css::lang::DisposedException aExcept( \ diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 08271f25bf16..2cb759a11876 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -93,7 +93,7 @@ void SwAccessibleDocumentBase::SetVisArea() SwAccessibleFrame::SetVisArea( GetMap()->GetVisArea() ); // #i58139# - showing state of document view needs also be updated. // Thus, call method <Scrolled(..)> instead of <ChildrenScrolled(..)> - // ChildrenScrolled( GetFrm(), aOldVisArea ); + // ChildrenScrolled( GetFrame(), aOldVisArea ); Scrolled( aOldVisArea ); } } @@ -382,7 +382,7 @@ SwAccessibleDocument::~SwAccessibleDocument() void SwAccessibleDocument::Dispose( bool bRecursive ) { - OSL_ENSURE( GetFrm() && GetMap(), "already disposed" ); + OSL_ENSURE( GetFrame() && GetMap(), "already disposed" ); vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr; if( pWin ) @@ -559,12 +559,12 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() if (!pDoc) return anyAtrribute; - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( !pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( !pCursorShell ) return anyAtrribute; - SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast<SwFEShell*>( pCrsrShell ) + SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast<SwFEShell*>( pCursorShell ) : nullptr; OUString sAttrName; OUString sValue; @@ -582,95 +582,95 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += OUString::number( nPage ) ; sAttrName = ";total-pages:"; sValue += sAttrName; - sValue += OUString::number( pCrsrShell->GetPageCnt() ) ; + sValue += OUString::number( pCursorShell->GetPageCnt() ) ; sValue += ";"; sAttrName = "line-number:"; - SwContentFrm* pCurrFrm = pCrsrShell->GetCurrFrm(); - SwPageFrm* pCurrPage=static_cast<SwFrm*>(pCurrFrm)->FindPageFrm(); + SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame(); + SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame(); sal_uLong nLineNum = 0; - SwTextFrm* pTextFrm = nullptr; - SwTextFrm* pCurrTextFrm = nullptr; - pTextFrm = static_cast< SwTextFrm* >(static_cast< SwPageFrm* > (pCurrPage)->ContainsContent()); - if (pCurrFrm->IsInFly())//such as, graphic,chart + SwTextFrame* pTextFrame = nullptr; + SwTextFrame* pCurrTextFrame = nullptr; + pTextFrame = static_cast< SwTextFrame* >(static_cast< SwPageFrame* > (pCurrPage)->ContainsContent()); + if (pCurrFrame->IsInFly())//such as, graphic,chart { - SwFlyFrm *pFlyFrm = pCurrFrm->FindFlyFrm(); - const SwFormatAnchor& rAnchor = pFlyFrm->GetFormat()->GetAnchor(); + SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame(); + const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor(); RndStdIds eAnchorId = rAnchor.GetAnchorId(); if(eAnchorId == FLY_AS_CHAR) { - const SwFrm *pSwFrm = pFlyFrm->GetAnchorFrm(); - if(pSwFrm->IsTextFrm()) - pCurrTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pSwFrm)); + const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame(); + if(pSwFrame->IsTextFrame()) + pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSwFrame)); } } else - pCurrTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm* >(pCurrFrm)); + pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame* >(pCurrFrame)); //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer - SwFrm* pFrm = pCurrTextFrm; - while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) - pCurrTextFrm = nullptr; + SwFrame* pFrame = pCurrTextFrame; + while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) + pCurrTextFrame = nullptr; //check shape - if(pCrsrShell->Imp()->GetDrawView()) + if(pCursorShell->Imp()->GetDrawView()) { - const SdrMarkList &rMrkList = pCrsrShell->Imp()->GetDrawView()->GetMarkedObjectList(); + const SdrMarkList &rMrkList = pCursorShell->Imp()->GetDrawView()->GetMarkedObjectList(); for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj(); SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat(); const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); if( FLY_AS_CHAR != rAnchor.GetAnchorId() ) - pCurrTextFrm = nullptr; + pCurrTextFrame = nullptr; } } //calculate line number - if (pCurrTextFrm && pTextFrm) + if (pCurrTextFrame && pTextFrame) { - if (!(pCurrTextFrm->IsInTab() || pCurrTextFrm->IsInFootnote())) + if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote())) { - while( pTextFrm != pCurrTextFrm ) + while( pTextFrame != pCurrTextFrame ) { //check header/footer - pFrm = pTextFrm; - while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) + pFrame = pTextFrame; + while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) { - pTextFrm = static_cast< SwTextFrm*>(pTextFrm->GetNextContentFrm()); + pTextFrame = static_cast< SwTextFrame*>(pTextFrame->GetNextContentFrame()); continue; } - if (!(pTextFrm->IsInTab() || pTextFrm->IsInFootnote() || pTextFrm->IsInFly())) - nLineNum += pTextFrm->GetThisLines(); - pTextFrm = static_cast< SwTextFrm* >(pTextFrm ->GetNextContentFrm()); + if (!(pTextFrame->IsInTab() || pTextFrame->IsInFootnote() || pTextFrame->IsInFly())) + nLineNum += pTextFrame->GetThisLines(); + pTextFrame = static_cast< SwTextFrame* >(pTextFrame ->GetNextContentFrame()); } - SwPaM* pCaret = pCrsrShell->GetCrsr(); - if (!pCurrTextFrm->IsEmpty() && pCaret) + SwPaM* pCaret = pCursorShell->GetCursor(); + if (!pCurrTextFrame->IsEmpty() && pCaret) { - if (pCurrTextFrm->IsTextFrm()) + if (pCurrTextFrame->IsTextFrame()) { const SwPosition* pPoint = nullptr; - if(pCurrTextFrm->IsInFly()) + if(pCurrTextFrame->IsInFly()) { - SwFlyFrm *pFlyFrm = pCurrTextFrm->FindFlyFrm(); - const SwFormatAnchor& rAnchor = pFlyFrm->GetFormat()->GetAnchor(); + SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame(); + const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor(); pPoint= rAnchor.GetContentAnchor(); } else pPoint = pCaret->GetPoint(); const sal_Int32 nActPos = pPoint->nContent.GetIndex(); - nLineNum += pCurrTextFrm->GetLineCount( nActPos ); + nLineNum += pCurrTextFrame->GetLineCount( nActPos ); } else//graphic, form, shape, etc. { SwPosition* pPoint = pCaret->GetPoint(); - Point aPt = pCrsrShell->_GetCrsr()->GetPtPos(); - if( pCrsrShell->GetLayout()->GetCrsrOfst( pPoint, aPt/*,* &eTmpState*/ ) ) + Point aPt = pCursorShell->_GetCursor()->GetPtPos(); + if( pCursorShell->GetLayout()->GetCursorOfst( pPoint, aPt/*,* &eTmpState*/ ) ) { const sal_Int32 nActPos = pPoint->nContent.GetIndex(); - nLineNum += pCurrTextFrm->GetLineCount( nActPos ); + nLineNum += pCurrTextFrame->GetLineCount( nActPos ); } } } @@ -684,7 +684,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += ";"; - SwFrm* pCurrCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm(); + SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame(); sAttrName = "column-number:"; sValue += sAttrName; @@ -692,18 +692,18 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() int nCurrCol = 1; if(pCurrCol!=nullptr) { - //SwLayoutFrm* pParent = pCurrCol->GetUpper(); - SwFrm* pCurrPageCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm(); - while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrm()) + //SwLayoutFrame* pParent = pCurrCol->GetUpper(); + SwFrame* pCurrPageCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame(); + while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrame()) { pCurrPageCol = pCurrPageCol->GetUpper(); } - SwLayoutFrm* pParent = pCurrPageCol->GetUpper(); + SwLayoutFrame* pParent = pCurrPageCol->GetUpper(); if(pParent!=nullptr) { - SwFrm* pCol = pParent->Lower(); + SwFrame* pCol = pParent->Lower(); while(pCol&&(pCol!=pCurrPageCol)) { pCol = pCol->GetNext(); @@ -724,13 +724,13 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += ";"; - SwSectionFrm* pCurrSctFrm=static_cast<SwFrm*>(pCurrFrm)->FindSctFrm(); - if(pCurrSctFrm!=nullptr && pCurrSctFrm->GetSection()!=nullptr ) + SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame(); + if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr ) { sAttrName = "section-name:"; sValue += sAttrName; - OUString sectionName = pCurrSctFrm->GetSection()->GetSectionName(); + OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName(); sectionName = sectionName.replaceFirst( "\\" , "\\\\" ); sectionName = sectionName.replaceFirst( "=" , "\\=" ); @@ -749,10 +749,10 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() if(pCurrCol!=nullptr) { - SwLayoutFrm* pParent = pCurrCol->GetUpper(); + SwLayoutFrame* pParent = pCurrCol->GetUpper(); if(pParent!=nullptr) { - SwFrm* pCol = pParent->Lower(); + SwFrame* pCol = pParent->Lower(); while(pCol&&(pCol!=pCurrCol)) { pCol = pCol->GetNext(); @@ -766,7 +766,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() //section-total-columns sAttrName = "section-total-columns:"; - const SwFormatCol &rFormatSctCol=pCurrSctFrm->GetAttrSet()->GetCol(); + const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol(); sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols(); nSctColCount = nSctColCount>0?nSctColCount:1; sValue += sAttrName; @@ -858,38 +858,38 @@ css::uno::Sequence< css::uno::Any > } else if ( nType == FORFINDREPLACEFLOWTO ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if ( pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if ( pCursorShell ) { - SwPaM *_pStartCrsr = pCrsrShell->GetCrsr(), *__pStartCrsr = _pStartCrsr; + SwPaM *_pStartCursor = pCursorShell->GetCursor(), *__pStartCursor = _pStartCursor; SwContentNode* pPrevNode = nullptr; - std::vector<SwFrm*> vFrmList; + std::vector<SwFrame*> vFrameList; do { - if ( _pStartCrsr && _pStartCrsr->HasMark() ) + if ( _pStartCursor && _pStartCursor->HasMark() ) { - SwContentNode* pContentNode = _pStartCrsr->GetContentNode(); + SwContentNode* pContentNode = _pStartCursor->GetContentNode(); if ( pContentNode == pPrevNode ) { continue; } - SwFrm* pFrm = pContentNode ? pContentNode->getLayoutFrm( pCrsrShell->GetLayout() ) : nullptr; - if ( pFrm ) + SwFrame* pFrame = pContentNode ? pContentNode->getLayoutFrame( pCursorShell->GetLayout() ) : nullptr; + if ( pFrame ) { - vFrmList.push_back( pFrm ); + vFrameList.push_back( pFrame ); } pPrevNode = pContentNode; } } - while( _pStartCrsr && ( (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr) ); + while( _pStartCursor && ( (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor) ); - if ( vFrmList.size() ) + if ( vFrameList.size() ) { - uno::Sequence< uno::Any > aRet(vFrmList.size()); - std::vector<SwFrm*>::iterator aIter = vFrmList.begin(); - for ( sal_Int32 nIndex = 0; aIter != vFrmList.end(); ++aIter, nIndex++ ) + uno::Sequence< uno::Any > aRet(vFrameList.size()); + std::vector<SwFrame*>::iterator aIter = vFrameList.begin(); + for ( sal_Int32 nIndex = 0; aIter != vFrameList.end(); ++aIter, nIndex++ ) { uno::Reference< XAccessible > xAcc = pAccMap->GetContext(*aIter, false); if ( xAcc.is() ) diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx index fda48d759d1f..ef3b70b992d2 100644 --- a/sw/source/core/access/accembedded.cxx +++ b/sw/source/core/access/accembedded.cxx @@ -37,8 +37,8 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleEmb SwAccessibleEmbeddedObject::SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleNoTextFrame( pInitMap, AccessibleRole::EMBEDDED_OBJECT, pFlyFrm ) + const SwFlyFrame* pFlyFrame ) : + SwAccessibleNoTextFrame( pInitMap, AccessibleRole::EMBEDDED_OBJECT, pFlyFrame ) { } @@ -108,16 +108,16 @@ css::uno::Any SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes() css::uno::Any strRet; OUString style; - SwFlyFrm* pFFrm = getFlyFrm(); + SwFlyFrame* pFFrame = getFlyFrame(); - if( pFFrm ) + if( pFFrame ) { style = "style:"; - SwContentFrm* pCFrm; - pCFrm = pFFrm->ContainsContent(); - if( pCFrm ) + SwContentFrame* pCFrame; + pCFrame = pFFrame->ContainsContent(); + if( pCFrame ) { - SwContentNode* pCNode = pCFrm->GetNode(); + SwContentNode* pCNode = pCFrame->GetNode(); if( pCNode ) { style += static_cast<SwOLENode*>(pCNode)->GetOLEObj().GetStyleString(); diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx index c349edc09de4..3141ff580fa4 100644 --- a/sw/source/core/access/accembedded.hxx +++ b/sw/source/core/access/accembedded.hxx @@ -33,7 +33,7 @@ protected: public: SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ); + const SwFlyFrame* pFlyFrame ); // XInterface diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx index c71e3fab4690..e64b0308f4e8 100644 --- a/sw/source/core/access/accfootnote.cxx +++ b/sw/source/core/access/accfootnote.cxx @@ -45,10 +45,10 @@ const sal_Char sImplementationNameEndnote[] = "com.sun.star.comp.Writer.SwAccess SwAccessibleFootnote::SwAccessibleFootnote( SwAccessibleMap* pInitMap, bool bIsEndnote, - const SwFootnoteFrm *pFootnoteFrm ) : + const SwFootnoteFrame *pFootnoteFrame ) : SwAccessibleContext( pInitMap, bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE, - pFootnoteFrm ) + pFootnoteFrame ) { SolarMutexGuard aGuard; @@ -57,7 +57,7 @@ SwAccessibleFootnote::SwAccessibleFootnote( OUString sArg; const SwTextFootnote *pTextFootnote = - static_cast< const SwFootnoteFrm *>( GetFrm() )->GetAttr(); + static_cast< const SwFootnoteFrame *>( GetFrame() )->GetAttr(); if( pTextFootnote ) { const SwDoc *pDoc = GetShell()->GetDoc(); @@ -84,7 +84,7 @@ OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription() OUString sArg; const SwTextFootnote *pTextFootnote = - static_cast< const SwFootnoteFrm *>( GetFrm() )->GetAttr(); + static_cast< const SwFootnoteFrame *>( GetFrame() )->GetAttr(); if( pTextFootnote ) { const SwDoc *pDoc = GetMap()->GetShell()->GetDoc(); @@ -128,9 +128,9 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleFootnote::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -bool SwAccessibleFootnote::IsEndnote( const SwFootnoteFrm *pFootnoteFrm ) +bool SwAccessibleFootnote::IsEndnote( const SwFootnoteFrame *pFootnoteFrame ) { - const SwTextFootnote *pTextFootnote = pFootnoteFrm ->GetAttr(); + const SwTextFootnote *pTextFootnote = pFootnoteFrame ->GetAttr(); return pTextFootnote && pTextFootnote->GetFootnote().IsEndNote() ; } diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx index cc48ec61488b..1c715dc305b7 100644 --- a/sw/source/core/access/accfootnote.hxx +++ b/sw/source/core/access/accfootnote.hxx @@ -24,7 +24,7 @@ #include <acccontext.hxx> class SwAccessibleMap; -class SwFootnoteFrm; +class SwFootnoteFrame; class SwAccessibleFootnote : public SwAccessibleContext { @@ -34,7 +34,7 @@ protected: public: SwAccessibleFootnote( SwAccessibleMap* pInitMap, bool bIsEndnote, - const SwFootnoteFrm *pFootnoteFrm ); + const SwFootnoteFrame *pFootnoteFrame ); // XAccessibleContext @@ -64,7 +64,7 @@ public: // XTypeProvider virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(css::uno::RuntimeException, std::exception) override; - static bool IsEndnote( const SwFootnoteFrm *pFrm ); + static bool IsEndnote( const SwFootnoteFrame *pFrame ); }; #endif diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 7ea913440e0a..aafafd8278d4 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -46,12 +46,12 @@ using namespace sw::access; // frame's paint area. sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bInPagePreview ) { sal_Int32 nCount = 0; - const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, *pFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) @@ -61,11 +61,11 @@ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, { nCount++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count nCount += GetChildCount( rAccMap, - rVisArea, rLower.GetSwFrm(), + rVisArea, rLower.GetSwFrame(), bInPagePreview ); } ++aIter; @@ -77,7 +77,7 @@ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, SwAccessibleChild SwAccessibleFrame::GetChild( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, sal_Int32& rPos, bool bInPagePreview ) { @@ -85,10 +85,10 @@ SwAccessibleChild SwAccessibleFrame::GetChild( if( rPos >= 0 ) { - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() && !aRet.IsValid() ) { @@ -100,11 +100,11 @@ SwAccessibleChild SwAccessibleFrame::GetChild( else rPos--; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count aRet = GetChild( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rPos, + rVisArea, *(rLower.GetSwFrame()), rPos, bInPagePreview ); } ++aIter; @@ -114,7 +114,7 @@ SwAccessibleChild SwAccessibleFrame::GetChild( { // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { @@ -126,11 +126,11 @@ SwAccessibleChild SwAccessibleFrame::GetChild( else rPos--; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count aRet = GetChild( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rPos, + rVisArea, *(rLower.GetSwFrame()), rPos, bInPagePreview ); } ++aIter; @@ -144,17 +144,17 @@ SwAccessibleChild SwAccessibleFrame::GetChild( bool SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const SwAccessibleChild& rChild, sal_Int32& rPos, bool bInPagePreview ) { bool bFound = false; - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() && !bFound ) { @@ -166,11 +166,11 @@ bool SwAccessibleFrame::GetChildIndex( else rPos++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count bFound = GetChildIndex( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rChild, + rVisArea, *(rLower.GetSwFrame()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -181,7 +181,7 @@ bool SwAccessibleFrame::GetChildIndex( // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !bFound ) { @@ -193,11 +193,11 @@ bool SwAccessibleFrame::GetChildIndex( else rPos++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count bFound = GetChildIndex( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rChild, + rVisArea, *(rLower.GetSwFrame()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -208,18 +208,18 @@ bool SwAccessibleFrame::GetChildIndex( } SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const Point& rPixPos, bool bInPagePreview, SwAccessibleMap& rAccMap ) { SwAccessibleChild aRet; - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here, and we have to reverse iterate, // because objects in front should be returned. - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_reverse_iterator aRIter( aVisMap.crbegin() ); while( aRIter != aVisMap.crend() && !aRet.IsValid() ) { @@ -236,10 +236,10 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, aRet = rLower; } } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrame()), rPixPos, bInPagePreview, rAccMap ); } ++aRIter; @@ -250,7 +250,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, // The unsorted list is sorted enough, because it returns lower // frames in the correct order. Moreover, we can iterate forward, // because the lowers don't overlap! - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { @@ -267,10 +267,10 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, aRet = rLower; } } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrame()), rPixPos, bInPagePreview, rAccMap ); } ++aIter; @@ -282,14 +282,14 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, ::std::list< SwAccessibleChild >& rChildren, bool bInPagePreview ) { - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() ) { @@ -298,10 +298,10 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { rChildren.push_back( rLower ); } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrame()), rChildren, bInPagePreview ); } ++aIter; @@ -311,7 +311,7 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { @@ -320,10 +320,10 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { rChildren.push_back( rLower ); } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrame()), rChildren, bInPagePreview ); } ++aIter; @@ -332,20 +332,20 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, } SwRect SwAccessibleFrame::GetBounds( const SwAccessibleMap& rAccMap, - const SwFrm *pFrm ) + const SwFrame *pFrame ) { - if( !pFrm ) - pFrm = GetFrm(); + if( !pFrame ) + pFrame = GetFrame(); - SwAccessibleChild aFrm( pFrm ); - SwRect aBounds( aFrm.GetBounds( rAccMap ).Intersection( maVisArea ) ); + SwAccessibleChild aFrame( pFrame ); + SwRect aBounds( aFrame.GetBounds( rAccMap ).Intersection( maVisArea ) ); return aBounds; } bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const { - const SwFrm *pFrm = GetFrm(); - if( !pFrm ) + const SwFrame *pFrame = GetFrame(); + if( !pFrame ) return false; OSL_ENSURE( pVSh, "no view shell" ); @@ -353,7 +353,7 @@ bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const pVSh->IsPreview()) ) return false; - if( !pFrm->IsRootFrm() && pFrm->IsProtected() ) + if( !pFrame->IsRootFrame() && pFrame->IsProtected() ) return false; return true; @@ -361,8 +361,8 @@ bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const bool SwAccessibleFrame::IsOpaque( SwViewShell *pVSh ) const { - SwAccessibleChild aFrm( GetFrm() ); - if( !aFrm.GetSwFrm() ) + SwAccessibleChild aFrame( GetFrame() ); + if( !aFrame.GetSwFrame() ) return false; OSL_ENSURE( pVSh, "no view shell" ); @@ -372,49 +372,49 @@ bool SwAccessibleFrame::IsOpaque( SwViewShell *pVSh ) const const SwViewOption *pVOpt = pVSh->GetViewOptions(); do { - const SwFrm *pFrm = aFrm.GetSwFrm(); - if( pFrm->IsRootFrm() ) + const SwFrame *pFrame = aFrame.GetSwFrame(); + if( pFrame->IsRootFrame() ) return true; - if( pFrm->IsPageFrm() && !pVOpt->IsPageBack() ) + if( pFrame->IsPageFrame() && !pVOpt->IsPageBack() ) return false; - const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = pFrame->GetAttrSet()->GetBackground(); if( !rBack.GetColor().GetTransparency() || rBack.GetGraphicPos() != GPOS_NONE ) return true; // If a fly frame has a transparent background color, we have to consider the background. // But a background color "no fill"/"auto fill" should *not* be considered. - if( pFrm->IsFlyFrm() && + if( pFrame->IsFlyFrame() && (rBack.GetColor().GetTransparency() != 0) && (rBack.GetColor() != COL_TRANSPARENT) ) return true; - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - const SwSection* pSection = static_cast<const SwSectionFrm*>(pFrm)->GetSection(); + const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection(); if( pSection && ( TOX_HEADER_SECTION == pSection->GetType() || TOX_CONTENT_SECTION == pSection->GetType() ) && !pVOpt->IsReadonly() && SwViewOption::IsIndexShadings() ) return true; } - if( pFrm->IsFlyFrm() ) - aFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + if( pFrame->IsFlyFrame() ) + aFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); else - aFrm = pFrm->GetUpper(); - } while( aFrm.GetSwFrm() && !aFrm.IsAccessible( IsInPagePreview() ) ); + aFrame = pFrame->GetUpper(); + } while( aFrame.GetSwFrame() && !aFrame.IsAccessible( IsInPagePreview() ) ); return false; } SwAccessibleFrame::SwAccessibleFrame( const SwRect& rVisArea, - const SwFrm *pF, + const SwFrame *pF, bool bIsPagePreview ) : maVisArea( rVisArea ), - mpFrm( pF ), + mpFrame( pF ), mbIsInPagePreview( bIsPagePreview ), bIsAccDocUse( false ) { @@ -424,16 +424,16 @@ SwAccessibleFrame::~SwAccessibleFrame() { } -const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj, +const SwFrame* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrameOrObj, bool bInPagePreview ) { - return rFrmOrObj.GetParent( bInPagePreview ); + return rFrameOrObj.GetParent( bInPagePreview ); } OUString SwAccessibleFrame::GetFormattedPageNumber() const { - sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum(); - sal_uInt32 nFormat = GetFrm()->FindPageFrm()->GetPageDesc() + sal_uInt16 nPageNum = GetFrame()->GetVirtPageNum(); + sal_uInt32 nFormat = GetFrame()->FindPageFrame()->GetPageDesc() ->GetNumType().GetNumberingType(); if( SVX_NUM_NUMBER_NONE == nFormat ) nFormat = SVX_NUM_ARABIC; @@ -444,21 +444,21 @@ OUString SwAccessibleFrame::GetFormattedPageNumber() const sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap ) const { - return GetChildCount( rAccMap, maVisArea, mpFrm, IsInPagePreview() ); + return GetChildCount( rAccMap, maVisArea, mpFrame, IsInPagePreview() ); } sw::access::SwAccessibleChild SwAccessibleFrame::GetChild( SwAccessibleMap& rAccMap, sal_Int32 nPos ) const { - return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrm, nPos, IsInPagePreview() ); + return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrame, nPos, IsInPagePreview() ); } sal_Int32 SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, const sw::access::SwAccessibleChild& rChild ) const { sal_Int32 nPos = 0; - return GetChildIndex( rAccMap, maVisArea, *mpFrm, rChild, nPos, IsInPagePreview() ) + return GetChildIndex( rAccMap, maVisArea, *mpFrame, rChild, nPos, IsInPagePreview() ) ? nPos : -1L; } @@ -467,19 +467,19 @@ sw::access::SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const Point& rPos, SwAccessibleMap& rAccMap ) const { - return GetChildAtPixel( maVisArea, *mpFrm, rPos, IsInPagePreview(), rAccMap ); + return GetChildAtPixel( maVisArea, *mpFrame, rPos, IsInPagePreview(), rAccMap ); } void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, ::std::list< sw::access::SwAccessibleChild >& rChildren ) const { - GetChildren( rAccMap, maVisArea, *mpFrm, rChildren, IsInPagePreview() ); + GetChildren( rAccMap, maVisArea, *mpFrame, rChildren, IsInPagePreview() ); } bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap, - const sw::access::SwAccessibleChild& rFrmOrObj ) const + const sw::access::SwAccessibleChild& rFrameOrObj ) const { - return IsShowing( rFrmOrObj.GetBox( rAccMap ) ); + return IsShowing( rFrameOrObj.GetBox( rAccMap ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index 91462027f665..55d9e2497043 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -29,7 +29,7 @@ #include <accfrmobj.hxx> class SwAccessibleMap; -class SwFrm; +class SwFrame; class SwViewShell; namespace sw { namespace access { class SwAccessibleChild; @@ -40,39 +40,39 @@ namespace sw { namespace access { class SwAccessibleFrame { SwRect maVisArea; - const SwFrm* mpFrm; + const SwFrame* mpFrame; const bool mbIsInPagePreview; protected: // #i77106# - method needs to be called by new class <SwAccessibleTableColHeaders> static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bInPagePreviewr ); // private: static sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, sal_Int32& rPos, bool bInPagePreview); static bool GetChildIndex( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const sw::access::SwAccessibleChild& rChild, sal_Int32& rPos, bool bInPagePreview ); static sw::access::SwAccessibleChild GetChildAtPixel( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const Point& rPos, bool bInPagePreview, SwAccessibleMap& rAccMap ); static void GetChildren( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, ::std::list< sw::access::SwAccessibleChild >& rChildren, bool bInPagePreview ); @@ -82,8 +82,8 @@ protected: bool IsOpaque( SwViewShell *pVSh ) const; bool IsShowing( const SwAccessibleMap& rAccMap, - const sw::access::SwAccessibleChild& rFrmOrObj ) const; - inline bool IsShowing( const SwRect& rFrm ) const; + const sw::access::SwAccessibleChild& rFrameOrObj ) const; + inline bool IsShowing( const SwRect& rFrame ) const; inline bool IsShowing( const SwAccessibleMap& rAccMap ) const; inline bool IsInPagePreview() const @@ -91,23 +91,23 @@ protected: return mbIsInPagePreview; } - inline void ClearFrm() + inline void ClearFrame() { - mpFrm = nullptr; + mpFrame = nullptr; } SwAccessibleFrame( const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bIsPagePreview ); virtual ~SwAccessibleFrame(); // MT: Move to private area? bool bIsAccDocUse; public: - // Return the SwFrm this context is attached to. - const SwFrm* GetFrm() const { return mpFrm; }; + // Return the SwFrame this context is attached to. + const SwFrame* GetFrame() const { return mpFrame; }; - static const SwFrm* GetParent( const sw::access::SwAccessibleChild& rFrmOrObj, + static const SwFrame* GetParent( const sw::access::SwAccessibleChild& rFrameOrObj, bool bInPagePreview ); sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap, @@ -117,14 +117,14 @@ protected: // Return the bounding box of the frame clipped to the vis area. If // no frame is specified, use this' frame. SwRect GetBounds( const SwAccessibleMap& rAccMap, - const SwFrm *pFrm = nullptr ); + const SwFrame *pFrame = nullptr ); // Return the upper that has a context attached. This might be // another one than the immediate upper. - inline const SwFrm *GetParent() const; + inline const SwFrame *GetParent() const; // Return the lower count or the nth lower, there the lowers have a - // not be same one as the SwFrm's lowers + // not be same one as the SwFrame's lowers sal_Int32 GetChildCount( SwAccessibleMap& rAccMap ) const; sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, sal_Int32 nPos ) const; @@ -146,21 +146,21 @@ protected: OUString GetFormattedPageNumber() const; }; -inline bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const +inline bool SwAccessibleFrame::IsShowing( const SwRect& rFrame ) const { - return rFrm.IsOver( maVisArea ); + return rFrame.IsOver( maVisArea ); } inline bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap ) const { - sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); - return IsShowing( rAccMap, aFrmOrObj ); + sw::access::SwAccessibleChild aFrameOrObj( GetFrame() ); + return IsShowing( rAccMap, aFrameOrObj ); } -inline const SwFrm *SwAccessibleFrame::GetParent() const +inline const SwFrame *SwAccessibleFrame::GetParent() const { - sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); - return GetParent( aFrmOrObj, IsInPagePreview() ); + sw::access::SwAccessibleChild aFrameOrObj( GetFrame() ); + return GetParent( aFrameOrObj, IsInPagePreview() ); } #endif diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index f895714fd41c..dcd7e577e0e6 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -53,8 +53,8 @@ bool SwAccessibleFrameBase::IsSelected() if( dynamic_cast<const SwFEShell*>( pVSh) != nullptr ) { const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh ); - const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm(); - if( pFlyFrm == GetFrm() ) + const SwFrame *pFlyFrame = pFESh->GetSelectedFlyFrame(); + if( pFlyFrame == GetFrame() ) bRet = true; } @@ -94,21 +94,21 @@ void SwAccessibleFrameBase::GetStates( rStateSet.AddState( AccessibleStateType::SELECTED ); } -sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrm *pFlyFrm ) +sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrame *pFlyFrame ) { sal_uInt8 nType = ND_TEXTNODE; - if( pFlyFrm->Lower() ) + if( pFlyFrame->Lower() ) { - if( pFlyFrm->Lower()->IsNoTextFrm() ) + if( pFlyFrame->Lower()->IsNoTextFrame() ) { - const SwContentFrm *pCntFrm = - static_cast<const SwContentFrm *>( pFlyFrm->Lower() ); - nType = pCntFrm->GetNode()->GetNodeType(); + const SwContentFrame *pContentFrame = + static_cast<const SwContentFrame *>( pFlyFrame->Lower() ); + nType = pContentFrame->GetNode()->GetNodeType(); } } else { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const SwFormatContent& rContent = pFrameFormat->GetContent(); const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); if( pNdIdx ) @@ -126,13 +126,13 @@ sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrm *pFlyFrm ) SwAccessibleFrameBase::SwAccessibleFrameBase( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleContext( pInitMap, nInitRole, pFlyFrm ), + const SwFlyFrame* pFlyFrame ) : + SwAccessibleContext( pInitMap, nInitRole, pFlyFrame ), bIsSelected( false ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); SetName( pFrameFormat->GetName() ); @@ -215,13 +215,13 @@ SwAccessibleFrameBase::~SwAccessibleFrameBase() void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() ); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( GetFrame() ); switch( nWhich ) { case RES_NAME_CHANGED: - if( pFlyFrm ) + if( pFlyFrame ) { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); assert(pFrameFormat == GetRegisteredIn() && "invalid frame"); const OUString sOldName( GetName() ); @@ -272,25 +272,25 @@ void SwAccessibleFrameBase::Dispose( bool bRecursive ) } //Get the selection cursor of the document. -SwPaM* SwAccessibleFrameBase::GetCrsr() +SwPaM* SwAccessibleFrameBase::GetCursor() { // get the cursor shell; if we don't have any, we don't have a // cursor/selection either - SwPaM* pCrsr = nullptr; - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && !pCrsrShell->IsTableMode() ) + SwPaM* pCursor = nullptr; + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && !pCursorShell->IsTableMode() ) { - SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr; + SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast< SwFEShell * >( pCursorShell ) : nullptr; if( !pFESh || - !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) ) + !(pFESh->IsFrameSelected() || pFESh->IsObjSelected() > 0) ) { // get the selection, and test whether it affects our text node - pCrsr = pCrsrShell->GetCrsr( false /* ??? */ ); + pCursor = pCursorShell->GetCursor( false /* ??? */ ); } } - return pCrsr; + return pCursor; } //Return the selected state of the object. @@ -305,8 +305,8 @@ bool SwAccessibleFrameBase::GetSelectedState( ) } // SELETED. - SwFlyFrm* pFlyFrm = getFlyFrm(); - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + SwFlyFrame* pFlyFrame = getFlyFrame(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); const SwPosition *pPos = pAnchor.GetContentAnchor(); if( !pPos ) @@ -314,23 +314,23 @@ bool SwAccessibleFrameBase::GetSelectedState( ) int pIndex = pPos->nContent.GetIndex(); if( pPos->nNode.GetNode().GetTextNode() ) { - SwPaM* pCrsr = GetCrsr(); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor(); + if( pCursor != nullptr ) { const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // ignore, if no mark - if( pCrsr->HasMark() ) + if( pCursor->HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = pCrsr->Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = pCursor->Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = pCrsr->End(); + SwPosition* pEnd = pCursor->End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { @@ -353,26 +353,26 @@ bool SwAccessibleFrameBase::GetSelectedState( ) // else: this PaM is collapsed and doesn't select anything // next PaM in ring - pCrsr = pCrsr->GetNext(); + pCursor = pCursor->GetNext(); } - while( pCrsr != pRingStart ); + while( pCursor != pRingStart ); } } return false; } -SwFlyFrm* SwAccessibleFrameBase::getFlyFrm() const +SwFlyFrame* SwAccessibleFrameBase::getFlyFrame() const { - SwFlyFrm* pFlyFrm = nullptr; + SwFlyFrame* pFlyFrame = nullptr; - const SwFrm* pFrm = GetFrm(); - assert(pFrm); - if( pFrm->IsFlyFrm() ) + const SwFrame* pFrame = GetFrame(); + assert(pFrame); + if( pFrame->IsFlyFrame() ) { - pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) ); + pFlyFrame = static_cast<SwFlyFrame*>( const_cast<SwFrame*>( pFrame ) ); } - return pFlyFrm; + return pFlyFrame; } bool SwAccessibleFrameBase::SetSelectedState( bool ) diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx index 0be3137423c5..45335a43ad31 100644 --- a/sw/source/core/access/accframebase.hxx +++ b/sw/source/core/access/accframebase.hxx @@ -24,7 +24,7 @@ #include <calbck.hxx> #include <pam.hxx> -class SwFlyFrm; +class SwFlyFrame; class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient @@ -37,9 +37,9 @@ protected: // This derived class additionally sets SELECTABLE(1), SELECTED(+), // FOCUSABLE(1) and FOCUSED(+) virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) override; - SwFlyFrm* getFlyFrm() const; + SwFlyFrame* getFlyFrame() const; bool GetSelectedState( ); - SwPaM* GetCrsr(); + SwPaM* GetCursor(); virtual void _InvalidateCursorPos() override; virtual void _InvalidateFocus() override; @@ -50,11 +50,11 @@ protected: public: SwAccessibleFrameBase( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); virtual bool HasCursor() override; // required by map to remember that object - static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm ); + static sal_uInt8 GetNodeType( const SwFlyFrame *pFlyFrame ); // The object is not visible an longer and should be destroyed virtual void Dispose( bool bRecursive = false ) override; diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index a449247cd103..cbd7b518e486 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -40,45 +40,45 @@ namespace sw { namespace access { SwAccessibleChild::SwAccessibleChild() - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) {} SwAccessibleChild::SwAccessibleChild( const SdrObject* pDrawObj ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { Init( pDrawObj ); } -SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm ) - : mpFrm( nullptr ) +SwAccessibleChild::SwAccessibleChild( const SwFrame* pFrame ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { - Init( pFrm ); + Init( pFrame ); } SwAccessibleChild::SwAccessibleChild( vcl::Window* pWindow ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { Init( pWindow ); } -SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, +SwAccessibleChild::SwAccessibleChild( const SwFrame* pFrame, const SdrObject* pDrawObj, vcl::Window* pWindow ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { - if ( pFrm ) + if ( pFrame ) { - Init( pFrm ); + Init( pFrame ); } else if ( pDrawObj ) { @@ -88,7 +88,7 @@ SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, { Init( pWindow ); } - OSL_ENSURE( (!pFrm || pFrm == mpFrm) && + OSL_ENSURE( (!pFrame || pFrame == mpFrame) && (!pDrawObj || pDrawObj == mpDrawObj) && (!pWindow || pWindow == mpWindow), "invalid frame/object/window combination" ); @@ -98,17 +98,17 @@ SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, void SwAccessibleChild::Init( const SdrObject* pDrawObj ) { mpDrawObj = pDrawObj; - mpFrm = mpDrawObj && dynamic_cast<const SwVirtFlyDrawObj*>( mpDrawObj) != nullptr - ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrm() + mpFrame = mpDrawObj && dynamic_cast<const SwVirtFlyDrawObj*>( mpDrawObj) != nullptr + ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrame() : nullptr; mpWindow = nullptr; } -void SwAccessibleChild::Init( const SwFrm* pFrm ) +void SwAccessibleChild::Init( const SwFrame* pFrame ) { - mpFrm = pFrm; - mpDrawObj = mpFrm && mpFrm->IsFlyFrm() - ? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj() + mpFrame = pFrame; + mpDrawObj = mpFrame && mpFrame->IsFlyFrame() + ? static_cast < const SwFlyFrame * >( mpFrame )->GetVirtDrawObj() : nullptr; mpWindow = nullptr; } @@ -116,7 +116,7 @@ void SwAccessibleChild::Init( const SwFrm* pFrm ) void SwAccessibleChild::Init( vcl::Window* pWindow ) { mpWindow = pWindow; - mpFrm = nullptr; + mpFrame = nullptr; mpDrawObj = nullptr; } @@ -124,14 +124,14 @@ bool SwAccessibleChild::IsAccessible( bool bPagePreview ) const { bool bRet( false ); - if ( mpFrm ) + if ( mpFrame ) { - bRet = mpFrm->IsAccessibleFrm() && - ( !mpFrm->IsCellFrm() || - static_cast<const SwCellFrm *>( mpFrm )->GetTabBox()->GetSttNd() != nullptr ) && - !mpFrm->IsInCoveredCell() && + bRet = mpFrame->IsAccessibleFrame() && + ( !mpFrame->IsCellFrame() || + static_cast<const SwCellFrame *>( mpFrame )->GetTabBox()->GetSttNd() != nullptr ) && + !mpFrame->IsInCoveredCell() && ( bPagePreview || - !mpFrm->IsPageFrm() ); + !mpFrame->IsPageFrame() ); } else if ( mpDrawObj ) { @@ -149,10 +149,10 @@ bool SwAccessibleChild::IsBoundAsChar() const { bool bRet( false ); - if ( mpFrm ) + if ( mpFrame ) { - bRet = mpFrm->IsFlyFrm() && - static_cast< const SwFlyFrm *>(mpFrm)->IsFlyInCntFrm(); + bRet = mpFrame->IsFlyFrame() && + static_cast< const SwFlyFrame *>(mpFrame)->IsFlyInContentFrame(); } else if ( mpDrawObj ) { @@ -169,7 +169,7 @@ bool SwAccessibleChild::IsBoundAsChar() const } SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r ) - : mpFrm( r.mpFrm ) + : mpFrame( r.mpFrame ) , mpDrawObj( r.mpDrawObj ) , mpWindow( r.mpWindow ) {} @@ -177,7 +177,7 @@ SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r ) SwAccessibleChild& SwAccessibleChild::operator=( const SwAccessibleChild& r ) { mpDrawObj = r.mpDrawObj; - mpFrm = r.mpFrm; + mpFrame = r.mpFrame; mpWindow = r.mpWindow; return *this; @@ -189,9 +189,9 @@ SwAccessibleChild& SwAccessibleChild::operator=( const SdrObject* pDrawObj ) return *this; } -SwAccessibleChild& SwAccessibleChild::operator=( const SwFrm* pFrm ) +SwAccessibleChild& SwAccessibleChild::operator=( const SwFrame* pFrame ) { - Init( pFrm ); + Init( pFrame ); return *this; } @@ -203,14 +203,14 @@ SwAccessibleChild& SwAccessibleChild::operator=( vcl::Window* pWindow ) bool SwAccessibleChild::operator==( const SwAccessibleChild& r ) const { - return mpFrm == r.mpFrm && + return mpFrame == r.mpFrame && mpDrawObj == r.mpDrawObj && mpWindow == r.mpWindow; } bool SwAccessibleChild::IsValid() const { - return mpFrm != nullptr || + return mpFrame != nullptr || mpDrawObj != nullptr || mpWindow != nullptr; } @@ -219,17 +219,17 @@ bool SwAccessibleChild::IsVisibleChildrenOnly() const { bool bRet( false ); - if ( !mpFrm ) + if ( !mpFrame ) { bRet = true; } else { - bRet = mpFrm->IsRootFrm() || - !( mpFrm->IsTabFrm() || - mpFrm->IsInTab() || + bRet = mpFrame->IsRootFrame() || + !( mpFrame->IsTabFrame() || + mpFrame->IsInTab() || ( IsBoundAsChar() && - static_cast<const SwFlyFrm*>(mpFrm)->GetAnchorFrm()->IsInTab() ) ); + static_cast<const SwFlyFrame*>(mpFrame)->GetAnchorFrame()->IsInTab() ) ); } return bRet; @@ -239,21 +239,21 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const { SwRect aBox; - if ( mpFrm ) + if ( mpFrame ) { - if ( mpFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + if ( mpFrame->IsPageFrame() && + static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() ) { - aBox = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 1, 1 ); + aBox = SwRect( mpFrame->Frame().Left(), mpFrame->Frame().Top()-1, 1, 1 ); } - else if ( mpFrm->IsTabFrm() ) + else if ( mpFrame->IsTabFrame() ) { - aBox = SwRect( mpFrm->Frm() ); - aBox.Intersection( mpFrm->GetUpper()->Frm() ); + aBox = SwRect( mpFrame->Frame() ); + aBox.Intersection( mpFrame->GetUpper()->Frame() ); } else { - aBox = mpFrm->Frm(); + aBox = mpFrame->Frame(); } } else if( mpDrawObj ) @@ -278,15 +278,15 @@ SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const { SwRect aBound; - if( mpFrm ) + if( mpFrame ) { - if( mpFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + if( mpFrame->IsPageFrame() && + static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() ) { - aBound = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 0, 0 ); + aBound = SwRect( mpFrame->Frame().Left(), mpFrame->Frame().Top()-1, 0, 0 ); } else - aBound = mpFrm->PaintArea(); + aBound = mpFrame->PaintArea(); } else if( mpDrawObj ) { @@ -312,19 +312,19 @@ bool SwAccessibleChild::AlwaysIncludeAsChild() const return bAlwaysIncludedAsChild; } -const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const +const SwFrame* SwAccessibleChild::GetParent( const bool bInPagePreview ) const { - const SwFrm* pParent( nullptr ); + const SwFrame* pParent( nullptr ); - if ( mpFrm ) + if ( mpFrame ) { - if( mpFrm->IsFlyFrm() ) + if( mpFrame->IsFlyFrame() ) { - const SwFlyFrm* pFly = static_cast< const SwFlyFrm *>( mpFrm ); - if( pFly->IsFlyInCntFrm() ) + const SwFlyFrame* pFly = static_cast< const SwFlyFrame *>( mpFrame ); + if( pFly->IsFlyInContentFrame() ) { // For FLY_AS_CHAR the parent is the anchor - pParent = pFly->GetAnchorFrm(); + pParent = pFly->GetAnchorFrame(); OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), "parent is not accessible" ); } @@ -333,19 +333,19 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const // In any other case the parent is the root frm // (in page preview, the page frame) if( bInPagePreview ) - pParent = pFly->FindPageFrm(); + pParent = pFly->FindPageFrame(); else - pParent = pFly->getRootFrm(); + pParent = pFly->getRootFrame(); } } else { - SwAccessibleChild aUpper( mpFrm->GetUpper() ); - while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) ) + SwAccessibleChild aUpper( mpFrame->GetUpper() ); + while( aUpper.GetSwFrame() && !aUpper.IsAccessible(bInPagePreview) ) { - aUpper = aUpper.GetSwFrm()->GetUpper(); + aUpper = aUpper.GetSwFrame()->GetUpper(); } - pParent = aUpper.GetSwFrm(); + pParent = aUpper.GetSwFrame(); } } else if( mpDrawObj ) @@ -360,7 +360,7 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const if( pFrameFormat && FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() ) { // For FLY_AS_CHAR the parent is the anchor - pParent = pContact->GetAnchorFrm(); + pParent = pContact->GetAnchorFrame(); OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), "parent is not accessible" ); @@ -369,9 +369,9 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const { // In any other case the parent is the root frm if( bInPagePreview ) - pParent = pContact->GetAnchorFrm()->FindPageFrm(); + pParent = pContact->GetAnchorFrame()->FindPageFrame(); else - pParent = pContact->GetAnchorFrm()->getRootFrm(); + pParent = pContact->GetAnchorFrame()->getRootFrame(); } } } @@ -393,7 +393,7 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const dynamic_cast< SwAccessibleContext *>( xAccParent.get() ); if ( pAccParentImpl ) { - pParent = pAccParentImpl->GetFrm(); + pParent = pAccParentImpl->GetFrame(); } } } diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 31a489e43640..e05ddc100f45 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -23,7 +23,7 @@ #include <vcl/vclptr.hxx> class SwAccessibleMap; -class SwFrm; +class SwFrame; class SdrObject; namespace vcl { class Window; } class SwRect; @@ -35,9 +35,9 @@ class SwAccessibleChild public: SwAccessibleChild(); explicit SwAccessibleChild( const SdrObject* pDrawObj ); - explicit SwAccessibleChild( const SwFrm* pFrm ); + explicit SwAccessibleChild( const SwFrame* pFrame ); explicit SwAccessibleChild( vcl::Window* pWindow ); - SwAccessibleChild( const SwFrm* pFrm, + SwAccessibleChild( const SwFrame* pFrame, const SdrObject* pDrawObj, vcl::Window* pWindow ); @@ -45,18 +45,18 @@ class SwAccessibleChild SwAccessibleChild& operator=( const SwAccessibleChild& r ); SwAccessibleChild& operator=( const SdrObject* pDrawObj ); - SwAccessibleChild& operator=( const SwFrm* pFrm ); + SwAccessibleChild& operator=( const SwFrame* pFrame ); SwAccessibleChild& operator=( vcl::Window* pWindow ); bool operator==( const SwAccessibleChild& r ) const; bool IsValid() const; - const SwFrm* GetSwFrm() const { return mpFrm; } + const SwFrame* GetSwFrame() const { return mpFrame; } const SdrObject* GetDrawObject() const { return mpDrawObj; } vcl::Window* GetWindow() const { return mpWindow; } - const SwFrm* GetParent( const bool bInPagePreview ) const; + const SwFrame* GetParent( const bool bInPagePreview ) const; bool IsAccessible( bool bPagePreview ) const; bool IsBoundAsChar() const; @@ -70,12 +70,12 @@ class SwAccessibleChild bool AlwaysIncludeAsChild() const; private: - const SwFrm* mpFrm; + const SwFrame* mpFrame; const SdrObject* mpDrawObj; VclPtr<vcl::Window> mpWindow; void Init( const SdrObject* pDrawObj ); - void Init( const SwFrm* pFrm ); + void Init( const SwFrame* pFrame ); void Init( vcl::Window* pWindow ); }; diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index 05168a432a36..ec2622178b97 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -37,16 +37,16 @@ using namespace sw::access; SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : nHellId( rAccMap.GetShell()->GetDoc()->getIDocumentDrawModelAccess().GetHellId() ) , nControlsId( rAccMap.GetShell()->GetDoc()->getIDocumentDrawModelAccess().GetControlsId() ) { - const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly(); sal_uInt32 nPos = 0; - SwAccessibleChild aLower( rFrm.GetLower() ); - while( aLower.GetSwFrm() ) + SwAccessibleChild aLower( rFrame.GetLower() ); + while( aLower.GetSwFrame() ) { if ( !bVisibleChildrenOnly || aLower.AlwaysIncludeAsChild() || @@ -55,15 +55,15 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower ); } - aLower = aLower.GetSwFrm()->GetNext(); + aLower = aLower.GetSwFrame()->GetNext(); } - if ( rFrm.IsPageFrm() ) + if ( rFrame.IsPageFrame() ) { OSL_ENSURE( bVisibleChildrenOnly, "page frame within tab frame???" ); - const SwPageFrm *pPgFrm = - static_cast< const SwPageFrm * >( &rFrm ); - const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); + const SwPageFrame *pPgFrame = + static_cast< const SwPageFrame * >( &rFrame ); + const SwSortedObjs *pObjs = pPgFrame->GetSortedObjs(); if ( pObjs ) { for( size_t i=0; i<pObjs->size(); ++i ) @@ -76,9 +76,9 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, } } } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs *pObjs = rFrame.GetDrawObjs(); if ( pObjs ) { for( size_t i=0; i<pObjs->size(); ++i ) @@ -96,7 +96,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rAccMap.GetContextImpl( &rFrm, false ); + rAccMap.GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); @@ -149,12 +149,12 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, return insert( aEntry ); } -bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm ) +bool SwAccessibleChildMap::IsSortingRequired( const SwFrame& rFrame ) { - return ( rFrm.IsPageFrm() && - static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) || - ( rFrm.IsTextFrm() && - rFrm.GetDrawObjs() ); + return ( rFrame.IsPageFrame() && + static_cast< const SwPageFrame& >( rFrame ).GetSortedObjs() ) || + ( rFrame.IsTextFrame() && + rFrame.GetDrawObjs() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index d2593333f819..53ccbd0dc978 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -27,7 +27,7 @@ class SwAccessibleMap; class SwRect; -class SwFrm; +class SwFrame; class SdrObject; class SwAccessibleChildMapKey @@ -75,9 +75,9 @@ public: /* MT: Need to get this position parameter stuff in dev300 somehow... //This methods are used to insert an object to the map, adding a position parameter. ::std::pair< iterator, bool > insert( sal_uInt32 nOrd, Point nPos, - const SwFrmOrObj& rLower ); + const SwFrameOrObj& rLower ); ::std::pair< iterator, bool > insert( const SdrObject *pObj, - const SwFrmOrObj& rLower, + const SwFrameOrObj& rLower, const SwDoc *pDoc, Point nPos); */ @@ -113,10 +113,10 @@ private: public: SwAccessibleChildMap( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ); - static bool IsSortingRequired( const SwFrm& rFrm ); + static bool IsSortingRequired( const SwFrame& rFrame ); const_iterator cbegin() const { return maMap.cbegin(); } const_iterator cend() const { return maMap.cend(); } diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 5c3cb557d0a1..36d6a880b5b0 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -31,24 +31,24 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst, SwAccessibleMap& rAccMap ) : rList( rLst ), - aCurr( rList.GetFrm().GetLower() ), + aCurr( rList.GetFrame().GetLower() ), nNextObj( 0 ) { - if( !aCurr.GetSwFrm() ) + if( !aCurr.GetSwFrame() ) { - const SwFrm& rFrm = rList.GetFrm(); - if( rFrm.IsPageFrm() ) + const SwFrame& rFrame = rList.GetFrame(); + if( rFrame.IsPageFrame() ) { - const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); - const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); + const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame ); + const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs(); if( pObjs && pObjs->size() ) { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); } } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs *pObjs = rFrame.GetDrawObjs(); if ( pObjs && pObjs->size() ) { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); @@ -62,7 +62,7 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( if ( !aCurr.IsValid() ) { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rAccMap.GetContextImpl( &rFrm, false ); + rAccMap.GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); @@ -92,10 +92,10 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne { bNextTaken = false; } - else if( aCurr.GetSwFrm() ) + else if( aCurr.GetSwFrame() ) { - aCurr = aCurr.GetSwFrm()->GetNext(); - if( !aCurr.GetSwFrm() ) + aCurr = aCurr.GetSwFrame()->GetNext(); + if( !aCurr.GetSwFrame() ) { bNextTaken = false; } @@ -103,18 +103,18 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne if( !bNextTaken ) { - const SwFrm& rFrm = rList.GetFrm(); - if( rFrm.IsPageFrm() ) + const SwFrame& rFrame = rList.GetFrame(); + if( rFrame.IsPageFrame() ) { - const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); - const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); + const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame ); + const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs(); aCurr = ( pObjs && nNextObj < pObjs->size() ) ? (*pObjs)[nNextObj++]->GetDrawObj() : static_cast< const SdrObject *>( nullptr ); } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs* pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs* pObjs = rFrame.GetDrawObjs(); const size_t nObjsCount = pObjs ? pObjs->size() : 0; aCurr = ( pObjs && nNextObj < nObjsCount ) ? (*pObjs)[nNextObj++]->GetDrawObj() @@ -128,7 +128,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne if ( !aCurr.IsValid() ) { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rList.GetAccMap().GetContextImpl( &rFrm, false ); + rList.GetAccMap().GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index d009ed72cf1b..863d86e9d6d2 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -76,27 +76,27 @@ public: class SwAccessibleChildSList { const SwRect maVisArea; - const SwFrm& mrFrm; + const SwFrame& mrFrame; const bool mbVisibleChildrenOnly; SwAccessibleMap& mrAccMap; public: typedef SwAccessibleChildSList_const_iterator const_iterator; - inline SwAccessibleChildSList( const SwFrm& rFrm, + inline SwAccessibleChildSList( const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : maVisArea() - , mrFrm( rFrm ) + , mrFrame( rFrame ) , mbVisibleChildrenOnly( false ) , mrAccMap( rAccMap ) {} inline SwAccessibleChildSList( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : maVisArea( rVisArea ) - , mrFrm( rFrm ) - , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() ) + , mrFrame( rFrame ) + , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly() ) , mrAccMap( rAccMap ) { } @@ -111,9 +111,9 @@ public: return SwAccessibleChildSList_const_iterator( *this ); } - inline const SwFrm& GetFrm() const + inline const SwFrame& GetFrame() const { - return mrFrm; + return mrFrame; } inline bool IsVisibleChildrenOnly() const diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx index c29ca478c9ca..6c6a697d9adc 100644 --- a/sw/source/core/access/accgraphic.cxx +++ b/sw/source/core/access/accgraphic.cxx @@ -33,8 +33,8 @@ using namespace ::com::sun::star::accessibility; SwAccessibleGraphic::SwAccessibleGraphic( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleNoTextFrame( pInitMap, AccessibleRole::GRAPHIC, pFlyFrm ) + const SwFlyFrame* pFlyFrame ) : + SwAccessibleNoTextFrame( pInitMap, AccessibleRole::GRAPHIC, pFlyFrame ) { } @@ -76,7 +76,7 @@ sal_Int16 SAL_CALL SwAccessibleGraphic::getAccessibleRole() { SolarMutexGuard g; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if (aURL.GetMap()) return AccessibleRole::IMAGE_MAP; diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx index 35c50b29ddd0..44bac5c5e764 100644 --- a/sw/source/core/access/accgraphic.hxx +++ b/sw/source/core/access/accgraphic.hxx @@ -29,7 +29,7 @@ protected: public: SwAccessibleGraphic( SwAccessibleMap* pInitMap, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); // XServiceInfo diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx index aa594c5fe908..36327d58f70f 100644 --- a/sw/source/core/access/accheaderfooter.cxx +++ b/sw/source/core/access/accheaderfooter.cxx @@ -38,23 +38,23 @@ const sal_Char sImplementationNameFooter[] = "com.sun.star.comp.Writer.SwAccessi SwAccessibleHeaderFooter::SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwHeaderFrm* pHdFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrm ) + const SwHeaderFrame* pHdFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrame ) { SolarMutexGuard aGuard; - OUString sArg( OUString::number( pHdFrm->GetPhyPageNum() ) ); + OUString sArg( OUString::number( pHdFrame->GetPhyPageNum() ) ); SetName( GetResource( STR_ACCESS_HEADER_NAME, &sArg ) ); } SwAccessibleHeaderFooter::SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwFooterFrm* pFtFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrm ) + const SwFooterFrame* pFtFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrame ) { SolarMutexGuard aGuard; - OUString sArg( OUString::number( pFtFrm->GetPhyPageNum() ) ); + OUString sArg( OUString::number( pFtFrame->GetPhyPageNum() ) ); SetName( GetResource( STR_ACCESS_FOOTER_NAME, &sArg ) ); } diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx index 7f91d40eca7a..b3fe7aeb2796 100644 --- a/sw/source/core/access/accheaderfooter.hxx +++ b/sw/source/core/access/accheaderfooter.hxx @@ -22,8 +22,8 @@ #include "acccontext.hxx" -class SwHeaderFrm; -class SwFooterFrm; +class SwHeaderFrame; +class SwFooterFrame; class SwAccessibleHeaderFooter : public SwAccessibleContext { @@ -32,9 +32,9 @@ protected: public: SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwHeaderFrm* pHdFrm ); + const SwHeaderFrame* pHdFrame ); SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwFooterFrm* pFtFrm ); + const SwFooterFrame* pFtFrame ); // XAccessibleContext diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index b8504b61f353..817bdfd2ebc9 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -76,9 +76,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using namespace ::sw::access; -struct SwFrmFunc +struct SwFrameFunc { - bool operator()( const SwFrm * p1, const SwFrm * p2) const + bool operator()( const SwFrame * p1, const SwFrame * p2) const { return p1 < p2; } @@ -87,10 +87,10 @@ struct SwFrmFunc class SwAccessibleContextMap_Impl { public: - typedef const SwFrm * key_type; + typedef const SwFrame * key_type; typedef uno::WeakReference < XAccessible > mapped_type; typedef std::pair<const key_type,mapped_type> value_type; - typedef SwFrmFunc key_compare; + typedef SwFrameFunc key_compare; typedef std::map<key_type,mapped_type,key_compare>::iterator iterator; typedef std::map<key_type,mapped_type,key_compare>::const_iterator const_iterator; private: @@ -338,36 +338,36 @@ private: SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED // and POS_CHANGED uno::WeakReference < XAccessible > mxAcc; // The object that fires the event - SwAccessibleChild maFrmOrObj; // the child for CHILD_POS_CHANGED and + SwAccessibleChild maFrameOrObj; // the child for CHILD_POS_CHANGED and // the same as xAcc for any other // event type EventType meType; // The event type AccessibleStates mnStates; // check states or update caret pos public: - const SwFrm* mpParentFrm; // The object that fires the event - bool IsNoXaccParentFrm() const + const SwFrame* mpParentFrame; // The object that fires the event + bool IsNoXaccParentFrame() const { - return CHILD_POS_CHANGED == meType && mpParentFrm != nullptr; + return CHILD_POS_CHANGED == meType && mpParentFrame != nullptr; } public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj ) + const SwAccessibleChild& rFrameOrObj ) : mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) {} SwAccessibleEvent_Impl( EventType eT, - const SwAccessibleChild& rFrmOrObj ) - : maFrmOrObj( rFrmOrObj ), + const SwAccessibleChild& rFrameOrObj ) + : maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert(SwAccessibleEvent_Impl::DISPOSE == meType && "wrong event constructor, DISPOSE only"); @@ -376,7 +376,7 @@ public: explicit SwAccessibleEvent_Impl( EventType eT ) : meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert(SwAccessibleEvent_Impl::SHAPE_SELECTION == meType && "wrong event constructor, SHAPE_SELECTION only" ); @@ -384,14 +384,14 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj, + const SwAccessibleChild& rFrameOrObj, const SwRect& rR ) : maOldBox( rR ), mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert((SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType || SwAccessibleEvent_Impl::POS_CHANGED == meType) && @@ -400,25 +400,25 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj, + const SwAccessibleChild& rFrameOrObj, const AccessibleStates _nStates ) : mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( _nStates ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert( SwAccessibleEvent_Impl::CARET_OR_STATES == meType && "wrong event constructor, CARET_OR_STATES only" ); } - SwAccessibleEvent_Impl( EventType eT, const SwFrm *pParentFrm, - const SwAccessibleChild& rFrmOrObj, const SwRect& rR ) : + SwAccessibleEvent_Impl( EventType eT, const SwFrame *pParentFrame, + const SwAccessibleChild& rFrameOrObj, const SwRect& rR ) : maOldBox( rR ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( pParentFrm ) + mpParentFrame( pParentFrame ) { assert( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType && "wrong event constructor, CHILD_POS_CHANGED only" ); @@ -453,9 +453,9 @@ public: maOldBox = rOldBox; } - inline const SwAccessibleChild& GetFrmOrObj() const + inline const SwAccessibleChild& GetFrameOrObj() const { - return maFrmOrObj; + return maFrameOrObj; } // <SetStates(..)> only used in method <SwAccessibleMap::AppendEvent(..)> @@ -530,7 +530,7 @@ void SwAccessibleEventList_Impl::MoveInvalidXAccToEnd() for ( ;li != end();) { SwAccessibleEvent_Impl e = *li; - if (e.IsNoXaccParentFrm()) + if (e.IsNoXaccParentFrame()) { iterator liNext = li; ++liNext; @@ -568,13 +568,13 @@ struct SwAccessibleChildFunc bool operator()( const SwAccessibleChild& r1, const SwAccessibleChild& r2 ) const { - const void *p1 = r1.GetSwFrm() - ? static_cast < const void * >( r1.GetSwFrm()) + const void *p1 = r1.GetSwFrame() + ? static_cast < const void * >( r1.GetSwFrame()) : ( r1.GetDrawObject() ? static_cast < const void * >( r1.GetDrawObject() ) : static_cast < const void * >( r1.GetWindow() ) ); - const void *p2 = r2.GetSwFrm() - ? static_cast < const void * >( r2.GetSwFrm()) + const void *p2 = r2.GetSwFrame() + ? static_cast < const void * >( r2.GetSwFrame()) : ( r2.GetDrawObject() ? static_cast < const void * >( r2.GetDrawObject() ) : static_cast < const void * >( r2.GetWindow() ) ); @@ -653,7 +653,7 @@ class SwAccPreviewData SwRect maVisArea; Fraction maScale; - const SwPageFrm *mpSelPage; + const SwPageFrame *mpSelPage; /** adjust logic page rectangle to its visible part @@ -680,10 +680,10 @@ public: void Update( const SwAccessibleMap& rAccMap, const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ); - void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ); + void InvalidateSelection( const SwPageFrame* _pSelectedPageFrame ); const SwRect& GetVisArea() const { return maVisArea;} @@ -694,9 +694,9 @@ public: void AdjustMapMode( MapMode& rMapMode, const Point& rPoint ) const; - inline const SwPageFrm *GetSelPage() const { return mpSelPage; } + inline const SwPageFrame *GetSelPage() const { return mpSelPage; } - void DisposePage(const SwPageFrm *pPageFrm ); + void DisposePage(const SwPageFrame *pPageFrame ); }; SwAccPreviewData::SwAccPreviewData() : @@ -711,12 +711,12 @@ SwAccPreviewData::~SwAccPreviewData() void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { // store preview scaling, maximal preview page size and selected page maScale = _rScale; - mpSelPage = _pSelectedPageFrm; + mpSelPage = _pSelectedPageFrame; // prepare loop on preview pages maPreviewRects.clear(); @@ -757,9 +757,9 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, } } -void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ) +void SwAccPreviewData::InvalidateSelection( const SwPageFrame* _pSelectedPageFrame ) { - mpSelPage = _pSelectedPageFrm; + mpSelPage = _pSelectedPageFrame; OSL_ENSURE( mpSelPage, "selected page not found" ); } @@ -797,9 +797,9 @@ void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode, // else: don't adjust MapMode } -void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) +void SwAccPreviewData::DisposePage(const SwPageFrame *pPageFrame ) { - if( mpSelPage == pPageFrm ) + if( mpSelPage == pPageFrame ) mpSelPage = nullptr; } @@ -835,11 +835,11 @@ void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( } static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, - const SwFrm *pFrm ) + const SwFrame *pFrame ) { bool bRet = false; - if( pFrm && pFrm->IsCellFrm() && rAcc.is() ) + if( pFrame && pFrame->IsCellFrame() && rAcc.is() ) { // Is it in the same table? We check that // by comparing the last table frame in the @@ -847,23 +847,23 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, // searching the first one. SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( rAcc.get() ); - if( pAccImpl->GetFrm()->IsCellFrm() ) + if( pAccImpl->GetFrame()->IsCellFrame() ) { - const SwTabFrm *pTabFrm1 = pAccImpl->GetFrm()->FindTabFrm(); - if (pTabFrm1) + const SwTabFrame *pTabFrame1 = pAccImpl->GetFrame()->FindTabFrame(); + if (pTabFrame1) { - while (pTabFrm1->GetFollow()) - pTabFrm1 = pTabFrm1->GetFollow(); + while (pTabFrame1->GetFollow()) + pTabFrame1 = pTabFrame1->GetFollow(); } - const SwTabFrm *pTabFrm2 = pFrm->FindTabFrm(); - if (pTabFrm2) + const SwTabFrame *pTabFrame2 = pFrame->FindTabFrame(); + if (pTabFrame2) { - while (pTabFrm2->GetFollow()) - pTabFrm2 = pTabFrm2->GetFollow(); + while (pTabFrame2->GetFollow()) + pTabFrame2 = pTabFrame2->GetFollow(); } - bRet = (pTabFrm1 == pTabFrm2); + bRet = (pTabFrame1 == pTabFrame2); } } @@ -873,11 +873,11 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) { ::rtl::Reference < SwAccessibleContext > xAccImpl( rEvent.GetContext() ); - if (!xAccImpl.is() && rEvent.mpParentFrm != nullptr) + if (!xAccImpl.is() && rEvent.mpParentFrame != nullptr) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( rEvent.mpParentFrm ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( rEvent.mpParentFrame ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); if (xAcc.is()) @@ -894,7 +894,7 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) { DoInvalidateShapeSelection(); } - else if( xAccImpl.is() && xAccImpl->GetFrm() ) + else if( xAccImpl.is() && xAccImpl->GetFrame() ) { if ( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE && rEvent.IsInvalidateTextAttrs() ) @@ -910,7 +910,7 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) xAccImpl->InvalidatePosOrSize( rEvent.GetOldBox() ); break; case SwAccessibleEvent_Impl::CHILD_POS_CHANGED: - xAccImpl->InvalidateChildPosOrSize( rEvent.GetFrmOrObj(), + xAccImpl->InvalidateChildPosOrSize( rEvent.GetFrameOrObj(), rEvent.GetOldBox() ); break; case SwAccessibleEvent_Impl::DISPOSE: @@ -974,7 +974,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) { SwAccessibleEventMap_Impl::iterator aIter = - mpEventMap->find( rEvent.GetFrmOrObj() ); + mpEventMap->find( rEvent.GetFrameOrObj() ); if( aIter != mpEventMap->end() ) { SwAccessibleEvent_Impl aEvent( *(*aIter).second ); @@ -1059,7 +1059,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) } else if( SwAccessibleEvent_Impl::DISPOSE != rEvent.GetType() ) { - SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrmOrObj(), + SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrameOrObj(), mpEvents->insert( mpEvents->end(), rEvent ) ); mpEventMap->insert( aEntry ); } @@ -1072,12 +1072,12 @@ void SwAccessibleMap::InvalidateCursorPosition( SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( rAcc.get() ); OSL_ENSURE( pAccImpl, "no caret context" ); - OSL_ENSURE( pAccImpl->GetFrm(), "caret context is disposed" ); + OSL_ENSURE( pAccImpl->GetFrame(), "caret context is disposed" ); if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrame()), AccessibleStates::CARET ); AppendEvent( aEvent ); } @@ -1088,7 +1088,7 @@ void SwAccessibleMap::InvalidateCursorPosition( // been disposed because it moved out of the vis area. // Setting the cursor for such frames is useless and even // causes asserts. - if( pAccImpl->GetFrm() ) + if( pAccImpl->GetFrame() ) pAccImpl->InvalidateCursorPos(); } } @@ -1121,7 +1121,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() const SwViewShell *pVSh = GetShell(); const SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pVSh) != nullptr ? static_cast< const SwFEShell * >( pVSh ) : nullptr; - SwPaM* pCrsr = pFESh ? pFESh->GetCrsr( false /* ??? */ ) : nullptr; + SwPaM* pCursor = pFESh ? pFESh->GetCursor( false /* ??? */ ) : nullptr; //const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; @@ -1155,7 +1155,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { while( aIter != aEndIter ) { - SwAccessibleChild pFrm( (*aIter).first ); + SwAccessibleChild pFrame( (*aIter).first ); const SwFrameFormat *pFrameFormat = (*aIter).first ? ::FindFrameFormat( (*aIter).first ) : nullptr; if( !pFrameFormat ) @@ -1185,21 +1185,21 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { int pIndex = pPos->nContent.GetIndex(); bool bMarked = false; - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); sal_uLong nHere = pNode->GetIndex(); - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { bMarked = true; - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { @@ -1264,25 +1264,25 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() delete[] pShapes; - //Checked for FlyFrm - if (mpFrmMap) + //Checked for FlyFrame + if (mpFrameMap) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { - const SwFrm *pFrm = (*aIter).first; - if(pFrm->IsFlyFrm()) + const SwFrame *pFrame = (*aIter).first; + if(pFrame->IsFlyFrame()) { uno::Reference < XAccessible > xAcc = (*aIter).second; if(xAcc.is()) { SwAccessibleFrameBase *pAccFrame = (static_cast< SwAccessibleFrameBase * >(xAcc.get())); - bool bFrmChanged = pAccFrame->SetSelectedState( true ); - if (bFrmChanged) + bool bFrameChanged = pAccFrame->SetSelectedState( true ); + if (bFrameChanged) { - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( pFrm ); - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( pFrame ); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); @@ -1320,33 +1320,33 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() //Checked for Paras. bool bMarkChanged = false; SwAccessibleContextMap_Impl mapTemp; - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - SwNodeIndex nStartIndex( rTmpCrsr.Start()->nNode ); - SwNodeIndex nEndIndex( rTmpCrsr.End()->nNode ); + SwNodeIndex nStartIndex( rTmpCursor.Start()->nNode ); + SwNodeIndex nEndIndex( rTmpCursor.End()->nNode ); while(nStartIndex <= nEndIndex) { - SwFrm *pFrm = nullptr; + SwFrame *pFrame = nullptr; if(nStartIndex.GetNode().IsContentNode()) { SwContentNode* pCNd = static_cast<SwContentNode*>(&(nStartIndex.GetNode())); - pFrm = SwIterator<SwFrm, SwContentNode>(*pCNd).First(); + pFrame = SwIterator<SwFrame, SwContentNode>(*pCNd).First(); } else if( nStartIndex.GetNode().IsTableNode() ) { SwTableNode * pTable = static_cast<SwTableNode *>(&(nStartIndex.GetNode())); SwTableFormat* pFormat = pTable->GetTable().GetFrameFormat(); - pFrm = SwIterator<SwFrm, SwTableFormat>(*pFormat).First(); + pFrame = SwIterator<SwFrame, SwTableFormat>(*pFormat).First(); } - if( pFrm && mpFrmMap) + if( pFrame && mpFrameMap) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc = (*aIter).second; bool isChanged = false; @@ -1356,9 +1356,9 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() } if(!isChanged) { - SwAccessibleContextMap_Impl::iterator aEraseIter = mpSeletedFrmMap->find( pFrm ); - if(aEraseIter != mpSeletedFrmMap->end()) - mpSeletedFrmMap->erase(aEraseIter); + SwAccessibleContextMap_Impl::iterator aEraseIter = mpSeletedFrameMap->find( pFrame ); + if(aEraseIter != mpSeletedFrameMap->end()) + mpSeletedFrameMap->erase(aEraseIter); } else { @@ -1366,7 +1366,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() vecAdd.push_back(static_cast< SwAccessibleContext * >(xAcc.get())); } - mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrm, xAcc ) ); + mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrame, xAcc ) ); } } ++nStartIndex; @@ -1374,12 +1374,12 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() } } } - if( !mpSeletedFrmMap ) - mpSeletedFrmMap = new SwAccessibleContextMap_Impl; - if( !mpSeletedFrmMap->empty() ) + if( !mpSeletedFrameMap ) + mpSeletedFrameMap = new SwAccessibleContextMap_Impl; + if( !mpSeletedFrameMap->empty() ) { - SwAccessibleContextMap_Impl::iterator aIter = mpSeletedFrmMap->begin(); - while( aIter != mpSeletedFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpSeletedFrameMap->begin(); + while( aIter != mpSeletedFrameMap->end() ) { uno::Reference < XAccessible > xAcc = (*aIter).second; if(xAcc.is()) @@ -1388,7 +1388,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() vecRemove.push_back(static_cast< SwAccessibleContext * >(xAcc.get())); } bMarkChanged = true; - mpSeletedFrmMap->clear(); + mpSeletedFrameMap->clear(); } if( !mapTemp.empty() ) @@ -1396,12 +1396,12 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() SwAccessibleContextMap_Impl::iterator aIter = mapTemp.begin(); while( aIter != mapTemp.end() ) { - mpSeletedFrmMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) ); + mpSeletedFrameMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) ); ++aIter; } mapTemp.clear(); } - if( bMarkChanged && mpFrmMap) + if( bMarkChanged && mpFrameMap) { VEC_PARA::iterator vi = vecAdd.begin(); for (; vi != vecAdd.end() ; ++vi) @@ -1647,7 +1647,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus() */ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) : - mpFrmMap( nullptr ), + mpFrameMap( nullptr ), mpShapeMap( nullptr ), mpShapes( nullptr ), mpEvents( nullptr ), @@ -1657,7 +1657,7 @@ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) : mpPreview( nullptr ), mnPara( 1 ), mbShapeSelected( false ), - mpSeletedFrmMap(nullptr) + mpSeletedFrameMap(nullptr) { pSh->GetLayout()->AddAccessibleShell(); } @@ -1667,11 +1667,11 @@ SwAccessibleMap::~SwAccessibleMap() uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { - const SwRootFrm *pRootFrm = GetShell()->GetLayout(); - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm ); - if( aIter != mpFrmMap->end() ) + const SwRootFrame *pRootFrame = GetShell()->GetLayout(); + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pRootFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( !xAcc.is() ) xAcc = new SwAccessibleDocument( this ); @@ -1683,10 +1683,10 @@ SwAccessibleMap::~SwAccessibleMap() SwAccessibleDocument *pAcc = static_cast< SwAccessibleDocument * >( xAcc.get() ); pAcc->Dispose( true ); } - if( mpFrmMap ) + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xTmp = (*aIter).second; if( xTmp.is() ) @@ -1700,12 +1700,12 @@ SwAccessibleMap::~SwAccessibleMap() { osl::MutexGuard aGuard( maMutex ); #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( !mpFrmMap || mpFrmMap->empty(), + OSL_ENSURE( !mpFrameMap || mpFrameMap->empty(), "Frame map should be empty after disposing the root frame" ); - if( mpFrmMap ) + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xTmp = (*aIter).second; if( xTmp.is() ) @@ -1735,8 +1735,8 @@ SwAccessibleMap::~SwAccessibleMap() } } #endif - delete mpFrmMap; - mpFrmMap = nullptr; + delete mpFrameMap; + mpFrameMap = nullptr; delete mpShapeMap; mpShapeMap = nullptr; delete mpShapes; @@ -1775,7 +1775,7 @@ SwAccessibleMap::~SwAccessibleMap() mpEvents = nullptr; } mpVSh->GetLayout()->RemoveAccessibleShell(); - delete mpSeletedFrmMap; + delete mpSeletedFrameMap; } uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( @@ -1787,22 +1787,22 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( { osl::MutexGuard aGuard( maMutex ); - if( !mpFrmMap ) + if( !mpFrameMap ) { - mpFrmMap = new SwAccessibleContextMap_Impl; + mpFrameMap = new SwAccessibleContextMap_Impl; #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = false; + mpFrameMap->mbLocked = false; #endif } #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( !mpFrmMap->mbLocked, "Map is locked" ); - mpFrmMap->mbLocked = true; + OSL_ENSURE( !mpFrameMap->mbLocked, "Map is locked" ); + mpFrameMap->mbLocked = true; #endif - const SwRootFrm *pRootFrm = GetShell()->GetLayout(); - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm ); - if( aIter != mpFrmMap->end() ) + const SwRootFrame *pRootFrame = GetShell()->GetLayout(); + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pRootFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( xAcc.is() ) { @@ -1815,19 +1815,19 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( else xAcc = new SwAccessibleDocument( this ); - if( aIter != mpFrmMap->end() ) + if( aIter != mpFrameMap->end() ) { (*aIter).second = xAcc; } else { - SwAccessibleContextMap_Impl::value_type aEntry( pRootFrm, xAcc ); - mpFrmMap->insert( aEntry ); + SwAccessibleContextMap_Impl::value_type aEntry( pRootFrame, xAcc ); + mpFrameMap->insert( aEntry ); } } #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = false; + mpFrameMap->mbLocked = false; #endif } @@ -1849,19 +1849,19 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( ) uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { // create & update preview data object if( mpPreview == nullptr ) mpPreview = new SwAccPreviewData(); - mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize ); + mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize ); uno::Reference<XAccessible> xAcc = _GetDocumentView( true ); return xAcc; } -uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, +uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrame *pFrame, bool bCreate ) { uno::Reference < XAccessible > xAcc; @@ -1871,73 +1871,73 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, { osl::MutexGuard aGuard( maMutex ); - if( !mpFrmMap && bCreate ) - mpFrmMap = new SwAccessibleContextMap_Impl; - if( mpFrmMap ) + if( !mpFrameMap && bCreate ) + mpFrameMap = new SwAccessibleContextMap_Impl; + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( !xAcc.is() && bCreate ) { SwAccessibleContext *pAcc = nullptr; - switch( pFrm->GetType() ) + switch( pFrame->GetType() ) { case FRM_TXT: mnPara++; pAcc = new SwAccessibleParagraph( *this, - static_cast< const SwTextFrm& >( *pFrm ) ); + static_cast< const SwTextFrame& >( *pFrame ) ); break; case FRM_HEADER: pAcc = new SwAccessibleHeaderFooter( this, - static_cast< const SwHeaderFrm *>( pFrm ) ); + static_cast< const SwHeaderFrame *>( pFrame ) ); break; case FRM_FOOTER: pAcc = new SwAccessibleHeaderFooter( this, - static_cast< const SwFooterFrm *>( pFrm ) ); + static_cast< const SwFooterFrame *>( pFrame ) ); break; case FRM_FTN: { - const SwFootnoteFrm *pFootnoteFrm = - static_cast < const SwFootnoteFrm * >( pFrm ); + const SwFootnoteFrame *pFootnoteFrame = + static_cast < const SwFootnoteFrame * >( pFrame ); bool bIsEndnote = - SwAccessibleFootnote::IsEndnote( pFootnoteFrm ); + SwAccessibleFootnote::IsEndnote( pFootnoteFrame ); pAcc = new SwAccessibleFootnote( this, bIsEndnote, /*(bIsEndnote ? mnEndnote++ : mnFootnote++),*/ - pFootnoteFrm ); + pFootnoteFrame ); } break; case FRM_FLY: { - const SwFlyFrm *pFlyFrm = - static_cast < const SwFlyFrm * >( pFrm ); - switch( SwAccessibleFrameBase::GetNodeType( pFlyFrm ) ) + const SwFlyFrame *pFlyFrame = + static_cast < const SwFlyFrame * >( pFrame ); + switch( SwAccessibleFrameBase::GetNodeType( pFlyFrame ) ) { case ND_GRFNODE: - pAcc = new SwAccessibleGraphic( this, pFlyFrm ); + pAcc = new SwAccessibleGraphic( this, pFlyFrame ); break; case ND_OLENODE: - pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrm ); + pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrame ); break; default: - pAcc = new SwAccessibleTextFrame( this, *pFlyFrm ); + pAcc = new SwAccessibleTextFrame( this, *pFlyFrame ); break; } } break; case FRM_CELL: pAcc = new SwAccessibleCell( this, - static_cast< const SwCellFrm *>( pFrm ) ); + static_cast< const SwCellFrame *>( pFrame ) ); break; case FRM_TAB: pAcc = new SwAccessibleTable( this, - static_cast< const SwTabFrm *>( pFrm ) ); + static_cast< const SwTabFrame *>( pFrame ) ); break; case FRM_PAGE: OSL_ENSURE( GetShell()->IsPreview(), "accessible page frames only in PagePreview" ); - pAcc = new SwAccessiblePage( this, pFrm ); + pAcc = new SwAccessiblePage( this, pFrame ); break; } xAcc = pAcc; @@ -1945,18 +1945,18 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, OSL_ENSURE( xAcc.is(), "unknown frame type" ); if( xAcc.is() ) { - if( aIter != mpFrmMap->end() ) + if( aIter != mpFrameMap->end() ) { (*aIter).second = xAcc; } else { - SwAccessibleContextMap_Impl::value_type aEntry( pFrm, xAcc ); - mpFrmMap->insert( aEntry ); + SwAccessibleContextMap_Impl::value_type aEntry( pFrame, xAcc ); + mpFrameMap->insert( aEntry ); } if( pAcc->HasCursor() && - !AreInSameTable( mxCursorContext, pFrm ) ) + !AreInSameTable( mxCursorContext, pFrame ) ) { // If the new context has the focus, and if we know // another context that had the focus, then the focus @@ -1993,10 +1993,10 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, } ::rtl::Reference < SwAccessibleContext > SwAccessibleMap::GetContextImpl( - const SwFrm *pFrm, + const SwFrame *pFrame, bool bCreate ) { - uno::Reference < XAccessible > xAcc( GetContext( pFrm, bCreate ) ); + uno::Reference < XAccessible > xAcc( GetContext( pFrame, bCreate ) ); ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast< SwAccessibleContext * >( xAcc.get() ) ); @@ -2182,17 +2182,17 @@ void SwAccessibleMap::AddGroupContext(const SdrObject *pParentObj, uno::Referenc return xAccImpl; } -void SwAccessibleMap::RemoveContext( const SwFrm *pFrm ) +void SwAccessibleMap::RemoveContext( const SwFrame *pFrame ) { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) { - mpFrmMap->erase( aIter ); + mpFrameMap->erase( aIter ); // Remove reference to old caret object. Though mxCursorContext // is a weak reference and cleared automatically, clearing it @@ -2202,18 +2202,18 @@ void SwAccessibleMap::RemoveContext( const SwFrm *pFrm ) { SwAccessibleContext *pOldAccImpl = static_cast< SwAccessibleContext *>( xOldAcc.get() ); - OSL_ENSURE( pOldAccImpl->GetFrm(), "old caret context is disposed" ); - if( pOldAccImpl->GetFrm() == pFrm ) + OSL_ENSURE( pOldAccImpl->GetFrame(), "old caret context is disposed" ); + if( pOldAccImpl->GetFrame() == pFrame ) { xOldAcc.clear(); // get an empty ref mxCursorContext = xOldAcc; } } - if( mpFrmMap->empty() ) + if( mpFrameMap->empty() ) { - delete mpFrmMap; - mpFrmMap = nullptr; + delete mpFrameMap; + mpFrameMap = nullptr; } } } @@ -2244,23 +2244,23 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj ) } } -void SwAccessibleMap::Dispose( const SwFrm *pFrm, +void SwAccessibleMap::Dispose( const SwFrame *pFrame, const SdrObject *pObj, vcl::Window* pWindow, bool bRecursive ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); + SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow ); // Indeed, the following assert checks the frame's accessible flag, // because that's the one that is evaluated in the layout. The frame // might not be accessible anyway. That's the case for cell frames that // contain further cells. - OSL_ENSURE( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(), + OSL_ENSURE( !aFrameOrObj.GetSwFrame() || aFrameOrObj.GetSwFrame()->IsAccessibleFrame(), "non accessible frame should be disposed" ); - if (aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) + if (aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) // fdo#87199 dispose the darn thing if it ever was accessible - || (pFrm && mpFrmMap && mpFrmMap->find(pFrm) != mpFrmMap->end())) + || (pFrame && mpFrameMap && mpFrameMap->find(pFrame) != mpFrameMap->end())) { ::rtl::Reference< SwAccessibleContext > xAccImpl; ::rtl::Reference< SwAccessibleContext > xParentAccImpl; @@ -2270,28 +2270,28 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, osl::MutexGuard aGuard( maMutex ); // First of all look for an accessible context for a frame - if( aFrmOrObj.GetSwFrm() && mpFrmMap ) + if( aFrameOrObj.GetSwFrame() && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); } } - if( !xAccImpl.is() && mpFrmMap ) + if( !xAccImpl.is() && mpFrameMap ) { // If there is none, look if the parent is accessible. - const SwFrm *pParent = - SwAccessibleFrame::GetParent( aFrmOrObj, + const SwFrame *pParent = + SwAccessibleFrame::GetParent( aFrameOrObj, GetShell()->IsPreview()); if( pParent ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pParent ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pParent ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xParentAccImpl = @@ -2299,10 +2299,10 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, } } } - if( !xParentAccImpl.is() && !aFrmOrObj.GetSwFrm() && mpShapeMap ) + if( !xParentAccImpl.is() && !aFrameOrObj.GetSwFrame() && mpShapeMap ) { SwAccessibleShapeMap_Impl::iterator aIter = - mpShapeMap->find( aFrmOrObj.GetDrawObject() ); + mpShapeMap->find( aFrameOrObj.GetDrawObject() ); if( aIter != mpShapeMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); @@ -2333,11 +2333,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, if( mpEvents ) { SwAccessibleEventMap_Impl::iterator aIter = - mpEventMap->find( aFrmOrObj ); + mpEventMap->find( aFrameOrObj ); if( aIter != mpEventMap->end() ) { SwAccessibleEvent_Impl aEvent( - SwAccessibleEvent_Impl::DISPOSE, aFrmOrObj ); + SwAccessibleEvent_Impl::DISPOSE, aFrameOrObj ); AppendEvent( aEvent ); } } @@ -2358,40 +2358,40 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, // be broadcasted at the end of the action to give the table // a chance to generate a single table change event. - xParentAccImpl->DisposeChild( aFrmOrObj, bRecursive ); + xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive ); } else if( xShapeAccImpl.is() ) { - RemoveContext( aFrmOrObj.GetDrawObject() ); + RemoveContext( aFrameOrObj.GetDrawObject() ); xShapeAccImpl->dispose(); } - if( mpPreview && pFrm && pFrm->IsPageFrm() ) - mpPreview->DisposePage( static_cast< const SwPageFrm *>( pFrm ) ); + if( mpPreview && pFrame && pFrame->IsPageFrame() ) + mpPreview->DisposePage( static_cast< const SwPageFrame *>( pFrame ) ); } } -void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, +void SwAccessibleMap::InvalidatePosOrSize( const SwFrame *pFrame, const SdrObject *pObj, vcl::Window* pWindow, const SwRect& rOldBox ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; ::rtl::Reference< SwAccessibleContext > xParentAccImpl; - const SwFrm *pParent =nullptr; + const SwFrame *pParent =nullptr; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { - if( aFrmOrObj.GetSwFrm() ) + if( aFrameOrObj.GetSwFrame() ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { // If there is an accessible object already it is // notified directly. @@ -2405,14 +2405,14 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, // Otherwise we look if the parent is accessible. // If not, there is nothing to do. pParent = - SwAccessibleFrame::GetParent( aFrmOrObj, + SwAccessibleFrame::GetParent( aFrameOrObj, GetShell()->IsPreview()); if( pParent ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pParent ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pParent ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xParentAccImpl = @@ -2429,7 +2429,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.get(), - aFrmOrObj, rOldBox ); + aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else @@ -2444,13 +2444,13 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CHILD_POS_CHANGED, - xParentAccImpl.get(), aFrmOrObj, rOldBox ); + xParentAccImpl.get(), aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else { FireEvents(); - xParentAccImpl->InvalidateChildPosOrSize( aFrmOrObj, + xParentAccImpl->InvalidateChildPosOrSize( aFrameOrObj, rOldBox ); } } @@ -2459,19 +2459,19 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, /* For child graphic and its parent paragraph,if split 2 graphic to 2 paragraph, will delete one graphic swfrm and new create 1 graphic swfrm , -then the new paragraph and the new graphic SwFrm will add . -but when add graphic SwFrm ,the accessible of the new Paragraph is not created yet. +then the new paragraph and the new graphic SwFrame will add . +but when add graphic SwFrame ,the accessible of the new Paragraph is not created yet. so the new graphic accessible 'parent is NULL, -so run here: save the parent's SwFrm not the accessible object parent, +so run here: save the parent's SwFrame not the accessible object parent, */ - bool bIsValidFrm = false; + bool bIsValidFrame = false; bool bIsTextParent = false; - if (aFrmOrObj.GetSwFrm()) + if (aFrameOrObj.GetSwFrame()) { - int nType = pFrm->GetType(); + int nType = pFrame->GetType(); if ( FRM_FLY == nType ) { - bIsValidFrm =true; + bIsValidFrame =true; } } else if(pObj) @@ -2482,15 +2482,15 @@ so run here: save the parent's SwFrm not the accessible object parent, bIsTextParent =true; } } -// bool bIsVisibleChildrenOnly =aFrmOrObj.IsVisibleChildrenOnly() ; -// bool bIsBoundAsChar =aFrmOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar && - if((bIsValidFrm || bIsTextParent) ) +// bool bIsVisibleChildrenOnly =aFrameOrObj.IsVisibleChildrenOnly() ; +// bool bIsBoundAsChar =aFrameOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar && + if((bIsValidFrame || bIsTextParent) ) { if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CHILD_POS_CHANGED, - pParent, aFrmOrObj, rOldBox ); + pParent, aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else @@ -2502,20 +2502,20 @@ so run here: save the parent's SwFrm not the accessible object parent, } } -void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) +void SwAccessibleMap::InvalidateContent( const SwFrame *pFrame ) { - SwAccessibleChild aFrmOrObj( pFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -2528,7 +2528,7 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::INVALID_CONTENT, pAccImpl, - aFrmOrObj ); + aFrameOrObj ); AppendEvent( aEvent ); } else @@ -2540,20 +2540,20 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) } } -void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) +void SwAccessibleMap::InvalidateAttr( const SwTextFrame& rTextFrame ) { - SwAccessibleChild aFrmOrObj( &rTextFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &rTextFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -2565,7 +2565,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::INVALID_ATTR, - pAccImpl, aFrmOrObj ); + pAccImpl, aFrameOrObj ); aEvent.SetStates( AccessibleStates::TEXT_ATTRIBUTE_CHANGED ); AppendEvent( aEvent ); } @@ -2578,38 +2578,38 @@ void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) } } -void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) +void SwAccessibleMap::InvalidateCursorPosition( const SwFrame *pFrame ) { - SwAccessibleChild aFrmOrObj( pFrm ); + SwAccessibleChild aFrameOrObj( pFrame ); bool bShapeSelected = false; const SwViewShell *pVSh = GetShell(); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) { - const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh ); + const SwCursorShell *pCSh = static_cast< const SwCursorShell * >( pVSh ); if( pCSh->IsTableMode() ) { - while( aFrmOrObj.GetSwFrm() && !aFrmOrObj.GetSwFrm()->IsCellFrm() ) - aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper(); + while( aFrameOrObj.GetSwFrame() && !aFrameOrObj.GetSwFrame()->IsCellFrame() ) + aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper(); } else if( dynamic_cast<const SwFEShell*>( pVSh) != nullptr ) { const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh ); - const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFrame *pFlyFrame = pFESh->GetSelectedFlyFrame(); + if( pFlyFrame ) { - OSL_ENSURE( !pFrm || pFrm->FindFlyFrm() == pFlyFrm, + OSL_ENSURE( !pFrame || pFrame->FindFlyFrame() == pFlyFrame, "cursor is not contained in fly frame" ); - aFrmOrObj = pFlyFrm; + aFrameOrObj = pFlyFrame; } else if( pFESh->IsObjSelected() > 0 ) { bShapeSelected = true; - aFrmOrObj = static_cast<const SwFrm *>( nullptr ); + aFrameOrObj = static_cast<const SwFrame *>( nullptr ); } } } - OSL_ENSURE( bShapeSelected || aFrmOrObj.IsAccessible(GetShell()->IsPreview()), + OSL_ENSURE( bShapeSelected || aFrameOrObj.IsAccessible(GetShell()->IsPreview()), "frame is not accessible" ); uno::Reference < XAccessible > xOldAcc; @@ -2625,27 +2625,27 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) bOldShapeSelected = mbShapeSelected; mbShapeSelected = bShapeSelected; - if( aFrmOrObj.GetSwFrm() && mpFrmMap ) + if( aFrameOrObj.GetSwFrame() && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; else { SwRect rcEmpty; - const SwTabFrm* pTabFrm = aFrmOrObj.GetSwFrm()->FindTabFrm(); - if (pTabFrm) + const SwTabFrame* pTabFrame = aFrameOrObj.GetSwFrame()->FindTabFrame(); + if (pTabFrame) { - InvalidatePosOrSize(pTabFrm, nullptr, nullptr, rcEmpty); + InvalidatePosOrSize(pTabFrame, nullptr, nullptr, rcEmpty); } else { - InvalidatePosOrSize(aFrmOrObj.GetSwFrm(), nullptr, nullptr, rcEmpty); + InvalidatePosOrSize(aFrameOrObj.GetSwFrame(), nullptr, nullptr, rcEmpty); } - aIter = mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + aIter = mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2664,10 +2664,10 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) // table, its the best choice, because using it avoids // an unnecessary cursor invalidation cycle when creating // a new object for the current cell. - if( aFrmOrObj.GetSwFrm()->IsCellFrm() ) + if( aFrameOrObj.GetSwFrame()->IsCellFrame() ) { if( xOldAcc.is() && - AreInSameTable( xOldAcc, aFrmOrObj.GetSwFrm() ) ) + AreInSameTable( xOldAcc, aFrameOrObj.GetSwFrame() ) ) { if( xAcc.is() ) xOldAcc = xAcc; // avoid extra invalidation @@ -2675,7 +2675,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) xAcc = xOldAcc; // make sure ate least one } if( !xAcc.is() ) - xAcc = GetContext( aFrmOrObj.GetSwFrm() ); + xAcc = GetContext( aFrameOrObj.GetSwFrame() ); } } else if (bShapeSelected) @@ -2694,19 +2694,19 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) } if (pObj != nullptr) { - const SwFrm *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreview() ); + const SwFrame *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreview() ); if( pParent ) { ::rtl::Reference< SwAccessibleContext > xParentAccImpl = GetContextImpl(pParent,false); if (!xParentAccImpl.is()) { - const SwTabFrm* pTabFrm = pParent->FindTabFrm(); - if (pTabFrm) + const SwTabFrame* pTabFrame = pParent->FindTabFrame(); + if (pTabFrame) { //The Table should not add in acc.because the "pParent" is not add to acc . - uno::Reference< XAccessible> xAccParentTab = GetContext(pTabFrm);//Should Create. + uno::Reference< XAccessible> xAccParentTab = GetContext(pTabFrame);//Should Create. - const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pTabFrm), GetShell()->IsPreview() ); + const SwFrame *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pTabFrame), GetShell()->IsPreview() ); if (pParentRoot) { ::rtl::Reference< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,false); @@ -2727,7 +2727,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) //directly create this acc para . xParentAccImpl = GetContextImpl(pParent);//Should Create. - const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pParent), GetShell()->IsPreview() ); + const SwFrame *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pParent), GetShell()->IsPreview() ); ::rtl::Reference< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,false); if(xParentAccImplRoot.is()) @@ -2836,23 +2836,23 @@ void SwAccessibleMap::SetCursorContext( } void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates, - const SwFrm* _pFrm ) + const SwFrame* _pFrame ) { // Start with the frame or the first upper that is accessible - SwAccessibleChild aFrmOrObj( _pFrm ); - while( aFrmOrObj.GetSwFrm() && - !aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) - aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper(); - if( !aFrmOrObj.GetSwFrm() ) - aFrmOrObj = GetShell()->GetLayout(); - - uno::Reference< XAccessible > xAcc( GetContext( aFrmOrObj.GetSwFrm() ) ); + SwAccessibleChild aFrameOrObj( _pFrame ); + while( aFrameOrObj.GetSwFrame() && + !aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) + aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper(); + if( !aFrameOrObj.GetSwFrame() ) + aFrameOrObj = GetShell()->GetLayout(); + + uno::Reference< XAccessible > xAcc( GetContext( aFrameOrObj.GetSwFrame() ) ); SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrame()), _nStates ); AppendEvent( aEvent ); } @@ -2863,22 +2863,22 @@ void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates, } } -void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, +void SwAccessibleMap::_InvalidateRelationSet( const SwFrame* pFrame, bool bFrom ) { // first, see if this frame is accessible, and if so, get the respective - SwAccessibleChild aFrmOrObj( pFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2893,7 +2893,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, - pAccImpl, SwAccessibleChild(pFrm), + pAccImpl, SwAccessibleChild(pFrame), ( bFrom ? AccessibleStates::RELATION_FROM : AccessibleStates::RELATION_TO ) ); @@ -2910,36 +2910,36 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, } } -void SwAccessibleMap::InvalidateRelationSet( const SwFrm* pMaster, - const SwFrm* pFollow ) +void SwAccessibleMap::InvalidateRelationSet( const SwFrame* pMaster, + const SwFrame* pFollow ) { _InvalidateRelationSet( pMaster, false ); _InvalidateRelationSet( pFollow, true ); } // invalidation of CONTENT_FLOW_FROM/_TO relation of a paragraph -void SwAccessibleMap::InvalidateParaFlowRelation( const SwTextFrm& _rTextFrm, +void SwAccessibleMap::InvalidateParaFlowRelation( const SwTextFrame& _rTextFrame, const bool _bFrom ) { - _InvalidateRelationSet( &_rTextFrm, _bFrom ); + _InvalidateRelationSet( &_rTextFrame, _bFrom ); } // invalidation of text selection of a paragraph -void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) +void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrame& _rTextFrame ) { // first, see if this frame is accessible, and if so, get the respective - SwAccessibleChild aFrmOrObj( &_rTextFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &_rTextFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2956,7 +2956,7 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild( &_rTextFrm ), + SwAccessibleChild( &_rTextFrame ), AccessibleStates::TEXT_SELECTION_CHANGED ); AppendEvent( aEvent ); } @@ -2969,23 +2969,23 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) } } -sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, +sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrame& rParentFrame, vcl::Window& rChild ) const { sal_Int32 nIndex( -1 ); - SwAccessibleChild aFrmOrObj( &rParentFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &rParentFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -3007,13 +3007,13 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { assert(GetShell()->IsPreview() && "no preview?"); assert(mpPreview != nullptr && "no preview data?"); - mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize ); + mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize ); // propagate change of VisArea through the document's // accessibility tree; this will also send appropriate scroll @@ -3029,12 +3029,12 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewP xOldAcc = mxCursorContext; - const SwPageFrm *pSelPage = mpPreview->GetSelPage(); - if( pSelPage && mpFrmMap ) + const SwPageFrame *pSelPage = mpPreview->GetSelPage(); + if( pSelPage && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pSelPage ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pSelPage ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -3059,11 +3059,11 @@ void SwAccessibleMap::InvalidatePreviewSelection( sal_uInt16 nSelPage ) xOldAcc = mxCursorContext; - const SwPageFrm *pSelPage = mpPreview->GetSelPage(); - if( pSelPage && mpFrmMap ) + const SwPageFrame *pSelPage = mpPreview->GetSelPage(); + if( pSelPage && mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pSelPage ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pSelPage ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -3074,9 +3074,9 @@ void SwAccessibleMap::InvalidatePreviewSelection( sal_uInt16 nSelPage ) InvalidateCursorPosition( xAcc ); } -bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const +bool SwAccessibleMap::IsPageSelected( const SwPageFrame *pPageFrame ) const { - return mpPreview && mpPreview->GetSelPage() == pPageFrm; + return mpPreview && mpPreview->GetSelPage() == pPageFrame; } void SwAccessibleMap::FireEvents() @@ -3364,29 +3364,29 @@ Size SwAccessibleMap::GetPreviewPageSize( sal_uInt16 _nPreviewPageNum ) const SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() { // no accessible contexts, no selection - if ( !mpFrmMap ) + if ( !mpFrameMap ) { return nullptr; } // get cursor as an instance of its base class <SwPaM> - SwPaM* pCrsr( nullptr ); + SwPaM* pCursor( nullptr ); { - SwCrsrShell* pCrsrShell = dynamic_cast<SwCrsrShell*>(GetShell()); - if ( pCrsrShell ) + SwCursorShell* pCursorShell = dynamic_cast<SwCursorShell*>(GetShell()); + if ( pCursorShell ) { - SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCrsrShell); + SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCursorShell); if ( !pFEShell || - ( !pFEShell->IsFrmSelected() && + ( !pFEShell->IsFrameSelected() && pFEShell->IsObjSelected() == 0 ) ) { // get cursor without updating an existing table cursor. - pCrsr = pCrsrShell->GetCrsr( false ); + pCursor = pCursorShell->GetCursor( false ); } } } // no cursor, no selection - if ( !pCrsr ) + if ( !pCursor ) { return nullptr; } @@ -3394,17 +3394,17 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() SwAccessibleSelectedParas_Impl* pRetSelectedParas( nullptr ); // loop on all cursors - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // for a selection the cursor has to have a mark. // for safety reasons assure that point and mark are in text nodes - if ( pCrsr->HasMark() && - pCrsr->GetPoint()->nNode.GetNode().IsTextNode() && - pCrsr->GetMark()->nNode.GetNode().IsTextNode() ) + if ( pCursor->HasMark() && + pCursor->GetPoint()->nNode.GetNode().IsTextNode() && + pCursor->GetMark()->nNode.GetNode().IsTextNode() ) { - SwPosition* pStartPos = pCrsr->Start(); - SwPosition* pEndPos = pCrsr->End(); + SwPosition* pStartPos = pCursor->Start(); + SwPosition* pEndPos = pCursor->End(); // loop on all text nodes inside the selection SwNodeIndex aIdx( pStartPos->nNode ); for ( ; aIdx.GetIndex() <= pEndPos->nNode.GetIndex(); ++aIdx ) @@ -3413,13 +3413,13 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() if ( pTextNode ) { // loop on all text frames registered at the text node. - SwIterator<SwTextFrm,SwTextNode> aIter( *pTextNode ); - for( SwTextFrm* pTextFrm = aIter.First(); pTextFrm; pTextFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *pTextNode ); + for( SwTextFrame* pTextFrame = aIter.First(); pTextFrame; pTextFrame = aIter.Next() ) { uno::WeakReference < XAccessible > xWeakAcc; SwAccessibleContextMap_Impl::iterator aMapIter = - mpFrmMap->find( pTextFrm ); - if( aMapIter != mpFrmMap->end() ) + mpFrameMap->find( pTextFrame ); + if( aMapIter != mpFrameMap->end() ) { xWeakAcc = (*aMapIter).second; SwAccessibleParaSelection aDataEntry( @@ -3444,8 +3444,8 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() } // prepare next turn: get next cursor in ring - pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() ); - } while ( pCrsr != pRingStart ); + pCursor = static_cast<SwPaM*>( pCursor->GetNext() ); + } while ( pCursor != pRingStart ); return pRetSelectedParas; } @@ -3507,15 +3507,15 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas() { ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast<SwAccessibleContext*>( xAcc.get() ) ); - if ( xAccImpl.is() && xAccImpl->GetFrm() ) + if ( xAccImpl.is() && xAccImpl->GetFrame() ) { - const SwTextFrm* pTextFrm( - dynamic_cast<const SwTextFrm*>(xAccImpl->GetFrm()) ); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame( + dynamic_cast<const SwTextFrame*>(xAccImpl->GetFrame()) ); + OSL_ENSURE( pTextFrame, "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" ); - if ( pTextFrm ) + if ( pTextFrame ) { - InvalidateParaTextSelection( *pTextFrm ); + InvalidateParaTextSelection( *pTextFrame ); } } } @@ -3535,15 +3535,15 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas() { ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast<SwAccessibleContext*>( xAcc.get() ) ); - if ( xAccImpl.is() && xAccImpl->GetFrm() ) + if ( xAccImpl.is() && xAccImpl->GetFrame() ) { - const SwTextFrm* pTextFrm( - dynamic_cast<const SwTextFrm*>(xAccImpl->GetFrm()) ); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame( + dynamic_cast<const SwTextFrame*>(xAccImpl->GetFrame()) ); + OSL_ENSURE( pTextFrame, "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" ); - if ( pTextFrm ) + if ( pTextFrame ) { - InvalidateParaTextSelection( *pTextFrm ); + InvalidateParaTextSelection( *pTextFrame ); } } } diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 5bb25d3048ce..9b7a1bfdd7ee 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -44,12 +44,12 @@ using utl::AccessibleRelationSetHelper; const SwNoTextNode *SwAccessibleNoTextFrame::GetNoTextNode() const { const SwNoTextNode *pNd = nullptr; - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() ); - if( pFlyFrm->Lower() && pFlyFrm->Lower()->IsNoTextFrm() ) + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame *>( GetFrame() ); + if( pFlyFrame->Lower() && pFlyFrame->Lower()->IsNoTextFrame() ) { - const SwContentFrm *pCntFrm = - static_cast<const SwContentFrm *>( pFlyFrm->Lower() ); - const SwContentNode* pSwContentNode = pCntFrm->GetNode(); + const SwContentFrame *pContentFrame = + static_cast<const SwContentFrame *>( pFlyFrame->Lower() ); + const SwContentNode* pSwContentNode = pContentFrame->GetNode(); if(pSwContentNode != nullptr) { pNd = pSwContentNode->GetNoTextNode(); @@ -62,8 +62,8 @@ const SwNoTextNode *SwAccessibleNoTextFrame::GetNoTextNode() const SwAccessibleNoTextFrame::SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrm ), + const SwFlyFrame* pFlyFrame ) : + SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrame ), aDepend( this, const_cast < SwNoTextNode * >( GetNoTextNode() ) ), msTitle(), msDesc() @@ -138,7 +138,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem // intentional no break here case RES_DESCRIPTION_CHANGED: { - if ( pNd && GetFrm() ) + if ( pNd && GetFrame() ) { const OUString sOldDesc( msDesc ); @@ -311,7 +311,7 @@ throw (uno::RuntimeException, std::exception) CHECK_FOR_DEFUNC( XAccessibleHypertext ); sal_Int32 nCount = 0; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if(aURL.GetMap() || !aURL.GetURL().isEmpty()) nCount = 1; @@ -328,7 +328,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL uno::Reference< XAccessibleHyperlink > xRet; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if( nLinkIndex > 0 ) throw lang::IndexOutOfBoundsException(); @@ -337,7 +337,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL { if ( !alink.is() ) { - alink = new SwAccessibleNoTextHyperlink( this, GetFrm() ); + alink = new SwAccessibleNoTextHyperlink( this, GetFrame() ); } return alink; diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx index 17c7d5216a85..d11dd25455fb 100644 --- a/sw/source/core/access/accnotextframe.hxx +++ b/sw/source/core/access/accnotextframe.hxx @@ -29,7 +29,7 @@ namespace com { namespace star { namespace accessibility { struct AccessibleRelation; } } } -class SwFlyFrm; +class SwFlyFrame; class SwNoTextNode; class SwAccessibleNoTextHyperlink; @@ -53,7 +53,7 @@ protected: public: SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); // XAccessibleContext diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx index ddea63954254..b8dbbbf42bc6 100644 --- a/sw/source/core/access/accnotexthyperlink.cxx +++ b/sw/source/core/access/accnotexthyperlink.cxx @@ -37,9 +37,9 @@ using namespace css::lang; using namespace css::uno; using namespace css::accessibility; -SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm *aFrm ) : +SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame *aFrame ) : xFrame( p ), - mpFrm( aFrm ) + mpFrame( aFrame ) { } @@ -180,8 +180,8 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor( throw lang::IndexOutOfBoundsException(); Any aRet; - //SwFrm* pAnchor = static_cast<SwFlyFrm*>(mpFrm)->GetAnchor(); - Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrm); + //SwFrame* pAnchor = static_cast<SwFlyFrame*>(mpFrame)->GetAnchor(); + Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrame); //SwAccessibleNoTextFrame* pFrame = xFrame.get(); //Reference< XAccessible > xAnchor = (XAccessible*)pFrame; aRet <<= xAnchor; diff --git a/sw/source/core/access/accnotexthyperlink.hxx b/sw/source/core/access/accnotexthyperlink.hxx index bd1c881338b8..7629ef8272cc 100644 --- a/sw/source/core/access/accnotexthyperlink.hxx +++ b/sw/source/core/access/accnotexthyperlink.hxx @@ -35,15 +35,15 @@ class SwAccessibleNoTextHyperlink : friend class SwAccessibleNoTextFrame; ::rtl::Reference< SwAccessibleNoTextFrame > xFrame; - const SwFrm *mpFrm; + const SwFrame *mpFrame; SwFrameFormat *GetFormat() { - return const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(mpFrm))->GetFormat(); + return const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(mpFrame))->GetFormat(); } public: - SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm* aFrm ); + SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame* aFrame ); // XAccessibleAction virtual sal_Int32 SAL_CALL getAccessibleActionCount() diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index 32e4a9083e81..f1f2c0ce9118 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -41,7 +41,7 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePag bool SwAccessiblePage::IsSelected() { - return GetMap()->IsPageSelected( static_cast < const SwPageFrm * >( GetFrm() ) ); + return GetMap()->IsPageSelected( static_cast < const SwPageFrame * >( GetFrame() ) ); } void SwAccessiblePage::GetStates( @@ -111,18 +111,18 @@ void SwAccessiblePage::_InvalidateFocus() } SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap, - const SwFrm* pFrame ) + const SwFrame* pFrame ) : SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame ) , bIsSelected( false ) { OSL_ENSURE( pFrame != nullptr, "need frame" ); OSL_ENSURE( pInitMap != nullptr, "need map" ); - OSL_ENSURE( pFrame->IsPageFrm(), "need page frame" ); + OSL_ENSURE( pFrame->IsPageFrame(), "need page frame" ); SolarMutexGuard aGuard; OUString sPage = OUString::number( - static_cast<const SwPageFrm*>( GetFrm() )->GetPhyPageNum() ); + static_cast<const SwPageFrame*>( GetFrame() )->GetPhyPageNum() ); SetName( GetResource( STR_ACCESS_PAGE_NAME, &sPage ) ); } diff --git a/sw/source/core/access/accpage.hxx b/sw/source/core/access/accpage.hxx index 03e4ac8baede..784bcc161196 100644 --- a/sw/source/core/access/accpage.hxx +++ b/sw/source/core/access/accpage.hxx @@ -23,7 +23,7 @@ #include "acccontext.hxx" /** - * accessibility implementation for the page (SwPageFrm) + * accessibility implementation for the page (SwPageFrame) * The page is _only_ visible in the page preview. For the regular * document view, it doesn't make sense to add this additional element * into the hierarchy. For the page preview, however, the page is the @@ -50,8 +50,8 @@ protected: public: // convenience constructor to avoid typecast; - // may only be called with SwPageFrm argument - SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrm* pFrame ); + // may only be called with SwPageFrame argument + SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrame* pFrame ); // XAccessibleContext methods that need to be overridden diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index fdcf1ab6821f..7fdd058a9d63 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -121,10 +121,10 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePar const SwTextNode* SwAccessibleParagraph::GetTextNode() const { - const SwFrm* pFrm = GetFrm(); - OSL_ENSURE( pFrm->IsTextFrm(), "The text frame has mutated!" ); + const SwFrame* pFrame = GetFrame(); + OSL_ENSURE( pFrame->IsTextFrame(), "The text frame has mutated!" ); - const SwTextNode* pNode = static_cast<const SwTextFrm*>(pFrm)->GetTextNode(); + const SwTextNode* pNode = static_cast<const SwTextFrame*>(pFrame)->GetTextNode(); OSL_ENSURE( pNode != nullptr, "A text frame without a text node." ); return pNode; @@ -162,8 +162,8 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos() if(!GetPortionData().IsValidCorePosition( nIndex ) || ( GetPortionData().IsZeroCorePositionData() && nIndex== 0) ) { - const SwTextFrm *pTextFrm = dynamic_cast<const SwTextFrm*>( GetFrm() ); - bool bFormat = (pTextFrm && pTextFrm->HasPara()); + const SwTextFrame *pTextFrame = dynamic_cast<const SwTextFrame*>( GetFrame() ); + bool bFormat = (pTextFrame && pTextFrame->HasPara()); if(bFormat) { ClearPortionData(); @@ -204,23 +204,23 @@ bool SwAccessibleParagraph::GetSelection( nEnd = -1; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); // #i27301# - consider adjusted method signature - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); // #i27301# - consider adjusted method signature + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) @@ -324,24 +324,24 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection ) { // get the cursor shell; if we don't have any, we don't have a // cursor/selection either - SwPaM* pCrsr = nullptr; - SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell(); + SwPaM* pCursor = nullptr; + SwCursorShell* pCursorShell = SwAccessibleParagraph::GetCursorShell(); // #i27301# - if cursor is retrieved for selection, the cursors for // a table selection has to be returned. - if ( pCrsrShell != nullptr && - ( _bForSelection || !pCrsrShell->IsTableMode() ) ) + if ( pCursorShell != nullptr && + ( _bForSelection || !pCursorShell->IsTableMode() ) ) { - SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr; + SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast< SwFEShell * >( pCursorShell ) : nullptr; if( !pFESh || - !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) ) + !(pFESh->IsFrameSelected() || pFESh->IsObjSelected() > 0) ) { // get the selection, and test whether it affects our text node - pCrsr = pCrsrShell->GetCrsr( false /* ??? */ ); + pCursor = pCursorShell->GetCursor( false /* ??? */ ); } } - return pCrsr; + return pCursor; } bool SwAccessibleParagraph::IsHeading() const @@ -359,12 +359,12 @@ void SwAccessibleParagraph::GetStates( rStateSet.AddState( AccessibleStateType::MULTI_LINE ); // MULTISELECTABLE - SwCrsrShell *pCrsrSh = GetCrsrShell(); - if( pCrsrSh ) + SwCursorShell *pCursorSh = GetCursorShell(); + if( pCursorSh ) rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); // FOCUSABLE - if( pCrsrSh ) + if( pCursorSh ) rStateSet.AddState( AccessibleStateType::FOCUSABLE ); // FOCUSED (simulates node index of cursor) @@ -532,9 +532,9 @@ void SwAccessibleParagraph::_InvalidateFocus() SwAccessibleParagraph::SwAccessibleParagraph( SwAccessibleMap& rInitMap, - const SwTextFrm& rTextFrm ) - : SwClient( const_cast<SwTextNode*>(rTextFrm.GetTextNode()) ) // #i108125# - , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTextFrm ) + const SwTextFrame& rTextFrame ) + : SwClient( const_cast<SwTextNode*>(rTextFrame.GetTextNode()) ) // #i108125# + , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTextFrame ) , sDesc() , pPortionData( nullptr ) , pHyperTextData( nullptr ) @@ -543,7 +543,7 @@ SwAccessibleParagraph::SwAccessibleParagraph( //Get the real heading level, Heading1 ~ Heading10 , nHeadingLevel (-1) , aSelectionHelper( *this ) - , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTextFrm ) ) // #i108125# + , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTextFrame ) ) // #i108125# , m_bLastHasSelection(false) //To add TEXT_SELECTION_CHANGED event { SolarMutexGuard aGuard; @@ -578,15 +578,15 @@ void SwAccessibleParagraph::UpdatePortionData() throw( uno::RuntimeException ) { // obtain the text frame - OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" ); - OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" ); - const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() ); + OSL_ENSURE( GetFrame() != nullptr, "The text frame has vanished!" ); + OSL_ENSURE( GetFrame()->IsTextFrame(), "The text frame has mutated!" ); + const SwTextFrame* pFrame = static_cast<const SwTextFrame*>( GetFrame() ); // build new portion data delete pPortionData; pPortionData = new SwAccessiblePortionData( - pFrm->GetTextNode(), GetMap()->GetShell()->GetViewOptions() ); - pFrm->VisitPortions( *pPortionData ); + pFrame->GetTextNode(), GetMap()->GetShell()->GetViewOptions() ); + pFrame->VisitPortions( *pPortionData ); OSL_ENSURE( pPortionData != nullptr, "UpdatePortionData() failed" ); } @@ -642,7 +642,7 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion( SwTextNode* pTextNode = const_cast<SwTextNode*>( GetTextNode() ); SwIndex aIndex( pTextNode, nStart ); SwPosition aStartPos( *pTextNode, aIndex ); - auto pUnoCursor(pTextNode->GetDoc()->CreateUnoCrsr( aStartPos )); + auto pUnoCursor(pTextNode->GetDoc()->CreateUnoCursor( aStartPos )); pUnoCursor->SetMark(); pUnoCursor->GetMark()->nContent = nEnd; @@ -947,13 +947,13 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale() { SolarMutexGuard aGuard; - const SwTextFrm *pTextFrm = dynamic_cast<const SwTextFrm*>( GetFrm() ); - if( !pTextFrm ) + const SwTextFrame *pTextFrame = dynamic_cast<const SwTextFrame*>( GetFrame() ); + if( !pTextFrame ) { THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (no text frame)" ); } - const SwTextNode *pTextNd = pTextFrm->GetTextNode(); + const SwTextNode *pTextNd = pTextFrame->GetTextNode(); lang::Locale aLoc( g_pBreakIt->GetLocale( pTextNd->GetLang( 0 ) ) ); return aLoc; @@ -968,24 +968,24 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleParagraph::getAccess utl::AccessibleRelationSetHelper* pHelper = new utl::AccessibleRelationSetHelper(); - const SwTextFrm* pTextFrm = dynamic_cast<const SwTextFrm*>(GetFrm()); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame = dynamic_cast<const SwTextFrame*>(GetFrame()); + OSL_ENSURE( pTextFrame, "<SwAccessibleParagraph::getAccessibleRelationSet()> - missing text frame"); - if ( pTextFrm ) + if ( pTextFrame ) { - const SwContentFrm* pPrevCntFrm( pTextFrm->FindPrevCnt( true ) ); - if ( pPrevCntFrm ) + const SwContentFrame* pPrevContentFrame( pTextFrame->FindPrevCnt( true ) ); + if ( pPrevContentFrame ) { - uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pPrevCntFrm ) }; + uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pPrevContentFrame ) }; AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_FROM, aSequence ); pHelper->AddRelation( aAccRel ); } - const SwContentFrm* pNextCntFrm( pTextFrm->FindNextCnt( true ) ); - if ( pNextCntFrm ) + const SwContentFrame* pNextContentFrame( pTextFrame->FindNextCnt( true ) ); + if ( pNextContentFrame ) { - uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pNextCntFrm ) }; + uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pNextContentFrame ) }; AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ); pHelper->AddRelation( aAccRel ); @@ -1003,19 +1003,19 @@ void SAL_CALL SwAccessibleParagraph::grabFocus() CHECK_FOR_DEFUNC( XAccessibleContext ); // get cursor shell - SwCrsrShell *pCrsrSh = GetCrsrShell(); - SwPaM *pCrsr = GetCursor( false ); // #i27301# - consider new method signature - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - const SwTextNode* pTextNd = pTextFrm->GetTextNode(); + SwCursorShell *pCursorSh = GetCursorShell(); + SwPaM *pCursor = GetCursor( false ); // #i27301# - consider new method signature + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + const SwTextNode* pTextNd = pTextFrame->GetTextNode(); - if( pCrsrSh != nullptr && pTextNd != nullptr && - ( pCrsr == nullptr || - pCrsr->GetPoint()->nNode.GetIndex() != pTextNd->GetIndex() || - !pTextFrm->IsInside( pCrsr->GetPoint()->nContent.GetIndex()) ) ) + if( pCursorSh != nullptr && pTextNd != nullptr && + ( pCursor == nullptr || + pCursor->GetPoint()->nNode.GetIndex() != pTextNd->GetIndex() || + !pTextFrame->IsInside( pCursor->GetPoint()->nContent.GetIndex()) ) ) { // create pam for selection SwIndex aIndex( const_cast< SwTextNode * >( pTextNd ), - pTextFrm->GetOfst() ); + pTextFrame->GetOfst() ); SwPosition aStartPos( *pTextNd, aIndex ); SwPaM aPaM( aStartPos ); @@ -1034,8 +1034,8 @@ void SAL_CALL SwAccessibleParagraph::grabFocus() // #i71385# static bool lcl_GetBackgroundColor( Color & rColor, - const SwFrm* pFrm, - SwCrsrShell* pCrsrSh ) + const SwFrame* pFrame, + SwCursorShell* pCursorSh ) { const SvxBrushItem* pBackgrdBrush = nullptr; const Color* pSectionTOXColor = nullptr; @@ -1044,8 +1044,8 @@ static bool lcl_GetBackgroundColor( Color & rColor, //UUUU drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( pFrm && - pFrm->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) ) + if ( pFrame && + pFrame->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) ) { if ( pSectionTOXColor ) { @@ -1058,9 +1058,9 @@ static bool lcl_GetBackgroundColor( Color & rColor, return true; } } - else if ( pCrsrSh ) + else if ( pCursorSh ) { - rColor = pCrsrSh->Imp()->GetRetoucheColor(); + rColor = pCursorSh->Imp()->GetRetoucheColor(); return true; } @@ -1072,7 +1072,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getForeground() { Color aBackgroundCol; - if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) ) + if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrame(), GetCursorShell() ) ) { if ( aBackgroundCol.IsDark() ) { @@ -1092,7 +1092,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground() { Color aBackgroundCol; - if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) ) + if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrame(), GetCursorShell() ) ) { return aBackgroundCol.GetColor(); } @@ -1317,8 +1317,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) bool bRet = false; // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -1369,7 +1369,7 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt bBehindText = true; // get model position & prepare GetCharRect() arguments - SwCrsrMoveState aMoveState; + SwCursorMoveState aMoveState; aMoveState.m_bRealHeight = true; aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; @@ -1388,15 +1388,15 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt SwRect aCoreRect; SwIndex aIndex( pNode, nPos ); SwPosition aPosition( *pNode, aIndex ); - GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState ); + GetFrame()->GetCharRect( aCoreRect, aPosition, &aMoveState ); // already get the caret position css::uno::Sequence< css::style::TabStop > tabs; const sal_Int32 nStrLen = GetTextNode()->GetText().getLength(); if( nStrLen > 0 ) { - SwFrm* pTFrm = const_cast<SwFrm*>(GetFrm()); - tabs = pTFrm->GetTabStopInfo(aCoreRect.Left()); + SwFrame* pTFrame = const_cast<SwFrame*>(GetFrame()); + tabs = pTFrame->GetTabStopInfo(aCoreRect.Left()); } if( tabs.hasElements() ) @@ -1408,10 +1408,10 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt SwRect aTmpRect(0, 0, tabs[0].Position, 0); Rectangle aScreenRect( GetMap()->CoreToPixel( aTmpRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.X(), -aFramePixPos.Y() ); tabs[0].Position = aScreenRect.GetWidth(); } @@ -1820,7 +1820,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( // #i73371# // resolve value text::WritingMode2::PAGE of property value entry WritingMode - if ( !bOnlyCharAttrs && GetFrm() ) + if ( !bOnlyCharAttrs && GetFrame() ) { tAccParaPropValMap::iterator aIter = aDefAttrSeq.find( UNO_NAME_WRITING_MODE ); if ( aIter != aDefAttrSeq.end() ) @@ -1829,17 +1829,17 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( sal_Int16 nVal = rPropVal.Value.get<sal_Int16>(); if ( nVal == text::WritingMode2::PAGE ) { - const SwFrm* pUpperFrm( GetFrm()->GetUpper() ); - while ( pUpperFrm ) + const SwFrame* pUpperFrame( GetFrame()->GetUpper() ); + while ( pUpperFrame ) { - if ( pUpperFrm->GetType() & + if ( pUpperFrame->GetType() & ( FRM_PAGE | FRM_FLY | FRM_SECTION | FRM_TAB | FRM_CELL ) ) { - if ( pUpperFrm->IsVertical() ) + if ( pUpperFrame->IsVertical() ) { nVal = text::WritingMode2::TB_RL; } - else if ( pUpperFrm->IsRightToLeft() ) + else if ( pUpperFrame->IsRightToLeft() ) { nVal = text::WritingMode2::RL_TB; } @@ -1852,13 +1852,13 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( break; } - if ( const SwFlyFrm* pFlyFrm = dynamic_cast<const SwFlyFrm*>(pUpperFrm) ) + if ( const SwFlyFrame* pFlyFrame = dynamic_cast<const SwFlyFrame*>(pUpperFrame) ) { - pUpperFrm = pFlyFrm->GetAnchorFrm(); + pUpperFrame = pFlyFrame->GetAnchorFrame(); } else { - pUpperFrm = pUpperFrm->GetUpper(); + pUpperFrame = pUpperFrame->GetUpper(); } } } @@ -1969,7 +1969,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // From the perspective of the a11y API the character attributes, which // are set at the automatic paragraph style of the paragraph, are treated // as run attributes. - // SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True ); + // SwXTextCursor::GetCursorAttr( *pPaM, aSet, sal_True, sal_True ); // get character attributes from automatic paragraph style and merge these into <aSet> { const SwTextNode* pTextNode( GetTextNode() ); @@ -1987,7 +1987,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END -1, 0 ); - SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, true); + SwUnoCursorHelper::GetCursorAttr(*pPaM, aCharAttrsAtPaM, true); aSet.Put( aCharAttrsAtPaM ); } @@ -2269,8 +2269,8 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, if (rValue.Name == UNO_NAME_CHAR_UNDERLINE) { //misspelled word - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell()) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && pCursorShell->GetViewOptions() && pCursorShell->GetViewOptions()->IsOnlineSpell()) { const SwWrongList* pWrongList = pTextNode->GetWrong(); if( nullptr != pWrongList ) @@ -2290,8 +2290,8 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, if (rValue.Name == UNO_NAME_CHAR_UNDERLINE_COLOR) { //misspelled word - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell()) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && pCursorShell->GetViewOptions() && pCursorShell->GetViewOptions()->IsOnlineSpell()) { const SwWrongList* pWrongList = pTextNode->GetWrong(); if( nullptr != pWrongList ) @@ -2376,7 +2376,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( bBehindText = true; // get model position & prepare GetCharRect() arguments - SwCrsrMoveState aMoveState; + SwCursorMoveState aMoveState; aMoveState.m_bRealHeight = true; aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; @@ -2395,17 +2395,17 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( SwRect aCoreRect; SwIndex aIndex( pNode, nPos ); SwPosition aPosition( *pNode, aIndex ); - GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState ); + GetFrame()->GetCharRect( aCoreRect, aPosition, &aMoveState ); // translate core coordinates into accessibility coordinates vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() ); + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.getX(), -aFramePixPos.getY() ); // convert into AWT Rectangle return awt::Rectangle( @@ -2430,7 +2430,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - // construct SwPosition (where GetCrsrOfst() will put the result into) + // construct SwPosition (where GetCursorOfst() will put the result into) SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); SwIndex aIndex( pNode, 0); SwPosition aPos( *pNode, aIndex ); @@ -2439,7 +2439,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Point aPoint( rPoint.X, rPoint.Y ); - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPoint.setX(aPoint.getX() + aPixPos.getX()); aPoint.setY(aPoint.getY() + aPixPos.getY()); @@ -2463,21 +2463,21 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) } // ask core for position - OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" ); - OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" ); - const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwCrsrMoveState aMoveState; + OSL_ENSURE( GetFrame() != nullptr, "The text frame has vanished!" ); + OSL_ENSURE( GetFrame()->IsTextFrame(), "The text frame has mutated!" ); + const SwTextFrame* pFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwCursorMoveState aMoveState; aMoveState.m_bPosMatchesBounds = true; - const bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState ); + const bool bSuccess = pFrame->GetCursorOfst( &aPos, aCorePoint, &aMoveState ); SwIndex aContentIdx = aPos.nContent; const sal_Int32 nIndex = aContentIdx.GetIndex(); if ( nIndex > 0 ) { SwRect aResultRect; - pFrm->GetCharRect( aResultRect, aPos ); - bool bVert = pFrm->IsVertical(); - bool bR2L = pFrm->IsRightToLeft(); + pFrame->GetCharRect( aResultRect, aPos ); + bool bVert = pFrame->IsVertical(); + bool bR2L = pFrame->IsRightToLeft(); if ( (!bVert && aResultRect.Pos().getX() > aCorePoint.getX()) || ( bVert && aResultRect.Pos().getY() > aCorePoint.getY()) || @@ -2486,7 +2486,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) SwIndex aIdxPrev( pNode, nIndex - 1); SwPosition aPosPrev( *pNode, aIdxPrev ); SwRect aResultRectPrev; - pFrm->GetCharRect( aResultRectPrev, aPosPrev ); + pFrame->GetCharRect( aResultRectPrev, aPosPrev ); if ( (!bVert && aResultRectPrev.Pos().getX() < aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) || ( bVert && aResultRectPrev.Pos().getY() < aCorePoint.getY() && aResultRect.Pos().getX() == aResultRectPrev.Pos().getX()) || ( bR2L && aResultRectPrev.Right() > aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) ) @@ -2554,8 +2554,8 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n bool bRet = false; // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -3053,7 +3053,7 @@ class SwHyperlinkIter_Impl size_t nPos; public: - explicit SwHyperlinkIter_Impl( const SwTextFrm *pTextFrm ); + explicit SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame ); const SwTextAttr *next(); size_t getCurrHintPos() const { return nPos-1; } @@ -3061,13 +3061,13 @@ public: sal_Int32 endIdx() const { return nEnd; } }; -SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrm *pTextFrm ) : - pHints( pTextFrm->GetTextNode()->GetpSwpHints() ), - nStt( pTextFrm->GetOfst() ), +SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame ) : + pHints( pTextFrame->GetTextNode()->GetpSwpHints() ), + nStt( pTextFrame->GetOfst() ), nPos( 0 ) { - const SwTextFrm *pFollFrm = pTextFrm->GetFollow(); - nEnd = pFollFrm ? pFollFrm->GetOfst() : pTextFrm->GetTextNode()->Len(); + const SwTextFrame *pFollFrame = pTextFrame->GetFollow(); + nEnd = pFollFrame ? pFollFrame->GetOfst() : pTextFrame->GetTextNode()->Len(); } const SwTextAttr *SwHyperlinkIter_Impl::next() @@ -3106,8 +3106,8 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount() sal_Int32 nCount = 0; // #i77108# - provide hyperlinks also in editable documents. - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aIter( pTextFrame ); while( aIter.next() ) nCount++; @@ -3123,8 +3123,8 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL uno::Reference< XAccessibleHyperlink > xRet; - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aHIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aHIter( pTextFrame ); sal_Int32 nTIndex = -1; SwTOXSortTabBase* pTBase = GetTOXSortTabBase(); SwTextAttr* pHt = const_cast<SwTextAttr*>(aHIter.next()); @@ -3220,8 +3220,8 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde sal_Int32 nRet = -1; // #i77108# { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aHIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aHIter( pTextFrame ); const sal_Int32 nIdx = GetPortionData().GetModelPosition( nCharIndex ); sal_Int32 nPos = 0; @@ -3283,23 +3283,23 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( ) SolarMutexGuard g; sal_Int32 nSeleted = 0; - SwPaM* pCrsr = GetCursor( true ); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) @@ -3355,9 +3355,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd sal_Int32 nSelected = selectionIndex; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); + SwPaM* pCursor = GetCursor( true ); - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { bool bRet = false; @@ -3366,24 +3366,24 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd sal_uLong nHere = pNode->GetIndex(); // iterate over ring - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // ignore, if no mark - if( pCrsr->HasMark() ) + if( pCursor->HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = pCrsr->Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = pCursor->Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = pCrsr->End(); + SwPosition* pEnd = pCursor->End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) { if( nSelected == 0 ) { - pCrsr->MoveTo(nullptr); - delete pCrsr; + pCursor->MoveTo(nullptr); + delete pCursor; bRet = true; } else @@ -3394,9 +3394,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd } // else: this PaM is collapsed and doesn't select anything if(!bRet) - pCrsr = pCrsr->GetNext(); + pCursor = pCursor->GetNext(); } - while( !bRet && (pCrsr != pRingStart) ); + while( !bRet && (pCursor != pRingStart) ); } return sal_True; } @@ -3451,16 +3451,16 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::addSelection( sal_Int32, sal_Int32 sta } // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection - pCrsrShell->StartAction(); - SwPaM* aPaM = pCrsrShell->CreateCrsr(); + pCursorShell->StartAction(); + SwPaM* aPaM = pCursorShell->CreateCursor(); aPaM->SetMark(); aPaM->GetPoint()->nContent = GetPortionData().GetModelPosition(startOffset); aPaM->GetMark()->nContent = GetPortionData().GetModelPosition(endOffset); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); } return 0; @@ -3603,21 +3603,21 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound ); if ( nCaretPos == aLineBound.startPos ) { - SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell(); - if ( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = SwAccessibleParagraph::GetCursorShell(); + if ( pCursorShell != nullptr ) { const awt::Rectangle aCharRect = getCharacterBounds( nCaretPos ); - const SwRect& aCursorCoreRect = pCrsrShell->GetCharRect(); + const SwRect& aCursorCoreRect = pCursorShell->GetCharRect(); // translate core coordinates into accessibility coordinates vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() ); + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.getX(), -aFramePixPos.getY() ); // convert into AWT Rectangle const awt::Rectangle aCursorRect( aScreenRect.Left(), @@ -3656,23 +3656,23 @@ bool SwAccessibleParagraph::GetSelectionAtIndex( sal_Int32 nSelected = nIndex; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 2433e03ad6a1..60444bf3a234 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -34,7 +34,7 @@ #include <unordered_map> class SwField; -class SwTextFrm; +class SwTextFrame; class SwTextNode; class SwPaM; class SwAccessiblePortionData; @@ -238,7 +238,7 @@ protected: public: SwAccessibleParagraph( SwAccessibleMap& rInitMap, - const SwTextFrm& rTextFrm ); + const SwTextFrame& rTextFrame ); inline operator css::accessibility::XAccessibleText *(); diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index 5f631e14170e..18e857ed9d23 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -146,7 +146,7 @@ public: sal_Int32 GetModelPosition( sal_Int32 nPos ) const; /// fill a SwSpecialPos structure, suitable for calling - /// SwTextFrm->GetCharRect + /// SwTextFrame->GetCharRect /// Returns the core position, and fills rpPos either with NULL or /// with the &rPos, after putting the appropriate data into it. sal_Int32 FillSpecialPos( sal_Int32 nPos, diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index 07f17d27fc64..dd674de28d30 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -84,7 +84,7 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( { SolarMutexGuard aGuard; - // Get the respective child as SwFrm (also do index checking), ... + // Get the respective child as SwFrame (also do index checking), ... const SwAccessibleChild aChild = m_rContext.GetChild( *(m_rContext.GetMap()), nChildIndex ); if( !aChild.IsValid() ) @@ -97,20 +97,20 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( { const SdrObject *pObj = aChild.GetDrawObject(); if( pObj ) - m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==aChild.GetSwFrm()); + m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==aChild.GetSwFrame()); } // no frame shell, or no frame, or no fly frame -> can't select } -//When the selected state of the SwFrmOrObj is setted, return true. +//When the selected state of the SwFrameOrObj is setted, return true. static bool lcl_getSelectedState(const SwAccessibleChild& aChild, SwAccessibleContext* pContext, SwAccessibleMap* pMap) { Reference< XAccessible > xAcc; - if ( aChild.GetSwFrm() ) + if ( aChild.GetSwFrame() ) { - xAcc = pMap->GetContext( aChild.GetSwFrm(), false ); + xAcc = pMap->GetContext( aChild.GetSwFrame(), false ); } else if ( aChild.GetDrawObject() ) { @@ -144,7 +144,7 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected( { SolarMutexGuard aGuard; - // Get the respective child as SwFrm (also do index checking), ... + // Get the respective child as SwFrame (also do index checking), ... const SwAccessibleChild aChild = m_rContext.GetChild( *(m_rContext.GetMap()), nChildIndex ); if( !aChild.IsValid() ) @@ -155,15 +155,15 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected( const SwFEShell* pFEShell = GetFEShell(); if( pFEShell ) { - if ( aChild.GetSwFrm() != nullptr ) + if ( aChild.GetSwFrame() != nullptr ) { - bRet = (pFEShell->GetSelectedFlyFrm() == aChild.GetSwFrm()); + bRet = (pFEShell->GetSelectedFlyFrame() == aChild.GetSwFrame()); } else if ( aChild.GetDrawObject() ) { bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() ); } - //If the SwFrmOrObj is not selected directly in the UI, we should check whether it is selected in the selection cursor. + //If the SwFrameOrObj is not selected directly in the UI, we should check whether it is selected in the selection cursor. if( !bRet ) { if( lcl_getSelectedState( aChild, &m_rContext, m_rContext.GetMap() ) ) @@ -194,11 +194,11 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( ) { const SwAccessibleChild& rChild = *aIter; const SdrObject* pObj = rChild.GetDrawObject(); - const SwFrm* pFrm = rChild.GetSwFrm(); - if( pObj && !(pFrm != nullptr && pFEShell->IsObjSelected()) ) + const SwFrame* pFrame = rChild.GetSwFrame(); + if( pObj && !(pFrame != nullptr && pFEShell->IsObjSelected()) ) { - m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==pFrm ); - if( pFrm ) + m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==pFrame ); + if( pFrame ) break; } ++aIter; @@ -217,8 +217,8 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) const SwFEShell* pFEShell = GetFEShell(); if( pFEShell != nullptr ) { - const SwFlyFrm* pFlyFrm = pFEShell->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFlyFrame* pFlyFrame = pFEShell->GetSelectedFlyFrame(); + if( pFlyFrame ) { nCount = 1; } @@ -237,9 +237,9 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) while( aIter != aEndIter && static_cast<size_t>(nCount) < nSelObjs ) { const SwAccessibleChild& rChild = *aIter; - if( rChild.GetDrawObject() && !rChild.GetSwFrm() && + if( rChild.GetDrawObject() && !rChild.GetSwFrame() && SwAccessibleFrame::GetParent(rChild, m_rContext.IsInPagePreview()) - == m_rContext.GetFrm() && + == m_rContext.GetFrame() && pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { nCount++; @@ -248,7 +248,7 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) } } } - //If the SwFrmOrObj is not selected directly in the UI, + //If the SwFrameOrObj is not selected directly in the UI, //we should check whether it is selected in the selection cursor. if( nCount == 0 ) { @@ -286,25 +286,25 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( throwIndexOutOfBoundsException(); SwAccessibleChild aChild; - const SwFlyFrm *pFlyFrm = pFEShell->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFlyFrame *pFlyFrame = pFEShell->GetSelectedFlyFrame(); + if( pFlyFrame ) { if( 0 == nSelectedChildIndex ) { - if(SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrm), m_rContext.IsInPagePreview()) == m_rContext.GetFrm() ) + if(SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview()) == m_rContext.GetFrame() ) { - aChild = pFlyFrm; + aChild = pFlyFrame; } else { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) { - const SwFrm *pParaFrm = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrm), m_rContext.IsInPagePreview() ); - aChild = pParaFrm; + const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() ); + aChild = pParaFrame; } } } @@ -324,9 +324,9 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( while( aIter != aEndIter && !aChild.IsValid() ) { const SwAccessibleChild& rChild = *aIter; - if( rChild.GetDrawObject() && !rChild.GetSwFrm() && + if( rChild.GetDrawObject() && !rChild.GetSwFrame() && SwAccessibleFrame::GetParent(rChild, m_rContext.IsInPagePreview()) == - m_rContext.GetFrm() && + m_rContext.GetFrame() && pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { if( 0 == nSelectedChildIndex ) @@ -343,10 +343,10 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( OSL_ENSURE( m_rContext.GetMap() != nullptr, "We need the map." ); Reference< XAccessible > xChild; - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { ::rtl::Reference < SwAccessibleContext > xChildImpl( - m_rContext.GetMap()->GetContextImpl( aChild.GetSwFrm() ) ); + m_rContext.GetMap()->GetContextImpl( aChild.GetSwFrame() ) ); if( xChildImpl.is() ) { xChildImpl->SetParent( &m_rContext ); diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index f94a05537659..04541c8fa9ac 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -78,34 +78,34 @@ class SwAccessibleTableData_Impl Int32Set_Impl maRows; Int32Set_Impl maColumns; ::std::list < Int32Pair_Impl > maExtents; // cell extends for event processing only - Point maTabFrmPos; - const SwTabFrm *mpTabFrm; + Point maTabFramePos; + const SwTabFrame *mpTabFrame; bool mbIsInPagePreview; bool mbOnlyTableColumnHeader; - void CollectData( const SwFrm *pFrm ); - void CollectColumnHeaderData( const SwFrm *pFrm ); - void CollectRowHeaderData( const SwFrm *pFrm ); - void CollectExtents( const SwFrm *pFrm ); + void CollectData( const SwFrame *pFrame ); + void CollectColumnHeaderData( const SwFrame *pFrame ); + void CollectRowHeaderData( const SwFrame *pFrame ); + void CollectExtents( const SwFrame *pFrame ); - bool FindCell( const Point& rPos, const SwFrm *pFrm , - bool bExact, const SwFrm *& rFrm ) const; + bool FindCell( const Point& rPos, const SwFrame *pFrame , + bool bExact, const SwFrame *& rFrame ) const; void GetSelection( const Point& rTabPos, const SwRect& rArea, - const SwSelBoxes& rSelBoxes, const SwFrm *pFrm, + const SwSelBoxes& rSelBoxes, const SwFrame *pFrame, SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const; // #i77106# - inline bool IncludeRow( const SwFrm& rFrm ) const + inline bool IncludeRow( const SwFrame& rFrame ) const { return !mbOnlyTableColumnHeader || - mpTabFrm->IsInHeadline( rFrm ); + mpTabFrame->IsInHeadline( rFrame ); } public: // #i77106# - add third optional parameter <bOnlyTableColumnHeader>, default value <false> SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, - const SwTabFrm *pTabFrm, + const SwTabFrame *pTabFrame, bool bIsInPagePreview, bool bOnlyTableColumnHeader = false ); @@ -115,10 +115,10 @@ public: inline Int32Set_Impl::const_iterator GetRowIter( sal_Int32 nRow ) const; inline Int32Set_Impl::const_iterator GetColumnIter( sal_Int32 nCol ) const; - const SwFrm *GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool bExact, + const SwFrame *GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool bExact, SwAccessibleTable *pThis ) const throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception); - const SwFrm *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, + const SwFrame *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, bool bExact ) const; inline sal_Int32 GetRowCount() const; inline sal_Int32 GetColumnCount() const; @@ -138,34 +138,34 @@ public: sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const; - const Point& GetTablePos() const { return maTabFrmPos; } - void SetTablePos( const Point& rPos ) { maTabFrmPos = rPos; } + const Point& GetTablePos() const { return maTabFramePos; } + void SetTablePos( const Point& rPos ) { maTabFramePos = rPos; } }; -void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { // #i77106# if ( IncludeRow( *pLower ) ) { - maRows.insert( pLower->Frm().Top() - maTabFrmPos.getY() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.getY() ); CollectData( pLower ); } } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { - maColumns.insert( pLower->Frm().Left() - maTabFrmPos.getX() ); + maColumns.insert( pLower->Frame().Left() - maTabFramePos.getX() ); } else { @@ -176,39 +176,39 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pLower)->GetTabLine(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pLower)->GetTabLine(); while( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); // Headerline? - //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine) + //if(mpTabFrame->GetTable()->GetTabLines()[ 0 ] != pLine) //return ; - maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.Y() ); CollectRowHeaderData( pLower ); } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { //Added by yanjun. Can't find the "GetRowHeaderFlag" function (need verify). - //if(static_cast<SwCellFrm*>(pLower)->GetRowHeaderFlag()) - // maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() ); + //if(static_cast<SwCellFrame*>(pLower)->GetRowHeaderFlag()) + // maColumns.insert( pLower->Frame().Left() - maTabFramePos.X() ); } else { @@ -219,42 +219,42 @@ void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pLower)->GetTabLine(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pLower)->GetTabLine(); while( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); // Headerline? - //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine) + //if(mpTabFrame->GetTable()->GetTabLines()[ 0 ] != pLine) //return ; //if the current line is now header line, then return ; - sal_Int16 iCurrentRowIndex = mpTabFrm->GetTable()->GetTabLines().GetPos( pLine); - if(iCurrentRowIndex >= mpTabFrm->GetTable()->_GetRowsToRepeat()) + sal_Int16 iCurrentRowIndex = mpTabFrame->GetTable()->GetTabLines().GetPos( pLine); + if(iCurrentRowIndex >= mpTabFrame->GetTable()->_GetRowsToRepeat()) return ; - maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.Y() ); CollectColumnHeaderData( pLower ); } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { - maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() ); + maColumns.insert( pLower->Frame().Left() - maTabFramePos.X() ); } else { @@ -265,23 +265,23 @@ void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectExtents( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsCellFrm() && + if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { sal_Int32 nRow, nCol; Int32Pair_Impl aCellExtents; - GetRowColumnAndExtent( pLower->Frm(), nRow, nCol, + GetRowColumnAndExtent( pLower->Frame(), nRow, nCol, aCellExtents.first, aCellExtents.second ); @@ -290,7 +290,7 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { CollectExtents( pLower ); @@ -302,33 +302,33 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) } bool SwAccessibleTableData_Impl::FindCell( - const Point& rPos, const SwFrm *pFrm, bool bExact, - const SwFrm *& rRet ) const + const Point& rPos, const SwFrame *pFrame, bool bExact, + const SwFrame *& rRet ) const { bool bFound = false; - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( !bFound && aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); OSL_ENSURE( pLower, "child should be a frame" ); if( pLower ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) { - OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" ); - const SwRect& rFrm = pLower->Frm(); - if( rFrm.Right() >= rPos.X() && rFrm.Bottom() >= rPos.Y() ) + OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" ); + const SwRect& rFrame = pLower->Frame(); + if( rFrame.Right() >= rPos.X() && rFrame.Bottom() >= rPos.Y() ) { // We have found the cell - OSL_ENSURE( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(), + OSL_ENSURE( rFrame.Left() <= rPos.X() && rFrame.Top() <= rPos.Y(), "find frame moved to far!" ); bFound = true; if( !bExact || - (rFrm.Top() == rPos.Y() && rFrm.Left() == rPos.Y() ) ) + (rFrame.Top() == rPos.Y() && rFrame.Left() == rPos.Y() ) ) { rRet = pLower; } @@ -337,7 +337,7 @@ bool SwAccessibleTableData_Impl::FindCell( else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { bFound = FindCell( rPos, pLower, bExact, rRet ); @@ -354,28 +354,28 @@ void SwAccessibleTableData_Impl::GetSelection( const Point& rTabPos, const SwRect& rArea, const SwSelBoxes& rSelBoxes, - const SwFrm *pFrm, + const SwFrame *pFrame, SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); OSL_ENSURE( pLower, "child should be a frame" ); const SwRect& rBox = rLower.GetBox( mrAccMap ); if( pLower && rBox.IsOver( rArea ) ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) { - OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" ); - const SwCellFrm *pCFrm = - static_cast < const SwCellFrm * >( pLower ); + OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" ); + const SwCellFrame *pCFrame = + static_cast < const SwCellFrame * >( pLower ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); if( rSelBoxes.find( pBox ) == rSelBoxes.end() ) { const Int32Set_Impl rRowsOrCols = @@ -403,7 +403,7 @@ void SwAccessibleTableData_Impl::GetSelection( else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { GetSelection( rTabPos, rArea, rSelBoxes, pLower, rSelHdl, @@ -415,7 +415,7 @@ void SwAccessibleTableData_Impl::GetSelection( } } -const SwFrm *SwAccessibleTableData_Impl::GetCell( +const SwFrame *SwAccessibleTableData_Impl::GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool, SwAccessibleTable *pThis ) const throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) @@ -424,9 +424,9 @@ const SwFrm *SwAccessibleTableData_Impl::GetCell( Int32Set_Impl::const_iterator aSttCol( GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetCellAtPos( *aSttCol, *aSttRow, false ); + const SwFrame *pCellFrame = GetCellAtPos( *aSttCol, *aSttRow, false ); - return pCellFrm; + return pCellFrame; } void SwAccessibleTableData_Impl::GetSelection( @@ -435,7 +435,7 @@ void SwAccessibleTableData_Impl::GetSelection( SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const { - SwRect aArea( mpTabFrm->Frm() ); + SwRect aArea( mpTabFrame->Frame() ); Point aPos( aArea.Pos() ); const Int32Set_Impl& rRowsOrColumns = bColumns ? maColumns : maRows; @@ -460,16 +460,16 @@ void SwAccessibleTableData_Impl::GetSelection( aArea.Bottom( *aEnd + aPos.getY() - 1 ); } - GetSelection( aPos, aArea, rSelBoxes, mpTabFrm, rSelHdl, bColumns ); + GetSelection( aPos, aArea, rSelBoxes, mpTabFrame, rSelHdl, bColumns ); } -const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos( +const SwFrame *SwAccessibleTableData_Impl::GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, bool bExact ) const { - Point aPos( mpTabFrm->Frm().Pos() ); + Point aPos( mpTabFrame->Frame().Pos() ); aPos.Move( nLeft, nTop ); - const SwFrm *pRet = nullptr; - FindCell( aPos, mpTabFrm, bExact, pRet ); + const SwFrame *pRet = nullptr; + FindCell( aPos, mpTabFrame, bExact, pRet ); return pRet; } @@ -496,17 +496,17 @@ bool SwAccessibleTableData_Impl::CompareExtents( } SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, - const SwTabFrm *pTabFrm, + const SwTabFrame *pTabFrame, bool bIsInPagePreview, bool bOnlyTableColumnHeader ) : mrAccMap( rAccMap ) - , maTabFrmPos( pTabFrm->Frm().Pos() ) - , mpTabFrm( pTabFrm ) + , maTabFramePos( pTabFrame->Frame().Pos() ) + , mpTabFrame( pTabFrame ) , mbIsInPagePreview( bIsInPagePreview ) , mbOnlyTableColumnHeader( bOnlyTableColumnHeader ) { - CollectData( mpTabFrm ); - CollectExtents( mpTabFrm ); + CollectData( mpTabFrame ); + CollectExtents( mpTabFrame ); } inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetRowIter( @@ -554,16 +554,16 @@ void SwAccessibleTableData_Impl::GetRowColumnAndExtent( sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const { Int32Set_Impl::const_iterator aStt( - maRows.lower_bound( rBox.Top() - maTabFrmPos.Y() ) ); + maRows.lower_bound( rBox.Top() - maTabFramePos.Y() ) ); Int32Set_Impl::const_iterator aEnd( - maRows.upper_bound( rBox.Bottom() - maTabFrmPos.Y() ) ); + maRows.upper_bound( rBox.Bottom() - maTabFramePos.Y() ) ); rRow = static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) ); rRowExtent = static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) ); - aStt = maColumns.lower_bound( rBox.Left() - maTabFrmPos.X() ); - aEnd = maColumns.upper_bound( rBox.Right() - maTabFrmPos.X() ); + aStt = maColumns.lower_bound( rBox.Left() - maTabFramePos.X() ); + aEnd = maColumns.upper_bound( rBox.Right() - maTabFramePos.X() ); rColumn = static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) ); rColumnExtent = @@ -661,10 +661,10 @@ void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol, const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const { const SwSelBoxes *pSelBoxes = nullptr; - const SwCrsrShell *pCSh = GetCrsrShell(); + const SwCursorShell *pCSh = GetCursorShell(); if( (pCSh != nullptr) && pCSh->IsTableMode() ) { - pSelBoxes = &pCSh->GetTableCrsr()->GetSelectedBoxes(); + pSelBoxes = &pCSh->GetTableCursor()->GetSelectedBoxes(); } return pSelBoxes; @@ -696,14 +696,14 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const // get table box for 'our' table cell SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) ); - if( aCell.GetSwFrm() ) + if( aCell.GetSwFrame() ) { - const SwFrm* pChildFrm = aCell.GetSwFrm(); - if( (pChildFrm != nullptr) && pChildFrm->IsCellFrm() ) + const SwFrame* pChildFrame = aCell.GetSwFrame(); + if( (pChildFrame != nullptr) && pChildFrame->IsCellFrame() ) { - const SwCellFrm* pCellFrm = - static_cast<const SwCellFrm*>( pChildFrm ); - pBox = pCellFrm->GetTabBox(); + const SwCellFrame* pCellFrame = + static_cast<const SwCellFrame*>( pChildFrame ); + pBox = pCellFrame->GetTabBox(); } } @@ -757,25 +757,25 @@ void SwAccessibleTable::GetStates( rStateSet.AddState( AccessibleStateType::RESIZABLE ); // MULTISELECTABLE rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell ) rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); } SwAccessibleTable::SwAccessibleTable( SwAccessibleMap* pInitMap, - const SwTabFrm* pTabFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ), + const SwTabFrame* pTabFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrame ), mpTableData( nullptr ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); - SetName( pFrameFormat->GetName() + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( pFrameFormat->GetName() + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); - const OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )->GetFormat()->GetName() ); + const OUString sArg1( static_cast< const SwTabFrame * >( GetFrame() )->GetFormat()->GetName() ); const OUString sArg2( GetFormattedPageNumber() ); sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 ); @@ -792,19 +792,19 @@ SwAccessibleTable::~SwAccessibleTable() void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() ); + const SwTabFrame *pTabFrame = static_cast< const SwTabFrame * >( GetFrame() ); switch( nWhich ) { case RES_NAME_CHANGED: - if( pTabFrm ) + if( pTabFrame ) { - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); OSL_ENSURE( pFrameFormat == GetRegisteredIn(), "invalid frame" ); const OUString sOldName( GetName() ); const OUString sNewTabName = pFrameFormat->GetName(); - SetName( sNewTabName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( sNewTabName + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); if( sOldName != GetName() ) { @@ -894,8 +894,8 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId() // #i77106# SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData() { - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + return new SwAccessibleTableData_Impl( *GetMap(), pTabFrame, IsInPagePreview() ); } void SwAccessibleTable::UpdateTableData() @@ -1026,12 +1026,12 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt( GetTableData().GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); - if( pCellFrm ) + if( pCellFrame ) { - sal_Int32 nBottom = pCellFrm->Frm().Bottom(); - nBottom -= GetFrm()->Frm().Top(); + sal_Int32 nBottom = pCellFrame->Frame().Bottom(); + nBottom -= GetFrame()->Frame().Top(); Int32Set_Impl::const_iterator aEndRow( GetTableData().GetRows().upper_bound( nBottom ) ); nExtend = @@ -1058,12 +1058,12 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt( GetTableData().GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); - if( pCellFrm ) + if( pCellFrame ) { - sal_Int32 nRight = pCellFrm->Frm().Right(); - nRight -= GetFrm()->Frm().Left(); + sal_Int32 nRight = pCellFrame->Frame().Right(); + nRight -= GetFrame()->Frame().Left(); Int32Set_Impl::const_iterator aEndCol( GetTableData().GetColumns().upper_bound( nRight ) ); nExtend = @@ -1088,7 +1088,7 @@ uno::Reference< XAccessibleTable > SAL_CALL // #i87532# - assure that return accessible object is empty, // if no column header exists. SwAccessibleTableColHeaders* pTableColHeaders = - new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) ); + new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrame *>( GetFrame() ) ); uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders ); if ( pTableColHeaders->getAccessibleChildCount() <= 0 ) { @@ -1209,10 +1209,10 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCellAt( CHECK_FOR_DEFUNC( XAccessibleTable ) - const SwFrm *pCellFrm = + const SwFrame *pCellFrame = GetTableData().GetCell( nRow, nColumn, false, this ); - if( pCellFrm ) - xRet = GetMap()->GetContext( pCellFrm ); + if( pCellFrame ) + xRet = GetMap()->GetContext( pCellFrame ); return xRet; } @@ -1241,16 +1241,16 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected( CHECK_FOR_DEFUNC( XAccessibleTable ) - const SwFrm *pFrm = + const SwFrame *pFrame = GetTableData().GetCell( nRow, nColumn, false, this ); - if( pFrm && pFrm->IsCellFrm() ) + if( pFrame && pFrame->IsCellFrame() ) { const SwSelBoxes *pSelBoxes = GetSelBoxes(); if( pSelBoxes ) { - const SwCellFrm *pCFrm = static_cast < const SwCellFrm * >( pFrm ); + const SwCellFrame *pCFrame = static_cast < const SwCellFrame * >( pFrame ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); bRet = pSelBoxes->find( pBox ) != pSelBoxes->end(); } } @@ -1294,10 +1294,10 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex ) } SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); - if ( aCell.GetSwFrm() ) + if ( aCell.GetSwFrame() ) { - sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top(); - nTop -= GetFrm()->Frm().Top(); + sal_Int32 nTop = aCell.GetSwFrame()->Frame().Top(); + nTop -= GetFrame()->Frame().Top(); Int32Set_Impl::const_iterator aRow( GetTableData().GetRows().lower_bound( nTop ) ); nRet = static_cast< sal_Int32 >( ::std::distance( @@ -1332,10 +1332,10 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn( } SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); - if ( aCell.GetSwFrm() ) + if ( aCell.GetSwFrame() ) { - sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left(); - nLeft -= GetFrm()->Frm().Left(); + sal_Int32 nLeft = aCell.GetSwFrame()->Frame().Left(); + nLeft -= GetFrame()->Frame().Left(); Int32Set_Impl::const_iterator aCol( GetTableData().GetColumns().lower_bound( nLeft ) ); nRet = static_cast< sal_Int32 >( ::std::distance( @@ -1388,7 +1388,7 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox ) FireTableChangeEvent(*mpTableData); } if( HasTableData() ) - GetTableData().SetTablePos( GetFrm()->Frm().Pos() ); + GetTableData().SetTablePos( GetFrame()->Frame().Pos() ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } @@ -1403,13 +1403,13 @@ void SwAccessibleTable::Dispose( bool bRecursive ) SwAccessibleContext::Dispose( bRecursive ); } -void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj, bool bRecursive ) { SolarMutexGuard aGuard; - const SwFrm *pFrm = rChildFrmOrObj.GetSwFrm(); - OSL_ENSURE( pFrm, "frame expected" ); + const SwFrame *pFrame = rChildFrameOrObj.GetSwFrame(); + OSL_ENSURE( pFrame, "frame expected" ); if( HasTableData() ) { FireTableChangeEvent( GetTableData() ); @@ -1417,16 +1417,16 @@ void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, } // There are two reason why this method has been called. The first one - // is there is no context for pFrm. The method is then called by + // is there is no context for pFrame. The method is then called by // the map, and we have to call our superclass. // The other situation is that we have been call by a call to get notified // about its change. We then must not call the superclass - uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrm, false ) ); + uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrame, false ) ); if( !xAcc.is() ) - SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive ); + SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive ); } -void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrameOrObj, const SwRect& rOldBox ) { SolarMutexGuard aGuard; @@ -1434,7 +1434,7 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil if( HasTableData() ) { SAL_WARN_IF( HasTableData() && - GetFrm()->Frm().Pos() != GetTableData().GetTablePos(), "sw.core", + GetFrame()->Frame().Pos() != GetTableData().GetTablePos(), "sw.core", "table has invalid position" ); if( HasTableData() ) { @@ -1446,12 +1446,12 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil { Int32Set_Impl::const_iterator aSttCol( GetTableData().GetColumnIter( 0 ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( 1 ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); Int32Set_Impl::const_iterator aSttCol2( pNewTableData->GetColumnIter( 0 ) ); Int32Set_Impl::const_iterator aSttRow2( pNewTableData->GetRowIter( 0 ) ); - const SwFrm *pCellFrm2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, false ); + const SwFrame *pCellFrame2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, false ); - if(pCellFrm == pCellFrm2) + if(pCellFrame == pCellFrame2) { AccessibleTableModelChange aModelChange; aModelChange.Type = AccessibleTableModelChangeType::UPDATE; @@ -1480,7 +1480,7 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil } // #i013961# - always call super class method - SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox ); + SwAccessibleContext::InvalidateChildPosOrSize( rChildFrameOrObj, rOldBox ); } // XAccessibleSelection @@ -1499,8 +1499,8 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( const SwTableBox* pBox = GetTableBox( nChildIndex ); OSL_ENSURE( pBox != nullptr, "We need the table box." ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell == nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell == nullptr ) return; // assure, that child, identified by the given index, isn't already selected. @@ -1515,7 +1515,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( // if we have a selection in a table, check if it's in the // same table that we're trying to select in - const SwTableNode* pSelectedTable = pCrsrShell->IsCrsrInTable(); + const SwTableNode* pSelectedTable = pCursorShell->IsCursorInTable(); if( pSelectedTable != nullptr ) { // get top-most table line @@ -1530,22 +1530,22 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( // create the new selection const SwStartNode* pStartNode = pBox->GetSttNd(); - if( pSelectedTable == nullptr || !pCrsrShell->GetTableCrs() ) + if( pSelectedTable == nullptr || !pCursorShell->GetTableCrs() ) { - pCrsrShell->StartAction(); + pCursorShell->StartAction(); // Set cursor into current cell. This deletes any table cursor. SwPaM aPaM( *pStartNode ); aPaM.Move( fnMoveForward, fnGoNode ); Select( aPaM ); // Move cursor to the end of the table creating a selection and a table // cursor. - pCrsrShell->SetMark(); - pCrsrShell->MoveTable( fnTableCurr, fnTableEnd ); + pCursorShell->SetMark(); + pCursorShell->MoveTable( fnTableCurr, fnTableEnd ); // now set the cursor into the cell again. - SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *pPaM->GetPoint() = *pPaM->GetMark(); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); // we now have one cell selected! } else @@ -1556,8 +1556,8 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( SwPaM aPaM( *pStartNode ); aPaM.Move( fnMoveForward, fnGoNode ); aPaM.SetMark(); - const SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + const SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *(aPaM.GetMark()) = *pPaM->GetMark(); Select( aPaM ); @@ -1585,12 +1585,12 @@ void SAL_CALL SwAccessibleTable::clearAccessibleSelection( ) CHECK_FOR_DEFUNC( XAccessibleTable ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); } } @@ -1656,10 +1656,10 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild( SolarMutexGuard aGuard; CHECK_FOR_DEFUNC( XAccessibleTable ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); + SwCursorShell* pCursorShell = GetCursorShell(); // index has to be treated as global child index - if ( !pCrsrShell ) + if ( !pCursorShell ) throw lang::IndexOutOfBoundsException(); // assure, that given child index is in bounds. @@ -1676,33 +1676,33 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild( // If we unselect point, then set cursor to mark. If we clear another // selected box, then set cursor to point. // reduce selection to mark. - SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); bool bDeselectPoint = pBox->GetSttNd() == pPaM->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); SwPaM aPaM( bDeselectPoint ? *pPaM->GetMark() : *pPaM->GetPoint() ); - pCrsrShell->StartAction(); + pCursorShell->StartAction(); // Set cursor into either point or mark Select( aPaM ); // Move cursor to the end of the table creating a selection and a table // cursor. - pCrsrShell->SetMark(); - pCrsrShell->MoveTable( fnTableCurr, fnTableEnd ); + pCursorShell->SetMark(); + pCursorShell->MoveTable( fnTableCurr, fnTableEnd ); // now set the cursor into the cell again. - pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *pPaM->GetPoint() = *pPaM->GetMark(); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); } sal_Int32 SAL_CALL SwAccessibleTable::getBackground() throw (css::uno::RuntimeException, std::exception) { - const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = GetFrame()->GetAttrSet()->GetBackground(); sal_uInt32 crBack = rBack.GetColor().GetColor(); if (COL_AUTO == crBack) @@ -1822,12 +1822,12 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row ) if( isAccessibleSelected( row , 0 ) && isAccessibleSelected( row , getAccessibleColumnCount()-1 ) ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); return sal_True; } } @@ -1843,12 +1843,12 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column ) if( isAccessibleSelected( 0 , column ) && isAccessibleSelected( getAccessibleRowCount()-1,column)) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); return sal_True; } } @@ -1857,16 +1857,16 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column ) // #i77106# - implementation of class <SwAccessibleTableColHeaders> SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2, - const SwTabFrm *pTabFrm ) - : SwAccessibleTable( pMap2, pTabFrm ) + const SwTabFrame *pTabFrame ) + : SwAccessibleTable( pMap2, pTabFrame ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); const OUString aName = pFrameFormat->GetName() + "-ColumnHeaders"; - SetName( aName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( aName + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); const OUString sArg2( GetFormattedPageNumber() ); @@ -1877,8 +1877,8 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2 SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData() { - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrame, IsInPagePreview(), true ); } void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ ) @@ -1902,8 +1902,8 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount() sal_Int32 nCount = 0; - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { @@ -1912,15 +1912,15 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount() { nCount++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - if ( !rLower.GetSwFrm()->IsRowFrm() || - pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) ) + if ( !rLower.GetSwFrame()->IsRowFrame() || + pTabFrame->IsInHeadline( *(rLower.GetSwFrame()) ) ) { nCount += SwAccessibleFrame::GetChildCount( *(GetMap()), GetVisArea(), - rLower.GetSwFrm(), + rLower.GetSwFrame(), IsInPagePreview() ); } } diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx index b2f3800b44c1..8afd565b5c14 100644 --- a/sw/source/core/access/acctable.hxx +++ b/sw/source/core/access/acctable.hxx @@ -27,7 +27,7 @@ #include <acccontext.hxx> -class SwTabFrm; +class SwTabFrame; class SwAccessibleTableData_Impl; class SwTableBox; class SwSelBoxes; @@ -86,7 +86,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrm* pTableFrm ); + SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrame* pTableFrame ); // XInterface @@ -226,10 +226,10 @@ public: // The object is not visible an longer and should be destroyed virtual void Dispose( bool bRecursive = false ) override; - virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive ) override; - virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, - const SwRect& rFrm ) override; + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj, + const SwRect& rFrame ) override; // XAccessibleSelection @@ -292,7 +292,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrm *pTabFrm ); + SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrame *pTabFrame ); // XInterface diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index ae2bc97feb5f..ac338185363d 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -45,13 +45,13 @@ using ::com::sun::star::accessibility::XAccessibleContext; SwAccessibleTextFrame::SwAccessibleTextFrame( SwAccessibleMap* pInitMap, - const SwFlyFrm& rFlyFrm ) : - SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, &rFlyFrm ), + const SwFlyFrame& rFlyFrame ) : + SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, &rFlyFrame ), msTitle(), msDesc() { const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( rFlyFrm.GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( rFlyFrame.GetFormat() ); msTitle = pFlyFrameFormat->GetObjTitle(); msDesc = pFlyFrameFormat->GetObjDescription(); @@ -77,7 +77,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * SwAccessibleFrameBase::Modify( pOld, pNew ); } - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() ); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( GetFrame() ); switch( nWhich ) { // #i73249# @@ -102,7 +102,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * FireAccessibleEvent( aEvent ); const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( pFlyFrm->GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( pFlyFrame->GetFormat() ); if (!pFlyFrameFormat || !pFlyFrameFormat->GetObjDescription().isEmpty()) { break; @@ -111,12 +111,12 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * // intentionally no break here case RES_DESCRIPTION_CHANGED: { - if ( pFlyFrm ) + if ( pFlyFrame ) { const OUString sOldDesc( msDesc ); const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( pFlyFrm->GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( pFlyFrame->GetFormat() ); const OUString& rDesc = pFlyFrameFormat->GetObjDescription(); msDesc = rDesc; if ( msDesc.isEmpty() && @@ -305,23 +305,23 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId() // XAccessibleRelationSet -SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const +SwFlyFrame* SwAccessibleTextFrame::getFlyFrame() const { - SwFlyFrm* pFlyFrm = nullptr; + SwFlyFrame* pFlyFrame = nullptr; - const SwFrm* pFrm = GetFrm(); - assert(pFrm); - if( pFrm->IsFlyFrm() ) + const SwFrame* pFrame = GetFrame(); + assert(pFrame); + if( pFrame->IsFlyFrame() ) { - pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) ); + pFlyFrame = static_cast<SwFlyFrame*>( const_cast<SwFrame*>( pFrame ) ); } - return pFlyFrm; + return pFlyFrame; } -AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm ) +AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrame* pFrame ) { - uno::Sequence<uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pFrm ) }; + uno::Sequence<uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pFrame ) }; return AccessibleRelation( nType, aSequence ); } @@ -335,18 +335,18 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccess AccessibleRelationSetHelper* pHelper = new AccessibleRelationSetHelper(); - SwFlyFrm* pFlyFrm = getFlyFrm(); - assert(pFlyFrm); + SwFlyFrame* pFlyFrame = getFlyFrame(); + assert(pFlyFrame); - const SwFlyFrm* pPrevFrm = pFlyFrm->GetPrevLink(); - if( pPrevFrm != nullptr ) + const SwFlyFrame* pPrevFrame = pFlyFrame->GetPrevLink(); + if( pPrevFrame != nullptr ) pHelper->AddRelation( makeRelation( - AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrm ) ); + AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrame ) ); - const SwFlyFrm* pNextFrm = pFlyFrm->GetNextLink(); - if( pNextFrm != nullptr ) + const SwFlyFrame* pNextFrame = pFlyFrame->GetNextLink(); + if( pNextFrame != nullptr ) pHelper->AddRelation( makeRelation( - AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrm ) ); + AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrame ) ); return pHelper; } diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx index d276c65656e2..f5420c979753 100644 --- a/sw/source/core/access/acctextframe.hxx +++ b/sw/source/core/access/acctextframe.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleSelection.hpp> -class SwFlyFrm; +class SwFlyFrame; namespace utl { class AccessibleRelationSetHelper; } namespace com { namespace star { namespace accessibility { struct AccessibleRelation; } @@ -43,7 +43,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm& rFlyFrm ); + SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrame& rFlyFrame ); virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) @@ -122,10 +122,10 @@ public: private: // helper methods for getAccessibleRelationSet: - SwFlyFrm* getFlyFrm() const; + SwFlyFrame* getFlyFrame() const; css::accessibility::AccessibleRelation makeRelation( - sal_Int16 nType, const SwFlyFrm* pFrm ); + sal_Int16 nType, const SwFlyFrame* pFrame ); public: virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx index 3ab9b8a5d593..938d77975632 100644 --- a/sw/source/core/access/parachangetrackinginfo.cxx +++ b/sw/source/core/access/parachangetrackinginfo.cxx @@ -31,7 +31,7 @@ #include <algorithm> namespace { - void initChangeTrackTextMarkupLists( const SwTextFrm& rTextFrm, + void initChangeTrackTextMarkupLists( const SwTextFrame& rTextFrame, SwWrongList*& opChangeTrackInsertionTextMarkupList, SwWrongList*& opChangeTrackDeletionTextMarkupList, SwWrongList*& opChangeTrackFormatChangeTextMarkupList ) @@ -40,12 +40,12 @@ namespace { opChangeTrackDeletionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); opChangeTrackFormatChangeTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); - if ( !rTextFrm.GetTextNode() ) + if ( !rTextFrame.GetTextNode() ) { OSL_FAIL( "<initChangeTrackTextMarkupLists(..) - missing <SwTextNode> instance!" ); return; } - const SwTextNode& rTextNode( *(rTextFrm.GetTextNode()) ); + const SwTextNode& rTextNode( *(rTextFrame.GetTextNode()) ); const IDocumentRedlineAccess& rIDocChangeTrack( rTextNode.getIDocumentRedlineAccess() ); @@ -64,12 +64,12 @@ namespace { return; } - const sal_Int32 nTextFrmTextStartPos = rTextFrm.IsFollow() - ? rTextFrm.GetOfst() + const sal_Int32 nTextFrameTextStartPos = rTextFrame.IsFollow() + ? rTextFrame.GetOfst() : 0; - const sal_Int32 nTextFrmTextEndPos = rTextFrm.HasFollow() - ? rTextFrm.GetFollow()->GetOfst() - : rTextFrm.GetText().getLength(); + const sal_Int32 nTextFrameTextEndPos = rTextFrame.HasFollow() + ? rTextFrame.GetFollow()->GetOfst() + : rTextFrame.GetText().getLength(); // iteration over the redlines which overlap with the text node. const SwRedlineTable& rRedlineTable = rIDocChangeTrack.GetRedlineTable(); @@ -89,8 +89,8 @@ namespace { pActRedline->CalcStartEnd( rTextNode.GetIndex(), nTextNodeChangeTrackStart, nTextNodeChangeTrackEnd ); - if ( nTextNodeChangeTrackStart > nTextFrmTextEndPos || - nTextNodeChangeTrackEnd < nTextFrmTextStartPos ) + if ( nTextNodeChangeTrackStart > nTextFrameTextEndPos || + nTextNodeChangeTrackEnd < nTextFrameTextStartPos ) { // Consider only redlines which overlap with the text frame's text. continue; @@ -121,23 +121,23 @@ namespace { } if ( pMarkupList ) { - const sal_Int32 nTextFrmChangeTrackStart = - std::max(nTextNodeChangeTrackStart, nTextFrmTextStartPos); + const sal_Int32 nTextFrameChangeTrackStart = + std::max(nTextNodeChangeTrackStart, nTextFrameTextStartPos); - const sal_Int32 nTextFrmChangeTrackEnd = - std::min(nTextNodeChangeTrackEnd, nTextFrmTextEndPos); + const sal_Int32 nTextFrameChangeTrackEnd = + std::min(nTextNodeChangeTrackEnd, nTextFrameTextEndPos); pMarkupList->Insert( OUString(), nullptr, - nTextFrmChangeTrackStart, - nTextFrmChangeTrackEnd - nTextFrmChangeTrackStart, + nTextFrameChangeTrackStart, + nTextFrameChangeTrackEnd - nTextFrameChangeTrackStart, pMarkupList->Count() ); } } // eof iteration over the redlines which overlap with the text node } } // eof anonymous namespace -SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTextFrm& rTextFrm ) - : mrTextFrm( rTextFrm ) +SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTextFrame& rTextFrame ) + : mrTextFrame( rTextFrame ) , mpChangeTrackInsertionTextMarkupList( nullptr ) , mpChangeTrackDeletionTextMarkupList( nullptr ) , mpChangeTrackFormatChangeTextMarkupList( nullptr ) @@ -171,7 +171,7 @@ const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( co "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackDeletionTextMarkupList> expected to be NULL." ); OSL_ENSURE( mpChangeTrackFormatChangeTextMarkupList == nullptr, "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackFormatChangeTextMarkupList> expected to be NULL." ); - initChangeTrackTextMarkupLists( mrTextFrm, + initChangeTrackTextMarkupLists( mrTextFrame, mpChangeTrackInsertionTextMarkupList, mpChangeTrackDeletionTextMarkupList, mpChangeTrackFormatChangeTextMarkupList ); diff --git a/sw/source/core/access/parachangetrackinginfo.hxx b/sw/source/core/access/parachangetrackinginfo.hxx index d25a50ca0726..4a83beedc5d5 100644 --- a/sw/source/core/access/parachangetrackinginfo.hxx +++ b/sw/source/core/access/parachangetrackinginfo.hxx @@ -22,13 +22,13 @@ #include <sal/types.h> -class SwTextFrm; +class SwTextFrame; class SwWrongList; class SwParaChangeTrackingInfo { public: - explicit SwParaChangeTrackingInfo( const SwTextFrm& rTextFrm ); + explicit SwParaChangeTrackingInfo( const SwTextFrame& rTextFrame ); ~SwParaChangeTrackingInfo(); void reset(); @@ -39,7 +39,7 @@ class SwParaChangeTrackingInfo SwParaChangeTrackingInfo( const SwParaChangeTrackingInfo& ) = delete; SwParaChangeTrackingInfo& operator=( const SwParaChangeTrackingInfo& ) = delete; - const SwTextFrm& mrTextFrm; + const SwTextFrame& mrTextFrame; SwWrongList* mpChangeTrackInsertionTextMarkupList; SwWrongList* mpChangeTrackDeletionTextMarkupList; |