[Libreoffice-commits] core.git: sw/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jan 26 15:09:51 UTC 2020
sw/source/core/doc/doctxm.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit d990c0e4bea625f3f8874d964fe183125f38b757
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Jan 26 15:03:12 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Jan 26 16:09:18 2020 +0100
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 at redhat.com>
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 ) &&
More information about the Libreoffice-commits
mailing list