diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-28 13:09:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-04 07:32:43 +0100 |
commit | 9865440d217d975206a3f91612f0666312bc8fd8 (patch) | |
tree | 7d5926e5bfe94c05a923ea68dba0ac6793c5a4a9 /dbaccess | |
parent | e7f71c7ab675f238b61d7f28e7f79f51c7e19801 (diff) |
new loplugin typedefparam
verify that parameters use the exact same typedef-names (if any)
in definition and declaration
Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77
Reviewed-on: https://gerrit.libreoffice.org/68439
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlimport.cxx | 21 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/parseschema.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/rowinputbinary.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/charsets.cxx | 2 |
5 files changed, 13 insertions, 18 deletions
diff --git a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx index 89371c735c44..ec5572667dea 100644 --- a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx @@ -48,7 +48,7 @@ void HsqlBinaryNode::readChildren(HsqlRowInputStream const& input) } std::vector<css::uno::Any> HsqlBinaryNode::readRow(HsqlRowInputStream& input, - const ColumnTypeVector& aColTypes, + const std::vector<ColumnDefinition>& aColTypes, sal_Int32 nIndexCount) { // skip first 4 bytes (size), and index nodes, 16 bytes each diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx index b29889c1b6cd..dc5b51cc07ce 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx @@ -48,12 +48,8 @@ using namespace css::io; using namespace css::uno; using namespace css::sdbc; -using ColumnTypeVector = std::vector<dbahsql::ColumnDefinition>; -using RowVector = std::vector<Any>; -using IndexVector = std::vector<sal_Int32>; - -void lcl_setParams(const RowVector& row, Reference<XParameters> const& xParam, - const ColumnTypeVector& rColTypes) +void lcl_setParams(const std::vector<Any>& row, Reference<XParameters> const& xParam, + const std::vector<dbahsql::ColumnDefinition>& rColTypes) { assert(row.size() == rColTypes.size()); size_t nColIndex = 0; @@ -182,7 +178,8 @@ void lcl_setParams(const RowVector& row, Reference<XParameters> const& xParam, } } -OUString lcl_createInsertStatement(const OUString& sTableName, const ColumnTypeVector& rColTypes) +OUString lcl_createInsertStatement(const OUString& sTableName, + const std::vector<dbahsql::ColumnDefinition>& rColTypes) { assert(rColTypes.size() > 0); OUStringBuffer sql("INSERT INTO "); @@ -221,8 +218,8 @@ HsqlImporter::HsqlImporter(Reference<XConnection>& rConnection, const Reference< m_xStorage.set(rStorage); } -void HsqlImporter::insertRow(const RowVector& xRows, const OUString& sTableName, - const ColumnTypeVector& rColTypes) +void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTableName, + const std::vector<ColumnDefinition>& rColTypes) { OUString sStatement = lcl_createInsertStatement(sTableName, rColTypes); Reference<XPreparedStatement> xStatement = m_rConnection->prepareStatement(sStatement); @@ -236,8 +233,8 @@ void HsqlImporter::insertRow(const RowVector& xRows, const OUString& sTableName, } void HsqlImporter::processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStream, - const ColumnTypeVector& rColTypes, const OUString& sTableName, - sal_Int32 nIndexCount) + const std::vector<ColumnDefinition>& rColTypes, + const OUString& sTableName, sal_Int32 nIndexCount) { rNode.readChildren(rStream); sal_Int32 nNext = rNode.getLeft(); @@ -267,7 +264,7 @@ void HsqlImporter::processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStrea * Balance: ? * Left/Right/Parent: File position of the Left/Right/Parent child */ -void HsqlImporter::parseTableRows(const IndexVector& rIndexes, +void HsqlImporter::parseTableRows(const std::vector<sal_Int32>& rIndexes, const std::vector<ColumnDefinition>& rColTypes, const OUString& sTableName) { diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx index e04998c80f28..be08037b7be5 100644 --- a/dbaccess/source/filter/hsqldb/parseschema.cxx +++ b/dbaccess/source/filter/hsqldb/parseschema.cxx @@ -167,7 +167,7 @@ void SchemaParser::parseSchema() } } -ColumnTypeVector SchemaParser::getTableColumnTypes(const OUString& sTableName) const +std::vector<ColumnDefinition> SchemaParser::getTableColumnTypes(const OUString& sTableName) const { return m_ColumnTypes.at(sTableName); } diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx index 5a447cacb4f3..24448f627971 100644 --- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx +++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx @@ -134,8 +134,6 @@ using namespace css::io; using namespace boost::posix_time; using namespace boost::gregorian; -typedef std::vector<ColumnDefinition> ColumnTypeVector; - HsqlRowInputStream::HsqlRowInputStream() {} void HsqlRowInputStream::setInputStream(Reference<XInputStream> const& rStream) @@ -239,7 +237,7 @@ bool HsqlRowInputStream::checkNull() return nNull == 0; } -std::vector<Any> HsqlRowInputStream::readOneRow(const ColumnTypeVector& nColTypes) +std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefinition>& nColTypes) { auto nLen = nColTypes.size(); std::vector<Any> aData; diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index e068c18f98ef..9404d777cea5 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -86,7 +86,7 @@ namespace dbaui { } - CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper_Base& _rBase, const OUString& _rDisplayName) + CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName) :CharsetDisplayDerefHelper_Base(_rBase) ,m_sDisplayName(_rDisplayName) { |