diff options
Diffstat (limited to 'framework')
4 files changed, 11 insertions, 7 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 2fa0307e37d4..947cd4bf4862 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -19,6 +19,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <framework/addonsoptions.hxx> +#include <o3tl/safeint.hxx> #include <unotools/configmgr.hxx> #include <unotools/configitem.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -805,7 +806,7 @@ bool AddonsOptions_Impl::ReadToolBarItemSet( const OUString& rToolBarItemSetNode } } - return ( static_cast<sal_uInt32>(rAddonOfficeToolBarSeq.getLength()) > nToolBarItemCount ); + return ( o3tl::make_unsigned(rAddonOfficeToolBarSeq.getLength()) > nToolBarItemCount ); } void AddonsOptions_Impl::ReadOfficeNotebookBarSet( @@ -863,7 +864,7 @@ bool AddonsOptions_Impl::ReadNotebookBarItemSet( } } - return (static_cast<sal_uInt32>(rAddonOfficeNotebookBarSeq.getLength()) + return (o3tl::make_unsigned(rAddonOfficeNotebookBarSeq.getLength()) > nNotebookBarItemCount); } @@ -1256,7 +1257,7 @@ bool AddonsOptions_Impl::ReadMergeStatusbarData( } } - return ( static_cast<sal_uInt32>(rMergeStatusbarItems.getLength()) > nStatusbarItemCount ); + return ( o3tl::make_unsigned(rMergeStatusbarItems.getLength()) > nStatusbarItemCount ); } bool AddonsOptions_Impl::ReadStatusBarItem( diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 5aaeb12c6467..0bcd2c6befaf 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -71,6 +71,7 @@ #include <cppuhelper/compbase.hxx> #include <cppuhelper/propshlp.hxx> #include <cppuhelper/supportsservice.hxx> +#include <o3tl/safeint.hxx> #include <o3tl/typed_flags_set.hxx> #include <unotools/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -4023,7 +4024,7 @@ bool AutoRecovery::impl_enoughDiscSpace(sal_Int32 nRequiredSpace) } sal_uInt64 nFreeMB = nFreeSpace/1048576; - return (nFreeMB >= static_cast<sal_uInt64>(nRequiredSpace)); + return (nFreeMB >= o3tl::make_unsigned(nRequiredSpace)); #endif // SIMULATE_FULL_DISC } diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 2c5071619306..3fc54f1ad00c 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/ui/DockingArea.hpp> #include <com/sun/star/util/XUpdatable.hpp> #include <comphelper/propertysequence.hxx> +#include <o3tl/safeint.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <svtools/miscopt.hxx> @@ -199,7 +200,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue sal_uInt32 nElements( 0 ); bool bAppendSeparator( false ); Reference< XWindow > xToolbarWindow = VCLUnoHelper::GetInterface( m_pToolBar ); - for ( sal_uInt32 n = 0; n < static_cast<sal_uInt32>(rAddonToolbar.getLength()); n++ ) + for ( sal_uInt32 n = 0; n < o3tl::make_unsigned(rAddonToolbar.getLength()); n++ ) { OUString aURL; OUString aTitle; diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx index 5e0dbc01861a..7607d20653d1 100644 --- a/framework/source/uifactory/addonstoolbarfactory.cxx +++ b/framework/source/uifactory/addonstoolbarfactory.cxx @@ -28,6 +28,7 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <o3tl/safeint.hxx> #include <vcl/svapp.hxx> using namespace com::sun::star::uno; @@ -112,14 +113,14 @@ bool AddonsToolBarFactory::hasButtonsInContext( // Check before we create a toolbar that we have at least one button in // the current frame context. - for ( sal_uInt32 i = 0; i < static_cast<sal_uInt32>(rPropSeqSeq.getLength()); i++ ) + for ( sal_uInt32 i = 0; i < o3tl::make_unsigned(rPropSeqSeq.getLength()); i++ ) { bool bIsButton( true ); bool bIsCorrectContext( false ); sal_uInt32 nPropChecked( 0 ); const Sequence< PropertyValue >& rPropSeq = rPropSeqSeq[i]; - for ( sal_uInt32 j = 0; j < static_cast<sal_uInt32>(rPropSeq.getLength()); j++ ) + for ( sal_uInt32 j = 0; j < o3tl::make_unsigned(rPropSeq.getLength()); j++ ) { if ( rPropSeq[j].Name == "Context" ) { |