summaryrefslogtreecommitdiff
path: root/include/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 12:57:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-01 07:12:36 +0100
commit8c9b5a901dcbb430bbf225ed0a2d7a286b1d5185 (patch)
treeedf76ea7647609264260d20d86dca9357aa662db /include/connectivity
parentc45a3488af6455a3b307f9e64bed41d23b3bae53 (diff)
loplugin:constantparam in connectivity
Change-Id: Ia13d0931bbdf642fe04119ea1112788fb143eba8 Reviewed-on: https://gerrit.libreoffice.org/44110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/connectivity')
-rw-r--r--include/connectivity/dbconversion.hxx2
-rw-r--r--include/connectivity/dbexception.hxx3
-rw-r--r--include/connectivity/dbtools.hxx42
3 files changed, 17 insertions, 30 deletions
diff --git a/include/connectivity/dbconversion.hxx b/include/connectivity/dbconversion.hxx
index 2e67931cb3ad..270aea7b86da 100644
--- a/include/connectivity/dbconversion.hxx
+++ b/include/connectivity/dbconversion.hxx
@@ -135,7 +135,7 @@ namespace dbtools
// return the DateTime in the format %04d-%02d-%02d %02d:%02d:%02d.%09d
OOO_DLLPUBLIC_DBTOOLS OUString toDateTimeString(const css::util::DateTime& _rDateTime);
// return the any in an sql standard format
- OOO_DLLPUBLIC_DBTOOLS OUString toSQLString(sal_Int32 eType, const css::uno::Any& _rVal, bool bQuote,
+ OOO_DLLPUBLIC_DBTOOLS OUString toSQLString(sal_Int32 eType, const css::uno::Any& _rVal,
const css::uno::Reference< css::script::XTypeConverter >& _rxTypeConverter);
/** converts a Unicode string into a 8-bit string, using the given encoding
diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx
index 0742d5b69224..16c499954ad2 100644
--- a/include/connectivity/dbexception.hxx
+++ b/include/connectivity/dbexception.hxx
@@ -310,8 +310,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
const OUString& _rMessage,
const OUString& _rSQLState,
const css::uno::Reference< css::uno::XInterface >& _rxContext,
- const sal_Int32 _nErrorCode = 0,
- const css::uno::Any* _pNextException = nullptr
+ const sal_Int32 _nErrorCode = 0
);
diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx
index e0bf5ca8f022..885cf82e50b9 100644
--- a/include/connectivity/dbtools.hxx
+++ b/include/connectivity/dbtools.hxx
@@ -127,28 +127,27 @@ namespace dbtools
retrieved from the driver manager.
</nl>
+ The calculated connection is set as ActiveConnection property on the rowset.
+
+ If the connection was newly created by the method, then
+ the ownership of the connection is delivered to a temporary object, which observes the
+ row set: As soon as a connection-relevant property of the row set changes, or as soon
+ as somebody else sets another ActiveConnection at the row set, the original
+ connection (the one which this function calculated) is disposed and discarded. At this
+ very moment, also the temporary observer object dies. This way, it is ensured that
+ there's no resource leak from an un-owned connection object.
+
@param _rxRowSet
the row set
@param _rxFactory
a service factory, which can be used to create data sources, interaction handler etc (the usual stuff)
- @param _bSetAsActiveConnection
- If <TRUE/>, the calculated connection is set as ActiveConnection property on the rowset.
-
- If the connection was newly created by the method, and this parameter is <TRUE/>, then
- the ownership of the connection is delivered to a temporary object, which observes the
- row set: As soon as a connection-relevant property of the row set changes, or as soon
- as somebody else sets another ActiveConnection at the row set, the original
- connection (the one which this function calculated) is disposed and discarded. At this
- very moment, also the temporary observer object dies. This way, it is ensured that
- there's no resource leak from an un-owned connection object.
*/
OOO_DLLPUBLIC_DBTOOLS
css::uno::Reference< css::sdbc::XConnection> connectRowset(
const css::uno::Reference< css::sdbc::XRowSet>& _rxRowSet,
- const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
- bool _bSetAsActiveConnection
+ const css::uno::Reference< css::uno::XComponentContext>& _rxContext
);
/** ensures that a row set has a valid ActiveConnection, if possible
@@ -163,21 +162,15 @@ namespace dbtools
<ul><li>If the connection was not newly created, the returned ->SharedConnection
instance will not have the ownership, since in this case it's assumed
that there already is an instance which has the ownership.</li>
- <li>If the connection was newly created, and ->_bUseAutoConnectionDisposer
- is <TRUE/>, then the returned SharedConnection instance will <em>not</em>
- be the owner of the connection. Instead, the ownership will be delivered
- to a temporary object as described for connectRowset.</li>
- <li>If the connection was newly created, and ->_bUseAutoConnectionDisposer
- is <FALSE/>, then the returned SharedConnection instance will have the
- ownership of the XConnection.</li>
+ <li>If the connection was newly created, then the returned SharedConnection
+ instance will have the ownership of the XConnection.</li>
</ul>
</li>
</ul>
*/
OOO_DLLPUBLIC_DBTOOLS SharedConnection ensureRowSetConnection(
const css::uno::Reference< css::sdbc::XRowSet>& _rxRowSet,
- const css::uno::Reference< css::uno::XComponentContext>& _rxContext,
- bool _bUseAutoConnectionDisposer
+ const css::uno::Reference< css::uno::XComponentContext>& _rxContext
);
/** returns the connection the RowSet is currently working with (which is the ActiveConnection property)
@@ -482,8 +475,6 @@ namespace dbtools
const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData,
const css::uno::Reference< css::beans::XPropertySet>& _xTable,
EComposeRule _eComposeRule,
- bool _bSuppressCatalogName,
- bool _bSuppressSchemaName,
bool _bQuote);
@@ -794,13 +785,10 @@ namespace dbtools
a query composer that knows the field by name
@param _xField
the field
- @param whenNotFound
- value returned when _sName is not known by _xComposer
*/
OOO_DLLPUBLIC_DBTOOLS bool isAggregateColumn(
const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xComposer,
- const css::uno::Reference< css::beans::XPropertySet > &_xField,
- bool whenNotFound = false
+ const css::uno::Reference< css::beans::XPropertySet > &_xField
);
/** is this column an aggregate?