diff options
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/Filter.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/GroupManager.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 8bc457ec3e93..af002b13ed58 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -59,6 +59,7 @@ #include <connectivity/dbtools.hxx> #include <connectivity/formattedcolumnvalue.hxx> #include <connectivity/predicateinput.hxx> +#include <o3tl/safeint.hxx> #include <rtl/ustrbuf.hxx> #include <tools/diagnose_ex.h> #include <unotools/localedatawrapper.hxx> @@ -458,7 +459,7 @@ namespace frm ::std::vector< OUString > aProposals; aProposals.reserve(16); - while ( xListCursor->next() && ( aProposals.size() < size_t( SHRT_MAX ) ) ) + while ( xListCursor->next() && ( aProposals.size() < o3tl::make_unsigned( SHRT_MAX ) ) ) { const OUString sCurrentValue = aFormatter.getFormattedValue(); aProposals.push_back( sCurrentValue ); diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index 7131dab79753..56a16e57359d 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/form/FormComponentType.hpp> #include <comphelper/property.hxx> #include <comphelper/types.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <tools/solar.h> @@ -322,7 +323,7 @@ sal_Int32 OGroupManager::getGroupCount() const void OGroupManager::getGroup(sal_Int32 nGroup, Sequence< Reference<XControlModel> >& _rGroup, OUString& _rName) { - OSL_ENSURE(nGroup >= 0 && static_cast<size_t>(nGroup) < m_aActiveGroupMap.size(),"OGroupManager::getGroup: Invalid group index!"); + OSL_ENSURE(nGroup >= 0 && o3tl::make_unsigned(nGroup) < m_aActiveGroupMap.size(),"OGroupManager::getGroup: Invalid group index!"); OGroupArr::iterator aGroupPos = m_aActiveGroupMap[nGroup]; _rName = aGroupPos->second.GetGroupName(); _rGroup = aGroupPos->second.GetControlModels(); diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index e98c7883f3c9..a578ac489e50 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -49,6 +49,7 @@ #include <connectivity/dbconversion.hxx> #include <cppuhelper/queryinterface.hxx> #include <o3tl/any.hxx> +#include <o3tl/safeint.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <sal/log.hxx> @@ -1537,8 +1538,8 @@ namespace frm Any operator ()( sal_Int16 _nIndex ) { - OSL_ENSURE( static_cast<ValueList::size_type>(_nIndex) < m_rList.size(), "ExtractAnyFromValueList: inconsistence!" ); - if ( static_cast<ValueList::size_type>(_nIndex) < m_rList.size() ) + OSL_ENSURE( o3tl::make_unsigned(_nIndex) < m_rList.size(), "ExtractAnyFromValueList: inconsistence!" ); + if ( o3tl::make_unsigned(_nIndex) < m_rList.size() ) return m_rList[ _nIndex ].makeAny(); return Any(); } |