diff options
Diffstat (limited to 'sw/source/core/view/viewsh.cxx')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 229b7a551364..1b01d6e6d02c 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -327,14 +327,14 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) // else we get Paint errors! // e.g. additional mode, page half visible vertically, in the // middle a selection and with an other cursor jump to left - // right border. Without ShowCrsr the selection disappears. - bool bShowCrsr = pRegion && dynamic_cast<const SwCrsrShell*>(this) != nullptr; - if( bShowCrsr ) - static_cast<SwCrsrShell*>(this)->HideCrsrs(); + // right border. Without ShowCursor the selection disappears. + bool bShowCursor = pRegion && dynamic_cast<const SwCursorShell*>(this) != nullptr; + if( bShowCursor ) + static_cast<SwCursorShell*>(this)->HideCursors(); if ( pRegion ) { - SwRootFrm* pCurrentLayout = GetLayout(); + SwRootFrame* pCurrentLayout = GetLayout(); Imp()->m_pRegion = nullptr; @@ -441,8 +441,8 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) delete pRegion; Imp()->DelRegion(); } - if( bShowCrsr ) - static_cast<SwCrsrShell*>(this)->ShowCrsrs( true ); + if( bShowCursor ) + static_cast<SwCursorShell*>(this)->ShowCursors( true ); } else { @@ -578,7 +578,7 @@ const SwRect& SwViewShell::VisArea() const { // when using the tiled rendering, consider the entire document as our // visible area - return isTiledRendering()? GetLayout()->Frm(): maVisArea; + return isTiledRendering()? GetLayout()->Frame(): maVisArea; } void SwViewShell::MakeVisible( const SwRect &rRect ) @@ -589,15 +589,15 @@ void SwViewShell::MakeVisible( const SwRect &rRect ) { if( mpWin ) { - const SwFrm* pRoot = GetLayout(); + const SwFrame* pRoot = GetLayout(); int nLoopCnt = 3; long nOldH; do{ - nOldH = pRoot->Frm().Height(); + nOldH = pRoot->Frame().Height(); StartAction(); ScrollMDI( this, rRect, USHRT_MAX, USHRT_MAX ); EndAction(); - } while( nOldH != pRoot->Frm().Height() && nLoopCnt-- ); + } while( nOldH != pRoot->Frame().Height() && nLoopCnt-- ); } #if OSL_DEBUG_LEVEL > 0 else @@ -654,16 +654,16 @@ void SwViewShell::UpdateFields(bool bCloseDB) { SET_CURR_SHELL( this ); - bool bCrsr = dynamic_cast<const SwCrsrShell*>( this ) != nullptr; - if ( bCrsr ) - static_cast<SwCrsrShell*>(this)->StartAction(); + bool bCursor = dynamic_cast<const SwCursorShell*>( this ) != nullptr; + if ( bCursor ) + static_cast<SwCursorShell*>(this)->StartAction(); else StartAction(); GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, bCloseDB); - if ( bCrsr ) - static_cast<SwCrsrShell*>(this)->EndAction(); + if ( bCursor ) + static_cast<SwCursorShell*>(this)->EndAction(); else EndAction(); } @@ -717,8 +717,8 @@ void SwViewShell::LayoutIdle() { //Prepare and recover cache, so that it will not get fouled. - SwSaveSetLRUOfst aSave( *SwTextFrm::GetTextCache(), - SwTextFrm::GetTextCache()->GetCurMax() - 50 ); + SwSaveSetLRUOfst aSave( *SwTextFrame::GetTextCache(), + SwTextFrame::GetTextCache()->GetCurMax() - 50 ); // #125243# there are lots of stacktraces indicating that Imp() returns NULL // this SwViewShell seems to be invalid - but it's not clear why // this return is only a workaround! @@ -731,14 +731,14 @@ void SwViewShell::LayoutIdle() static void lcl_InvalidateAllContent( SwViewShell& rSh, sal_uInt8 nInv ) { - bool bCrsr = dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr; - if ( bCrsr ) - static_cast<SwCrsrShell&>(rSh).StartAction(); + bool bCursor = dynamic_cast<const SwCursorShell*>( &rSh) != nullptr; + if ( bCursor ) + static_cast<SwCursorShell&>(rSh).StartAction(); else rSh.StartAction(); rSh.GetLayout()->InvalidateAllContent( nInv ); - if ( bCrsr ) - static_cast<SwCrsrShell&>(rSh).EndAction(); + if ( bCursor ) + static_cast<SwCursorShell&>(rSh).EndAction(); else rSh.EndAction(); @@ -751,16 +751,16 @@ static void lcl_InvalidateAllContent( SwViewShell& rSh, sal_uInt8 nInv ) */ static void lcl_InvalidateAllObjPos( SwViewShell &_rSh ) { - const bool bIsCrsrShell = dynamic_cast<const SwCrsrShell*>( &_rSh) != nullptr; - if ( bIsCrsrShell ) - static_cast<SwCrsrShell&>(_rSh).StartAction(); + const bool bIsCursorShell = dynamic_cast<const SwCursorShell*>( &_rSh) != nullptr; + if ( bIsCursorShell ) + static_cast<SwCursorShell&>(_rSh).StartAction(); else _rSh.StartAction(); _rSh.GetLayout()->InvalidateAllObjPos(); - if ( bIsCrsrShell ) - static_cast<SwCrsrShell&>(_rSh).EndAction(); + if ( bIsCursorShell ) + static_cast<SwCursorShell&>(_rSh).EndAction(); else _rSh.EndAction(); @@ -951,8 +951,8 @@ void SwViewShell::CalcLayout() SwWait aWait( *GetDoc()->GetDocShell(), true ); //prepare and recover cache, so that it will not get fouled. - SwSaveSetLRUOfst aSaveLRU( *SwTextFrm::GetTextCache(), - SwTextFrm::GetTextCache()->GetCurMax() - 50 ); + SwSaveSetLRUOfst aSaveLRU( *SwTextFrame::GetTextCache(), + SwTextFrame::GetTextCache()->GetCurMax() - 50 ); //switch on Progress when none is running yet. const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == nullptr; @@ -1011,11 +1011,11 @@ void SwViewShell::SizeChgNotify() { mbDocSizeChgd = true; - if ( !Imp()->IsCalcLayoutProgress() && dynamic_cast<const SwCrsrShell*>( this ) != nullptr ) + if ( !Imp()->IsCalcLayoutProgress() && dynamic_cast<const SwCursorShell*>( this ) != nullptr ) { - const SwFrm *pCnt = static_cast<SwCrsrShell*>(this)->GetCurrFrm( false ); - const SwPageFrm *pPage; - if ( pCnt && nullptr != (pPage = pCnt->FindPageFrm()) ) + const SwFrame *pCnt = static_cast<SwCursorShell*>(this)->GetCurrFrame( false ); + const SwPageFrame *pPage; + if ( pCnt && nullptr != (pPage = pCnt->FindPageFrame()) ) { const sal_uInt16 nVirtNum = pPage->GetVirtPageNum(); const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType(); @@ -1052,7 +1052,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //First get the old visible page, so we don't have to look //for it afterwards. - const SwFrm *pOldPage = Imp()->GetFirstVisPage(GetWin()); + const SwFrame *pOldPage = Imp()->GetFirstVisPage(GetWin()); const SwRect aPrevArea( VisArea() ); const bool bFull = aPrevArea.IsEmpty(); @@ -1061,7 +1061,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //When there a PaintRegion still exists and the VisArea has changed, //the PaintRegion is at least by now obsolete. The PaintRegion can - //have been created by RootFrm::Paint. + //have been created by RootFrame::Paint. if ( !mbInEndAction && Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() ) Imp()->DelRegion(); @@ -1086,9 +1086,9 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) // If possible, don't scroll the application background // (PaintDesktop). Also limit the left and right side of // the scroll range to the pages. - const SwPageFrm *pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); - if ( pPage->Frm().Top() > pOldPage->Frm().Top() ) - pPage = static_cast<const SwPageFrm*>(pOldPage); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); + if ( pPage->Frame().Top() > pOldPage->Frame().Top() ) + pPage = static_cast<const SwPageFrame*>(pOldPage); SwRect aBoth( VisArea() ); aBoth.Union( aPrevArea ); const SwTwips nBottom = aBoth.Bottom(); @@ -1097,12 +1097,12 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode(); - while ( pPage && pPage->Frm().Top() <= nBottom ) + while ( pPage && pPage->Frame().Top() <= nBottom ) { SwRect aPageRect( pPage->GetBoundRect(GetWin()) ); if ( bBookMode ) { - const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage(); + const SwPageFrame& rFormatPage = static_cast<const SwPageFrame*>(pPage)->GetFormatPage(); aPageRect.SSize() = rFormatPage.GetBoundRect(GetWin()).SSize(); } @@ -1149,7 +1149,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) } } } - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } Rectangle aRect( aPrevArea.SVRect() ); aRect.Left() = nMinLeft; @@ -1455,13 +1455,13 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect //Unfortunately we must at any rate Paint the rectangles next to the pages, //as these are not painted at VisPortChgd. bool bBorderOnly = false; - const SwRootFrm *pRoot = GetLayout(); - if ( rRect.Top() > pRoot->Frm().Bottom() ) + const SwRootFrame *pRoot = GetLayout(); + if ( rRect.Top() > pRoot->Frame().Bottom() ) { - const SwFrm *pPg = pRoot->Lower(); + const SwFrame *pPg = pRoot->Lower(); while ( pPg && pPg->GetNext() ) pPg = pPg->GetNext(); - if ( !pPg || !pPg->Frm().IsOver( VisArea() ) ) + if ( !pPg || !pPg->Frame().IsOver( VisArea() ) ) bBorderOnly = true; } @@ -1477,14 +1477,14 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect if ( bBorderOnly ) { - const SwFrm *pPage =pRoot->Lower(); + const SwFrame *pPage =pRoot->Lower(); SwRect aLeft( rRect ), aRight( rRect ); while ( pPage ) { - long nTmp = pPage->Frm().Left(); + long nTmp = pPage->Frame().Left(); if ( nTmp < aLeft.Right() ) aLeft.Right( nTmp ); - nTmp = pPage->Frm().Right(); + nTmp = pPage->Frame().Right(); if ( nTmp > aRight.Left() ) { aRight.Left( nTmp + nSidebarWidth ); @@ -1499,20 +1499,20 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect } else { - const SwFrm *pPage = Imp()->GetFirstVisPage(&rRenderContext); + const SwFrame *pPage = Imp()->GetFirstVisPage(&rRenderContext); const SwTwips nBottom = rRect.Bottom(); while ( pPage && !aRegion.empty() && - (pPage->Frm().Top() <= nBottom) ) + (pPage->Frame().Top() <= nBottom) ) { - SwRect aPageRect( pPage->Frm() ); + SwRect aPageRect( pPage->Frame() ); if ( bBookMode ) { - const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage(); - aPageRect.SSize() = rFormatPage.Frm().SSize(); + const SwPageFrame& rFormatPage = static_cast<const SwPageFrame*>(pPage)->GetFormatPage(); + aPageRect.SSize() = rFormatPage.Frame().SSize(); } const bool bSidebarRight = - static_cast<const SwPageFrm*>(pPage)->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT; + static_cast<const SwPageFrame*>(pPage)->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT; aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth; aPageRect.SSize().Width() += nSidebarWidth; @@ -1583,16 +1583,16 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) if ( !GetWin() ) return false; - const SwPageFrm *pPage = Imp()->GetFirstVisPage(GetOut()); + const SwPageFrame *pPage = Imp()->GetFirstVisPage(GetOut()); const SwTwips nBottom = VisArea().Bottom(); const SwTwips nRight = VisArea().Right(); bool bRet = false; - while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) || - (pPage->Frm().Left() > nRight))) + while ( !bRet && pPage && !((pPage->Frame().Top() > nBottom) || + (pPage->Frame().Left() > nRight))) { if ( pPage->IsInvalid() || pPage->IsInvalidFly() ) bRet = true; - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } if ( bRet ) @@ -1740,7 +1740,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe return; } - if ( SwRootFrm::IsInPaint() ) + if ( SwRootFrame::IsInPaint() ) { //During the publication of a page at printing the Paint is buffered. SwPaintQueue::Add( this, SwRect( rRect ) ); @@ -1762,7 +1762,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe mbPaintInProgress = true; SET_CURR_SHELL( this ); - SwRootFrm::SetNoVirDev( true ); + SwRootFrame::SetNoVirDev( true ); //We don't want to Clip to and fro, we trust that all are limited //to the rectangle and only need to calculate the clipping once. @@ -1807,7 +1807,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe // <-- } } - SwRootFrm::SetNoVirDev( false ); + SwRootFrame::SetNoVirDev( false ); mbPaintInProgress = false; UISizeNotify(); } @@ -1962,9 +1962,9 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) // That leads to problems with Invalidate, e.g. when setting up an new View // the content is inserted and formatted (regardless of empty VisArea). // Therefore the pages must be roused for formatting. - if( !GetLayout()->Frm().Height() ) + if( !GetLayout()->Frame().Height() ) { - SwFrm* pPage = GetLayout()->Lower(); + SwFrame* pPage = GetLayout()->Lower(); while( pPage ) { pPage->_InvalidateSize(); @@ -1976,7 +1976,7 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) LockPaint(); StartAction(); - SwPageFrm *pPg = static_cast<SwPageFrm*>(GetLayout()->Lower()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(GetLayout()->Lower()); do { pPg->InvalidateSize(); pPg->_InvalidatePrt(); @@ -1986,26 +1986,26 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) pPg->PrepareHeader(); pPg->PrepareFooter(); } - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } while ( pPg ); // When the size ratios in browse mode change, // the Position and PrtArea of the Content and Tab frames must be Invalidated. sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS; - // In case of layout or mode change, the ContentFrms need a size-Invalidate + // In case of layout or mode change, the ContentFrames need a size-Invalidate // because of printer/screen formatting. if ( bSizeChanged ) nInv |= INV_SIZE | INV_DIRECTION; GetLayout()->InvalidateAllContent( nInv ); - SwFrm::CheckPageDescs( static_cast<SwPageFrm*>(GetLayout()->Lower()) ); + SwFrame::CheckPageDescs( static_cast<SwPageFrame*>(GetLayout()->Lower()) ); EndAction(); UnlockPaint(); } -SwRootFrm *SwViewShell::GetLayout() const +SwRootFrame *SwViewShell::GetLayout() const { return mpLayout.get(); } @@ -2037,9 +2037,9 @@ void SwViewShell::DrawSelChanged() Size SwViewShell::GetDocSize() const { Size aSz; - const SwRootFrm* pRoot = GetLayout(); + const SwRootFrame* pRoot = GetLayout(); if( pRoot ) - aSz = pRoot->Frm().SSize(); + aSz = pRoot->Frame().SSize(); return aSz; } @@ -2205,7 +2205,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) pMyWin->Invalidate(); if ( bReformat ) { - // Nothing helps, we need to send all ContentFrms a + // Nothing helps, we need to send all ContentFrames a // Prepare, we format anew: StartAction(); Reformat(); @@ -2362,12 +2362,12 @@ void SwViewShell::InvalidateAccessibleFocus() /** * invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs #i27138# */ -void SwViewShell::InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pFromTextFrm, - const SwTextFrm* _pToTextFrm ) +void SwViewShell::InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, + const SwTextFrame* _pToTextFrame ) { if ( GetLayout() && GetLayout()->IsAnyShellAccessible() ) { - Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTextFrm, _pToTextFrm ); + Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTextFrame, _pToTextFrame ); } } @@ -2385,11 +2385,11 @@ void SwViewShell::InvalidateAccessibleParaTextSelection() /** * invalidate attributes for paragraphs #i88069# */ -void SwViewShell::InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ) +void SwViewShell::InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame ) { if ( GetLayout() && GetLayout()->IsAnyShellAccessible() ) { - Imp()->_InvalidateAccessibleParaAttrs( rTextFrm ); + Imp()->_InvalidateAccessibleParaAttrs( rTextFrame ); } } @@ -2441,19 +2441,19 @@ sal_uInt16 SwViewShell::GetPageCount() const const Size SwViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - const SwRootFrm* pTmpRoot = GetLayout(); + const SwRootFrame* pTmpRoot = GetLayout(); if( pTmpRoot && nPageNum ) { - const SwPageFrm* pPage = static_cast<const SwPageFrm*> + const SwPageFrame* pPage = static_cast<const SwPageFrame*> (pTmpRoot->Lower()); while( --nPageNum && pPage->GetNext() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); - aSize = pPage->Frm().SSize(); + aSize = pPage->Frame().SSize(); } return aSize; } @@ -2467,14 +2467,14 @@ sal_Int32 SwViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const S // #i40059# Position out of bounds: SwRect aRect( rRect ); - aRect.Pos().X() = std::max( aRect.Left(), GetLayout()->Frm().Left() ); + aRect.Pos().X() = std::max( aRect.Left(), GetLayout()->Frame().Left() ); - const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() ); + const SwPageFrame* pPage = GetLayout()->GetPageAtPos( aRect.Center() ); if ( pPage ) { OSL_ENSURE( pPage, "GetPageNumAndSetOffsetForPDF: No page found" ); - Point aOffset( pPage->Frm().Pos() ); + Point aOffset( pPage->Frame().Pos() ); aOffset.X() = -aOffset.X(); aOffset.Y() = -aOffset.Y(); |