Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3564

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/64/3564/1

Base: fix incorrect field removal in criterion inside query design view

Includes following master commits:

commit 6536d0eb4f56e64c9b74b358642e3ee1e39353e5
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Tue Apr 23 06:44:57 2013 +0200

    reword comment

commit 5143e162f81ec64db4ed2b11a3a79183c4901c79
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Tue Apr 23 06:44:42 2013 +0200

    isEmpty() instead of getLength()==0

commit f0c38b6355333c0bbb02e52a732f04ab0d519ecf
Author: Olivier Ploton <olivier.ploton@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
---
M connectivity/source/parse/sqlnode.cxx
1 file changed, 7 insertions(+), 2 deletions(-)



diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 73fd510..d9bb7a0 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -463,8 +463,13 @@
             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.isEmpty() && rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref))
             {
                 sal_Bool bFilter = sal_False;
                 // retrieve the fields name

-- 
To view, visit https://gerrit.libreoffice.org/3564
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fedae672c24a269fca3dfc1bacc66fd53fc61af
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Lionel Elie Mamane <lionel@mamane.lu>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.