sw/inc/numrule.hxx               |    1 -
 sw/source/core/doc/number.cxx    |   19 ++++---------------
 sw/source/core/txtnode/ndtxt.cxx |    1 -
 3 files changed, 4 insertions(+), 17 deletions(-)

New commits:
commit 9e12f49c6c1683f9a7545cc0b7f1082110d27df9
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Mar 24 10:41:57 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Mar 24 19:55:07 2022 +0100

    loplugin:constantparam
    
    Change-Id: I48abe56cc6be52b2a3cd0998e79e6643f65bbbf0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132032
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index e10603a7e3dc..5003ab22e928 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -168,7 +168,6 @@ public:
          restrict returned string to this level. */
     OUString MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
                           const bool bInclStrings = true,
-                          const bool bOnlyArabic = false,
                           const unsigned int _nRestrictToThisLevel = MAXLEVEL,
                           Extremities* pExtremities = nullptr,
                           LanguageType nLang = LANGUAGE_SYSTEM) const;
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 2589084f807d..0615c9a912d5 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -649,7 +649,6 @@ OUString SwNumRule::MakeNumString( const SwNodeNum& rNum, 
bool bInclStrings ) co
 
 OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & 
rNumVector,
                                  const bool bInclStrings,
-                                 const bool bOnlyArabic,
                                  const unsigned int _nRestrictToThisLevel,
                                  SwNumRule::Extremities* pExtremities,
                                  LanguageType nLang ) const
@@ -711,12 +710,7 @@ OUString SwNumRule::MakeNumString( const 
SwNumberTree::tNumberVector & rNumVecto
                 }
             }
             else if (rNumVector[i])
-            {
-                if (bOnlyArabic)
-                    sReplacement = OUString::number(rNumVector[i]);
-                else
-                    sReplacement = Get(i).GetNumStr(rNumVector[i], aLocale);
-            }
+                sReplacement = Get(i).GetNumStr(rNumVector[i], aLocale);
             else
                 sReplacement = "0";        // all 0 level are a 0
 
@@ -761,12 +755,7 @@ OUString SwNumRule::MakeNumString( const 
SwNumberTree::tNumberVector & rNumVecto
             }
 
             if (rNumVector[i])
-            {
-                if (bOnlyArabic)
-                    aStr.append(rNumVector[i]);
-                else
-                    aStr.append(rNFormat.GetNumStr(rNumVector[i], aLocale));
-            }
+                aStr.append(rNFormat.GetNumStr(rNumVector[i], aLocale));
             else
                 aStr.append("0");        // all 0 level are a 0
             if (i != nLevel && !aStr.isEmpty())
@@ -775,7 +764,7 @@ OUString SwNumRule::MakeNumString( const 
SwNumberTree::tNumberVector & rNumVecto
 
         // The type doesn't have any number, so don't append
         // the post-/prefix string
-        if (bInclStrings && !bOnlyArabic &&
+        if (bInclStrings &&
             SVX_NUM_CHAR_SPECIAL != rMyNFormat.GetNumberingType() &&
             SVX_NUM_BITMAP != rMyNFormat.GetNumberingType())
         {
@@ -831,7 +820,7 @@ OUString SwNumRule::MakeRefNumString( const SwNodeNum& 
rNodeNum,
             {
                 Extremities aExtremities;
                 OUString aPrevStr = MakeNumString( 
pWorkingNodeNum->GetNumberVector(),
-                                                 true, false, MAXLEVEL,
+                                                 true, MAXLEVEL,
                                                  &aExtremities);
                 sal_Int32 nStrip = 0;
                 while ( nStrip < aExtremities.nPrefixChars )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6b314cf49653..9b575ad4b821 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3121,7 +3121,6 @@ OUString SwTextNode::GetNumString( const bool 
_bInclPrefixAndSuffixStrings,
         {
             return pRule->MakeNumString( GetNum(pLayout)->GetNumberVector(),
                                      _bInclPrefixAndSuffixStrings,
-                                     false,
                                      _nRestrictToThisLevel,
                                      nullptr,
                                      GetLang(0));

Reply via email to