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 /svx/source/accessibility | |
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 'svx/source/accessibility')
-rw-r--r-- | svx/source/accessibility/AccessibleControlShape.cxx | 6 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 4 | ||||
-rw-r--r-- | svx/source/accessibility/GraphCtlAccessibleContext.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 5875601d45b9..c23cb16faeca 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -195,7 +195,7 @@ void AccessibleControlShape::Init() if ( pView && pViewWindow && pUnoObjectImpl ) { // get the context of the control - it will be our "inner" context - m_xUnoControl = pUnoObjectImpl->GetUnoControl( *pView, *pViewWindow ); + m_xUnoControl = pUnoObjectImpl->GetUnoControl( *pView, *pViewWindow->GetOutDev() ); if ( !m_xUnoControl.is() ) { @@ -207,7 +207,7 @@ void AccessibleControlShape::Init() // Okay, we will add as listener to the control container where we expect our control to appear. OSL_ENSURE( !m_bWaitingForControl, "AccessibleControlShape::Init: already waiting for the control!" ); - Reference< XContainer > xControlContainer = lcl_getControlContainer( pViewWindow, maShapeTreeInfo.GetSdrView() ); + Reference< XContainer > xControlContainer = lcl_getControlContainer( pViewWindow->GetOutDev(), maShapeTreeInfo.GetSdrView() ); OSL_ENSURE( xControlContainer.is(), "AccessibleControlShape::Init: unable to find my ControlContainer!" ); if ( xControlContainer.is() ) { @@ -632,7 +632,7 @@ void SAL_CALL AccessibleControlShape::disposing() if ( m_bWaitingForControl ) { OSL_FAIL( "AccessibleControlShape::disposing: this should never happen!" ); - Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() ); + Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow()->GetOutDev(), maShapeTreeInfo.GetSdrView() ); if ( xContainer.is() ) { m_bWaitingForControl = false; diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 8264e40f98bb..28cb6b7b768f 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -160,12 +160,12 @@ void AccessibleShape::Init() if( !hasOutlinerParaObject ) { // empty text -> use proxy edit source to delay creation of EditEngine - mpText.reset( new AccessibleTextHelper( std::make_unique<AccessibleEmptyEditSource >(*pSdrObject, *pView, *pWindow) ) ); + mpText.reset( new AccessibleTextHelper( std::make_unique<AccessibleEmptyEditSource >(*pSdrObject, *pView, *pWindow->GetOutDev()) ) ); } else { // non-empty text -> use full-fledged edit source right away - mpText.reset( new AccessibleTextHelper( std::make_unique<SvxTextEditSource >(*pSdrObject, nullptr, *pView, *pWindow) ) ); + mpText.reset( new AccessibleTextHelper( std::make_unique<SvxTextEditSource >(*pSdrObject, nullptr, *pView, *pWindow->GetOutDev()) ) ); } if( pWindow->HasFocus() ) mpText->SetFocus(); diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 660aebfd18e4..98484033820e 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -92,7 +92,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( } maTreeInfo.SetSdrView( mpView ); - maTreeInfo.SetWindow(&dynamic_cast<vcl::Window&>(mpControl->GetDrawingArea()->get_ref_device())); + maTreeInfo.SetWindow(mpControl->GetDrawingArea()->get_ref_device().GetOwnerWindow()); maTreeInfo.SetViewForwarder( this ); } |