[Libreoffice-commits] .: connectivity/inc connectivity/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue May 29 02:15:12 PDT 2012


 connectivity/inc/connectivity/sqlnode.hxx                |    2 +-
 connectivity/source/drivers/mozab/MPreparedStatement.cxx |    4 ++--
 connectivity/source/drivers/mozab/MPreparedStatement.hxx |    2 +-
 connectivity/source/drivers/mozab/MResultSet.cxx         |   14 +++++++-------
 connectivity/source/drivers/mozab/MResultSetMetaData.cxx |    2 +-
 connectivity/source/drivers/mozab/MStatement.cxx         |    2 +-
 connectivity/source/inc/TSortIndex.hxx                   |    2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit d567a320b20bbbe5abe8c8cdc25476076f7fbcff
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 29 10:15:06 2012 +0100

    WaE: signed/unsigned etc.
    
    Change-Id: I3e2e43f5854b8bc33a442ecd25e089d20a122018

diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 8874ed0..8d7a3fb 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -272,7 +272,7 @@ namespace connectivity
 
         void setParent(OSQLParseNode* pParseNode) {m_pParent = pParseNode;};
 
-        sal_uInt32 count() const {return m_aChildren.size();};
+        size_t count() const {return m_aChildren.size();};
         inline OSQLParseNode* getChild(sal_uInt32 nPos) const;
 
         void append(OSQLParseNode* pNewSubTree);
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
index c9b27e3..cb1fd13 100644
--- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
@@ -408,11 +408,11 @@ ORowSetValue& x)
 }
 
 //------------------------------------------------------------------
-sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol)
+size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol)
 {
     OSL_UNUSED( pParameter );
     // Count of the newly added Parameters
-    sal_uInt32 nParameter = m_xParamColumns->get().size()+1;
+    size_t nParameter = m_xParamColumns->get().size()+1;
 
     OSL_ENSURE(SQL_ISRULE(pParameter,parameter),"OResultSet::AddParameter: Argument is not a Parameter");
     OSL_ENSURE(pParameter->count() > 0,"OResultSet: error in parse tree");
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx
index eca24fd..90f2cc7 100644
--- a/connectivity/source/drivers/mozab/MPreparedStatement.hxx
+++ b/connectivity/source/drivers/mozab/MPreparedStatement.hxx
@@ -97,7 +97,7 @@ namespace connectivity
             void checkAndResizeParameters(sal_Int32 parameterIndex);
             void setParameter(sal_Int32 parameterIndex, const ORowSetValue& x);
 
-            sal_uInt32 AddParameter(connectivity::OSQLParseNode * pParameter,
+            size_t AddParameter(connectivity::OSQLParseNode * pParameter,
                                 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol);
             void scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes);
             void describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable);
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index c64b5b8..5bb0af5 100644
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -886,8 +886,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode*                 parseT
         OSQLParseNode *pOptEscape;
         const OSQLParseNode* pPart2 = parseTree->getChild(1);
         pColumn     = parseTree->getChild(0);                        // Match Item
-        pAtom       = pPart2->getChild(pPart2->count()-2);     // Match String
-        pOptEscape  = pPart2->getChild(pPart2->count()-1);     // Opt Escape Rule
+        pAtom       = pPart2->getChild(static_cast<sal_uInt32>(pPart2->count()-2));     // Match String
+        pOptEscape  = pPart2->getChild(static_cast<sal_uInt32>(pPart2->count()-1));     // Opt Escape Rule
         (void)pOptEscape;
         const bool bNot = SQL_ISTOKEN(pPart2->getChild(0), NOT);
 
@@ -1297,7 +1297,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
                     }
 
                     m_pKeySet = m_pSortIndex->CreateKeySet();
