diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-01-18 18:27:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-17 12:56:51 +0200 |
commit | 9090dc1f3b27195f5defd35586ac79357992be21 (patch) | |
tree | d39f4b624ae337d5c9ce76eba8521b76e53afa05 /sd/source/ui/func | |
parent | c8cf2e0e088b74afa52564945a9c005b3b86bf7e (diff) |
split OutputDevice from Window
as part of a longer-term goal of doing our
widget rendering only inside a top-level render-
context.
I moved all of the OutputDevice-related code that existed in vcl::Window
into a new subclass of OutputDevice called WindowOutputDevice.
Notes for further work
(*) not sure why we are getting an 1x1 surface in
SvpSalGraphics::releaseCairoContext, but to fix it I clamp
the size there
(*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice
(*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code?
Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fudraw.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fuediglu.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index f88c0d6bf463..e9eb1b2bacef 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -172,7 +172,7 @@ bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt) } else { - mpView->MouseButtonDown(rMEvt, mpWindow); + mpView->MouseButtonDown(rMEvt, mpWindow->GetOutDev()); SdrObject* pObj = mpView->GetCreateObj(); @@ -204,7 +204,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) } else { - mpView->MouseButtonUp(rMEvt, mpWindow); + mpView->MouseButtonUp(rMEvt, mpWindow->GetOutDev()); } if (aVEvt.eEvent == SdrEventKind::EndCreate) diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 2156624f4508..18cd90fb77e6 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -193,7 +193,7 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt) // look only for HelpLines when they are visible (!) bool bHelpLine(false); if(mpView->IsHlplVisible()) - bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV); + bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow->GetOutDev(), nHelpLine, pPV); bool bHitHdl = (mpView->PickHandle(aMDPos) != nullptr); if ( bHelpLine @@ -257,7 +257,7 @@ bool FuDraw::MouseMove(const MouseEvent& rMEvt) mpView->MovDragHelpLine(aPos); } - bool bReturn = mpView->MouseMove(rMEvt, mpWindow); + bool bReturn = mpView->MouseMove(rMEvt, mpWindow->GetOutDev()); if (mpView->IsAction()) { @@ -571,7 +571,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if (bDefPointer) { mpWindow->SetPointer(mpView->GetPreferredPointer( - aPnt, mpWindow, nModifier, bLeftDown)); + aPnt, mpWindow->GetOutDev(), nModifier, bLeftDown)); } } diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index efbf255f3ef2..25f4b9cf4b66 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -74,7 +74,7 @@ FuEditGluePoints::~FuEditGluePoints() bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) { - mpView->SetActualWin( mpWindow ); + mpView->SetActualWin( mpWindow->GetOutDev() ); bool bReturn = FuDraw::MouseButtonDown(rMEvt); @@ -196,7 +196,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt) { - mpView->SetActualWin( mpWindow ); + mpView->SetActualWin( mpWindow->GetOutDev() ); FuDraw::MouseMove(rMEvt); @@ -215,7 +215,7 @@ bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt) bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt) { - mpView->SetActualWin( mpWindow ); + mpView->SetActualWin( mpWindow->GetOutDev() ); bool bReturn = false; @@ -255,7 +255,7 @@ bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt) */ bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt) { - mpView->SetActualWin( mpWindow ); + mpView->SetActualWin( mpWindow->GetOutDev() ); //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point, //and SHIFT+ENTER key to decide the position and draw the new insert point @@ -362,7 +362,7 @@ void FuEditGluePoints::ForcePointer(const MouseEvent* pMEvt) bool FuEditGluePoints::Command(const CommandEvent& rCEvt) { - mpView->SetActualWin( mpWindow ); + mpView->SetActualWin( mpWindow->GetOutDev() ); return FuPoor::Command( rCEvt ); } diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 9913f9635181..b4e93d7b41e1 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -84,7 +84,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) { aLinePos = mpWindow->PixelToLogic(aLinePos); sal_uInt16 nHitLog = static_cast<sal_uInt16>(mpWindow->PixelToLogic(Size(HITPIX,0)).Width()); - bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, nHelpLine, pPV); + bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow->GetOutDev(), nHelpLine, pPV); if ( bLineExist ) aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); else diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 11e97a3bc7ed..ec04594d3d95 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -278,7 +278,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if (eHit == SdrHitKind::TextEdit) { // hit text -> SdrView handles event - if (mpView->MouseButtonDown(rMEvt, mpWindow)) + if (mpView->MouseButtonDown(rMEvt, mpWindow->GetOutDev())) return true; } @@ -626,7 +626,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); - if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 ) + if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow->GetOutDev())) || rMEvt.GetClicks() == 2 ) return true; // handle event from SdrView bool bEmptyTextObj = false; |