summaryrefslogtreecommitdiff
path: root/sd/source/ui/sidebar/MasterPagesSelector.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/sidebar/MasterPagesSelector.cxx')
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 8ca3fe8e7f0d..560f061db87c 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -34,6 +34,7 @@
#include <SlideSorterViewShell.hxx>
#include "PreviewValueSet.hxx"
#include <ViewShellBase.hxx>
+#include <o3tl/safeint.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/image.hxx>
#include <vcl/floatwin.hxx>
@@ -429,7 +430,7 @@ MasterPagesSelector::UserData* MasterPagesSelector::GetUserData (int nIndex) con
{
const ::osl::MutexGuard aGuard (maMutex);
- if (nIndex>0 && static_cast<unsigned int>(nIndex)<=PreviewValueSet::GetItemCount())
+ if (nIndex>0 && o3tl::make_unsigned(nIndex)<=PreviewValueSet::GetItemCount())
return static_cast<UserData*>(PreviewValueSet::GetItemData(static_cast<sal_uInt16>(nIndex)));
else
return nullptr;