[Libreoffice-commits] core.git: sw/inc sw/source
Stephan Bergmann
sbergman at redhat.com
Thu Mar 2 15:28:58 UTC 2017
sw/inc/numrule.hxx | 2 +-
sw/source/core/doc/number.cxx | 4 ++--
sw/source/core/fields/reffld.cxx | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 0a041a3bbdedc1326e3566dc9ed10a0151c3bdd9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Mar 2 16:28:23 2017 +0100
Clean up use of integer types
Change-Id: I9b4f740e1c53de0ee90c3299970f774ace67323b
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 028003c..5ca5dd8 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -172,7 +172,7 @@ public:
Extremities* pExtremities = nullptr ) const;
OUString MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels,
- const sal_uInt8 nRestrictInclToThisLevel ) const;
+ const int nRestrictInclToThisLevel ) const;
/**
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 838c8c7..1beb43c 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -700,7 +700,7 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto
OUString SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels,
- const sal_uInt8 nRestrictInclToThisLevel ) const
+ const int nRestrictInclToThisLevel ) const
{
OUString aRefNumStr;
@@ -782,7 +782,7 @@ OUString SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
}
} while ( pWorkingNodeNum &&
pWorkingNodeNum->GetLevelInListTree() >= 0 &&
- static_cast<sal_uInt8>(pWorkingNodeNum->GetLevelInListTree()) >= nRestrictInclToThisLevel );
+ pWorkingNodeNum->GetLevelInListTree() >= nRestrictInclToThisLevel );
}
return aRefNumStr;
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 63e2e48..7fcde5e 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -59,6 +59,7 @@
#include <sfx2/childwin.hxx>
+#include <cstddef>
#include <memory>
#include <vector>
#include <set>
@@ -509,7 +510,7 @@ OUString SwGetRefField::MakeRefNumStr( const SwTextNode& rTextNodeOfField,
// Determine, up to which level the superior list labels have to be
// included - default is to include all superior list labels.
- sal_uInt8 nRestrictInclToThisLevel( 0 );
+ int nRestrictInclToThisLevel( 0 );
// Determine for format REF_NUMBER the level, up to which the superior
// list labels have to be restricted, if the text node of the reference
// field and the text node of the referenced item are in the same
@@ -539,7 +540,7 @@ OUString SwGetRefField::MakeRefNumStr( const SwTextNode& rTextNodeOfField,
{
const SwNumberTree::tNumberVector rFieldNumVec = pNodeNumForTextNodeOfField->GetNumberVector();
const SwNumberTree::tNumberVector rRefItemNumVec = rTextNodeOfReferencedItem.GetNum()->GetNumberVector();
- sal_uInt8 nLevel( 0 );
+ std::size_t nLevel( 0 );
while ( nLevel < rFieldNumVec.size() && nLevel < rRefItemNumVec.size() )
{
if ( rRefItemNumVec[nLevel] == rFieldNumVec[nLevel] )
More information about the Libreoffice-commits
mailing list