diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-10-18 12:56:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-19 19:28:18 +0000 |
commit | 7567a4c230625bbf922c52c861363f1cc4d6a1c7 (patch) | |
tree | 4fe8184d18021beb6c194cc899cec568db5c4ae1 /dbaccess | |
parent | 17cbea4159c369cc9324a67ab2f1aac9cf416476 (diff) |
'>>=' with rhs Any is a copy assignment
replace '>>=' operator with '=' where return value is not checked
and simplify. (note: switches lhs with rhs)
Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8
Reviewed-on: https://gerrit.libreoffice.org/30004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/unosqlmessage.cxx | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 4bd1fe4fc84c..468b1c969cae 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1552,8 +1552,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert OUString aName; column->getPropertyValue(PROPERTY_NAME) >>= aName; - Any aValue; - column->getPropertyValue(PROPERTY_VALUE) >>= aValue; + const Any aValue = column->getPropertyValue(PROPERTY_VALUE); OUStringBuffer aSQL; const OUString aQuote = m_xMetaData->getIdentifierQuoteString(); diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index a2d01a7e3c67..6638c82feaac 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -88,13 +88,12 @@ void OSQLMessageDialog::initialize(Sequence<Any> const & args) throw (css::uno:: { OUString title; Reference< css::awt::XWindow > parentWindow; - css::uno::Any sqlException; - if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= parentWindow) && (args[2] >>= sqlException)) { + if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= parentWindow)) { Sequence<Any> s(3); s[0] <<= PropertyValue( "Title", -1, makeAny(title), PropertyState_DIRECT_VALUE); s[1] <<= PropertyValue( "ParentWindow", -1, makeAny(parentWindow), PropertyState_DIRECT_VALUE); - s[2] <<= PropertyValue( "SQLException", -1, sqlException, PropertyState_DIRECT_VALUE); + s[2] <<= PropertyValue( "SQLException", -1, args[2], PropertyState_DIRECT_VALUE); OGenericUnoDialog::initialize(s); } else { OGenericUnoDialog::initialize(args); |