diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-25 08:14:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-30 12:32:14 +0100 |
commit | 8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch) | |
tree | dd45d452202998297b8562743ea6345462304d04 /reportdesign/source | |
parent | d05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff) |
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/sdr/formatnormalizer.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/formatnormalizer.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/ReportController.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx index 0db0bcac38e8..195582503839 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.cxx +++ b/reportdesign/source/core/sdr/formatnormalizer.cxx @@ -109,18 +109,18 @@ namespace rptui } - void FormatNormalizer::impl_onDefinitionPropertyChange( const OUString& _rChangedPropName ) + void FormatNormalizer::impl_onDefinitionPropertyChange( std::u16string_view _rChangedPropName ) { - if ( _rChangedPropName != "Command" && _rChangedPropName != "CommandType" && _rChangedPropName != "EscapeProcessing" ) + if ( _rChangedPropName != u"Command" && _rChangedPropName != u"CommandType" && _rChangedPropName != u"EscapeProcessing" ) // nothing we're interested in return; m_bFieldListDirty = true; } - void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, const OUString& _rChangedPropName ) + void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, std::u16string_view _rChangedPropName ) { - if ( _rChangedPropName != "DataField" ) + if ( _rChangedPropName != u"DataField" ) // nothing we're interested in return; diff --git a/reportdesign/source/core/sdr/formatnormalizer.hxx b/reportdesign/source/core/sdr/formatnormalizer.hxx index d6249b4c1913..0ed30df3edfe 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.hxx +++ b/reportdesign/source/core/sdr/formatnormalizer.hxx @@ -69,8 +69,8 @@ namespace rptui private: bool impl_lateInit(); - void impl_onDefinitionPropertyChange( const OUString& _rChangedPropName ); - void impl_onFormattedProperttyChange( const css::uno::Reference< css::report::XFormattedField >& _rxFormatted, const OUString& _rChangedPropName ); + void impl_onDefinitionPropertyChange( std::u16string_view _rChangedPropName ); + void impl_onFormattedProperttyChange( const css::uno::Reference< css::report::XFormattedField >& _rxFormatted, std::u16string_view _rChangedPropName ); bool impl_ensureUpToDateFieldList_nothrow(); diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 9918cd22abcc..baa7a948f37e 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -128,7 +128,7 @@ Condition::Condition(weld::Container* pParent, weld::Window* pDialog, ICondition ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions ); } -sal_uInt16 Condition::mapToolbarItemToSlotId(const OString& rItemId) +sal_uInt16 Condition::mapToolbarItemToSlotId(std::string_view rItemId) { if (rItemId == "bold") return SID_ATTR_CHAR_WEIGHT; diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx index fe6fbb707356..02d26921bc62 100644 --- a/reportdesign/source/ui/dlg/Condition.hxx +++ b/reportdesign/source/ui/dlg/Condition.hxx @@ -141,7 +141,7 @@ namespace rptui ::rptui::OReportController& getController() const { return m_rController; } - static sal_uInt16 mapToolbarItemToSlotId(const OString& rItemId); + static sal_uInt16 mapToolbarItemToSlotId(std::string_view rItemId); css::uno::Reference<css::awt::XWindow> GetXWindow() const { return m_pDialog->GetXWindow(); } diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 13e5daebedec..d0a2a0670e81 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -242,7 +242,7 @@ NavigatorTree::~NavigatorTree() namespace { - sal_uInt16 mapIdent(const OString& rIdent) + sal_uInt16 mapIdent(std::string_view rIdent) { if (rIdent == "sorting") return SID_SORTINGANDGROUPING; diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index 326c5ff0308c..80685623f126 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -190,7 +190,7 @@ namespace rptui @param _bShow when <TRUE/> the header and footer will be shown otherwise not */ void groupChange( const css::uno::Reference< css::report::XGroup>& _xGroup - ,const OUString& _sPropName + ,std::u16string_view _sPropName ,sal_Int32 _nGroupPos ,bool _bShow); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index cae05f329d5a..7613e7bcd09c 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2267,7 +2267,7 @@ static sal_uInt16 lcl_getNonVisibleGroupsBefore( const uno::Reference< report::X return nNonVisibleGroups; } -void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,const OUString& _sPropName,sal_Int32 _nGroupPos,bool _bShow) +void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,std::u16string_view _sPropName,sal_Int32 _nGroupPos,bool _bShow) { ::std::function<bool(OGroupHelper *)> pMemFun = ::std::mem_fn(&OGroupHelper::getHeaderOn); ::std::function<uno::Reference<report::XSection>(OGroupHelper *)> pMemFunSection = ::std::mem_fn(&OGroupHelper::getHeader); |