diff options
Diffstat (limited to 'sw')
27 files changed, 77 insertions, 77 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 5605d23ca75d..8217e0500ce7 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -3063,7 +3063,7 @@ Size SwAccessibleMap::LogicToPixel( const Size& rSize ) const MapMode aSrc( MapUnit::Map100thMM ); MapMode aDest( MapUnit::MapTwip ); Size aSize( OutputDevice::LogicToLogic( rSize, aSrc, aDest ) ); - if (const OutputDevice* pWin = GetShell()->GetWin()) + if (const OutputDevice* pWin = GetShell()->GetWin()->GetOutDev()) { MapMode aMapMode; GetMapMode( Point(0,0), aMapMode ); @@ -3182,7 +3182,7 @@ css::uno::Reference< XAccessible > Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const { Point aPoint; - if (const OutputDevice* pWin = GetShell()->GetWin()) + if (const OutputDevice* pWin = GetShell()->GetWin()->GetOutDev()) { MapMode aMapMode; GetMapMode( rPoint, aMapMode ); @@ -3227,7 +3227,7 @@ static void lcl_CorrectRectangle(tools::Rectangle & rRect, tools::Rectangle SwAccessibleMap::CoreToPixel( const tools::Rectangle& rRect ) const { tools::Rectangle aRect; - if (const OutputDevice* pWin = GetShell()->GetWin()) + if (const OutputDevice* pWin = GetShell()->GetWin()->GetOutDev()) { MapMode aMapMode; GetMapMode( rRect.TopLeft(), aMapMode ); diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 4777b767deb3..adcb0aa4bc4a 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -592,7 +592,7 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect ) void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh, tools::Long* pX, tools::Long* pY ) { - const OutputDevice* pOut = rSh.GetWin(); + const OutputDevice* pOut = rSh.GetWin()->GetOutDev(); if ( ! pOut ) pOut = rSh.GetOut(); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index c0b8984e6cf4..738ac7cc9dae 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -1212,7 +1212,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr else if( pShell->GetWin() && pOut->IsVirtual() ) { pVout = pOut; - pOut = pShell->GetWin(); + pOut = pShell->GetWin()->GetOutDev(); } else pVout = nullptr; @@ -1260,7 +1260,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr : nullptr); // tdf#130951 caution - target may be Window, use the correct OutputDevice OutputDevice* pTarget(pShell->isOutputToWindow() - ? pShell->GetWin() + ? pShell->GetWin()->GetOutDev() : pShell->GetOut()); SdrPageWindow* pPageWindow(nullptr != pPageView && nullptr != pTarget ? pPageView->FindPageWindow(*pTarget) diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 99fad85445a4..4f16f7df8f1f 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1264,7 +1264,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) // Otherwise it could happen that for vector graphics // many MB's of memory are allocated. const Size aSz( GetSelectedFlyFrame()->getFramePrintArea().SSize() ); - ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin()); + ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin()->GetOutDev()); MapMode aTmp( MapUnit::MapTwip ); pVirtDev->SetMapMode( aTmp ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 10d5cf065d3a..0ab451c111a0 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2154,11 +2154,11 @@ void SwLayIdle::ShowIdle( Color eColor ) tools::Rectangle aRect( 0, 0, 5, 5 ); aRect = pWin->PixelToLogic( aRect ); // Depending on if idle layout is in progress or not, draw a "red square" or a "green square". - pWin->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); - pWin->SetFillColor( eColor ); - pWin->SetLineColor(); - pWin->DrawRect( aRect ); - pWin->Pop(); + pWin->GetOutDev()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); + pWin->GetOutDev()->SetFillColor( eColor ); + pWin->GetOutDev()->SetLineColor(); + pWin->GetOutDev()->DrawRect( aRect ); + pWin->GetOutDev()->Pop(); } } #define SHOW_IDLE( Color ) ShowIdle( Color ) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 27cbf1b4a997..1d3d046dee66 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3012,7 +3012,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( pSh->GetWin() ) { - if ( pSh->GetOut() == pSh->GetWin() && !pSh->GetWin()->IsVisible() ) + if ( pSh->GetOut() == pSh->GetWin()->GetOutDev() && !pSh->GetWin()->IsVisible() ) { return; } @@ -7502,7 +7502,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom(); ::SetOutDevAndWin( pSh, pDev, nullptr, 100 ); gProp.bSFlyMetafile = true; - gProp.pSFlyMetafileOut = pWin; + gProp.pSFlyMetafileOut = pWin->GetOutDev(); SwViewShellImp *pImp = pSh->Imp(); gProp.pSFlyOnlyDraw = pFly; diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index a0ae8073c27b..f6e298b2d3e0 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -1009,7 +1009,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM SwViewShell const * pSh = GetDoc().getIDocumentLayoutAccess().GetCurrentViewShell(); OutputDevice* pOut = nullptr; if( pSh ) - pOut = pSh->GetWin(); + pOut = pSh->GetWin()->GetOutDev(); if( !pOut ) pOut = Application::GetDefaultDevice(); diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 6f578e0744cd..1164a0fcb183 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -455,7 +455,7 @@ bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) pOut = GetDoc().getIDocumentDeviceAccess().getReferenceDevice( true ); if( pSh && !pOut ) - pOut = pSh->GetWin(); + pOut = pSh->GetWin()->GetOutDev(); if( !pOut ) pOut = Application::GetDefaultDevice(); diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 312eb4dd71ba..54c60551f7bb 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -793,7 +793,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf OutputDevice* pOut = rInf.GetOut(); OutputDevice* pWin; if( rInf.GetVsh() && rInf.GetVsh()->GetWin() ) - pWin = rInf.GetVsh()->GetWin(); + pWin = rInf.GetVsh()->GetWin()->GetOutDev(); else pWin = Application::GetDefaultDevice(); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 508f5ff81cfc..5e3afe0fce96 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -611,7 +611,7 @@ void SwFntObj::GuessLeading( const SwViewShell& #if defined(_WIN32) OutputDevice *pWin = rSh.GetWin() ? - rSh.GetWin() : + rSh.GetWin()->GetOutDev() : Application::GetDefaultDevice(); if ( pWin ) { @@ -876,7 +876,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) OSL_ENSURE( rInf.GetShell(), "SwFntObj::DrawText without shell" ); OutputDevice& rRefDev = rInf.GetShell()->GetRefDev(); - OutputDevice* pWin = rInf.GetShell()->GetWin(); + vcl::Window* pWin = rInf.GetShell()->GetWin(); // true if pOut is the printer and the printer has been used for formatting const bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() && diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 317480500eac..3cadcfd3556a 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -213,7 +213,8 @@ void SwViewShellImp::MakeDrawView() // to use GetOut() and check the existing cases. // Check worked well. Took a look at viewing, printing, PDF export and print preview with a test // document which has an empty 2nd page (right page, see bug) - OutputDevice* pOutDevForDrawView = GetShell()->GetWin(); + auto pWin = GetShell()->GetWin(); + OutputDevice* pOutDevForDrawView = pWin ? pWin->GetOutDev() : nullptr; if(!pOutDevForDrawView) { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 9d4ab60ceba0..e0f12b18b7a1 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -182,7 +182,7 @@ void SwViewShell::DLPrePaint2(const vcl::Region& rRegion) // Prefer window; if not available, get mpOut (e.g. printer) const bool bWindow = GetWin() && !comphelper::LibreOfficeKit::isActive() && !isOutputToWindow(); - mpPrePostOutDev = bWindow ? GetWin(): GetOut(); + mpPrePostOutDev = bWindow ? GetWin()->GetOutDev() : GetOut(); // #i74769# use SdrPaintWindow now direct mpTargetPaintWindow = Imp()->GetDrawView()->BeginDrawLayers(mpPrePostOutDev, rRegion); @@ -285,7 +285,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) if ( mnLockPaint ) aAction.SetPaint( false ); aAction.SetInputType( VclInputFlags::KEYBOARD ); - aAction.Action(GetWin()); + aAction.Action(GetWin()->GetOutDev()); } if ( bIsShellForCheckViewLayout ) @@ -1078,7 +1078,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //First get the old visible page, so we don't have to look //for it afterwards. - const SwFrame *pOldPage = Imp()->GetFirstVisPage(GetWin()); + const SwFrame *pOldPage = Imp()->GetFirstVisPage(GetWin()->GetOutDev()); const SwRect aPrevArea( VisArea() ); const bool bFull = aPrevArea.IsEmpty(); @@ -1125,11 +1125,11 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) while ( pPage && pPage->getFrameArea().Top() <= nBottom ) { - SwRect aPageRect( pPage->GetBoundRect(GetWin()) ); + SwRect aPageRect( pPage->GetBoundRect(GetWin()->GetOutDev()) ); if ( bBookMode ) { const SwPageFrame& rFormatPage = pPage->GetFormatPage(); - aPageRect.SSize( rFormatPage.GetBoundRect(GetWin()).SSize() ); + aPageRect.SSize( rFormatPage.GetBoundRect(GetWin()->GetOutDev()).SSize() ); } // #i9719# - consider new border and shadow width @@ -1218,8 +1218,8 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) if ( HasDrawView() ) { - Imp()->GetDrawView()->VisAreaChanged( GetWin() ); - Imp()->GetDrawView()->SetActualWin( GetWin() ); + Imp()->GetDrawView()->VisAreaChanged( GetWin()->GetOutDev() ); + Imp()->GetDrawView()->SetActualWin( GetWin()->GetOutDev() ); } GetWin()->PaintImmediately(); @@ -1273,9 +1273,9 @@ bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const to //create virtual device and set. const Size aPixSz = GetWin()->PixelToLogic(Size(1,1)); - VclPtrInstance<VirtualDevice> pVout( *GetWin() ); - pVout->SetLineColor( GetWin()->GetLineColor() ); - pVout->SetFillColor( GetWin()->GetFillColor() ); + VclPtrInstance<VirtualDevice> pVout( *GetWin()->GetOutDev() ); + pVout->SetLineColor( GetWin()->GetOutDev()->GetLineColor() ); + pVout->SetFillColor( GetWin()->GetOutDev()->GetFillColor() ); MapMode aMapMode( GetWin()->GetMapMode() ); pVout->SetMapMode( aMapMode ); Size aSize( maVisArea.Width()+2*aPixSz.Width(), std::abs(lYDiff)+(2*aPixSz.Height()) ); @@ -1394,7 +1394,7 @@ bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const to GetWin()->SetMapMode( aTmpMapMode ); if ( Imp()->HasDrawView() ) - Imp()->GetDrawView()->VisAreaChanged( GetWin() ); + Imp()->GetDrawView()->VisAreaChanged( GetWin()->GetOutDev() ); SetFirstVisPageInvalid(); if ( !Imp()->m_bStopSmooth ) @@ -1636,7 +1636,7 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) // can't format frames which are locked by the outer action. This may // cause and endless loop. ++mnStartAction; - aAction.Action(GetWin()); + aAction.Action(GetWin()->GetOutDev()); --mnStartAction; SwRegionRects *pRegion = Imp()->GetRegion(); @@ -1720,7 +1720,7 @@ public: { pRef = pValue; - if (pValue == pShell->GetWin()) + if (pValue == pShell->GetWin()->GetOutDev()) return; SdrView* pDrawView(pShell->Imp()->GetDrawView()); @@ -1732,7 +1732,7 @@ public: if (nullptr != pSdrPageView) { - m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*pShell->GetWin()); + m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*pShell->GetWin()->GetOutDev()); if (nullptr != m_pPatchedPageWindow) { @@ -1869,7 +1869,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang //aRegion.EndEnumRects( hHdl ); } else if ( SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) && - GetOut() == GetWin() ) + GetOut() == GetWin()->GetOutDev() ) { // #i68597# const vcl::Region aDLRegion(rRect); @@ -2075,7 +2075,7 @@ vcl::RenderContext& SwViewShell::GetRefDev() const if ( GetWin() && GetViewOptions()->getBrowseMode() && !GetViewOptions()->IsPrtFormat() ) - pTmpOut = GetWin(); + pTmpOut = GetWin()->GetOutDev(); else pTmpOut = GetDoc()->getIDocumentDeviceAccess().getReferenceDevice( true ); diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 24c7ed35ff03..6ca815c0890c 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -104,10 +104,10 @@ void SwViewShell::Init( const SwViewOption *pNewOpt ) SAL_INFO( "sw.core", "View::Init - after InitPrt" ); if( GetWin() ) { - SwViewOption::Init( GetWin() ); - GetWin()->SetFillColor(); + SwViewOption::Init( GetWin()->GetOutDev() ); + GetWin()->GetOutDev()->SetFillColor(); GetWin()->SetBackground(); - GetWin()->SetLineColor(); + GetWin()->GetOutDev()->SetLineColor(); } // Create a new layout, if there is no one available @@ -150,7 +150,7 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow, mpImp( new SwViewShellImp( this ) ), mpWin( pWindow ), mpOut( pOutput ? pOutput - : pWindow ? static_cast<OutputDevice*>(pWindow) + : pWindow ? pWindow->GetOutDev() : static_cast<OutputDevice*>(rDocument.getIDocumentDeviceAccess().getPrinter( true ))), mpAccOptions( new SwAccessibilityOptions ), mbShowHeaderSeparator( false ), @@ -220,7 +220,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow, mpImp( new SwViewShellImp( this ) ), mpWin( pWindow ), mpOut( pOutput ? pOutput - : pWindow ? static_cast<OutputDevice*>(pWindow) + : pWindow ? pWindow->GetOutDev() : static_cast<OutputDevice*>(rShell.GetDoc()->getIDocumentDeviceAccess().getPrinter( true ))), mpAccOptions( new SwAccessibilityOptions ), mbShowHeaderSeparator( false ), diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index bb51694df012..3c064d600bee 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -671,7 +671,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha const SdrUnoObj *pFormObj = dynamic_cast<const SdrUnoObj*>( pObj ); uno::Reference< awt::XControl > xControl; if ( pDrawView && pVSh->GetWin() && pFormObj ) - xControl = pFormObj->GetUnoControl( *pDrawView, *pVSh->GetWin() ); + xControl = pFormObj->GetUnoControl( *pDrawView, *pVSh->GetWin()->GetOutDev() ); awt::Size aSz( rShape->getSize() ); awt::Size aNewSz( 0, 0 ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 38c0418060e1..64d1beb7de46 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -664,7 +664,7 @@ static void GetControlSize(const SdrUnoObj& rFormObj, Size& rSz, SwDoc *pDoc) SdrView* pDrawView = pVSh->GetDrawView(); OSL_ENSURE( pDrawView && pVSh->GetWin(), "no DrawView or window!" ); if ( pDrawView && pVSh->GetWin() ) - xControl = rFormObj.GetUnoControl( *pDrawView, *pVSh->GetWin() ); + xControl = rFormObj.GetUnoControl( *pDrawView, *pVSh->GetWin()->GetOutDev() ); uno::Reference< awt::XTextLayoutConstrains > xLC( xControl, uno::UNO_QUERY ); OSL_ENSURE( xLC.is(), "no XTextLayoutConstrains" ); if( !xLC.is() ) diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 7a9022e01778..582ff2701933 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -364,7 +364,7 @@ void SwPageBreakWin::UpdatePosition(const std::optional<Point>& xEvtPt) while ( pPrevPage && ( ( pPrevPage->getFrameArea().Top( ) == pPageFrame->getFrameArea().Top( ) ) || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) ); - ::tools::Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); + ::tools::Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()->GetOutDev()).SVRect() ); ::tools::Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->getFrameArea().SVRect() ); tools::Long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 752de942539b..ec09f3c07f12 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2958,7 +2958,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SdrView *pSdrView = rSh.GetDrawView(); if ( pSdrView ) { - if (pSdrView->MouseButtonDown(aMEvt, this)) + if (pSdrView->MouseButtonDown(aMEvt, GetOutDev())) { rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false); return; // SdrView's event evaluated @@ -3955,7 +3955,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) const SwCallMouseEvent aLastCallEvent( m_aSaveCallEvent ); m_aSaveCallEvent.Clear(); - if ( !bIsDocReadOnly && pSdrView && pSdrView->MouseMove(rMEvt,this) ) + if ( !bIsDocReadOnly && pSdrView && pSdrView->MouseMove(rMEvt,GetOutDev()) ) { SetPointer( PointerStyle::Text ); return; // evaluate SdrView's event @@ -4349,7 +4349,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) !rSh.GetViewOptions()->getBrowseMode() && rSh.GetViewOptions()->IsShadowCursor() && !(rMEvt.GetModifier() + rMEvt.GetButtons()) && - !rSh.HasSelection() && !GetConnectMetaFile() ) + !rSh.HasSelection() && !GetOutDev()->GetConnectMetaFile() ) { SwRect aRect; sal_Int16 eOrient; @@ -4426,7 +4426,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if (pSdrView->GetDragMode() != SdrDragMode::Crop && !rMEvt.IsShift()) pSdrView->SetOrtho(false); - if ( pSdrView->MouseButtonUp( rMEvt,this ) ) + if ( pSdrView->MouseButtonUp( rMEvt,GetOutDev() ) ) { rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false); return; // SdrView's event evaluated @@ -4836,7 +4836,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.GetViewOptions()->IsShadowCursor() && MOUSE_LEFT == (rMEvt.GetModifier() + rMEvt.GetButtons()) && !rSh.HasSelection() && - !GetConnectMetaFile() && + !GetOutDev()->GetConnectMetaFile() && rSh.VisArea().IsInside( aDocPt )) { SwUndoId nLastUndoId(SwUndoId::EMPTY); @@ -5777,9 +5777,9 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) } - if (pSdrView->MouseButtonDown( aMEvt, this ) ) + if (pSdrView->MouseButtonDown( aMEvt, GetOutDev() ) ) { - pSdrView->MouseButtonUp( aMEvt, this ); + pSdrView->MouseButtonUp( aMEvt, GetOutDev() ); rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false); return; } diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 0f4a2e1250d8..c2c196c329b8 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -94,7 +94,7 @@ OUString SwEditWin::ClipLongToolTip(const OUString& rText) tools::Long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3; nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width(); if (nTextWidth > nMaxWidth) - sDisplayText = GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis); + sDisplayText = GetOutDev()->GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis); return sDisplayText; } diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 042dcc727eaa..a06b700b12f0 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -523,7 +523,7 @@ void SwSrcEditWindow::CreateTextEngine() vcl::Font aFont; aFont.SetTransparent( false ); aFont.SetFillColor( rCol ); - SetPointFont(*this, aFont); + SetPointFont(*GetOutDev(), aFont); aFont = GetFont(); aFont.SetFillColor( rCol ); m_pOutWin->SetFont( aFont ); @@ -963,11 +963,11 @@ void SwSrcEditWindow::SetFont() if(lcl_GetLanguagesForEncoding(m_eSourceEncoding, aLanguages)) { //TODO: check for multiple languages - aFont = OutputDevice::GetDefaultFont(DefaultFontType::FIXED, aLanguages[0], GetDefaultFontFlags::NONE, this); + aFont = OutputDevice::GetDefaultFont(DefaultFontType::FIXED, aLanguages[0], GetDefaultFontFlags::NONE, GetOutDev()); } else aFont = OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE, - Application::GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this); + Application::GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, GetOutDev()); sFontName = aFont.GetFamilyName(); } const SvxFontListItem* pFontListItem = diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index 2cdefb908f41..7a989b4bff39 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -86,7 +86,6 @@ private: void ImpDoHighlight( const OUString& rSource, sal_uInt16 nLineOff ); - using OutputDevice::SetFont; void SetFont(); DECL_LINK( SyntaxTimerHdl, Timer *, void ); diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index ca3c19239011..1f94564df88e 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -85,7 +85,7 @@ SwCommentRuler::SwCommentRuler(SwViewShell* pViewSh, vcl::Window* pParent, SwEdi , mpSwWin(pWin) , mbIsHighlighted(false) , mnFadeRate(0) - , maVirDev(VclPtr<VirtualDevice>::Create(*this)) + , maVirDev(VclPtr<VirtualDevice>::Create(*GetOutDev())) { // Set fading timeout: 5 x 40ms = 200ms maFadeTimer.SetTimeout(40); diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index d49d3d1433ef..bc1c86fe1a2b 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -335,7 +335,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; std::unique_ptr< svx::ISdrObjectFilter > pFilter( FmFormShell::CreateFocusableControlFilter( - *pDrawView, *pWindow ) ); + *pDrawView, *pWindow->GetOutDev() ) ); if (!pFilter) break; @@ -348,7 +348,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) if ( !pUnoObject ) break; - pFormShell->ToggleControlFocus( *pUnoObject, *pDrawView, *pWindow ); + pFormShell->ToggleControlFocus( *pUnoObject, *pDrawView, *pWindow->GetOutDev() ); } break; case FN_CNTNT_TO_NEXT_FRAME: diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 856dc09f9db3..04ff8a593306 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -170,10 +170,10 @@ SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView , maPaintedPreviewDocRect(tools::Rectangle(0,0,0,0)) , mpPgPreviewLayout(nullptr) { - SetOutDevViewType( OutDevViewType::PrintPreview ); + GetOutDev()->SetOutDevViewType( OutDevViewType::PrintPreview ); SetHelpId(HID_PAGEPREVIEW); - SetFillColor( GetBackground().GetColor() ); - SetLineColor( GetBackground().GetColor()); + GetOutDev()->SetFillColor( GetBackground().GetColor() ); + GetOutDev()->SetLineColor( GetBackground().GetColor()); SetMapMode( MapMode(MapUnit::MapTwip) ); const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(false); @@ -610,7 +610,7 @@ void SwPagePreview::ExecPgUpAndPgDown( const bool _bPgUp, nNewSelectedPageNum = 1; } else - nScrollAmount = - std::min( m_pViewWin->GetOutputSize().Height(), + nScrollAmount = - std::min( m_pViewWin->GetOutDev()->GetOutputSize().Height(), m_pViewWin->GetPaintedPreviewDocRect().Top() ); } else @@ -624,7 +624,7 @@ void SwPagePreview::ExecPgUpAndPgDown( const bool _bPgUp, nNewSelectedPageNum = mnPageCount; } else - nScrollAmount = std::min( m_pViewWin->GetOutputSize().Height(), + nScrollAmount = std::min( m_pViewWin->GetOutDev()->GetOutputSize().Height(), ( pPagePreviewLay->GetPreviewDocSize().Height() - m_pViewWin->GetPaintedPreviewDocRect().Bottom() ) ); } @@ -1304,7 +1304,7 @@ void SwPagePreview::InnerResizePixel( const Point &rOfst, const Size &rSize, bo CalcAndSetBorderPixel( aBorder ); tools::Rectangle aRect( rOfst, rSize ); aRect += aBorder; - ViewResizePixel( *m_pViewWin, aRect.TopLeft(), aRect.GetSize(), + ViewResizePixel( *m_pViewWin->GetOutDev(), aRect.TopLeft(), aRect.GetSize(), m_pViewWin->GetOutputSizePixel(), *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill ); @@ -1333,7 +1333,7 @@ void SwPagePreview::OuterResizePixel( const Point &rOfst, const Size &rSize ) SvBorder aBorderNew; CalcAndSetBorderPixel( aBorderNew ); - ViewResizePixel( *m_pViewWin, rOfst, rSize, m_pViewWin->GetOutputSizePixel(), + ViewResizePixel( *m_pViewWin->GetOutDev(), rOfst, rSize, m_pViewWin->GetOutputSizePixel(), *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill ); } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 3091e5af3bc6..56af6085b6af 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1501,7 +1501,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > Point aTopLeft(aVis.TopLeft()); // make sure the document is still centered const SwTwips lBorder = IsDocumentBorder() ? DOCUMENTBORDER : 2 * DOCUMENTBORDER; - SwTwips nEditWidth = GetEditWin().GetOutputSize().Width(); + SwTwips nEditWidth = GetEditWin().GetOutDev()->GetOutputSize().Width(); if(nEditWidth > (m_aDocSz.Width() + lBorder )) aTopLeft.setX( ( m_aDocSz.Width() + lBorder - nEditWidth ) / 2 ); else diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 6e20aaedf7f6..eaaa780cf02c 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -985,7 +985,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool ) } Size aEditSz( GetEditWin().GetOutputSizePixel() ); - ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, *m_pVScrollbar, + ViewResizePixel( *GetEditWin().GetOutDev(), rOfst, aSz, aEditSz, *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill, m_pVRuler, m_pHRuler, m_pWrtShell->GetViewOptions()->IsVRulerRight()); if ( m_bShowAtResize ) @@ -1081,7 +1081,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) SvBorder aBorder; CalcAndSetBorderPixel( aBorder ); const Size aEditSz( GetEditWin().GetOutputSizePixel() ); - ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, *m_pVScrollbar, + ViewResizePixel( *GetEditWin().GetOutDev(), rOfst, rSize, aEditSz, *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill, m_pVRuler, m_pHRuler, m_pWrtShell->GetViewOptions()->IsVRulerRight() ); if ( m_bShowAtResize ) diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 3059016abdfe..17e29ec02ade 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -463,7 +463,7 @@ SdrObject* SwXTextView::GetControl( SdrObject* pControl = nullptr; if ( pFormShell && pDrawView && pWindow ) - pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill ); + pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow->GetOutDev(), xToFill ); return pControl; } @@ -487,7 +487,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo uno::Reference< form::runtime::XFormController > xController; if ( pFormShell && pDrawView && pWindow ) - xController = FmFormShell::GetFormController( Form, *pDrawView, *pWindow ); + xController = FmFormShell::GetFormController( Form, *pDrawView, *pWindow->GetOutDev() ); return xController; } diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx index 2a9b2a9f3d99..cd208e5b3a08 100644 --- a/sw/source/uibase/utlui/shdwcrsr.cxx +++ b/sw/source/uibase/utlui/shdwcrsr.cxx @@ -57,7 +57,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, tools::Long nHeight, bool bLeft tools::Long nDiff = bLeft ? -1 : 1; while( aPt1.Y() <= aPt2.Y() ) { - pWin->DrawLine( aPt1, aPt2 ); + pWin->GetOutDev()->DrawLine( aPt1, aPt2 ); aPt1.AdjustY( 1 ); aPt2.AdjustY( -1 ); aPt2.setX( aPt1.AdjustX(nDiff ) ); @@ -68,15 +68,15 @@ void SwShadowCursor::DrawCursor( const Point& rPt, tools::Long nHeight, sal_uInt { nHeight = (((nHeight / 4)+1) * 4) + 1; - pWin->Push(); + pWin->GetOutDev()->Push(); pWin->SetMapMode(MapMode(MapUnit::MapPixel)); - pWin->SetRasterOp( RasterOp::Xor ); + pWin->GetOutDev()->SetRasterOp( RasterOp::Xor ); - pWin->SetLineColor( Color( ColorTransparency, sal_uInt32(aCol) ^ sal_uInt32(COL_WHITE) ) ); + pWin->GetOutDev()->SetLineColor( Color( ColorTransparency, sal_uInt32(aCol) ^ sal_uInt32(COL_WHITE) ) ); // 1. The Line: - pWin->DrawLine( Point( rPt.X(), rPt.Y() + 1), + pWin->GetOutDev()->DrawLine( Point( rPt.X(), rPt.Y() + 1), Point( rPt.X(), rPt.Y() - 2 + nHeight )); // 2. The Triangle @@ -85,7 +85,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, tools::Long nHeight, sal_uInt if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Arrow to the left DrawTri( rPt, nHeight, true ); - pWin->Pop(); + pWin->GetOutDev()->Pop(); } void SwShadowCursor::Paint() |