connectivity/inc/connectivity/FValue.hxx | 2 connectivity/inc/connectivity/sqlnode.hxx | 2 connectivity/inc/connectivity/sqlparse.hxx | 1 connectivity/source/commontools/FValue.cxx | 94 ------------------------- connectivity/source/commontools/TSortIndex.cxx | 13 --- connectivity/source/inc/TSortIndex.hxx | 5 - connectivity/source/parse/sqlnode.cxx | 41 ---------- unusedcode.easy | 5 - 8 files changed, 163 deletions(-)
New commits: commit 63940b9214e5f1f44b74aaf689f5ee43f5473e0e Author: Santiago Martinez <smvar...@gmail.com> Date: Wed Mar 28 21:48:52 2012 +0200 Remove unused code in connectiviy. diff --git a/connectivity/inc/connectivity/FValue.hxx b/connectivity/inc/connectivity/FValue.hxx index 64f44d4..db46884 100644 --- a/connectivity/inc/connectivity/FValue.hxx +++ b/connectivity/inc/connectivity/FValue.hxx @@ -330,8 +330,6 @@ namespace connectivity sal_Int64 getLong() const; double getDouble() const; float getFloat() const; - // convert the double to the type _nDataType - void setFromDouble(const double& _rVal,sal_Int32 _nDatatype); ::rtl::OUString getString() const; // makes a automatic conversion if type isn't a string ::com::sun::star::util::Date getDate() const; diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index acd1ef0..2de9ea3 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1616,100 +1616,6 @@ double ORowSetValue::getDouble() const } return nRet; } -// ------------------------------------------------------------------------- -void ORowSetValue::setFromDouble(const double& _rVal,sal_Int32 _nDatatype) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "ocke.jans...@sun.com", "ORowSetValue::setFromDouble" ); - free(); - - m_bNull = sal_False; - switch(_nDatatype) - { - case DataType::CHAR: - case DataType::VARCHAR: - case DataType::DECIMAL: - case DataType::NUMERIC: - case DataType::LONGVARCHAR: - { - ::rtl::OUString aVal = ::rtl::OUString::valueOf(_rVal); - m_aValue.m_pString = aVal.pData; - rtl_uString_acquire(m_aValue.m_pString); - } - break; - case DataType::BIGINT: - if ( m_bSigned ) - { - m_aValue.m_pValue = new sal_Int64((sal_Int64)_rVal); - TRACE_ALLOC( sal_Int64 ) - } - else - { - ::rtl::OUString aVal = ::rtl::OUString::valueOf(_rVal); - m_aValue.m_pString = aVal.pData; - rtl_uString_acquire(m_aValue.m_pString); - } - break; - case DataType::FLOAT: - m_aValue.m_pValue = new float((float)_rVal); - TRACE_ALLOC( float ) - break; - case DataType::DOUBLE: - case DataType::REAL: - m_aValue.m_pValue = new double(_rVal); - TRACE_ALLOC( double ) - break; - case DataType::DATE: - m_aValue.m_pValue = new Date(dbtools::DBTypeConversion::toDate(_rVal)); - TRACE_ALLOC( Date ) - break; - case DataType::TIME: - m_aValue.m_pValue = new Time(dbtools::DBTypeConversion::toTime(_rVal)); - TRACE_ALLOC( Time ) - break; - case DataType::TIMESTAMP: - m_aValue.m_pValue = new DateTime(dbtools::DBTypeConversion::toDateTime(_rVal)); - TRACE_ALLOC( DateTime ) - break; - case DataType::BINARY: - case DataType::VARBINARY: - case DataType::LONGVARBINARY: - case DataType::BLOB: - case DataType::CLOB: - OSL_ASSERT(!"setFromDouble() for this type is not allowed!"); - break; - case DataType::BIT: - case DataType::BOOLEAN: - m_aValue.m_bBool = _rVal != 0.0; - break; - case DataType::TINYINT: - if ( m_bSigned ) - m_aValue.m_nInt8 = sal_Int8(_rVal); - else - m_aValue.m_nInt16 = sal_Int16(_rVal); - break; - case DataType::SMALLINT: - if ( m_bSigned ) - m_aValue.m_nInt16 = sal_Int16(_rVal); - else - m_aValue.m_nInt32 = sal_Int32(_rVal); - break; - case DataType::INTEGER: - if ( m_bSigned ) - m_aValue.m_nInt32 = sal_Int32(_rVal); - else - { - m_aValue.m_pValue = new sal_Int64((sal_Int64)_rVal); - TRACE_ALLOC( sal_Int64 ) - } - break; - default: - { - m_aValue.m_pValue = new Any(_rVal); - break; - } - } - m_eTypeKind = _nDatatype; -} // ----------------------------------------------------------------------------- Sequence<sal_Int8> ORowSetValue::getSequence() const { diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 5338648..6885376 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -143,19 +143,6 @@ void OSortIndex::Freeze() m_bFrozen = sal_True; } -//------------------------------------------------------------------ -sal_Int32 OSortIndex::GetValue(sal_Int32 nPos) const -{ - OSL_ENSURE(nPos > 0,"OSortIndex::GetValue: nPos == 0"); - OSL_ENSURE((size_t)nPos <= m_aKeyValues.size(),"OSortIndex::GetValue: Zugriff ausserhalb der Array-Grenzen"); - - if (!m_bFrozen && m_aKeyType[0] != SQL_ORDERBYKEY_NONE) - { - OSL_FAIL("OSortIndex::GetValue: Invalid use of index!"); - return 0; - } - return m_aKeyValues[nPos-1].first; -} // ----------------------------------------------------------------------------- OKeyValue::OKeyValue() { diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx index 419966f..4a92d22 100644 --- a/connectivity/source/inc/TSortIndex.hxx +++ b/connectivity/source/inc/TSortIndex.hxx @@ -107,11 +107,6 @@ namespace connectivity sal_Bool IsFrozen() const { return m_bFrozen; } // returns the current size of the keyvalues sal_Int32 Count() const { return m_aKeyValues.size(); } - /** GetValue returns the value at position nPos (1..n) [sorted access]. - It only allowed to call this method after the sortindex has been frozen. - */ - - sal_Int32 GetValue(sal_Int32 nPos) const; inline const ::std::vector<OKeyType>& getKeyType() const { return m_aKeyType; } inline TAscendingOrder getAscending(::std::vector<TAscendingOrder>::size_type _nPos) const { return m_aAscending[_nPos]; } diff --git a/unusedcode.easy b/unusedcode.easy index 09d0924..d495104 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -770,10 +770,8 @@ comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUStrin comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const comphelper::findProperty(com::sun::star::beans::Property&, com::sun::star::uno::Sequence<com::sun::star::beans::Property>&, rtl::OUString const&) connectivity::OKeyValue::OKeyValue() -connectivity::ORowSetValue::setFromDouble(double const&, int) connectivity::OSQLInternalNode::OSQLInternalNode(unsigned short const*, connectivity::SQLNodeType, unsigned int) connectivity::OSQLScanner::GetCurrentRule() const -connectivity::OSortIndex::GetValue(int) const connectivity::SQLError::getSQLState(int) const connectivity::file::OStatement_Base::reset() connectivity::file::OStatement_Base::setWarning(com::sun::star::sdbc::SQLWarning const&) commit 34366497a4c69ba77c47632e4c175f09363a3114 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 29 12:56:13 2012 +0100 remove dangling declaration diff --git a/connectivity/inc/connectivity/sqlparse.hxx b/connectivity/inc/connectivity/sqlparse.hxx index 88c0637..714eb21 100644 --- a/connectivity/inc/connectivity/sqlparse.hxx +++ b/connectivity/inc/connectivity/sqlparse.hxx @@ -119,7 +119,6 @@ namespace connectivity void push_back(OSQLParseNode* _pNode); void erase(OSQLParseNode* _pNode); - bool empty() const; void clear(); void clearAndDelete(); }; commit 10e92b820d80df6e46fc6c9aeef25bb4bb93920c Author: Santiago Martinez <smvar...@gmail.com> Date: Wed Mar 28 21:28:07 2012 +0200 Remove unused code in sqlnode diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index 4f8385a..8874ed0 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -278,11 +278,9 @@ namespace connectivity void append(OSQLParseNode* pNewSubTree); void insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree); - OSQLParseNode* replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubTree); OSQLParseNode* replace(OSQLParseNode* pOldSubTree, OSQLParseNode* pNewSubTree); OSQLParseNode* removeAt(sal_uInt32 nPos); - OSQLParseNode* remove(OSQLParseNode* pSubTree); void replaceNodeValue(const ::rtl::OUString& rTableAlias,const ::rtl::OUString& rColumnName); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 4580bba..d69f8c8 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2383,45 +2383,9 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) m_aChildren.erase(aPos); return pNode; } -//----------------------------------------------------------------------------- -OSQLParseNode* OSQLParseNode::remove(OSQLParseNode* pSubTree) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "ocke.jans...@sun.com", "OSQLParseNode::remove" ); - OSL_ENSURE(pSubTree != NULL, "OSQLParseNode: invalid SubTree"); - OSQLParseNodes::iterator aPos = ::std::find(m_aChildren.begin(), m_aChildren.end(), pSubTree); - if (aPos != m_aChildren.end()) - { - // Set the getParent of the removed node to NULL - pSubTree->setParent( NULL ); - m_aChildren.erase(aPos); - return pSubTree; - } - else - return NULL; -} // Replace methods //----------------------------------------------------------------------------- -OSQLParseNode* OSQLParseNode::replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubNode) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "ocke.jans...@sun.com", "OSQLParseNode::replaceAt" ); - OSL_ENSURE(pNewSubNode != NULL, "OSQLParseNode: invalid nodes"); - OSL_ENSURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent"); - OSL_ENSURE(nPos < m_aChildren.size(), "OSQLParseNode: invalid position"); - OSL_ENSURE(::std::find(m_aChildren.begin(), m_aChildren.end(), pNewSubNode) == m_aChildren.end(), - "OSQLParseNode::Replace() Node already element of parent"); - - OSQLParseNode* pOldSubNode = m_aChildren[nPos]; - - // Create connection to getParent - pNewSubNode->setParent( this ); - pOldSubNode->setParent( NULL ); - - m_aChildren[nPos] = pNewSubNode; - return pOldSubNode; -} - -//----------------------------------------------------------------------------- OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "ocke.jans...@sun.com", "OSQLParseNode::replace " ); @@ -2788,11 +2752,6 @@ void OSQLParseNodesContainer::erase(OSQLParseNode* _pNode) } } // ----------------------------------------------------------------------------- -bool OSQLParseNodesContainer::empty() const -{ - return m_aNodes.empty(); -} -// ----------------------------------------------------------------------------- void OSQLParseNodesContainer::clear() { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/unusedcode.easy b/unusedcode.easy index ecbba19..09d0924 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -772,9 +772,6 @@ comphelper::findProperty(com::sun::star::beans::Property&, com::sun::star::uno:: connectivity::OKeyValue::OKeyValue() connectivity::ORowSetValue::setFromDouble(double const&, int) connectivity::OSQLInternalNode::OSQLInternalNode(unsigned short const*, connectivity::SQLNodeType, unsigned int) -connectivity::OSQLParseNode::remove(connectivity::OSQLParseNode*) -connectivity::OSQLParseNode::replaceAt(unsigned int, connectivity::OSQLParseNode*) -connectivity::OSQLParseNodesContainer::empty() const connectivity::OSQLScanner::GetCurrentRule() const connectivity::OSortIndex::GetValue(int) const connectivity::SQLError::getSQLState(int) const
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits