diff options
Diffstat (limited to 'dbaccess/source/core/api/StaticSet.cxx')
-rw-r--r-- | dbaccess/source/core/api/StaticSet.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx index 82948e6f1d4e..57eea66f34cf 100644 --- a/dbaccess/source/core/api/StaticSet.cxx +++ b/dbaccess/source/core/api/StaticSet.cxx @@ -23,17 +23,14 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <connectivity/CommonTools.hxx> #include <comphelper/types.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> using namespace dbaccess; using namespace connectivity; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::lang; -using namespace ::osl; void OStaticSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 /*_nPosition*/) { @@ -43,7 +40,7 @@ void OStaticSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 /*_nPosition*/) // css::sdbcx::XRowLocate Any OStaticSet::getBookmark() { - return makeAny(getRow()); + return Any(getRow()); } bool OStaticSet::moveToBookmark( const Any& bookmark ) @@ -193,7 +190,7 @@ bool OStaticSet::absolute( sal_Int32 row ) } else if(row > 0) { - if(row >= static_cast<sal_Int32>(m_aSet.size())) + if(o3tl::make_unsigned(row) >= m_aSet.size()) { if(!m_bEnd) { @@ -202,7 +199,7 @@ bool OStaticSet::absolute( sal_Int32 row ) bNext = fetchRow(); } - if(row > static_cast<sal_Int32>(m_aSet.size())) + if(o3tl::make_unsigned(row) > m_aSet.size()) m_aSetIter = m_aSet.end(); // check again else m_aSetIter = m_aSet.begin() + row; |