summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/dbui/mailmergehelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/dbui/mailmergehelper.cxx')
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index ea3573dd8f5c..0981bce7fdaa 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/mail/MailServiceProvider.hpp>
#include <com/sun/star/mail/XSmtpService.hpp>
#include <comphelper/processfactory.hxx>
+#include <o3tl/safeint.hxx>
#include <vcl/event.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -460,7 +461,7 @@ bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
bHandled = true;
break;
case KEY_DOWN:
- if(pImpl->aAddresses.size() > sal_uInt32(pImpl->nSelectedAddress + pImpl->nColumns))
+ if(pImpl->aAddresses.size() > o3tl::make_unsigned(pImpl->nSelectedAddress + pImpl->nColumns))
++nSelectedRow;
bHandled = true;
break;
@@ -470,7 +471,7 @@ bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
bHandled = true;
break;
case KEY_RIGHT:
- if(nSelectedColumn < sal_uInt32(pImpl->nColumns - 1) &&
+ if(nSelectedColumn < o3tl::make_unsigned(pImpl->nColumns - 1) &&
pImpl->aAddresses.size() - 1 > pImpl->nSelectedAddress )
++nSelectedColumn;
bHandled = true;