summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-23 21:00:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 09:03:09 +0200
commitf693d23170036bd6116458e655c2f3b34b3cd926 (patch)
tree726814bacdafc9471362b8de4f893990ea66c192
parentb4e1389f7abecbd8b323d9c4653ee506054a1f85 (diff)
loplugin:returnconstval in unotools
Change-Id: I8bfc0d52c8a68268a12e3dab890402d964d48eba Reviewed-on: https://gerrit.libreoffice.org/78036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/unotools/localedatawrapper.hxx2
-rw-r--r--unotools/source/config/lingucfg.cxx6
-rw-r--r--unotools/source/config/misccfg.cxx8
-rw-r--r--unotools/source/config/syslocaleoptions.cxx4
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx2
5 files changed, 10 insertions, 12 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 04650e29f7b6..fd0e457943eb 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -211,7 +211,7 @@ public:
Indian grouping. The sal_Int32* getConstArray() can be passed directly
to the ::rtl::math::doubleToString() methods as argument for the
pGroups parameter. */
- const css::uno::Sequence< sal_Int32 > getDigitGrouping() const;
+ css::uno::Sequence< sal_Int32 > getDigitGrouping() const;
// Functionality of class International methods, LocaleItem
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 70efeba7b6c5..7c7a6b700cc8 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -68,7 +68,7 @@ static bool lcl_SetLocale( LanguageType &rLanguage, const uno::Any &rVal )
return bSucc;
}
-static const OUString lcl_LanguageToCfgLocaleStr( LanguageType nLanguage )
+static OUString lcl_LanguageToCfgLocaleStr( LanguageType nLanguage )
{
OUString aRes;
if (LANGUAGE_SYSTEM != nLanguage)
@@ -148,7 +148,7 @@ class SvtLinguConfigItem : public utl::ConfigItem
SvtLinguOptions aOpt;
static bool GetHdlByName( sal_Int32 &rnHdl, const OUString &rPropertyName, bool bFullPropName = false );
- static const uno::Sequence< OUString > GetPropertyNames();
+ static uno::Sequence< OUString > GetPropertyNames();
void LoadOptions( const uno::Sequence< OUString > &rProperyNames );
bool SaveOptions( const uno::Sequence< OUString > &rProperyNames );
@@ -256,7 +256,7 @@ static struct NamesToHdl
{ nullptr, nullptr, -1}
};
-const uno::Sequence< OUString > SvtLinguConfigItem::GetPropertyNames()
+uno::Sequence< OUString > SvtLinguConfigItem::GetPropertyNames()
{
uno::Sequence< OUString > aNames;
diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx
index e8bf4023479f..4941773afb65 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -44,7 +44,7 @@ private:
bool bNotFound;
sal_Int32 nYear2000; // two digit year representation
- static const css::uno::Sequence<OUString> GetPropertyNames();
+ static css::uno::Sequence<OUString> GetPropertyNames();
void Load();
virtual void ImplCommit() final override;
@@ -114,17 +114,15 @@ void SfxMiscCfg::SetYear2000( sal_Int32 nSet )
nYear2000 = nSet;
}
-const Sequence<OUString> SfxMiscCfg::GetPropertyNames()
+Sequence<OUString> SfxMiscCfg::GetPropertyNames()
{
- const OUString pProperties[] =
+ return
{
OUString("Print/Warning/PaperSize"),
OUString("Print/Warning/PaperOrientation"),
OUString("Print/Warning/NotFound"),
OUString("DateFormat/TwoDigitYear")
};
- const Sequence< OUString > seqPropertyNames( pProperties, 4 );
- return seqPropertyNames;
}
void SfxMiscCfg::Load()
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 1876855d1008..f3942f5b7c4d 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -75,7 +75,7 @@ class SvtSysLocaleOptions_Impl : public utl::ConfigItem
bool m_bRODecimalSeparator;
bool m_bROIgnoreLanguageChange;
- static const Sequence< /* const */ OUString > GetPropertyNames();
+ static Sequence<OUString> GetPropertyNames();
void MakeRealLocale();
void MakeRealUILocale();
@@ -128,7 +128,7 @@ public:
#define PROPERTYHANDLE_DATEPATTERNS 4
#define PROPERTYHANDLE_IGNORELANGCHANGE 5
-const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames()
+Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames()
{
return Sequence< OUString >
{
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 8a16ec556f47..ec306acfa07a 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -1079,7 +1079,7 @@ void LocaleDataWrapper::getDigitGroupingImpl()
}
}
-const css::uno::Sequence< sal_Int32 > LocaleDataWrapper::getDigitGrouping() const
+css::uno::Sequence< sal_Int32 > LocaleDataWrapper::getDigitGrouping() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if (!aGrouping.hasElements() || aGrouping[0] == 0)