connectivity/source/commontools/dbtools.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 4b51fb0b56c19d8c32d32adb8ea10ab5b586b403 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Mon Jul 2 14:52:58 2012 +0200 fdo#51619 do not ask for parameters if all have already been given Change-Id: I1c1b1e46e7269bbfa24fbc0c0ebf5ba0f5aad7b9 diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 755fe9e..9286efd 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1819,7 +1819,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>(); sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0; ::std::vector<bool, std::allocator<bool> > aNewParameterSet( _aParametersSet ); - if ( nParamCount || ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount ) + if ( nParamCount && ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount ) { static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)); aNewParameterSet.resize(nParamCount ,false); commit 0b35e876bf0ab174e36ed46cafba1740ddf30e68 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Mon Jul 2 14:48:03 2012 +0200 janitorial: remove unused xParamsAsNames variable Change-Id: Ic4fe24faf75d38a8123a8f0e8304c054760bad85 diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 35482a2..755fe9e 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1817,7 +1817,6 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, Reference<XParametersSupplier> xParameters = Reference<XParametersSupplier> (_xComposer, UNO_QUERY); Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>(); - Reference<XNameAccess> xParamsAsNames(xParamsAsIndicies, UNO_QUERY); sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0; ::std::vector<bool, std::allocator<bool> > aNewParameterSet( _aParametersSet ); if ( nParamCount || ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits