[Libreoffice-commits] .: Branch 'libreoffice-3-5-5' - connectivity/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Jul 3 00:52:13 PDT 2012


 connectivity/source/commontools/dbtools.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a3744b78b52c403630eff81c756ba1543e9c84b
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
    (cherry picked from commit c34ef6b710bd9f3a5beac3be856c970c70e68610)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    Signed-off-by: Fridrich Strba <fridrich.strba at graduateinstitute.ch>
    Signed-off-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 35482a2..5113e4f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1820,7 +1820,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
     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 )
+    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);


More information about the Libreoffice-commits mailing list