AccessibleShapeTreeInfo needs a vcl::Window
no point in passing an OutputDevice there Change-Id: I6da9b29a0e6f57ad6a8ebcb6113987ee25419483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108988 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
621c189173
commit
fc0002ccf2
@@ -51,7 +51,7 @@ AccessibleChartShape::AccessibleChartShape(
|
||||
|
||||
m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView );
|
||||
m_aShapeTreeInfo.SetController( nullptr );
|
||||
m_aShapeTreeInfo.SetDevice( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
|
||||
m_aShapeTreeInfo.SetWindow( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
|
||||
m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder );
|
||||
|
||||
::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance();
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
/** Set the window that is used to construct SvxTextEditSources which in
|
||||
turn is used to create accessible edit engines.
|
||||
*/
|
||||
void SetDevice(OutputDevice* pWindow);
|
||||
void SetWindow(vcl::Window* pWindow);
|
||||
|
||||
/** Return the current Window.
|
||||
@return
|
||||
@@ -142,11 +142,8 @@ public:
|
||||
*/
|
||||
vcl::Window* GetWindow() const
|
||||
{
|
||||
if (mpWindow && mpWindow->GetOutDevType() == OUTDEV_WINDOW)
|
||||
return static_cast<vcl::Window*>(mpWindow.get());
|
||||
return nullptr;
|
||||
return mpWindow.get();
|
||||
}
|
||||
OutputDevice* GetDevice() const { return mpWindow;}
|
||||
|
||||
/** The view forwarder allows the transformation between internal
|
||||
and pixel coordinates and can be asked for the visible area.
|
||||
@@ -188,7 +185,7 @@ private:
|
||||
/** This window is necessary to construct an SvxTextEditSource which in
|
||||
turn is used to create an accessible edit engine.
|
||||
*/
|
||||
VclPtr<OutputDevice> mpWindow;
|
||||
VclPtr<vcl::Window> mpWindow;
|
||||
|
||||
/** The view forwarder allows the transformation between internal
|
||||
and pixel coordinates and can be asked for the visible area.
|
||||
|
||||
@@ -331,7 +331,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
|
||||
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument().GetDrawLayer()) );
|
||||
maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
|
||||
maShapeTreeInfo.SetController(nullptr);
|
||||
maShapeTreeInfo.SetDevice(pViewShell->GetWindowByPos(meSplitPos));
|
||||
maShapeTreeInfo.SetWindow(pViewShell->GetWindowByPos(meSplitPos));
|
||||
maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
|
||||
}
|
||||
}
|
||||
@@ -364,7 +364,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
|
||||
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument().GetDrawLayer()) );
|
||||
maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
|
||||
maShapeTreeInfo.SetController(nullptr);
|
||||
maShapeTreeInfo.SetDevice(mpViewShell->GetWindowByPos(meSplitPos));
|
||||
maShapeTreeInfo.SetWindow(mpViewShell->GetWindowByPos(meSplitPos));
|
||||
maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi
|
||||
::accessibility::AccessibleShapeTreeInfo aShapeTreeInfo;
|
||||
aShapeTreeInfo.SetSdrView(mpViewShell->GetPreview()->GetDrawView());
|
||||
aShapeTreeInfo.SetController(nullptr);
|
||||
aShapeTreeInfo.SetDevice(mpViewShell->GetWindow());
|
||||
aShapeTreeInfo.SetWindow(mpViewShell->GetWindow());
|
||||
aShapeTreeInfo.SetViewForwarder(&(maShapeRanges[rShape.mnRangeId].maViewForwarder));
|
||||
rShape.mpAccShape = rShapeHandler.CreateAccessibleObject(aShapeInfo, aShapeTreeInfo);
|
||||
if (rShape.mpAccShape.is())
|
||||
|
||||
@@ -81,7 +81,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
|
||||
mxModel, uno::UNO_QUERY_THROW));
|
||||
maShapeTreeInfo.SetController (mxController);
|
||||
maShapeTreeInfo.SetSdrView (pViewShell->GetView());
|
||||
maShapeTreeInfo.SetDevice (pSdWindow);
|
||||
maShapeTreeInfo.SetWindow (pSdWindow);
|
||||
maShapeTreeInfo.SetViewForwarder (&maViewForwarder);
|
||||
|
||||
mxWindow = ::VCLUnoHelper::GetInterface (pSdWindow);
|
||||
|
||||
@@ -186,7 +186,7 @@ void AccessibleControlShape::Init()
|
||||
// I'm aware of at the moment...
|
||||
|
||||
// get the control which belongs to our model (relative to our view)
|
||||
const OutputDevice* pViewWindow = maShapeTreeInfo.GetDevice();
|
||||
const vcl::Window* pViewWindow = maShapeTreeInfo.GetWindow();
|
||||
SdrUnoObj* pUnoObjectImpl = dynamic_cast<SdrUnoObj*>( GetSdrObjectFromXShape(mxShape) );
|
||||
SdrView* pView = maShapeTreeInfo.GetSdrView();
|
||||
OSL_ENSURE( pView && pViewWindow && pUnoObjectImpl, "AccessibleControlShape::Init: no view, or no view window, no SdrUnoObj!" );
|
||||
@@ -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.GetDevice(), maShapeTreeInfo.GetSdrView() );
|
||||
Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() );
|
||||
if ( xContainer.is() )
|
||||
{
|
||||
m_bWaitingForControl = false;
|
||||
|
||||
@@ -102,7 +102,7 @@ void AccessibleShapeTreeInfo::SetController (
|
||||
mxController = rxController;
|
||||
}
|
||||
|
||||
void AccessibleShapeTreeInfo::SetDevice(OutputDevice* pDevice)
|
||||
void AccessibleShapeTreeInfo::SetWindow(vcl::Window* pDevice)
|
||||
{
|
||||
mpWindow = pDevice;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext(
|
||||
}
|
||||
|
||||
maTreeInfo.SetSdrView( mpView );
|
||||
maTreeInfo.SetDevice(&mpControl->GetDrawingArea()->get_ref_device());
|
||||
maTreeInfo.SetWindow(&dynamic_cast<vcl::Window&>(mpControl->GetDrawingArea()->get_ref_device()));
|
||||
maTreeInfo.SetViewForwarder( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ public:
|
||||
: maMap()
|
||||
{
|
||||
maInfo.SetSdrView( pMap->GetShell()->GetDrawView() );
|
||||
maInfo.SetDevice( pMap->GetShell()->GetWin() );
|
||||
maInfo.SetWindow( pMap->GetShell()->GetWin() );
|
||||
maInfo.SetViewForwarder( pMap );
|
||||
uno::Reference < document::XShapeEventBroadcaster > xModelBroadcaster =
|
||||
new SwDrawModellListener_Impl(
|
||||
|
||||
Reference in New Issue
Block a user