summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-26 15:03:12 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-26 16:09:18 +0100
commitd990c0e4bea625f3f8874d964fe183125f38b757 (patch)
treed2340534da4adf9258b0cde2b10d3ab5acf25c29 /sw
parent22c33b17cd64889d2324cbc11b729ea60d0a2e87 (diff)
Avoid explicit cast to smaller sal_uInt16 from larger int
...in what might be an attempt to avoid warnings about signed vs. unsigned comparisons. Change-Id: I21381a7df7e0902d3b6ab4de064d6470a9c4a2db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87447 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/doctxm.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 01fa812c4a1d..2782ff681a98 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -66,6 +66,7 @@
#include <tools/datetimeutils.hxx>
#include <tools/globname.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <o3tl/safeint.hxx>
#include <memory>
@@ -1248,7 +1249,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTextNode* pOwnChapterNode,
::SetProgressState( 0, pDoc->GetDocShell() );
SwTextNode* pTextNd = pOutlineNode->GetTextNode();
if( pTextNd && pTextNd->Len() && pTextNd->HasWriterListeners() &&
- sal_uInt16( pTextNd->GetAttrOutlineLevel()) <= GetLevel() &&
+ o3tl::make_unsigned( pTextNd->GetAttrOutlineLevel()) <= GetLevel() &&
pTextNd->getLayoutFrame(pLayout) &&
!pTextNd->IsHiddenByParaField() &&
!pTextNd->HasHiddenCharAttribute( true ) &&