summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-24 08:54:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-24 15:06:24 +0100
commitceb8f5d62c7afc5547c9a6de8eb570a11b5fbd67 (patch)
tree2782cb4bb3adfe5ad11caa8f5a9c18b82bb03ee4 /svl
parent86fac2109d3b5e159628aee6392ecc856fb8a5a6 (diff)
loplugin:constantparam
Change-Id: I86592be0717c062a918108bf4437074b0f70b372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/adrparse.cxx30
-rw-r--r--svl/source/numbers/numfmuno.cxx2
2 files changed, 8 insertions, 24 deletions
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index a0cdcfdfc022..19e869a09289 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -88,7 +88,7 @@ class SvAddressParser_Impl
bool readToken();
static OUString reparse(sal_Unicode const * pBegin,
- sal_Unicode const * pEnd, bool bAddrSpec);
+ sal_Unicode const * pEnd);
public:
SvAddressParser_Impl(SvAddressParser * pParser, const OUString& rIn);
@@ -245,12 +245,11 @@ bool SvAddressParser_Impl::readToken()
// static
OUString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin,
- sal_Unicode const * pEnd, bool bAddrSpec)
+ sal_Unicode const * pEnd)
{
OUStringBuffer aResult;
TokenType eMode = TOKEN_ATOM;
bool bEscaped = false;
- bool bEndsWithSpace = false;
int nLevel = 0;
while (pBegin < pEnd)
{
@@ -265,14 +264,12 @@ OUString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin,
}
else if (cChar == '"')
{
- if (bAddrSpec)
- aResult.append(cChar);
+ aResult.append(cChar);
eMode = TOKEN_ATOM;
}
else if (cChar == '\\')
{
- if (bAddrSpec)
- aResult.append(cChar);
+ aResult.append(cChar);
bEscaped = true;
}
else
@@ -292,8 +289,7 @@ OUString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin,
}
else if (cChar == '\\')
{
- if (bAddrSpec)
- aResult.append(cChar);
+ aResult.append(cChar);
bEscaped = true;
}
else
@@ -317,28 +313,16 @@ OUString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin,
case TOKEN_ATOM:
if (cChar <= ' ' || cChar == 0x7F) // DEL
{
- if (!bAddrSpec && !bEndsWithSpace)
- {
- aResult.append(' ');
- bEndsWithSpace = true;
- }
}
else if (cChar == '(')
{
- if (!bAddrSpec && !bEndsWithSpace)
- {
- aResult.append(' ');
- bEndsWithSpace = true;
- }
eMode = TOKEN_COMMENT;
}
else
{
- bEndsWithSpace = false;
if (cChar == '"')
{
- if (bAddrSpec)
- aResult.append(cChar);
+ aResult.append(cChar);
eMode = TOKEN_QUOTED;
}
else if (cChar == '[')
@@ -502,7 +486,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
{
OUString aTheAddrSpec;
if (m_pAddrSpec->m_bReparse)
- aTheAddrSpec = reparse(m_pAddrSpec->m_pBegin, m_pAddrSpec->m_pEnd, true);
+ aTheAddrSpec = reparse(m_pAddrSpec->m_pBegin, m_pAddrSpec->m_pEnd);
else
{
sal_Int32 nLen = m_pAddrSpec->m_pEnd - m_pAddrSpec->m_pBegin;
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 84812f9c5eef..a17a71a81947 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -97,7 +97,7 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap()
static LanguageType lcl_GetLanguage( const lang::Locale& rLocale )
{
- LanguageType eRet = LanguageTag::convertToLanguageTypeWithFallback( rLocale, false);
+ LanguageType eRet = LanguageTag::convertToLanguageTypeWithFallback( rLocale );
if ( eRet == LANGUAGE_NONE )
eRet = LANGUAGE_SYSTEM; //! or throw an exception?