summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 08:17:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 10:03:52 +0100
commit6e1207c9def3af1b979b57c3d19c51a2c33ecf2d (patch)
tree75fdc0b1dc9be6d98def65098f546ca6c81178af /chart2/source
parent91106b5b6153f324399f4fbb74b0f90c6eccc7ec (diff)
loplugin:passstuffbyref in chart2..connectivity
Change-Id: Ic2c6606ea0ce1d5c3089bc4c1a879fed3f2c7aff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/dialogs/ChartResourceGroups.cxx4
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx4
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.hxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx4
-rw-r--r--chart2/source/inc/ChartResourceGroups.hxx4
-rw-r--r--chart2/source/inc/DataBrowserModel.hxx2
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx2
-rw-r--r--chart2/source/view/axes/VAxisBase.hxx2
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx2
9 files changed, 13 insertions, 13 deletions
diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
index a684b481c07d..1e43eb481a36 100644
--- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
+++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
@@ -205,7 +205,7 @@ SplineResourceGroup::SplineResourceGroup(weld::Builder* pBuilder, weld::Window*
m_xLB_LineType->connect_changed(LINK(this, SplineResourceGroup, LineTypeChangeHdl));
}
-std::shared_ptr<SplinePropertiesDialog> SplineResourceGroup::getSplinePropertiesDialog()
+const std::shared_ptr<SplinePropertiesDialog>& SplineResourceGroup::getSplinePropertiesDialog()
{
if (!m_xSplinePropertiesDialog)
{
@@ -214,7 +214,7 @@ std::shared_ptr<SplinePropertiesDialog> SplineResourceGroup::getSplineProperties
return m_xSplinePropertiesDialog;
}
-std::shared_ptr<SteppedPropertiesDialog> SplineResourceGroup::getSteppedPropertiesDialog()
+const std::shared_ptr<SteppedPropertiesDialog>& SplineResourceGroup::getSteppedPropertiesDialog()
{
if (!m_xSteppedPropertiesDialog)
{
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index b80dcf2043e0..c7b751c944c9 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -663,12 +663,12 @@ void DataBrowser::RenewTable()
Invalidate();
}
-OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
+const OUString & DataBrowser::GetColString( sal_Int32 nColumnId ) const
{
OSL_ASSERT(m_apDataBrowserModel);
if( nColumnId > 0 )
return m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 );
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString DataBrowser::GetCellText( sal_Int32 nRow, sal_uInt16 nColumnId ) const
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index c1d6a72e6cf8..46c62ba63e3c 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -174,7 +174,7 @@ private:
void RenewTable();
void ImplAdjustHeaderControls();
- OUString GetColString( sal_Int32 nColumnId ) const;
+ const OUString & GetColString( sal_Int32 nColumnId ) const;
DECL_LINK( SeriesHeaderGotFocus, impl::SeriesHeaderEdit&, void );
DECL_LINK( SeriesHeaderChanged, impl::SeriesHeaderEdit&, void );
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 9f01c68f61fc..1f04f29ae69f 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -708,12 +708,12 @@ sal_Int32 DataBrowserModel::getMaxRowCount() const
return nResult;
}
-OUString DataBrowserModel::getRoleOfColumn( sal_Int32 nColumnIndex ) const
+const OUString & DataBrowserModel::getRoleOfColumn( sal_Int32 nColumnIndex ) const
{
if( nColumnIndex != -1 &&
o3tl::make_unsigned( nColumnIndex ) < m_aColumns.size())
return m_aColumns[ nColumnIndex ].m_aUIRoleName;
- return OUString();
+ return EMPTY_OUSTRING;
}
bool DataBrowserModel::isCategoriesColumn( sal_Int32 nColumnIndex ) const
diff --git a/chart2/source/inc/ChartResourceGroups.hxx b/chart2/source/inc/ChartResourceGroups.hxx
index ecb886f194af..9b6d5ee267f7 100644
--- a/chart2/source/inc/ChartResourceGroups.hxx
+++ b/chart2/source/inc/ChartResourceGroups.hxx
@@ -112,8 +112,8 @@ private:
DECL_LINK(LineTypeChangeHdl, weld::ComboBox&, void);
DECL_LINK(SplineDetailsDialogHdl, weld::Button&, void);
DECL_LINK(SteppedDetailsDialogHdl, weld::Button&, void);
- std::shared_ptr<SplinePropertiesDialog> getSplinePropertiesDialog();
- std::shared_ptr<SteppedPropertiesDialog> getSteppedPropertiesDialog();
+ const std::shared_ptr<SplinePropertiesDialog>& getSplinePropertiesDialog();
+ const std::shared_ptr<SteppedPropertiesDialog>& getSteppedPropertiesDialog();
private:
weld::Window* m_pParent;
diff --git a/chart2/source/inc/DataBrowserModel.hxx b/chart2/source/inc/DataBrowserModel.hxx
index 16acb2de0b07..f5b2d80070ad 100644
--- a/chart2/source/inc/DataBrowserModel.hxx
+++ b/chart2/source/inc/DataBrowserModel.hxx
@@ -98,7 +98,7 @@ public:
sal_Int32 getMaxRowCount() const;
// returns the UI string of the corresponding role
- OUString getRoleOfColumn( sal_Int32 nColumnIndex ) const;
+ const OUString & getRoleOfColumn( sal_Int32 nColumnIndex ) const;
bool isCategoriesColumn( sal_Int32 nColumnIndex ) const;
struct tDataHeader
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index e555fb7ab021..94ad117b87b0 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -68,7 +68,7 @@ public:
SAL_DLLPRIVATE virtual css::uno::Reference< css::frame::XModel >
createUnoModel() override;
- SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel >
+ SAL_DLLPRIVATE const css::uno::Reference< css::frame::XModel > &
getUnoModel();
SdrModel& getSdrModel();
diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx
index 4ee4f5e288ae..4b1a8de92750 100644
--- a/chart2/source/view/axes/VAxisBase.hxx
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -70,7 +70,7 @@ public:
rtl::Reference<::chart::ChartModel> const& xChartDoc,
css::uno::Reference<css::uno::XComponentContext> const& rComponentContext);
- std::shared_ptr<DataTableView> getDataTableView() { return m_pDataTableView; }
+ const std::shared_ptr<DataTableView> & getDataTableView() { return m_pDataTableView; }
protected: //methods
static size_t getIndexOfLongestLabel( const css::uno::Sequence<OUString>& rLabels );
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 71cd8d699cf7..8c418ec2374d 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -127,7 +127,7 @@ uno::Reference< frame::XModel > DrawModelWrapper::createUnoModel()
return new SvxUnoDrawingModel( this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid link problems in writer
}
-uno::Reference< frame::XModel > DrawModelWrapper::getUnoModel()
+const uno::Reference< frame::XModel > & DrawModelWrapper::getUnoModel()
{
return SdrModel::getUnoModel();
}