[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - connectivity/source

Olivier Ploton olivier.ploton at univ-tours.fr
Tue Apr 23 08:11:59 PDT 2013


 connectivity/source/parse/sqlnode.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit ade0bd686190aa7016c2d0e1dab231cb15365fde
Author: Olivier Ploton <olivier.ploton at univ-tours.fr>
Date:   Wed Dec 12 22:04:38 2012 +0100

    Base: fix incorrect field removal in criterion inside query design view
    
    Includes following master commits:
    
    commit 6536d0eb4f56e64c9b74b358642e3ee1e39353e5
    Author: Lionel Elie Mamane <lionel at mamane.lu>
    Date:   Tue Apr 23 06:44:57 2013 +0200
    
        reword comment
    
    commit 5143e162f81ec64db4ed2b11a3a79183c4901c79
    Author: Lionel Elie Mamane <lionel at mamane.lu>
    Date:   Tue Apr 23 06:44:42 2013 +0200
    
        isEmpty() instead of getLength()==0
    
    commit f0c38b6355333c0bbb02e52a732f04ab0d519ecf
    Author: Olivier Ploton <olivier.ploton at univ-tours.fr>
    Date:   Wed Dec 12 22:04:38 2012 +0100
    
        Base: fix incorrect field removal in criterion inside query design view
    
    Change-Id: I2fedae672c24a269fca3dfc1bacc66fd53fc61af
    Signed-off-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 73fd510..4704b74 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -463,8 +463,13 @@ void OSQLParseNode::impl_parseNodeToString_throw(::rtl::OUStringBuffer& rString,
             if (rParam.xField.is() && SQL_ISRULE(pSubTree,subquery))
                 aNewParam.xField = NULL;
 
-            // if there is a field given we don't display the fieldname, if there is any
-            if (rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref))
+            // When we are building a criterion inside a query view,
+            // simplify criterion display by removing:
+            //   "currentFieldName"
+            //   "currentFieldName" =
+            // but only at the very beginning of the criterion
+            // (not embedded deep in the expression).
+            if (rString.getLength() == 0 && rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref))
             {
                 sal_Bool bFilter = sal_False;
                 // retrieve the fields name


More information about the Libreoffice-commits mailing list