diff options
author | Olivier Ploton <olivier.ploton@univ-tours.fr> | 2012-12-12 22:04:38 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-04-23 06:45:57 +0200 |
commit | f0c38b6355333c0bbb02e52a732f04ab0d519ecf (patch) | |
tree | d8da1bff439fc37fa744493d6b57fac2ee03f7f8 /connectivity | |
parent | fdo#62147: sw: ODF import: apply styles in cells with string-value (diff) | |
download | core-f0c38b6355333c0bbb02e52a732f04ab0d519ecf.tar.gz core-f0c38b6355333c0bbb02e52a732f04ab0d519ecf.zip |
Base: fix incorrect field removal in criterion inside query design view
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index e4ba3e959997..795d4e6bb1a5 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 |