summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-07-29 09:23:41 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-07-29 15:21:39 +0200
commit18ed2be7f1406b879c1add35f8f86e68202d0876 (patch)
tree917fdba0b44fa0bc2427262323503726880b91df /chart2/source/controller
parentc39978f41dccbeb2e973c919a67d9b1d974f8f3c (diff)
Prevent rtl::Reference -> css::uno::Reference -> rtl::Reference implicit path
Replace up-casting conversion constructor with respective conversion operator, similar to existing css::uno::Reference conversion operator. Thic change will not allow code like rtl::Reference<Foo> foo; rtl::Reference<Foo> bar(foo, uno::UNO_QUERY_THROW); which was possible because compiler could use temporary css::uno::Reference. Change-Id: I54b79af3e2508b26e9cd59f2cc7e2ae92f6efbbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171166 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 12d22805790f..c8e70ac142d2 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -49,7 +49,7 @@ namespace chart
CreationWizard::CreationWizard(weld::Window* pParent, const rtl::Reference<::chart::ChartModel>& xChartModel,
uno::Reference<uno::XComponentContext> xContext)
: vcl::RoadmapWizardMachine(pParent)
- , m_xChartModel(xChartModel,uno::UNO_QUERY)
+ , m_xChartModel(xChartModel)
, m_xComponentContext(std::move(xContext))
, m_pTemplateProvider(nullptr)
, m_aTimerTriggeredControllerLock(xChartModel)
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 63577edf3920..1e0c8c3dc96f 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -34,8 +34,7 @@ namespace chart
void ChartController::executeDispatch_EditData()
{
- rtl::Reference<::chart::ChartModel> xChartDoc( getChartModel(), uno::UNO_QUERY );
- if (xChartDoc.is())
+ if (rtl::Reference<::chart::ChartModel> xChartDoc = getChartModel())
{
SolarMutexGuard aSolarGuard;
UndoLiveUpdateGuardWithData aUndoGuard(