summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/postgresql/pq_xusers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_xusers.cxx')
-rw-r--r--connectivity/source/drivers/postgresql/pq_xusers.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx
index bc8b62b1d5b4..08cdf2d1c135 100644
--- a/connectivity/source/drivers/postgresql/pq_xusers.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <cppuhelper/exc_hlp.hxx>
+#include <o3tl/safeint.hxx>
#include "pq_xusers.hxx"
#include "pq_xuser.hxx"
@@ -51,7 +52,7 @@ using osl::MutexGuard;
using com::sun::star::beans::XPropertySet;
-using com::sun::star::uno::makeAny;
+using com::sun::star::uno::Any;
using com::sun::star::uno::UNO_QUERY;
using com::sun::star::uno::Reference;
@@ -98,10 +99,10 @@ void Users::refresh()
OUString name = xRow->getString( 1);
pUser->setPropertyValue_NoBroadcast_public(
- st.NAME , makeAny(xRow->getString( TABLE_INDEX_CATALOG+1) ) );
+ st.NAME , Any(xRow->getString( TABLE_INDEX_CATALOG+1) ) );
{
- m_values.push_back( makeAny( prop ) );
+ m_values.push_back( Any( prop ) );
map[ name ] = tableIndex;
++tableIndex;
}
@@ -151,7 +152,7 @@ void Users::dropByIndex( sal_Int32 index )
{
osl::MutexGuard guard( m_xMutex->GetMutex() );
- if( index < 0 || index >= static_cast<sal_Int32>(m_values.size()) )
+ if( index < 0 || o3tl::make_unsigned(index) >= m_values.size() )
{
throw css::lang::IndexOutOfBoundsException(
"USERS: Index out of range (allowed 0 to "