diff options
Diffstat (limited to 'sw')
22 files changed, 44 insertions, 45 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index c0153ef93d3f..933c044d92bd 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -45,7 +45,7 @@ public: inline SwRect( tools::Long X, tools::Long Y, tools::Long Width, tools::Long Height ); //SV-SS e.g. SwRect( pWin->GetClipRect() ); - SwRect( const tools::Rectangle &rRect ); + explicit SwRect( const tools::Rectangle &rRect ); //Set-Methods inline void Chg( const Point& rNP, const Size &rNS ); diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index bb59f3a68044..04beb8200745 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -532,7 +532,7 @@ void SwAccessibleContext::ThrowIfDisposed() SwAccessibleContext::SwAccessibleContext(std::shared_ptr<SwAccessibleMap> const& pMap, sal_Int16 const nRole, const SwFrame *pF ) - : SwAccessibleFrame( pMap->GetVisArea().SVRect(), pF, + : SwAccessibleFrame( pMap->GetVisArea(), pF, pMap->GetShell()->IsPreview() ) , m_pMap(pMap.get()) , m_wMap(pMap) diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index edc3a145c11c..609b174072e0 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -135,7 +135,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat, } // use geometry of drawing object - const SwRect aObjRect = _rSdrObj.GetSnapRect(); + const tools::Rectangle aObjRect = _rSdrObj.GetSnapRect(); if ( bVert ) { @@ -172,9 +172,9 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat, const SwAnchoredObject* pAnchoredObj = pContact->GetAnchoredObj( &_rSdrObj ); if ( auto pAnchoredDrawObj = dynamic_cast<const SwAnchoredDrawObject*>( pAnchoredObj) ) { - const SwRect aObjRect = _rSdrObj.GetSnapRect(); + const tools::Rectangle aObjRect = _rSdrObj.GetSnapRect(); const_cast<SwAnchoredDrawObject*>(pAnchoredDrawObj) - ->SetLastObjRect( aObjRect.SVRect() ); + ->SetLastObjRect( aObjRect ); } } } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 9ae68e2a05ef..579866cedcbe 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1237,7 +1237,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj, SwFrameFormat::tLayoutDir eLayoutDir = pAnchoredDrawObj->GetFrameFormat().GetLayoutDir(); // use geometry of drawing object - SwRect aObjRect( rObj.GetSnapRect() ); + tools::Rectangle aObjRect( rObj.GetSnapRect() ); // If drawing object is a member of a group, the adjustment // of the positioning and the alignment attributes has to // be done for the top group object. @@ -1311,9 +1311,9 @@ void SwDrawContact::Changed_( const SdrObject& rObj, // #i34748# - use new method // <SwAnchoredDrawObject::SetLastObjRect(..)>. const_cast<SwAnchoredDrawObject*>(pAnchoredDrawObj) - ->SetLastObjRect( aObjRect.SVRect() ); + ->SetLastObjRect( aObjRect ); } - else if ( aObjRect.SSize() != aOldObjRect.GetSize() ) + else if ( aObjRect.GetSize() != aOldObjRect.GetSize() ) { InvalidateObjs_(); // #i35007# - notify anchor frame @@ -1990,7 +1990,7 @@ void SwDrawContact::ChkPage() SwPageFrame* pPg = ( maAnchoredDrawObj.GetAnchorFrame() && maAnchoredDrawObj.GetAnchorFrame()->IsPageFrame() ) ? GetPageFrame() - : FindPage( GetMaster()->GetCurrentBoundRect() ); + : FindPage( SwRect(GetMaster()->GetCurrentBoundRect()) ); if ( GetPageFrame() == pPg ) return; diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 93a66ba6b625..41cea972ee05 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -1112,7 +1112,7 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const Fraction& xFact, const // need to save aOutRect to FrameArea, will be restored to aOutRect in // SwVirtFlyDrawObj::NbcMove currently for TransformableSwFrames SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*GetFlyFrame()); - aFrm.setSwRect(m_aOutRect); + aFrm.setSwRect(SwRect(m_aOutRect)); } // keep old hack - not clear what happens here diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index db5f4dd33419..6ecb3c2c2a20 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1276,7 +1276,7 @@ SwRect SwFEShell::GetFlyRect() const SwRect SwFEShell::GetObjRect() const { if( Imp()->HasDrawView() ) - return Imp()->GetDrawView()->GetAllMarkedRect(); + return SwRect(Imp()->GetDrawView()->GetAllMarkedRect()); else { SwRect aRect; @@ -1618,7 +1618,7 @@ const SwFrameFormat* SwFEShell::GetFormatFromObj( const Point& rPt, SwRect** pRe else if ( pObj->GetUserCall() ) //not for group objects pRet = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat(); if(pRet && pRectToFill) - **pRectToFill = pObj->GetCurrentBoundRect(); + **pRectToFill = SwRect(pObj->GetCurrentBoundRect()); } pDView->SetHitTolerancePixel( nOld ); } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 6f4dbf238612..7c7c0fbc43d1 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1761,7 +1761,7 @@ bool SwFEShell::GotoObj( bool bNext, GotoObjFlags eType ) { SelectObj( Point(), 0, const_cast<SdrObject*>(pBest) ); if( !ActionPend() ) - MakeVisible( pBest->GetCurrentBoundRect() ); + MakeVisible( SwRect(pBest->GetCurrentBoundRect()) ); } CallChgLnk(); return true; @@ -2678,7 +2678,7 @@ void SwFEShell::MakeSelVisible() Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) { GetCurrFrame(); // just to trigger formatting in case the selected object is not formatted. - MakeVisible( Imp()->GetDrawView()->GetAllMarkedRect() ); + MakeVisible( SwRect(Imp()->GetDrawView()->GetAllMarkedRect()) ); } else SwCursorShell::MakeSelVisible(); diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 93773c255fd7..8110b5120c74 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -619,7 +619,7 @@ SwRect SwAnchoredDrawObject::GetObjRect() const { // use geometry of drawing object //return GetDrawObj()->GetCurrentBoundRect(); - return GetDrawObj()->GetSnapRect(); + return SwRect(GetDrawObj()->GetSnapRect()); } namespace @@ -745,7 +745,7 @@ SwRect SwAnchoredDrawObject::GetObjBoundRect() const pDoc->getIDocumentState().SetEnableSetModified(bEnableSetModified); } } - return GetDrawObj()->GetCurrentBoundRect(); + return SwRect(GetDrawObj()->GetCurrentBoundRect()); } // --> #i68520# diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 14a73d4d5869..51e76b63daaa 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -3406,7 +3406,7 @@ void Notify_Background( const SdrObject* pObj, // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. if (!isValidTableBeforeAnchor - && (pTab->getFrameArea().IsOver(pObj->GetLastBoundRect()) || + && (pTab->getFrameArea().IsOver(SwRect(pObj->GetLastBoundRect())) || pTab->getFrameArea().IsOver(rRect))) { if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) ) @@ -3418,7 +3418,7 @@ void Notify_Background( const SdrObject* pObj, // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. if (!isValidTableBeforeAnchor && pCell->IsCellFrame() && - ( pCell->getFrameArea().IsOver( pObj->GetLastBoundRect() ) || + ( pCell->getFrameArea().IsOver( SwRect(pObj->GetLastBoundRect()) ) || pCell->getFrameArea().IsOver( rRect ) ) ) { const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient(); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 8dae637b7700..646e4fe97995 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1200,7 +1200,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContex bZeroHeight = true; } - rRect = pOut->PixelToLogic( aAlignedPxRect.SVRect() ); + rRect = SwRect(pOut->PixelToLogic( aAlignedPxRect.SVRect() )); // Consider zero width/height and adjust calculated aligned twip rectangle. // Reset width/height to zero; previous negative width/height haven't to be considered. @@ -3914,7 +3914,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) //right now. Afterwards they must not be printed if the //page over which they float position wise gets printed. const SwPageFrame *pPage = pAnch->FindPageFrame(); - if ( !pPage->getFrameArea().IsOver( pObj->GetCurrentBoundRect() ) ) + if ( !pPage->getFrameArea().IsOver( SwRect(pObj->GetCurrentBoundRect()) ) ) pAnch = nullptr; } } @@ -5801,7 +5801,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const const SwPostItMgr *pMgr = _pViewShell->GetPostItMgr(); SwRect aAlignedPageRect( _rPageRect ); ::SwAlignRect( aAlignedPageRect, _pViewShell, pRenderContext ); - SwRect aPagePxRect = pRenderContext->LogicToPixel( aAlignedPageRect.SVRect() ); + SwRect aPagePxRect(pRenderContext->LogicToPixel( aAlignedPageRect.SVRect() )); tools::Long lShadowAdjustment = snShadowPxWidth - 1; // TODO: extract this @@ -5917,7 +5917,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin SwRect aAlignedPageRect( _rPageRect ); ::SwAlignRect( aAlignedPageRect, _pViewShell, _pViewShell->GetOut() ); - SwRect aPagePxRect = _pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() ); + SwRect aPagePxRect(_pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() )); if (aShadowColor != SwViewOption::GetShadowColor()) { @@ -6168,7 +6168,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin { SwRect aAlignedPageRect( _rPageRect ); ::SwAlignRect( aAlignedPageRect, _pViewShell, pRenderContext ); - SwRect aPagePxRect = pRenderContext->LogicToPixel( aAlignedPageRect.SVRect() ); + SwRect aPagePxRect(pRenderContext->LogicToPixel( aAlignedPageRect.SVRect() )); aPagePxRect.AddBottom( snShadowPxWidth + 1 ); aPagePxRect.AddTop( - snShadowPxWidth - 1 ); @@ -6181,7 +6181,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin if(bLeftShadow) aPagePxRect.Left( aTmpRect.Left() - snShadowPxWidth - 1); if(bRightShadow) aPagePxRect.Right( aTmpRect.Right() + snShadowPxWidth + 1); - _orBorderAndShadowBoundRect = pRenderContext->PixelToLogic( aPagePxRect.SVRect() ); + _orBorderAndShadowBoundRect = SwRect(pRenderContext->PixelToLogic( aPagePxRect.SVRect() )); } SwRect SwPageFrame::GetBoundRect(OutputDevice const * pOutputDevice) const diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 50b2b9eb65f5..b6a2d091e7bd 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -140,7 +140,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // left difference is only considered, if requested. if( !IsObjFly() ) { - SwRect aSnapRect = GetObject().GetSnapRect(); + SwRect aSnapRect(GetObject().GetSnapRect()); if ( rAnchorFrame.IsVertical() ) { rAnchorFrame.SwitchVerticalToHorizontal( aSnapRect ); @@ -237,7 +237,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // move drawing object to set its correct relative position. { - SwRect aSnapRect = GetObject().GetSnapRect(); + SwRect aSnapRect(GetObject().GetSnapRect()); if ( rAnchorFrame.IsVertical() ) rAnchorFrame.SwitchVerticalToHorizontal( aSnapRect ); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index ba2f0ad9333f..258c0313b981 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1808,7 +1808,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Turn media shapes into Screen annotations. if (SdrObject* pObject = pFrameFormat->FindRealSdrObject()) { - SwRect aSnapRect = pObject->GetSnapRect(); + SwRect aSnapRect(pObject->GetSnapRect()); std::vector<sal_Int32> aScreenPageNums = CalcOutputPageNums(aSnapRect); if (aScreenPageNums.empty()) continue; diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 6e5318097e2b..476c4dacb7f5 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1089,8 +1089,7 @@ void SwTextPaintInfo::DrawPostIts( bool bScript ) const if ( GetTextFrame()->IsVertical() ) GetTextFrame()->SwitchHorizontalToVertical( aTmpRect ); - const tools::Rectangle aRect( aTmpRect.SVRect() ); - SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); + SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aTmpRect, bScript ); } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 3c37ba2ced2b..4a19062f4db6 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -1027,7 +1027,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: // paint preview background { - SwRegionRects aPreviewBackgrdRegion(rOutRect); + SwRegionRects aPreviewBackgrdRegion((SwRect(rOutRect))); // calculate preview background rectangles for ( auto & rpPreviewPage : maPreviewPages ) { @@ -1086,14 +1086,14 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: pOutputDev->SetFont( aOldFont ); // paint shadow and border for empty page // use new method to paint page border and shadow - SwPageFrame::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); + SwPageFrame::PaintBorderAndShadow( SwRect(aPageRect), &mrParentViewShell, true, false, true ); } else { const bool bIsLeftShadowed = pPage->IsLeftShadowNeeded(); const bool bIsRightShadowed = pPage->IsRightShadowNeeded(); - mrParentViewShell.maVisArea = aPageRect; + mrParentViewShell.maVisArea = SwRect(aPageRect); aPxPaintRect.Intersection( aPxOutRect ); tools::Rectangle aPaintRect = pOutputDev->PixelToLogic( aPxPaintRect ); mrParentViewShell.Paint(rRenderContext, aPaintRect); @@ -1106,7 +1106,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: bIsLeftShadowed, bIsRightShadowed, true ); const vcl::Region aDLRegion(aPageBorderRect.SVRect()); mrParentViewShell.DLPrePaint2(aDLRegion); - SwPageFrame::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); + SwPageFrame::PaintBorderAndShadow( SwRect(aPageRect), &mrParentViewShell, true, false, true ); mrParentViewShell.DLPostPaint2(true); } // <-- diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index e0f12b18b7a1..a28f3dc2df52 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -401,7 +401,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) if ( bPaint ) { if (GetWin()->SupportsDoubleBuffering()) - InvalidateWindows(aRect.SVRect()); + InvalidateWindows(aRect); else { // #i75172# begin DrawingLayer paint @@ -417,7 +417,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) if (!comphelper::LibreOfficeKit::isActive()) pCurrentLayout->PaintSwFrame( *mpOut, aRect ); else - pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect()); + pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect); // #i75172# end DrawingLayer paint DLPostPaint2(true); @@ -1859,7 +1859,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang for(const auto& rRectangle : aRectangles) { - Imp()->AddPaintRect(rRectangle); + Imp()->AddPaintRect(SwRect(rRectangle)); } //RegionHandle hHdl( aRegion.BeginEnumRects() ); @@ -1938,7 +1938,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex VisPortChgd(SwRect(aOutRect)); // Invoke SwLayAction if layout is not yet ready. - CheckInvalidForPaint(aOutRect); + CheckInvalidForPaint(SwRect(aOutRect)); // draw - works in logic coordinates Paint(rDevice, aOutRect); diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 38ad0d75b5a7..c5a0f8edca30 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -778,7 +778,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) if(pCurrentTextObj) pDrView->SdrEndTextEdit( true ); // and the found one should be activated - rSh.MakeVisible(pTextObj->GetLogicRect()); + rSh.MakeVisible(SwRect(pTextObj->GetLogicRect())); Point aTmp( 0,0 ); rSh.SelectObj( aTmp, 0, pTextObj ); SdrPageView* pPV = pDrView->GetSdrPageView(); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ec09f3c07f12..446d2faa5405 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4781,7 +4781,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) ICheckboxFieldmark& rCheckboxFm = dynamic_cast<ICheckboxFieldmark&>(*fieldBM); rCheckboxFm.SetChecked(!rCheckboxFm.IsChecked()); rCheckboxFm.Invalidate(); - rSh.InvalidateWindows( m_rView.GetVisArea() ); + rSh.InvalidateWindows( SwRect(m_rView.GetVisArea()) ); } } } diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx index a626be95da3e..939890805425 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.cxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx @@ -142,7 +142,7 @@ bool SdrHHCWrapper::ConvertNextDocument() pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1,1))); SetPaperSize( pTextObj->GetLogicRect().GetSize() ); SetUpdateMode(true); - pView->GetWrtShell().MakeVisible(pTextObj->GetLogicRect()); + pView->GetWrtShell().MakeVisible(SwRect(pTextObj->GetLogicRect())); pSdrView->SdrBeginTextEdit(pTextObj, pPV, &pView->GetEditWin(), false, this, pOutlView.get(), true, true); } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index c35563f167dc..e3f6e07538c6 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -528,7 +528,7 @@ Point SwDrawBase::GetDefaultCenterPos() const SwRect aVisArea(m_pSh->VisArea()); if (comphelper::LibreOfficeKit::isActive()) { - aVisArea = m_pSh->getLOKVisibleArea(); + aVisArea = SwRect(m_pSh->getLOKVisibleArea()); aVisArea.Intersection(SwRect(Point(), aDocSz)); } diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 010c8551c810..0c11a9395a40 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1430,7 +1430,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if (pDlg->Execute() == RET_OK) { pFieldBM->Invalidate(); - rWrtSh.InvalidateWindows( rWrtSh.GetView().GetVisArea() ); + rWrtSh.InvalidateWindows( SwRect(rWrtSh.GetView().GetVisArea()) ); rWrtSh.UpdateCursor(); // cursor position might be invalid } } @@ -1442,7 +1442,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if (pDlg->Execute() == RET_OK) { rDateField.Invalidate(); - rWrtSh.InvalidateWindows( rWrtSh.GetView().GetVisArea() ); + rWrtSh.InvalidateWindows( SwRect(rWrtSh.GetView().GetVisArea()) ); rWrtSh.UpdateCursor(); // cursor position might be invalid } } diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index b676999f6448..9d6d07e1deaf 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -161,7 +161,7 @@ void SwView::ExecDraw(SfxRequest& rReq) { Size aDocSize( m_pWrtShell->GetDocSize() ); const SwRect& rVisArea = comphelper::LibreOfficeKit::isActive() ? - m_pWrtShell->getLOKVisibleArea() : m_pWrtShell->VisArea(); + SwRect(m_pWrtShell->getLOKVisibleArea()) : m_pWrtShell->VisArea(); Point aPos( rVisArea.Center() ); tools::Rectangle aObjRect( pObj->GetLogicRect() ); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index eaaa780cf02c..c7b6a48a4179 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -246,7 +246,7 @@ void SwView::SetVisArea( const tools::Rectangle &rRect, bool bUpdateScrollbar ) if ( m_pWrtShell ) { - m_pWrtShell->VisPortChgd( m_aVisArea ); + m_pWrtShell->VisPortChgd( SwRect(m_aVisArea) ); if ( aOldSz != m_pWrtShell->VisArea().SSize() && ( std::abs(aOldSz.Width() - m_pWrtShell->VisArea().Width()) > 2 || std::abs(aOldSz.Height() - m_pWrtShell->VisArea().Height()) > 2 ) ) |