From 7567a4c230625bbf922c52c861363f1cc4d6a1c7 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Tue, 18 Oct 2016 12:56:25 +0200 Subject: '>>=' 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 Reviewed-by: Noel Grandin --- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 3 +-- dbaccess/source/ui/uno/unosqlmessage.cxx | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'dbaccess') 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 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 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); -- cgit