[Libreoffice-commits] .: 2 commits - connectivity/source
Lionel Elie Mamane
lmamane at kemper.freedesktop.org
Mon Jul 2 06:19:18 PDT 2012
connectivity/source/commontools/dbtools.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit c34ef6b710bd9f3a5beac3be856c970c70e68610
Author: Lionel Elie Mamane <lionel at 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 76b5ff9..96639c6 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1788,7 +1788,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 7cb5924a9bdb6d63e6e0a1fd23b4d4f8473b21a2
Author: Lionel Elie Mamane <lionel at 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 bd024cb..76b5ff9 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1786,7 +1786,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 )
More information about the Libreoffice-commits
mailing list