summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgenrl.cxx5
-rw-r--r--cui/source/tabpages/numfmt.cxx5
2 files changed, 7 insertions, 3 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 71b61b0cca79..f8fdd3bec1fd 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -28,6 +28,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
+#include <o3tl/safeint.hxx>
#include <vcl/svapp.hxx>
#include <unotools/saveopt.hxx>
#include <svl/intitem.hxx>
@@ -402,11 +403,11 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, weld::Entry&, rEdit, void )
{
OUString sShortName = rShortName.xEdit->get_text();
// clear short name if it contains more characters than the number of initials
- if (static_cast<unsigned>(sShortName.getLength()) > nInits)
+ if (o3tl::make_unsigned(sShortName.getLength()) > nInits)
{
rShortName.xEdit->set_text(OUString());
}
- while (static_cast<unsigned>(sShortName.getLength()) < nInits)
+ while (o3tl::make_unsigned(sShortName.getLength()) < nInits)
sShortName += " ";
OUString sName = rEdit.get_text();
OUString sLetter = sName.isEmpty()
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 273386c5724b..db22b3cefbf9 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <o3tl/safeint.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <sfx2/objsh.hxx>
@@ -1385,7 +1388,7 @@ bool SvxNumberFormatTabPage::Click_Impl(weld::Button& rIB)
m_xEdComment->set_text(m_xLbCategory->get_text(1));
- if( nFmtLbSelPos>=0 && static_cast<size_t>(nFmtLbSelPos)<aEntryList.size() )
+ if( nFmtLbSelPos>=0 && o3tl::make_unsigned(nFmtLbSelPos)<aEntryList.size() )
{
aFormat = aEntryList[nFmtLbSelPos];
}