[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity svx/source ucb/source writerfilter/source xmlhelp/source xmlsecurity/source
connectivity/source/commontools/dbcharset.cxx |6 +-- dbaccess/source/ui/control/charsetlistbox.cxx |2 - dbaccess/source/ui/dlg/DbAdminImpl.cxx |3 - dbaccess/source/ui/inc/charsetlistbox.hxx |2 - dbaccess/source/ui/inc/charsets.hxx |2 - dbaccess/source/ui/misc/charsets.cxx|2 - include/connectivity/dbcharset.hxx |2 - svx/source/form/fmtextcontrolshell.cxx |2 - ucb/source/ucp/webdav-curl/DateTimeHelper.cxx | 16 +- ucb/source/ucp/webdav-curl/DateTimeHelper.hxx |6 +-- writerfilter/source/dmapper/util.cxx|2 - xmlhelp/source/cxxhelp/provider/databases.cxx |6 +-- xmlhelp/source/cxxhelp/provider/databases.hxx |2 - xmlhelp/source/cxxhelp/provider/urlparameter.cxx|4 +- xmlhelp/source/cxxhelp/test/searchdemo.cxx |2 - xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx |2 - 16 files changed, 30 insertions(+), 31 deletions(-) New commits: commit 3fbadf2801f4c13f086d76a3ed566180cc0693dc Author: Noel Grandin AuthorDate: Fri Apr 7 17:53:00 2023 +0200 Commit: Noel Grandin CommitDate: Sun Apr 9 16:28:13 2023 +0200 use more OUStringToOString which makes it easier to pass around string_view in a few places. Change-Id: Icbbb7f56494986582f1c3272404775bd98031240 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 9e0b9ac2dd07..381afa606e08 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -93,15 +93,15 @@ namespace dbtools } -OCharsetMap::CharsetIteratorOCharsetMap::findIanaName(const OUString& _rIanaName) const +OCharsetMap::CharsetIterator OCharsetMap::findIanaName(std::u16string_view _rIanaName) const { ensureConstructed( ); rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW; -if ( !_rIanaName.isEmpty() ) +if ( !_rIanaName.empty() ) { // byte string conversion -OString sMimeByteString( _rIanaName.getStr(), _rIanaName.getLength(), RTL_TEXTENCODING_ASCII_US ); +OString sMimeByteString = OUStringToOString( _rIanaName, RTL_TEXTENCODING_ASCII_US ); // look up eEncoding = rtl_getTextEncodingFromMimeCharset( sMimeByteString.getStr() ); diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index 8915b65c9455..e6090ccfd84d 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -34,7 +34,7 @@ namespace dbaui } } -void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName ) +void CharSetListBox::SelectEntryByIanaName( std::u16string_view _rIanaName ) { OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName ); if (aFind == m_aCharSets.end()) diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 2f60d21a9101..97210e843b00 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -860,8 +860,7 @@ OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) aString = indirectPos->second; } -OString aReturn( aString.getStr(), aString.getLength(), RTL_TEXTENCODING_ASCII_US ); -return aReturn; +return OUStringToOString( aString, RTL_TEXTENCODING_ASCII_US ); } template static bool checkItemType(const SfxPoolItem* pItem){ return dynamic_cast(pItem) != nullptr;} diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx index aedfb6ec50a4..2b91bbb5389f 100644 --- a/dbaccess/source/ui/inc/charsetlistbox.hxx +++ b/dbaccess/source/ui/inc/charsetlistbox.hxx @@ -32,7 +32,7 @@ namespace dbaui public: CharSetListBox(std::unique_ptr xControl); -voidSelectEntryByIanaName( const OUString& _rIanaName ); +voidSelectEntryByIanaName( std::u16string_view _rIanaName ); boolStoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ); weld::ComboBox* get_widget() { return m_xControl.get(); } diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx index 4d4454e010d1..49977bd56262 100644 --- a/dbaccess/source/ui/inc/charsets.hxx +++ b/dbaccess/source/ui/inc/charsets.hxx @@ -43,7 +43,7 @@ namespace dbaui // various find operations
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/drivers/ado/AColumn.cxx | 14 connectivity/source/drivers/ado/AColumns.cxx|2 - connectivity/source/drivers/ado/AGroup.cxx | 15 connectivity/source/drivers/ado/AGroups.cxx |2 - connectivity/source/drivers/ado/AIndex.cxx | 14 connectivity/source/drivers/ado/AIndexes.cxx|2 - connectivity/source/drivers/ado/AKey.cxx| 14 connectivity/source/drivers/ado/AKeys.cxx |2 - connectivity/source/drivers/ado/ATable.cxx | 16 - connectivity/source/drivers/ado/ATables.cxx |2 - connectivity/source/drivers/ado/AUser.cxx | 15 connectivity/source/drivers/ado/AUsers.cxx |2 - connectivity/source/drivers/ado/AView.cxx | 15 connectivity/source/drivers/ado/AViews.cxx |2 - connectivity/source/drivers/calc/CTable.cxx | 14 connectivity/source/drivers/component/CTable.cxx|3 - connectivity/source/drivers/dbase/DDatabaseMetaData.cxx |2 - connectivity/source/drivers/dbase/DIndex.cxx| 14 connectivity/source/drivers/dbase/DIndexes.cxx | 11 +- connectivity/source/drivers/dbase/DResultSet.cxx|2 - connectivity/source/drivers/dbase/DTable.cxx| 28 ++-- connectivity/source/drivers/dbase/DTables.cxx |6 +-- connectivity/source/drivers/file/FDatabaseMetaData.cxx |2 - connectivity/source/drivers/file/FResultSet.cxx |3 - connectivity/source/drivers/file/FStatement.cxx |2 - connectivity/source/drivers/file/FTable.cxx | 14 connectivity/source/drivers/flat/ETable.cxx | 16 - connectivity/source/drivers/hsqldb/HTable.cxx | 13 --- connectivity/source/drivers/mysql_jdbc/YTable.cxx | 14 connectivity/source/drivers/writer/WTable.cxx | 12 -- connectivity/source/inc/ado/AColumn.hxx |3 - connectivity/source/inc/ado/AGroup.hxx |4 -- connectivity/source/inc/ado/AIndex.hxx |3 - connectivity/source/inc/ado/AKey.hxx|4 -- connectivity/source/inc/ado/ATable.hxx |3 - connectivity/source/inc/ado/AUser.hxx |3 - connectivity/source/inc/ado/AView.hxx |4 -- connectivity/source/inc/calc/CTable.hxx |4 -- connectivity/source/inc/dbase/DIndex.hxx|4 -- connectivity/source/inc/dbase/DTable.hxx|3 - connectivity/source/inc/file/FTable.hxx |4 -- connectivity/source/inc/flat/ETable.hxx |4 -- connectivity/source/inc/hsqldb/HTable.hxx |3 - connectivity/source/inc/mysql/YTable.hxx|3 - connectivity/source/inc/writer/WTable.hxx |4 -- connectivity/source/sdbcx/VCollection.cxx |2 - connectivity/source/sdbcx/VDescriptor.cxx | 25 +- dbaccess/source/core/api/table.cxx | 12 -- dbaccess/source/core/inc/table.hxx |3 - include/connectivity/sdbcx/VDescriptor.hxx |8 50 files changed, 28 insertions(+), 348 deletions(-) New commits: commit f025dcc44cffc38720ea1b39c456cf562f1d144d Author: Noel Grandin AuthorDate: Mon Jan 16 10:41:34 2023 +0200 Commit: Noel Grandin CommitDate: Mon Jan 16 10:19:16 2023 + XUnoTunnel->dynamic_cast in connectivityy Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index a521586b9551..a40c4f72346a 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -66,20 +66,6 @@ OAdoColumn::OAdoColumn(bool _bCase,OConnection* _pConnection) } -Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId() -{ -static const comphelper::UnoIdInit implId; -return implId.getSeq(); -} - -// css::lang::XUnoTunnel - -sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId ) -{ -return comphelper::getSomethingImpl(rId, this, - comphelper::FallbackToGetSomethingOf{}); -} - void OAdoColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index 229903502fa1..f56a6d8d007a 100644 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -62,7
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/TTableHelper.cxx |8 connectivity/source/drivers/ado/ATable.cxx |6 +++--- connectivity/source/drivers/component/CTable.cxx |2 +- connectivity/source/drivers/dbase/DTable.cxx |9 - connectivity/source/drivers/evoab2/NTable.cxx|2 +- connectivity/source/drivers/file/FTable.cxx |2 +- connectivity/source/drivers/flat/ETable.cxx |2 +- connectivity/source/drivers/macab/MacabTable.cxx |2 +- connectivity/source/inc/dbase/DColumns.hxx |1 - connectivity/source/sdbcx/VTable.cxx |4 ++-- dbaccess/source/core/api/RowSet.hxx |1 + include/connectivity/sdbcx/VTable.hxx|7 --- 12 files changed, 23 insertions(+), 23 deletions(-) New commits: commit ebe57117c470a87a6b4201537616bd1379257c02 Author: Caolán McNamara AuthorDate: Thu Sep 23 15:03:45 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 23 21:58:09 2021 +0200 leaks of OCollection in dbase import presumably since... commit 5c7b954935369cbbd22a6f43be63ac7c0ddbbfdc Date: Mon Jan 29 13:28:44 2018 +0200 loplugin:useuniqueptr in OTable OCollection has a unique and nonstandard acquire/release which forwards to a parent cppu::OWeakObject. So when it would appear to a casual observer, who assumes that it has an internal refcount, that its refcount would drop to zero and then get auto-deleted, nothing of the kind occurs. Change-Id: Ic292663a61b4d7dbf7636be7ad4c00aed0b5a7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122528 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 9c955a7e0104..3235c69ae8ef 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -296,7 +296,7 @@ void OTableHelper::refreshColumns() if(m_xColumns) m_xColumns->reFill(aVector); else -m_xColumns = createColumns(aVector); +m_xColumns.reset(createColumns(aVector)); } const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const @@ -413,10 +413,10 @@ void OTableHelper::refreshKeys() { refreshPrimaryKeys(aNames); refreshForeignKeys(aNames); -m_xKeys = createKeys(aNames); +m_xKeys.reset(createKeys(aNames)); } // if(!isNew()) else if (!m_xKeys ) -m_xKeys = createKeys(aNames); +m_xKeys.reset(createKeys(aNames)); /*if(m_pKeys) m_pKeys->reFill(aVector); else*/ @@ -460,7 +460,7 @@ void OTableHelper::refreshIndexes() if(m_xIndexes) m_xIndexes->reFill(aVector); else -m_xIndexes = createIndexes(aVector); +m_xIndexes.reset(createIndexes(aVector)); } OUString OTableHelper::getRenameStart() const diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index 12280d9bc002..1ade9a649b77 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -90,7 +90,7 @@ void OAdoTable::refreshColumns() if(m_xColumns) m_xColumns->reFill(aVector); else -m_xColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection()); +m_xColumns.reset(new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection())); } void OAdoTable::refreshKeys() @@ -107,7 +107,7 @@ void OAdoTable::refreshKeys() if(m_xKeys) m_xKeys->reFill(aVector); else -m_xKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection()); +m_xKeys.reset(new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection())); } void OAdoTable::refreshIndexes() @@ -124,7 +124,7 @@ void OAdoTable::refreshIndexes() if(m_xIndexes) m_xIndexes->reFill(aVector); else -m_xIndexes = new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()); +m_xIndexes.reset(new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection())); } Sequence< sal_Int8 > OAdoTable::getUnoTunnelId() diff --git a/connectivity/source/drivers/component/CTable.cxx b/connectivity/source/drivers/component/CTable.cxx index 9b5354d266d1..83dbf8a68830 100644 --- a/connectivity/source/drivers/component/CTable.cxx +++ b/connectivity/source/drivers/component/CTable.cxx @@ -63,7 +63,7 @@ void OComponentTable::refreshColumns() if(m_xColumns) m_xColumns->reFill(aVector); else -m_xColumns = new component::OComponentColumns(this,m_aMutex,aVector); +m_xColumns.reset(new component::OComponentColumns(this,m_aMutex,aVector)); } void OComponentTable::refreshIndexes() diff
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/parse/sqlbison.y |4 ++-- dbaccess/source/core/api/SingleSelectQueryComposer.cxx |6 +++--- dbaccess/source/core/inc/SingleSelectQueryComposer.hxx |2 +- include/connectivity/sqlparse.hxx |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 11ee7b59dda5ff2beb65fdf003e7748e541db777 Author: Julien Nabet AuthorDate: Sat Apr 25 19:17:12 2020 +0200 Commit: Julien Nabet CommitDate: Sat Apr 25 20:19:58 2020 +0200 Typo: *Comparsion* -> *Comparison* in dbaccess/connectivity Change-Id: I9dfe37b290dbb83b1dfb2f92669ae254898ee72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92898 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 4c1294a07e58..1d9a0d36a36d 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -1118,7 +1118,7 @@ boolean_primary: } else { -nErg = xxx_pGLOBAL_SQLPARSER->buildComparsionRule($$,$1); +nErg = xxx_pGLOBAL_SQLPARSER->buildComparisonRule($$,$1); } if(nErg == 1) { @@ -4760,7 +4760,7 @@ sal_Int16 OSQLParser::buildStringNodes(OSQLParseNode*& pLiteral) return 1; } -sal_Int16 OSQLParser::buildComparsionRule(OSQLParseNode*& pAppend,OSQLParseNode* pLiteral) +sal_Int16 OSQLParser::buildComparisonRule(OSQLParseNode*& pAppend,OSQLParseNode* pLiteral) { OSQLParseNode* pComp = new OSQLInternalNode("=", SQLNodeType::Equal); return buildPredicateRule(pAppend,pLiteral,pComp); diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index ba3b02d2da69..62709c8e7902 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -999,7 +999,7 @@ bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode const * pConditio } else if (SQL_ISRULE(pCondition, comparison_predicate)) { -return setComparsionPredicate(pCondition,_rIterator,rFilter,xFormatter); +return setComparisonPredicate(pCondition,_rIterator,rFilter,xFormatter); } else if (SQL_ISRULE(pCondition,like_predicate)) { @@ -1166,10 +1166,10 @@ bool OSingleSelectQueryComposer::setLikePredicate(OSQLParseNode const * pConditi return true; } -bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode const * pCondition, OSQLParseTreeIterator const & _rIterator, +bool OSingleSelectQueryComposer::setComparisonPredicate(OSQLParseNode const * pCondition, OSQLParseTreeIterator const & _rIterator, std::vector < PropertyValue >& rFilter, const Reference< css::util::XNumberFormatter > & xFormatter) const { -OSL_ENSURE(SQL_ISRULE(pCondition, comparison_predicate),"setComparsionPredicate: pCondition is not a ComparsionPredicate"); +OSL_ENSURE(SQL_ISRULE(pCondition, comparison_predicate),"setComparisonPredicate: pCondition is not a ComparisonPredicate"); if (SQL_ISRULE(pCondition->getChild(0), column_ref) || SQL_ISRULE(pCondition->getChild(pCondition->count()-1), column_ref)) { diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index 77d0a178e99a..bb2634b7611d 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -116,7 +116,7 @@ namespace dbaccess std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; bool setLikePredicate(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator const & _rIterator, std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; -bool setComparsionPredicate(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator const & _rIterator, +bool setComparisonPredicate(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator const & _rIterator, std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; static OUString getColumnName(::connectivity::OSQLParseNode const * pColumnRef, ::connectivity::OSQLParseTreeIterator const & _rIterator); diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx index 6f3bbe56c39a..814615aef5b4 100644 --- a/include/connectivity/sqlparse.hxx +++
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity vcl/inc vcl/osx vcl/source
connectivity/source/commontools/TSortIndex.cxx |4 connectivity/source/commontools/dbtools.cxx | 12 connectivity/source/drivers/calc/CTable.cxx | 18 - connectivity/source/drivers/component/CColumns.cxx |4 connectivity/source/drivers/component/CResultSet.cxx |2 connectivity/source/drivers/component/CTable.cxx |2 connectivity/source/drivers/dbase/DColumns.cxx |4 connectivity/source/drivers/dbase/DIndex.cxx |2 connectivity/source/drivers/dbase/DIndexColumns.cxx |4 connectivity/source/drivers/dbase/DResultSet.cxx |4 connectivity/source/drivers/dbase/DTable.cxx | 86 +++--- connectivity/source/drivers/evoab2/NResultSetMetaData.cxx|2 connectivity/source/drivers/file/FNoException.cxx|6 connectivity/source/drivers/file/FPreparedStatement.cxx | 58 ++-- connectivity/source/drivers/file/FResultSet.cxx | 156 +-- connectivity/source/drivers/file/FResultSetMetaData.cxx | 24 - connectivity/source/drivers/file/FStatement.cxx | 44 +-- connectivity/source/drivers/file/fanalyzer.cxx |2 connectivity/source/drivers/file/fcode.cxx | 12 connectivity/source/drivers/flat/EColumns.cxx|4 connectivity/source/drivers/flat/EResultSet.cxx |2 connectivity/source/drivers/flat/ETable.cxx | 44 +-- connectivity/source/drivers/macab/MacabPreparedStatement.cxx | 14 connectivity/source/drivers/macab/MacabResultSetMetaData.cxx |2 connectivity/source/drivers/mork/MPreparedStatement.cxx | 14 connectivity/source/drivers/mork/MResultSet.cxx | 86 +++--- connectivity/source/drivers/mork/MResultSetMetaData.cxx | 20 - connectivity/source/drivers/mork/MStatement.cxx |6 connectivity/source/drivers/writer/WTable.cxx| 22 - connectivity/source/inc/file/FResultSet.hxx |6 connectivity/source/parse/PColumn.cxx|4 connectivity/source/parse/sqliterator.cxx| 62 ++-- dbaccess/source/core/api/BookmarkSet.cxx | 12 dbaccess/source/core/api/CRowSetDataColumn.cxx |4 dbaccess/source/core/api/CacheSet.cxx| 22 - dbaccess/source/core/api/HelperCollections.cxx | 12 dbaccess/source/core/api/KeySet.cxx | 90 +++--- dbaccess/source/core/api/OptimisticSet.cxx | 20 - dbaccess/source/core/api/RowSet.cxx | 58 ++-- dbaccess/source/core/api/RowSetBase.cxx | 10 dbaccess/source/core/api/RowSetCache.cxx | 42 +- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 38 +- dbaccess/source/core/api/StaticSet.cxx | 12 dbaccess/source/core/api/WrappedResultSet.cxx| 12 include/connectivity/CommonTools.hxx | 27 - include/connectivity/FValue.hxx |4 vcl/inc/osx/salframe.h |2 vcl/inc/salframe.hxx |4 vcl/osx/salframe.cxx |9 vcl/source/window/dialog.cxx |3 50 files changed, 561 insertions(+), 552 deletions(-) New commits: commit e5230535877e30c3b874495e8794faa3a42d8017 Author: Noel Grandin AuthorDate: Tue Mar 17 21:34:21 2020 +0200 Commit: Noel Grandin CommitDate: Wed Mar 18 09:49:50 2020 +0100 simplify ORefVector code by making it extend std::vector - it wants to be a ref-counted vector, so let it be, and we can simplify the usage sites Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 76bbafaeb13a..6b94216a3719 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -85,10 +85,10 @@ struct TKeyValueFunc Freeze(); ::rtl::Reference pKeySet = new OKeySet(); -pKeySet->get().reserve(m_aKeyValues.size()); +pKeySet->reserve(m_aKeyValues.size()); std::transform(m_aKeyValues.begin() ,m_aKeyValues.end() -,std::back_inserter(pKeySet->get()) +,std::back_inserter(*pKeySet) ,::o3tl::select1st()); pKeySet->setFrozen(); return pKeySet; diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity svx/source
connectivity/source/commontools/predicateinput.cxx |2 - connectivity/source/parse/sqlnode.cxx | 25 dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 26 - dbaccess/source/ui/querydesign/QueryDesignView.cxx | 18 +-- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |4 +- include/connectivity/sqlnode.hxx | 10 +++--- svx/source/fmcomp/gridcell.cxx |2 - svx/source/form/filtnav.cxx|2 - svx/source/form/formcontroller.cxx | 10 +- 9 files changed, 47 insertions(+), 52 deletions(-) New commits: commit 8e0c45246a3de75d84875500ce3485e1ded4b934 Author: Julien Nabet AuthorDate: Tue Oct 8 20:43:03 2019 +0200 Commit: Julien Nabet CommitDate: Wed Oct 9 14:09:22 2019 +0200 Resolve FIXME Decimal Separator should be OUString (connectivity/dbaccess/svx) instead of a sal_Char Change-Id: I14fd983dac7ceb83a788c26dd4ea9d1c87444c9a Reviewed-on: https://gerrit.libreoffice.org/80493 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane Reviewed-by: Julien Nabet diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 7b9e1a1960ee..3e88af4e5e62 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -256,7 +256,7 @@ namespace dbtools sTransformedText.clear(); pParseNode->parseNodeToPredicateStr( sTransformedText, m_xConnection, m_xFormatter, _rxField, OUString(), -rParseContext.getPreferredLocale(), static_cast(nDecSeparator), +rParseContext.getPreferredLocale(), OUString(nDecSeparator), ); _rPredicateValue = sTransformedText; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 09d263e58805..80c752ef5f01 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -191,7 +191,7 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r const Reference< XNumberFormatter >& _xFormatter, const Reference< XPropertySet >& _xField, const OUString &_sPredicateTableAlias, const Locale& _rLocale, const IParseContext* _pContext, -bool _bIntl, bool _bQuote, sal_Char _cDecSep, bool _bPredicate, bool _bParseToSDBC ) +bool _bIntl, bool _bQuote, OUString _sDecSep, bool _bPredicate, bool _bParseToSDBC ) :rLocale(_rLocale) ,aMetaData( _rxConnection ) ,pParser( nullptr ) @@ -200,7 +200,7 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r ,xField(_xField) ,sPredicateTableAlias(_sPredicateTableAlias) ,m_rContext( _pContext ? *_pContext : OSQLParser::s_aDefaultContext ) -,cDecSep(_cDecSep) +,sDecSep(_sDecSep) ,bQuote(_bQuote) ,bInternational(_bIntl) ,bPredicate(_bPredicate) @@ -254,7 +254,7 @@ void OSQLParseNode::parseNodeToStr(OUString& rString, parseNodeToStr( rString, _rxConnection, nullptr, nullptr, OUString(), pContext ? pContext->getPreferredLocale() : OParseContext::getDefaultLocale(), -pContext, _bIntl, _bQuote, '.', false ); +pContext, _bIntl, _bQuote, OUString("."), false ); } @@ -262,13 +262,13 @@ void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter > & xFormatter, const css::lang::Locale& rIntl, - sal_Char _cDec, + OUString _sDec, const IParseContext* pContext ) const { OSL_ENSURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!"); if (xFormatter.is()) -parseNodeToStr(rString, _rxConnection, xFormatter, nullptr, OUString(), rIntl, pContext, true, true, _cDec, true); +parseNodeToStr(rString, _rxConnection, xFormatter, nullptr, OUString(), rIntl, pContext, true, true, _sDec, true); } @@ -278,13 +278,13 @@ void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, const Reference< XPropertySet > & _xField, const OUString &_sPredicateTableAlias, const css::lang::Locale& rIntl, - sal_Char _cDec, + OUString _sDec, const IParseContext*
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/dbexception.cxx |4 ++-- connectivity/source/drivers/dbase/DTable.cxx |7 --- connectivity/source/drivers/jdbc/JConnection.cxx |4 +++- connectivity/source/drivers/jdbc/ResultSet.cxx |7 +-- dbaccess/source/core/api/RowSet.cxx | 12 +++- include/connectivity/dbexception.hxx |3 ++- 6 files changed, 23 insertions(+), 14 deletions(-) New commits: commit 20c4c3acd5fbf38f2e990435bf346d4fbac05f9d Author: Noel Grandin AuthorDate: Tue Feb 5 15:48:53 2019 +0200 Commit: Noel Grandin CommitDate: Wed Feb 6 08:16:38 2019 +0100 store originating exception when re-throwing Change-Id: I26959d3604a581f1528e575239970ab364c7fd50 Reviewed-on: https://gerrit.libreoffice.org/67413 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 718bbdf4d674..31503a724a01 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -400,7 +400,7 @@ void throwGenericSQLException(const OUString& _rMsg, const Reference< XInterface throw SQLException( _rMsg, _rxSource, getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 0, _rNextException); } -void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, const Reference< XInterface >& _rxContext ) +void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, const Reference< XInterface >& _rxContext, const Any& _rNextException ) { ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceStringWithSubstitution( @@ -413,7 +413,7 @@ void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, cons _rxContext, getStandardSQLState( StandardSQLState::FEATURE_NOT_IMPLEMENTED ), 0, -Any() +_rNextException ); } diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 735daf3bc1ab..767f4d99ac99 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1068,12 +1068,12 @@ bool ODbaseTable::CreateImpl() } catch(const Exception&) { - +css::uno::Any anyEx = cppu::getCaughtException(); const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( STR_COULD_NOT_DELETE_FILE, "$name$", aName ) ); -::dbtools::throwGenericSQLException( sError, *this ); +::dbtools::throwGenericSQLException( sError, *this, anyEx ); } } if (!CreateMemoFile(aURL)) @@ -1086,11 +1086,12 @@ bool ODbaseTable::CreateImpl() } catch(const ContentCreationException&) { +css::uno::Any anyEx = cppu::getCaughtException(); const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( STR_COULD_NOT_DELETE_FILE, "$name$", aName ) ); -::dbtools::throwGenericSQLException( sError, *this ); +::dbtools::throwGenericSQLException( sError, *this, anyEx ); } return false; } diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 8d0dfe141b54..2a1b153b9fd6 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -701,9 +701,11 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas } catch( Exception& ) { +css::uno::Any anyEx = cppu::getCaughtException(); ::dbtools::throwGenericSQLException( lcl_getDriverLoadErrorMessage( getResources(),_sDriverClass, _sDriverClassPath ), -*this +*this, +anyEx ); } } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index 97b1f1233e50..238e78702c61 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -729,7 +730,8 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con } catch(const Exception&) { -::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateBinaryStream", *this ); +Any anyEx = ::cppu::getCaughtException(); +::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateBinaryStream", *this, anyEx ); } } @@ -760,7 +762,8 @@
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity svx/source
connectivity/source/commontools/ParameterSubstitution.cxx |5 +-- connectivity/source/commontools/predicateinput.cxx| 22 ++ connectivity/source/drivers/ado/APreparedStatement.cxx|5 +-- connectivity/source/drivers/file/FStatement.cxx |2 - connectivity/source/drivers/macab/MacabStatement.cxx |2 - connectivity/source/drivers/mork/MStatement.cxx |2 - connectivity/source/parse/sqlbison.y |8 ++--- connectivity/source/parse/sqlnode.cxx |5 +-- dbaccess/source/core/api/SingleSelectQueryComposer.cxx|8 ++--- dbaccess/source/ui/inc/QueryDesignView.hxx|2 - dbaccess/source/ui/querydesign/QueryDesignView.cxx|4 +- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |9 + dbaccess/source/ui/querydesign/querycontroller.cxx|9 ++--- include/connectivity/predicateinput.hxx |4 +- include/connectivity/sqlparse.hxx |6 +-- svx/source/fmcomp/gridcell.cxx|2 - svx/source/form/filtnav.cxx |2 - svx/source/form/sqlparserclient.cxx |4 +- svx/source/inc/sqlparserclient.hxx|2 - 19 files changed, 47 insertions(+), 56 deletions(-) New commits: commit d425658bd9fd8e315e4931afb544bc845da0360e Author: Noel Grandin AuthorDate: Wed Dec 19 16:10:51 2018 +0200 Commit: Noel Grandin CommitDate: Fri Dec 21 08:26:15 2018 +0100 pass OSQLParseNode around by unique_ptr Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad Reviewed-on: https://gerrit.libreoffice.org/65436 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/ParameterSubstitution.cxx b/connectivity/source/commontools/ParameterSubstitution.cxx index dfec360b23e5..a8efa6c6a694 100644 --- a/connectivity/source/commontools/ParameterSubstitution.cxx +++ b/connectivity/source/commontools/ParameterSubstitution.cxx @@ -83,12 +83,11 @@ namespace connectivity OSQLParser aParser( m_xContext ); OUString sErrorMessage; OUString sNewSql; -OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_sText); +std::unique_ptr pNode = aParser.parseTree(sErrorMessage,_sText); if(pNode) { // special handling for parameters -OSQLParseNode::substituteParameterNames(pNode); +OSQLParseNode::substituteParameterNames(pNode.get()); pNode->parseNodeToStr( sNewSql, xConnection ); -delete pNode; sRet = sNewSql; } } diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index fbc9c0bbb40e..b7a08ef57309 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -123,9 +123,9 @@ namespace dbtools } -OSQLParseNode* OPredicateInputController::implPredicateTree(OUString& _rErrorMessage, const OUString& _rStatement, const Reference< XPropertySet > & _rxField) const +std::unique_ptr OPredicateInputController::implPredicateTree(OUString& _rErrorMessage, const OUString& _rStatement, const Reference< XPropertySet > & _rxField) const { -OSQLParseNode* pReturn = const_cast< OSQLParser& >( m_aParser ).predicateTree( _rErrorMessage, _rStatement, m_xFormatter, _rxField ); +std::unique_ptr pReturn = const_cast< OSQLParser& >( m_aParser ).predicateTree( _rErrorMessage, _rStatement, m_xFormatter, _rxField ); if ( !pReturn ) { // is it a text field ? sal_Int32 nType = DataType::OTHER; @@ -242,7 +242,7 @@ namespace dbtools // parse the string OUString sError; OUString sTransformedText( _rPredicateValue ); -OSQLParseNode* pParseNode = implPredicateTree( sError, sTransformedText, _rxField ); +std::unique_ptr pParseNode = implPredicateTree( sError, sTransformedText, _rxField ); if ( _pErrorMessage ) *_pErrorMessage = sError; if ( pParseNode ) @@ -258,7 +258,6 @@ namespace dbtools rParseContext.getPreferredLocale(), static_cast(nDecSeparator), ); _rPredicateValue = sTransformedText; -delete pParseNode; bSuccess = true; } @@ -279,9 +278,9 @@ namespace dbtools // (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this . OUString sError; -OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, _rxField ); +std::unique_ptr pParseNode = implPredicateTree( sError,
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/dbcharset.cxx|2 +- connectivity/source/drivers/file/FConnection.cxx |2 +- connectivity/source/drivers/mysql/YDriver.cxx|2 +- connectivity/source/drivers/odbc/OConnection.cxx |2 +- dbaccess/source/ui/misc/charsets.cxx |2 +- include/connectivity/dbcharset.hxx |4 +--- 6 files changed, 6 insertions(+), 8 deletions(-) New commits: commit ebb41767f3669cd2ad3f8208f012f70654bbceb7 Author: Stephan BergmannDate: Mon Mar 5 17:42:40 2018 +0100 Rename OCharsetMap::find overload to findIanaName Change-Id: Id3fe81b41b92d6ad4e3f7127331d859a7b3c7f54 Reviewed-on: https://gerrit.libreoffice.org/50779 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 48a7c6817c89..9fc7923dbc70 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -92,7 +92,7 @@ namespace dbtools } -OCharsetMap::CharsetIteratorOCharsetMap::find(const OUString& _rIanaName, const IANA&) const +OCharsetMap::CharsetIteratorOCharsetMap::findIanaName(const OUString& _rIanaName) const { ensureConstructed( ); diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index a0b5884e1ca2..a109c6fa6645 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -109,7 +109,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& OSL_VERIFY( pIter->Value >>= sIanaName ); ::dbtools::OCharsetMap aLookupIanaName; -::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); +::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.findIanaName(sIanaName); if (aLookup != aLookupIanaName.end()) m_nTextEncoding = (*aLookup).getEncoding(); else diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 25f436d5ac32..95094265e508 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -265,7 +265,7 @@ namespace connectivity if ( !sIanaName.isEmpty() ) { ::dbtools::OCharsetMap aLookupIanaName; -::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); +::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.findIanaName(sIanaName); if (aLookup != aLookupIanaName.end() ) { OUString sAdd; diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index d2fbcb436693..cc474837bb52 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -231,7 +231,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal OSL_VERIFY( pBegin->Value >>= sIanaName ); ::dbtools::OCharsetMap aLookupIanaName; -::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); +::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.findIanaName(sIanaName); if (aLookup != aLookupIanaName.end()) m_nTextEncoding = (*aLookup).getEncoding(); else diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index 9cf2789ce1bf..3fe9316042ab 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -63,7 +63,7 @@ namespace dbaui OCharsetDisplay::const_iterator OCharsetDisplay::findIanaName(const OUString& _rIanaName) const { -OCharsetMap::const_iterator aBaseIter = OCharsetMap::find(_rIanaName, OCharsetMap::IANA()); +OCharsetMap::const_iterator aBaseIter = OCharsetMap::findIanaName(_rIanaName); return const_iterator( this, aBaseIter ); } diff --git a/include/connectivity/dbcharset.hxx b/include/connectivity/dbcharset.hxx index f2a2ca171014..0830c1d00862 100644 --- a/include/connectivity/dbcharset.hxx +++ b/include/connectivity/dbcharset.hxx @@ -67,8 +67,6 @@ namespace dbtools OCharsetMap(); virtual ~OCharsetMap(); -struct IANA { }; - /** find the given text encoding in the map. @return the end iterator if the encoding could not be found. */ @@
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/TTableHelper.cxx | 20 ++-- connectivity/source/drivers/ado/ATable.cxx | 22 ++--- connectivity/source/drivers/component/CTable.cxx |6 - connectivity/source/drivers/dbase/DTable.cxx | 100 +++ connectivity/source/drivers/evoab2/NTable.cxx|6 - connectivity/source/drivers/file/FTable.cxx |6 - connectivity/source/drivers/firebird/Table.cxx |4 connectivity/source/drivers/flat/ETable.cxx |6 - connectivity/source/drivers/hsqldb/HTable.cxx| 12 +- connectivity/source/drivers/macab/MacabTable.cxx |6 - connectivity/source/drivers/mysql/YTable.cxx | 12 +- connectivity/source/sdbcx/VTable.cxx | 33 ++- dbaccess/source/core/api/table.cxx |6 - include/connectivity/sdbcx/VTable.hxx|7 - 14 files changed, 119 insertions(+), 127 deletions(-) New commits: commit 5c7b954935369cbbd22a6f43be63ac7c0ddbbfdc Author: Noel GrandinDate: Mon Jan 29 13:28:44 2018 +0200 loplugin:useuniqueptr in OTable use rtl::Reference here since these are reference counted data structures, and we hand out references to me via our API Change-Id: I8f69dde2db08519cb3d9de20b4ad54462e3ecc98 Reviewed-on: https://gerrit.libreoffice.org/49180 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index b94ab42d4617..7bb03a90da3c 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -299,10 +299,10 @@ void OTableHelper::refreshColumns() ); } -if(m_pColumns) -m_pColumns->reFill(aVector); +if(m_xColumns) +m_xColumns->reFill(aVector); else -m_pColumns = createColumns(aVector); +m_xColumns = createColumns(aVector); } const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const @@ -424,10 +424,10 @@ void OTableHelper::refreshKeys() { refreshPrimaryKeys(aNames); refreshForeignKeys(aNames); -m_pKeys = createKeys(aNames); +m_xKeys = createKeys(aNames); } // if(!isNew()) -else if (!m_pKeys ) -m_pKeys = createKeys(aNames); +else if (!m_xKeys ) +m_xKeys = createKeys(aNames); /*if(m_pKeys) m_pKeys->reFill(aVector); else*/ @@ -469,10 +469,10 @@ void OTableHelper::refreshIndexes() } } -if(m_pIndexes) -m_pIndexes->reFill(aVector); +if(m_xIndexes) +m_xIndexes->reFill(aVector); else -m_pIndexes = createIndexes(aVector); +m_xIndexes = createIndexes(aVector); } OUString OTableHelper::getRenameStart() const @@ -549,7 +549,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference ); Reference< XPropertySet > xOld( -m_pColumns->getByIndex(index), css::uno::UNO_QUERY); +m_xColumns->getByIndex(index), css::uno::UNO_QUERY); if(xOld.is()) alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor); } diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index c1688a152cc4..0c028794a6c3 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -84,10 +84,10 @@ void OAdoTable::refreshColumns() aColumns.fillElementNames(aVector); } -if(m_pColumns) -m_pColumns->reFill(aVector); +if(m_xColumns) +m_xColumns->reFill(aVector); else -m_pColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection()); +m_xColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection()); } void OAdoTable::refreshKeys() @@ -101,10 +101,10 @@ void OAdoTable::refreshKeys() aKeys.fillElementNames(aVector); } -if(m_pKeys) -m_pKeys->reFill(aVector); +if(m_xKeys) +m_xKeys->reFill(aVector); else -m_pKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection()); +m_xKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection()); } void OAdoTable::refreshIndexes() @@ -118,10 +118,10 @@ void OAdoTable::refreshIndexes() aIndexes.fillElementNames(aVector); } -if(m_pIndexes) -m_pIndexes->reFill(aVector); +if(m_xIndexes) +m_xIndexes->reFill(aVector); else -m_pIndexes = new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()); +m_xIndexes = new
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/cpool/ZConnectionPool.cxx|2 +- connectivity/source/drivers/evoab2/NTable.hxx|6 +++--- connectivity/source/drivers/evoab2/NTables.cxx |1 + connectivity/source/drivers/firebird/Columns.cxx |3 ++- connectivity/source/inc/OColumn.hxx | 11 +-- connectivity/source/inc/component/CTable.hxx |6 +++--- connectivity/source/inc/dbase/dindexnode.hxx |6 +++--- connectivity/source/inc/file/FTable.hxx |6 +++--- connectivity/source/inc/file/fcode.hxx |4 ++-- connectivity/source/inc/hsqldb/HTable.hxx|8 connectivity/source/inc/mysql/YTable.hxx |8 dbaccess/source/core/api/OptimisticSet.cxx |8 dbaccess/source/core/api/RowSetCache.cxx | 10 +- include/connectivity/FValue.hxx |4 ++-- include/connectivity/TColumnsHelper.hxx |2 +- include/connectivity/dbexception.hxx |2 +- include/connectivity/dbtools.hxx |8 include/connectivity/sqlparse.hxx|2 +- 18 files changed, 49 insertions(+), 48 deletions(-) New commits: commit e1755ac8c42ba4657881ecf7aa652a137abf3267 Author: Noel GrandinDate: Tue Dec 5 11:47:52 2017 +0200 loplugin:countusersofdefaultparams in connectivity Change-Id: Ia613257f2de1395c6629c1c37026ed48d4b927c8 Reviewed-on: https://gerrit.libreoffice.org/45854 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index d6d1c8f3ee13..ddb80da0c02c 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -82,7 +82,7 @@ struct TRemoveEventListenerFunctor OConnectionPool* m_pConnectionPool; bool m_bDispose; -TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool,bool _bDispose = false) +TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool, bool _bDispose) : m_pConnectionPool(_pConnectionPool) ,m_bDispose(_bDispose) { diff --git a/connectivity/source/drivers/evoab2/NTable.hxx b/connectivity/source/drivers/evoab2/NTable.hxx index c3e984ce78b6..eb1159847d20 100644 --- a/connectivity/source/drivers/evoab2/NTable.hxx +++ b/connectivity/source/drivers/evoab2/NTable.hxx @@ -38,9 +38,9 @@ namespace connectivity OEvoabConnection* _pConnection, const OUString& Name, const OUString& Type, -const OUString& Description = OUString(), -const OUString& SchemaName = OUString(), -const OUString& CatalogName = OUString() +const OUString& Description, +const OUString& SchemaName, +const OUString& CatalogName ); OEvoabConnection* getConnection() { return m_pConnection;} diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 652ac07030e1..7beaffdca6d6 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -63,6 +63,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName) aName, xRow->getString(4), xRow->getString(5), +"", ""); xRet = pRet; } diff --git a/connectivity/source/drivers/firebird/Columns.cxx b/connectivity/source/drivers/firebird/Columns.cxx index d418026ce6c2..8089cab8c965 100644 --- a/connectivity/source/drivers/firebird/Columns.cxx +++ b/connectivity/source/drivers/firebird/Columns.cxx @@ -29,7 +29,8 @@ Columns::Columns(Table& rTable, OColumnsHelper(rTable, true, // TODO: is this case sensitivity? rMutex, - rVector) + rVector, + /*bUseHardRef*/true) { OColumnsHelper::setParent(); } diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index fb087a859853..e0d86d7e9497 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -71,12 +71,11 @@ namespace connectivity OColumn(const OUString &_aTableName, const OUString &_aColumnName, - -sal_Int32 _aNullable=0, -sal_Int32 _aColumnDisplaySize=0, -sal_Int32 _aPrecision=0, -sal_Int32 _aScale=0, -sal_Int32 _aColumnType=0) +sal_Int32 _aNullable, +sal_Int32 _aColumnDisplaySize, +sal_Int32 _aPrecision, +sal_Int32
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity include/vcl l10ntools/inc l10ntools/source vcl/inc vcl/unx
connectivity/source/commontools/sqlerror.cxx | 11 - connectivity/source/drivers/evoab2/NResultSet.cxx |2 connectivity/source/drivers/mork/MConnection.cxx |2 connectivity/source/parse/sqlnode.cxx |4 dbaccess/source/core/api/RowSetBase.cxx |1 dbaccess/source/core/dataaccess/ContentHelper.cxx |1 dbaccess/source/core/dataaccess/documentcontainer.cxx |7 dbaccess/source/sdbtools/connection/objectnames.cxx |6 dbaccess/source/ui/app/AppControllerGen.cxx |2 dbaccess/source/ui/browser/brwctrlr.cxx |2 include/connectivity/sqlerror.hxx |2 include/connectivity/sqlparse.hxx |5 include/vcl/toolbox.hxx |1 l10ntools/inc/export.hxx | 51 l10ntools/source/merge.cxx| 27 -- vcl/inc/unx/i18n_status.hxx |8 vcl/unx/generic/app/i18n_status.cxx | 195 -- 17 files changed, 22 insertions(+), 305 deletions(-) New commits: commit 3e4b0bde6252b80ccc99c8b9ae261d79456ba026 Author: Noel GrandinDate: Mon Jul 24 09:05:18 2017 +0200 loplugin:unusedfields some untouched fields which lead to a whole bunch of dead code in vcl/.../i18n_status.cxx Change-Id: Id8eeadeb9cbc6107e1a0dac5801ce20b2b9ae6dc Reviewed-on: https://gerrit.libreoffice.org/40355 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index 01e07b26721f..8efc72ceccfd 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -56,7 +56,7 @@ namespace connectivity class SQLError_Impl { public: -explicit SQLError_Impl( const Reference & _rxContext ); +explicit SQLError_Impl(); // versions of the public SQLError methods which are just delegated to this impl-class static const OUString& getMessagePrefix(); @@ -86,14 +86,11 @@ namespace connectivity private: ::osl::Mutexm_aMutex; -Referencem_aContext; std::unique_ptrm_xResources; bool m_bAttemptedInit; }; -SQLError_Impl::SQLError_Impl( const Reference & _rxContext ) -:m_aContext( _rxContext ) -,m_bAttemptedInit( false ) +SQLError_Impl::SQLError_Impl() : m_bAttemptedInit( false ) { } @@ -276,8 +273,8 @@ namespace connectivity return m_xResources.get() != nullptr; } -SQLError::SQLError( const Reference & _rxContext ) -:m_pImpl( new SQLError_Impl( _rxContext ) ) +SQLError::SQLError() +:m_pImpl( new SQLError_Impl ) { } diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 83b05ef3fb18..52bc5b567de1 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -668,7 +668,7 @@ void OEvoabResultSet::construct( const QueryData& _rData ) case eFilterNone: if ( !m_pVersionHelper->isLocal( pBook ) ) { -SQLError aErrorFactory( comphelper::getComponentContext(m_pConnection->getDriver().getMSFactory()) ); +SQLError aErrorFactory; SQLException aAsException = aErrorFactory.getSQLException( ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED, *this ); m_aWarnings.appendWarning( SQLWarning( aAsException.Message, diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx index 9c421095232a..32ea6b192128 100644 --- a/connectivity/source/drivers/mork/MConnection.cxx +++ b/connectivity/source/drivers/mork/MConnection.cxx @@ -390,7 +390,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer if ( _rError.getErrorCondition() != 0 ) { -SQLError aErrorHelper( comphelper::getComponentContext(getDriver()->getFactory()) ); +SQLError aErrorHelper; const OUString& sParameter( _rError.getParameter() ); if ( !sParameter.isEmpty() ) aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter ); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 36274ffbe02d..b7464836e90b 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -639,7 +639,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer&
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity include/sfx2 sfx2/source sot/source sw/inc sw/source xmloff/source
connectivity/source/drivers/file/FStatement.cxx |2 connectivity/source/drivers/macab/MacabStatement.cxx|2 connectivity/source/drivers/mork/MStatement.cxx |2 connectivity/source/parse/sqliterator.cxx |5 -- connectivity/source/parse/sqlnode.cxx | 11 ++-- dbaccess/source/core/api/OptimisticSet.cxx |2 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |4 - dbaccess/source/ui/querydesign/querycontroller.cxx |2 include/connectivity/sqliterator.hxx|4 - include/connectivity/sqlnode.hxx|3 - include/sfx2/dispatch.hxx |2 sfx2/source/control/dispatch.cxx|8 +-- sot/source/sdstor/stg.cxx |2 sot/source/sdstor/stgole.cxx|4 - sot/source/sdstor/stgole.hxx|2 sot/source/sdstor/ucbstorage.cxx| 23 + sw/inc/IDocumentContentOperations.hxx |3 - sw/inc/doc.hxx |2 sw/source/core/doc/DocumentContentOperationsManager.cxx | 24 - sw/source/core/doc/docbasic.cxx | 16 +- sw/source/core/docnode/node2lay.cxx | 10 +--- sw/source/core/frmedt/fefly1.cxx|2 sw/source/core/inc/DocumentContentOperationsManager.hxx |3 - sw/source/core/inc/flowfrm.hxx |2 sw/source/core/inc/frame.hxx|2 sw/source/core/inc/frmtool.hxx |6 -- sw/source/core/inc/layfrm.hxx |2 sw/source/core/inc/swblocks.hxx |2 sw/source/core/inc/tabfrm.hxx |2 sw/source/core/layout/colfrm.cxx|4 - sw/source/core/layout/fly.cxx | 10 sw/source/core/layout/frmtool.cxx |5 -- sw/source/core/layout/sectfrm.cxx |8 +-- sw/source/core/layout/tabfrm.cxx|2 sw/source/core/swg/swblocks.cxx |2 sw/source/core/text/inftxt.cxx | 12 ++-- sw/source/core/text/inftxt.hxx |5 -- sw/source/core/undo/unins.cxx |2 sw/source/core/unocore/unoframe.cxx |4 - sw/source/filter/html/htmlplug.cxx | 12 +--- sw/source/filter/ww8/attributeoutputbase.hxx|2 sw/source/filter/ww8/rtfexport.cxx | 14 + sw/source/filter/ww8/rtfexport.hxx |2 sw/source/filter/ww8/wrtw8sty.cxx |4 - sw/source/filter/ww8/ww8atr.cxx |9 +-- sw/source/filter/ww8/ww8toolbar.cxx | 39 +++- sw/source/filter/ww8/ww8toolbar.hxx | 15 ++ sw/source/filter/xml/xmltexti.cxx | 20 ++-- xmloff/source/chart/ColorPropertySet.cxx|8 +-- 49 files changed, 128 insertions(+), 205 deletions(-) New commits: commit 0d051730156f633150fa9e3107fe97cf7be6d8f9 Author: Noel GrandinDate: Tue Nov 15 09:13:33 2016 +0200 loplugin:constantparam Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0 Reviewed-on: https://gerrit.libreoffice.org/30858 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 36cf314..0bd2564 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -56,7 +56,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) ,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper) ,m_xDBMetaData(_pConnection->getMetaData()) ,m_aParser( _pConnection->getDriver()->getComponentContext() ) -,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, nullptr ) +,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser ) ,m_pConnection(_pConnection) ,m_pParseTree(nullptr) ,m_pSQLAnalyzer(nullptr) diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 8236c3b..2fa468e 100644 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -67,7 +67,7 @@ MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection ) : MacabCommonStatement_BASE(m_aMutex),
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/parse/sqlbison.y|2 +- dbaccess/source/core/api/RowSetCache.cxx|4 ++-- dbaccess/source/core/dataaccess/databasecontext.cxx | 15 --- dbaccess/source/filter/xml/xmlfilter.cxx|2 +- dbaccess/source/ui/browser/unodatbr.cxx |2 +- dbaccess/source/ui/querydesign/querycontroller.cxx |8 include/connectivity/sqlparse.hxx |2 +- 7 files changed, 14 insertions(+), 21 deletions(-) New commits: commit 576ab772555ed9f06995d9b5d605c90191500a76 Author: Rohan KumarDate: Mon Mar 7 21:50:41 2016 +0530 tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals I either replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 statements or i used SAL_INFO(..)s Change-Id: Iefb6b83e86e1767e55600b6e1989ee91207fb220 Reviewed-on: https://gerrit.libreoffice.org/23000 Tested-by: Jenkins Reviewed-by: jan iversen diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index b5289df..9428804 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4651,7 +4651,7 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont return aStr; } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OUString OSQLParser::RuleIDToStr(sal_uInt32 nRuleID) { OSL_ENSURE(nRuleID < SAL_N_ELEMENTS(yytname), "OSQLParser::RuleIDToStr: Invalid nRuleId!"); diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 69d388c..1d4970a 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1133,10 +1133,10 @@ bool ORowSetCache::last( ) OSL_ENSURE(m_bBeforeFirst,"ORowSetCache::last return false and BeforeFirst isn't true"); m_aMatrixIter = m_pMatrix->end(); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if(bRet) { -OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!"); +assert((*m_aMatrixIter).is() && "ORowSetCache::last: Row not valid!"); } #endif diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index b12ace6..f4e92b5 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -685,9 +685,7 @@ Reference< XInterface > ODatabaseContext::getObject( const OUString& _rURL ) void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl ) { OUString sURL( _rModelImpl.getURL() ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: registering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: registering " << sURL); if ( m_aDatabaseObjects.find( sURL ) == m_aDatabaseObjects.end() ) { m_aDatabaseObjects[ sURL ] = &_rModelImpl; @@ -700,19 +698,14 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl ) { OUString sURL( _rModelImpl.getURL() ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: deregistering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: deregistering " << sURL); m_aDatabaseObjects.erase( sURL ); } void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, const OUString& _rNewURL ) { -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: changing registration from %s to %s", -OUStringToOString( _rOldURL, RTL_TEXTENCODING_UTF8 ).getStr(), -OUStringToOString( _rNewURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: changing registrations from " << _rOldURL << + " to " << _rNewURL); ObjectCache::iterator oldPos = m_aDatabaseObjects.find( _rOldURL ); ENSURE_OR_THROW( oldPos != m_aDatabaseObjects.end(), "illegal old database document URL" ); ObjectCache::iterator newPos = m_aDatabaseObjects.find( _rNewURL ); diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index bd1d661..44a3848 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -114,7 +114,7 @@ sal_Int32 ReadThroughComponent( } catch (const SAXParseException& r) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 SAL_WARN("dbaccess", "SAX parse exception catched while importing:\n" << r.Message << r.LineNumber << "," << r.ColumnNumber); #else (void)r; diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/warningscontainer.cxx |5 - dbaccess/source/core/api/FilteredContainer.cxx|2 dbaccess/source/core/api/query.hxx| 10 +-- dbaccess/source/core/api/querycontainer.cxx |4 - dbaccess/source/core/api/tablecontainer.cxx |2 dbaccess/source/core/api/viewcontainer.cxx|2 dbaccess/source/core/inc/FilteredContainer.hxx|6 +- dbaccess/source/core/inc/querycontainer.hxx |8 +-- dbaccess/source/core/inc/tablecontainer.hxx |2 dbaccess/source/core/inc/viewcontainer.hxx|4 - include/connectivity/warningscontainer.hxx| 46 -- 11 files changed, 32 insertions(+), 59 deletions(-) New commits: commit 6c1cabe677f5eb24b465dd6e316c8c66df64bb29 Author: Noel Grandin n...@peralex.com Date: Tue May 26 10:25:09 2015 +0200 loplugin:unnecessarysuperclass, merge IWarningsContainer.. ..into WarningsContainer Change-Id: I682528a4eb1b1298faf12b2d498db65f94800cd5 Reviewed-on: https://gerrit.libreoffice.org/15905 Tested-by: Jenkins c...@libreoffice.org Reviewed-by: Noel Grandin noelgran...@gmail.com diff --git a/connectivity/source/commontools/warningscontainer.cxx b/connectivity/source/commontools/warningscontainer.cxx index 4afe81a..5d35532 100644 --- a/connectivity/source/commontools/warningscontainer.cxx +++ b/connectivity/source/commontools/warningscontainer.cxx @@ -55,11 +55,6 @@ namespace dbtools } -WarningsContainer::~WarningsContainer() -{ -} - - void WarningsContainer::appendWarning(const SQLException _rWarning) { lcl_concatWarnings( m_aOwnWarnings, makeAny( _rWarning ) ); diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 3fa7078..4002ce9 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -239,7 +239,7 @@ sal_Int32 createWildCardVector(Sequence OUString _rTableFilter, ::std::vecto const Reference XConnection _xCon, bool _bCase, IRefreshListener* _pRefreshListener, - ::dbtools::IWarningsContainer* _pWarningsContainer + ::dbtools::WarningsContainer* _pWarningsContainer ,oslInterlockedCount _nInAppend) :OCollection(_rParent,_bCase,_rMutex,::std::vector OUString()) ,m_bConstructed(false) diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx index ecaa325..baf50c2 100644 --- a/dbaccess/source/core/api/query.hxx +++ b/dbaccess/source/core/api/query.hxx @@ -32,7 +32,7 @@ namespace dbtools { -class IWarningsContainer; +class WarningsContainer; } namespace dbaccess @@ -64,8 +64,8 @@ protected: ::com::sun::star::uno::Reference ::com::sun::star::sdbc::XConnection m_xConnection; ::com::sun::star::uno::Reference ::com::sun::star::beans::XPropertySetInfom_xCommandPropInfo; ::rtl::Reference OContainerMediator m_pColumnMediator; -::dbtools::IWarningsContainer* m_pWarnings; -bool m_bCaseSensitiv : 1;// assume case sensitivity of the column names ? +::dbtools::WarningsContainer* m_pWarnings; +bool m_bCaseSensitiv : 1;// assume case sensitivity of the column names ? // possible actions on our aggregate enum AGGREGATE_ACTION { NONE, SETTING_PROPERTIES, FLUSHING }; @@ -131,8 +131,8 @@ public: public: // the caller is responsible for the lifetime! -voidsetWarningsContainer( ::dbtools::IWarningsContainer* _pWarnings ) { m_pWarnings = _pWarnings; } -::dbtools::IWarningsContainer* getWarningsContainer( ) const { return m_pWarnings; } +voidsetWarningsContainer( ::dbtools::WarningsContainer* _pWarnings ) { m_pWarnings = _pWarnings; } +::dbtools::WarningsContainer* getWarningsContainer( ) const { return m_pWarnings; } // XRename virtual void SAL_CALL rename( const OUString newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index 59ad63e..b9dd5c1 100644 ---
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity include/sfx2 include/svx sfx2/source svx/source unusedcode.easy vcl/unx
connectivity/source/sdbcx/VView.cxx |7 - dbaccess/source/core/dataaccess/databasedocument.cxx |6 dbaccess/source/core/dataaccess/databasedocument.hxx |3 -- dbaccess/source/ui/control/FieldControls.cxx | 23 --- dbaccess/source/ui/inc/FieldControls.hxx |9 --- include/connectivity/sdbcx/VView.hxx |3 -- include/sfx2/progress.hxx|1 include/svx/fontlb.hxx |2 - sfx2/source/bastyp/progress.cxx | 20 svx/source/dialog/fontlb.cxx |8 -- unusedcode.easy | 12 ++--- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 12 - vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx |6 vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx |7 - vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx |5 15 files changed, 3 insertions(+), 121 deletions(-) New commits: commit 194016b1d7a3f09baeaddfcfdb369adf15f9cff2 Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 5 09:24:25 2015 + callcatcher: update unused code Change-Id: I540d192a361938cd4dca811e7170d762841662ee diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index adc2e3d..be69eb6 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -75,13 +75,6 @@ void OView::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CHECKOPTION), PROPERTY_ID_CHECKOPTION,nAttrib,m_CheckOption, ::cppu::UnoTypesal_Int32::get()); } -void OView::disposing(void) -{ -OPropertySetHelper::disposing(); - -::osl::MutexGuard aGuard(m_aMutex); -} - Sequence Type SAL_CALL OView::getTypes( ) throw(RuntimeException, std::exception) { return ::comphelper::concatSequences(ODescriptor::getTypes(),OView_BASE::getTypes()); diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 4e8099d..3cc3484 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1997,12 +1997,6 @@ Reference XNameReplace SAL_CALL ODatabaseDocument::getEvents( ) throw (Runti return m_pEventContainer; } -void SAL_CALL ODatabaseDocument::disposing( const ::com::sun::star::lang::EventObject Source ) throw(RuntimeException) -{ -if ( m_pImpl.is() ) -m_pImpl-disposing(Source); -} - Reference XInterface ODatabaseDocument::getThis() const { return *const_cast ODatabaseDocument* ( this ); diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index 56e374b..cc29925 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -314,9 +314,6 @@ public: virtual ::com::sun::star::uno::Sequence ::com::sun::star::uno::Type SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence sal_Int8 SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -// XEventListener -void SAL_CALL disposing( const ::com::sun::star::lang::EventObject Source ) throw(::com::sun::star::uno::RuntimeException); - // XComponent virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference ::com::sun::star::lang::XEventListener xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/control/FieldControls.cxx b/dbaccess/source/ui/control/FieldControls.cxx index 9335be8..e827fcc 100644 --- a/dbaccess/source/ui/control/FieldControls.cxx +++ b/dbaccess/source/ui/control/FieldControls.cxx @@ -47,15 +47,6 @@ OPropColumnEditCtrl::OPropColumnEditCtrl(vcl::Window* pParent, m_strHelpText = ModuleRes(nHelpId); } -void -OPropColumnEditCtrl::SetSpecialReadOnly(bool _bReadOnly) -{ -SetReadOnly(_bReadOnly); -lcl_setSpecialReadOnly(_bReadOnly,this); -} - - - OPropEditCtrl::OPropEditCtrl(vcl::Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle) :Edit(pParent, nWinStyle) ,m_nPos(nPosition) @@ -64,13 +55,6 @@ OPropEditCtrl::OPropEditCtrl(vcl::Window* pParent, sal_uInt16 nHelpId, short nPo } void -OPropEditCtrl::SetSpecialReadOnly(bool _bReadOnly) -{ -SetReadOnly(_bReadOnly); -lcl_setSpecialReadOnly(_bReadOnly,this); -} - -void OPropNumericEditCtrl::SetSpecialReadOnly(bool _bReadOnly) { SetReadOnly(_bReadOnly); @@ -92,11 +76,4 @@
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/drivers/odbc/ODatabaseMetaData.cxx |2 connectivity/source/inc/odbc/OConnection.hxx |2 connectivity/source/inc/odbc/ODriver.hxx |2 connectivity/source/inc/odbc/OFunctiondefs.hxx | 104 - connectivity/source/inc/odbc/OFunctions.hxx|2 connectivity/source/inc/odbc/OTools.hxx|2 dbaccess/source/ui/dlg/odbcconfig.cxx | 36 - include/connectivity/odbc.hxx | 104 + 8 files changed, 110 insertions(+), 144 deletions(-) New commits: commit 173e0172092fa87606a80a7b0d6b89323c7166b5 Author: Lionel Elie Mamane lio...@mamane.lu Date: Fri Sep 26 18:25:56 2014 +0200 factorise odbc headers inclusion it is complicated enough that we should implement that logic only once Change-Id: I0cc5ffb871223b27df825f21612e3c8f6f2febb3 diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx index 6a98544..56a2467 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx @@ -25,7 +25,7 @@ #include com/sun/star/sdbc/ResultSetType.hpp #include com/sun/star/sdbc/ResultSetConcurrency.hpp #include com/sun/star/sdbc/TransactionIsolation.hpp -#include odbc/OFunctiondefs.hxx +#include connectivity/odbc.hxx #include stdio.h #include TPrivilegesResultSet.hxx #include connectivity/dbexception.hxx diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index bdf46b6..37f730b 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -21,7 +21,7 @@ #include com/sun/star/sdbc/SQLWarning.hpp #include com/sun/star/beans/PropertyValue.hpp -#include odbc/OFunctiondefs.hxx +#include connectivity/odbc.hxx #include odbc/odbcbasedllapi.hxx #include connectivity/OSubComponent.hxx #include connectivity/CommonTools.hxx diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx index f225bd0..210a543 100644 --- a/connectivity/source/inc/odbc/ODriver.hxx +++ b/connectivity/source/inc/odbc/ODriver.hxx @@ -23,7 +23,7 @@ #include com/sun/star/sdbc/XDriver.hpp #include com/sun/star/lang/XServiceInfo.hpp #include cppuhelper/compbase2.hxx -#include odbc/OFunctiondefs.hxx +#include connectivity/odbc.hxx #include odbc/odbcbasedllapi.hxx #include connectivity/CommonTools.hxx #include osl/module.h diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx index 1ead6bb..feeda59 100644 --- a/connectivity/source/inc/odbc/OFunctions.hxx +++ b/connectivity/source/inc/odbc/OFunctions.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX -#include odbc/OFunctiondefs.hxx +#include connectivity/odbc.hxx #include rtl/ustring.hxx #include osl/module.h diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx index d9b8127..ff07cd0 100644 --- a/connectivity/source/inc/odbc/OTools.hxx +++ b/connectivity/source/inc/odbc/OTools.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OTOOLS_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OTOOLS_HXX -#include odbc/OFunctiondefs.hxx +#include connectivity/odbc.hxx #include odbc/odbcbasedllapi.hxx #include com/sun/star/sdbc/SQLException.hpp #include com/sun/star/util/Date.hpp diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index e75b160..c301918 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -20,12 +20,6 @@ #include config_folders.h #include odbcconfig.hxx -#ifdef SYSTEM_ODBC_HEADERS -#include sqltypes.h -#else -#include odbc/sqltypes.h -#endif - #include rtl/bootstrap.hxx #include rtl/ustring.hxx #include rtl/ustrbuf.hxx @@ -49,35 +43,7 @@ #endif #endif -// just to go with calling convention of windows -// so don't touch this -#if defined(WNT) -#undef SQL_API -#define SQL_API __stdcall -// At least under some circumstances, the below #include odbc/sqlext.h re- -// defines SQL_API to an empty string, leading to a compiler warning on MSC; to -// not break the current behavior, this is worked around by locally disabling -// that warning: -#if defined _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4005) -#endif -#endif // defined(WNT) - -#ifdef SYSTEM_ODBC_HEADERS -#include sqlext.h -#else -#include odbc/sqlext.h -#endif - -#if defined(WNT) -#if defined _MSC_VER -#pragma warning(pop) -#endif -#undef SQL_API -#define SQL_API __stdcall -#endif // defined(WNT) -// from here on you can do what you want to +#include connectivity/odbc.hxx #else diff --git a/connectivity/source/inc/odbc/OFunctiondefs.hxx
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/commontools/dbexception.cxx | 111 ++- dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx |2 include/connectivity/dbexception.hxx | 54 + 3 files changed, 49 insertions(+), 118 deletions(-) New commits: commit 7a6fd503b1c69e99eb1bcfb55a453a1afad3e4eb Author: Andrzej J.R. Hunt andr...@ahunt.org Date: Mon Sep 9 09:28:57 2013 +0100 Remove sal_char* from dbexception and some cleanup. Change-Id: I81909e4542bd5e8d1f8ae182c3c17f9bbea9745d Reviewed-on: https://gerrit.libreoffice.org/5881 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index c33c1e0..87e8d50 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -198,12 +198,12 @@ SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const } //-- -void SQLExceptionInfo::prepend( const OUString _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) +void SQLExceptionInfo::prepend( const OUString _rErrorMessage, const OUString _rSQLState, const sal_Int32 _nErrorCode ) { SQLException aException; aException.Message = _rErrorMessage; aException.ErrorCode = _nErrorCode; -aException.SQLState = _pAsciiSQLState ? OUString::createFromAscii( _pAsciiSQLState ) : OUString(S1000 ); +aException.SQLState = !_rSQLState.isEmpty() ? _rSQLState : S1000; aException.NextException = m_aContent; m_aContent = aException; @@ -211,7 +211,7 @@ void SQLExceptionInfo::prepend( const OUString _rErrorMessage, const sal_Char* } //-- -void SQLExceptionInfo::append( TYPE _eType, const OUString _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) +void SQLExceptionInfo::append( TYPE _eType, const OUString _rErrorMessage, const OUString _rSQLState, const sal_Int32 _nErrorCode ) { // create the to-be-appended exception Any aAppend; @@ -227,7 +227,7 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString _rErrorMessage, cons SQLException* pAppendException( static_cast SQLException* ( const_cast void* ( aAppend.getValue() ) ) ); pAppendException-Message = _rErrorMessage; -pAppendException-SQLState = OUString::createFromAscii( _pAsciiSQLState ); +pAppendException-SQLState = _rSQLState; pAppendException-ErrorCode = _nErrorCode; // find the end of the current chain @@ -386,31 +386,18 @@ void throwInvalidIndexException(const ::com::sun::star::uno::Reference ::com::s ); } // - -void throwFunctionNotSupportedException(const OUString _rMsg, -const ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface _Context, -const ::com::sun::star::uno::Any _Next) throw ( ::com::sun::star::sdbc::SQLException ) -{ -throw SQLException( -_rMsg, -_Context, -getStandardSQLState( SQL_FUNCTION_NOT_SUPPORTED ), -0, -_Next -); -} -// - -void throwFunctionNotSupportedException( const sal_Char* _pAsciiFunctionName, const ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface _rxContext, -const ::com::sun::star::uno::Any* _pNextException ) throw ( ::com::sun::star::sdbc::SQLException ) +void throwFunctionNotSupportedException( const OUString _rFunctionName, const ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface _rxContext, +const ::com::sun::star::uno::Any _rNextException ) throw ( ::com::sun::star::sdbc::SQLException ) { ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNSUPPORTED_FUNCTION, -$functionname$, OUString::createFromAscii( _pAsciiFunctionName ) +$functionname$, _rFunctionName ) ); throwFunctionNotSupportedException( sError, _rxContext, -_pNextException ? *_pNextException : Any() +_rNextException ); } // - @@ -428,13 +415,13 @@ void throwGenericSQLException(const OUString _rMsg, const Reference XInterface } // - -void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, const Reference XInterface _rxContext, const Any* _pNextException ) +void throwFeatureNotImplementedException( const OUString _rFeatureName, const Reference