diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-01-25 20:25:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-25 20:21:48 +0100 |
commit | 1aa31294b2d3fb562ba33d5d873da62439944f07 (patch) | |
tree | 79a604d51b0c54768c07ed8c4643cf43b29d8fca /chart2 | |
parent | 2dbc9266ec2207c2719c0104168cfcad9f6948da (diff) |
avoid some ref-counting
can just return a pointer here, instead of VclPtr.
Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/inc/ChartController.hxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index 8f4d9ade8af2..582573dc7612 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -327,7 +327,7 @@ public: ViewElementListProvider getViewElementListProvider(); DrawModelWrapper* GetDrawModelWrapper(); DrawViewWrapper* GetDrawViewWrapper(); - VclPtr<ChartWindow> GetChartWindow() const; + ChartWindow* GetChartWindow() const; weld::Window* GetChartFrame(); bool isAdditionalShapeSelected() const; void SetAndApplySelection(const css::uno::Reference<css::drawing::XShape>& rxShape); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 219ad91cfa70..be8dffbaee44 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -431,7 +431,7 @@ void SAL_CALL ChartController::attachFrame( if (pParentComponent) pParentComponent->setVisible(true); - pParent = VCLUnoHelper::GetWindow( xContainerWindow ).get(); + pParent = VCLUnoHelper::GetWindow( xContainerWindow ); } { @@ -1514,7 +1514,7 @@ DrawViewWrapper* ChartController::GetDrawViewWrapper() } -VclPtr<ChartWindow> ChartController::GetChartWindow() const +ChartWindow* ChartController::GetChartWindow() const { // clients getting the naked VCL Window from UNO should always have the // solar mutex (and keep it over the lifetime of this ptr), as VCL might @@ -1522,7 +1522,7 @@ VclPtr<ChartWindow> ChartController::GetChartWindow() const DBG_TESTSOLARMUTEX(); if(!m_xViewWindow.is()) return nullptr; - return dynamic_cast<ChartWindow*>(VCLUnoHelper::GetWindow(m_xViewWindow).get()); + return dynamic_cast<ChartWindow*>(VCLUnoHelper::GetWindow(m_xViewWindow)); } weld::Window* ChartController::GetChartFrame() |