-                    m_CurrentRowCount = m_pKeySet->get().size();
+                    m_CurrentRowCount = static_cast<sal_Int32>(m_pKeySet->get().size());
 #if OSL_DEBUG_LEVEL > 0
                     for( OKeySet::Vector::size_type i = 0; i < m_pKeySet->get().size(); i++ )
                         OSL_TRACE("Sorted: %d -> %d", i, (m_pKeySet->get())[i] );
@@ -1405,7 +1405,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
                 {
                     if(_bSetColumnMapping)
                     {
-                        sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1;
+                        sal_Int32 nSelectColumnPos = static_cast<sal_Int32>(aIter - _rxColumns->get().begin() + 1);
                             // the getXXX methods are 1-based ...
                         sal_Int32 nTableColumnPos = i + 1;
                             // get first table column is the bookmark column
@@ -1490,7 +1490,7 @@ sal_Bool OResultSet::fillKeySet(sal_Int32 nMaxCardNumber)
 sal_Int32 OResultSet::deletedCount()
 {
     impl_ensureKeySet();
-    return m_CurrentRowCount - m_pKeySet->get().size();
+    return m_CurrentRowCount - static_cast<sal_Int32>(m_pKeySet->get().size());
 
 }
 // -----------------------------------------------------------------------------
@@ -1559,7 +1559,7 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset )
 
     if ( nCurCard > nNumberOfRecords && m_aQuery.queryComplete()) {
         fillKeySet(nNumberOfRecords);
-        m_nRowPos = m_pKeySet->get().size() + 1;
+        m_nRowPos = static_cast<sal_uInt32>(m_pKeySet->get().size() + 1);
         OSL_TRACE("seekRow: return False, m_nRowPos = %u", m_nRowPos );
         return sal_False;
     }
@@ -1908,7 +1908,7 @@ void SAL_CALL OResultSet::moveToInsertRow(  ) throw(::com::sun::star::sdbc::SQLE
     else
         m_nUpdatedRow = 0;
 
-    m_nRowPos = m_pKeySet->get().size();
+    m_nRowPos = static_cast<sal_uInt32>(m_pKeySet->get().size());
     fetchCurrentRow();
     OSL_TRACE("moveToInsertRow out, m_nRowPos = %u", m_nRowPos );
 }
diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
index d6e58e5..32f933a 100644
--- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
+++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
@@ -70,7 +70,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 /*column*/ ) thr
 
 sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount(  ) throw(SQLException, RuntimeException)
 {
-    return (m_xColumns->get()).size();
+    return static_cast<sal_Int32>((m_xColumns->get()).size());
 }
 // -------------------------------------------------------------------------
 
diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx
index d216df9..2dd80bf 100644
--- a/connectivity/source/drivers/mozab/MStatement.cxx
+++ b/connectivity/source/drivers/mozab/MStatement.cxx
@@ -492,7 +492,7 @@ void OCommonStatement::createColumnMapping()
     ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_pSQLIterator->getSelectColumns();
     m_aColMapping.resize(xColumns->get().size() + 1);
     for (i=0; i<m_aColMapping.size(); ++i)
-        m_aColMapping[i] = i;
+        m_aColMapping[i] = static_cast<sal_Int32>(i);
 
     Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY);
     // now check which columns are bound
diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx
index 4a92d22..47c8e7f 100644
--- a/connectivity/source/inc/TSortIndex.hxx
+++ b/connectivity/source/inc/TSortIndex.hxx
@@ -106,7 +106,7 @@ namespace connectivity
         // look at the name
         sal_Bool IsFrozen() const { return m_bFrozen; }
         // returns the current size of the keyvalues
-        sal_Int32 Count()   const { return m_aKeyValues.size(); }
+        size_t Count()   const { return m_aKeyValues.size(); }
 
         inline const ::std::vector<OKeyType>& getKeyType() const { return m_aKeyType; }
         inline TAscendingOrder getAscending(::std::vector<TAscendingOrder>::size_type _nPos) const { return m_aAscending[_nPos]; }


More information about the Libreoffice-commits mailing list