connectivity/source/parse/sqlnode.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 6536d0eb4f56e64c9b74b358642e3ee1e39353e5 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Tue Apr 23 06:44:57 2013 +0200 reword comment Change-Id: I13aaf37421c7652e8e293759e9f563fc76cb1344 diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index ea384ac..391e6d6 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -471,10 +471,12 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const if (rParam.xField.is() && SQL_ISRULE(pSubTree,subquery)) aNewParam.xField = NULL; - // Special case: if there is a field given we are building - // a criterion inside a query view (and rString is supposed - // to be initially empty). In order to simplify criterion text - // inside view, omit fieldname if it appears as 1st token. + // 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; commit 5143e162f81ec64db4ed2b11a3a79183c4901c79 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Tue Apr 23 06:44:42 2013 +0200 isEmpty() instead of getLength()==0 Change-Id: I610ecd58f3f7fa7f3ab04db8b17259bbc54c2b74 diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 795d4e6..ea384ac 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -475,7 +475,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const // a criterion inside a query view (and rString is supposed // to be initially empty). In order to simplify criterion text // inside view, omit fieldname if it appears as 1st token. - if ((rString.getLength() == 0) && rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref)) + if (rString.isEmpty() && rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref)) { sal_Bool bFilter = sal_False; // retrieve the fields name commit f0c38b6355333c0bbb02e52a732f04ab0d519ecf Author: Olivier Ploton <olivier.plo...@univ-tours.fr> Date: Wed Dec 12 22:04:38 2012 +0100 Base: fix incorrect field removal in criterion inside query design view diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index e4ba3e9..795d4e6 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -471,8 +471,11 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const 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)) + // Special case: if there is a field given we are building + // a criterion inside a query view (and rString is supposed + // to be initially empty). In order to simplify criterion text + // inside view, omit fieldname if it appears as 1st token. + if ((rString.getLength() == 0) && rParam.xField.is() && SQL_ISRULE(pSubTree,column_ref)) { sal_Bool bFilter = sal_False; // retrieve the fields name _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits