Commit Graph

434 Commits

Author SHA1 Message Date
2fde764591 sqlbison.y string clean-up
Change-Id: I1ab32794a10f78f305de8057af5885d7719f87a3
2013-11-26 23:15:36 +01:00
1ba111343e bugs.freedesktop.org -> bugs.libreoffice.org
Change-Id: I56c1190c93333636981acf2dd271515170a8a904
2013-11-17 08:33:01 +01:00
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
aeb41c9b9b remove redundant calls to OUString constructor
Change code like this:
  aStr = OUString("xxxx");
into this:
  aStr = "xxxx";

Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04 10:11:07 +02:00
7eb42bddb3 windows: warning 4706 is disabled globally in com_MSC_defs.mk
So there is no need to do this locally, too.

Change-Id: Ibc623235cae07a86dfd0dbc1d7672ca4273facec
2013-10-28 01:08:27 +01:00
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
abb6ab4145 Fix warnings in sqlflex.l, sqlbison.y
Change-Id: I6c6b9452014940e09f8f4b7466c5a5f562c9fff5
2013-10-02 16:49:48 +02:00
fac0354929 translate german comments in sqlbison.y
Change-Id: Ic573e5ae63fdfb3d4ff79eb6d81fe0f4b058d582
2013-09-13 14:56:32 +02:00
04e92a626e fix Apple g++ 4.2.1 unused function warning in sqlbison.y
Change-Id: Icc55a6b485341e3be0d3e96f51f41a2bba1629c1
2013-09-13 14:56:32 +02:00
be3e037b38 setting a table name on an expression/function call makes no sense
Change-Id: Id30805f09bc359c6f66d87f050427c0e586ec93d
2013-09-13 12:08:05 +02:00
974d73d219 remove an arbitrary level of nested parentheses
not only one.

Change-Id: I1f611dda6a98fb6244409c0cd1fc87fc9dfaa8c3
2013-09-13 12:08:04 +02:00
7b4b3ad8c6 Don't clobber argument on failure
Change-Id: I709305d4ec3c37d3fc1c2c911551174f8cfbb883
2013-09-13 12:08:03 +02:00
fa1b2554d5 use replaceFirst
Change-Id: Ia20eec6e868579ed31e478514b7f2722a0972094
Reviewed-on: https://gerrit.libreoffice.org/5828
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-05 16:49:33 +00:00
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
231cb07d0e connectivity bison/flex: get rid on unnecessary static OUString()
Change-Id: I06057fd5fddde278333bf3b65388c70d30b69d79
2013-07-11 22:34:19 -05:00
21b2b1c049 unused variable 'sTableName' [loplugin]
Change-Id: I5fe746ed08a7b1124465231b6e85475da5490904
2013-07-11 20:48:20 +02:00
33fe41cf45 sort is ascending by default
Change-Id: I38354405acbbdb27b9e7ce1d19e862b7b352c850
2013-07-11 17:53:33 +02:00
417925840e give right function name in debug messages
Change-Id: I7d82e34545a5aab657f3156b8c5b23c8a8531a11
2013-07-11 17:53:31 +02:00
40370f759c ORDER BY columns are prioritarily *SELECT* columns
as opposed to *table* columns,
and notwithstanding HSQLDB 1.8 (our embedded database) bugs.
Actually, supporting ORDER BY on non-select (but table) columns is OPTIONAL for DBMSs
(but quite common)

Change-Id: I6725dfda36b09429a78262bff6f3d3e3dd9032b6
2013-07-11 17:53:30 +02:00
ad1049716a remove unreachable code, reorganise OSL_ENSUREs
Change-Id: I5a5df020dd6900e28a9db94bfa179baa3f59dc4a
2013-07-11 17:53:29 +02:00
48e5349a6e lcl_getColumnRange: no table range -> match 1st name-matching select column
as opposed to no match

Change-Id: I811abd9df5b6cc617c28ab330cecb406cd11e709
2013-07-11 17:53:28 +02:00
a0c50b739c Further fallout from the connectivity SQL parser changes
A couple of headers now need to be public because they are indirectly
included in other modules.

Change-Id: Id01945197b67183a0a042e854289875ae147a0eb
2013-07-10 20:48:49 +03:00
986b39aa4f Avoid duplicate definition of xxx_pGLOBAL_SQLPARSER at linking stage
Change-Id: I29a3a68f9ee434332cad7199a90a1b01c22fbe0e
2013-07-10 20:48:49 +03:00
60a1254495 WaE: unused functions
Change-Id: Ie54546ef97fe102de09888ce9c7eefe6c879aae4
2013-07-10 20:48:49 +03:00
911a229cc6 Undef SQLyyerror, too
Change-Id: Id80d373d93df140b8fc0d0d0c44044b94ceb97a9
2013-07-10 20:48:48 +03:00
86ffbdcd40 make aEmptyString const
ensures nobody mistakenly modifies it, and makes other code get
a non-empty string where empty string is expected.

Change-Id: I477edd0e589444da19b68381234eb5e85ecd54cc
2013-07-10 18:15:14 +02:00
9a34875667 compatibility with 2008-era bison (2.3)
Undo problematic pollution by sqlbison.hxx
Since with post-2008 (2.4 and later) bison that "#define SQLyylex"\is not active in sqlflex.l, this forces the situation	o be the same in all versions of bison, and should notreak anything by itself.

Change-Id: Ie65e3f6cc61dc97adc1d530e3781306ecd176b17
2013-07-10 18:08:39 +02:00
412c67a916 fix doubly-defined aEmptyStr with Bison 2.3
Change-Id: Ia54673f3e689a49b3e9101ae4cf5b57f1e68f592
2013-07-10 16:14:05 +02:00
83076c22e1 TODO note
Change-Id: I1b310119c08052949e975bfa3838e229d4e140b2
2013-07-10 03:15:13 +02:00
c9a8f238e0 remove bogus test
the TABLENAME property contains the *original* tablename, but this column should have the query table alias as table name

Change-Id: Ieeb362f38b701b92998e293dda474bad36e5e577
2013-07-10 03:15:12 +02:00
f220c3913a make SQL grammar Generalised LR
This fixes parsing failures, like e.g.
warn:legacy.osl:30429:1:dbaccess/source/core/api/SingleSelectQueryComposer.cxx:783: OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!
when opening query "Balance" of https://bugs.freedesktop.org/attachment.cgi?id=71964

OTOH, since we have reduce/reduce conflicts, we might have true
ambiguities in our grammar. This change makes the parsing fail
in the presence of full-expression ambiguities instead of making
a ~arbitrary choice.

Change-Id: I88574da91045dd52f198f193c78d144302f298a4
2013-07-10 03:15:12 +02:00
6eb9c378f4 fdo#58644 fix handling of subqueries
don't remove parentheses around subqueries
(without the parentheses, it is not valid SQL)

Change-Id: I4e9c55cea0276f10b0f97e31bc329949aba5b989
2013-07-10 03:15:11 +02:00
4296394d5c remove pointless external guards for standard headers
Change-Id: I509984a6029b6a86fd1ee3f947394af9cdf71c6a
2013-06-28 18:10:16 +02:00
2cfb215de6 impl_parseLikeNodeToString_throw should be called only on a like_predicate
Change-Id: I3597aadab8b13703ed7b7731d530320c4e5999be
2013-06-28 16:26:07 +02:00
ede7f6ae5f fdo#66130 correct "skip column name" condition for LIKE predicate
When converting a parse tree to SQL snippet for a predicate in the
context of a column, we skip the name of the same column in 'simple'
cases.

This is used mainly in the "Criterion" lines of query design,
and in the search/filter dialogs of forms, tables, etc.

In all other cases (such as when creating a full SQL command, or for
references to *other* columns than the context one), the column name
must be printed out.

In this respect, the condition "should we skip the column name?" in
impl_parseLikeNodeToString_throw was buggy, and different from the
one in the general case (in impl_parseNodeToString_throw), leading
to generating invalid SQL like:
 SELECT foo, bar FROM baz LEFT JOIN qux ON LIKE qux.quu
instead of
 SELECT foo, bar FROM baz LEFT JOIN qux ON baz.baa LIKE qux.quu

Change-Id: Ie14fce319554a66feb0fd0ce1a03d947a46a820a
2013-06-28 16:26:06 +02:00
ed9f838720 Revert "fdo#65653, fdo#65619, fdo#65216: Missing check"
This reverts commit 10777b37536be16c6d2e167b59e9e31e37ba3517.

The problem has been fixed in a more safe way by making columnMatchP
treat the case where rParam.xField is not set instead of requiring
it from all callers.

Change-Id: Ic68a764e08446a7b669c6030c2bcd55c7d31772b
2013-06-18 13:06:45 +02:00
20499497b0 fdo#65653 make columnMatchP safer
Change-Id: Id994ab5aed6172d8a93fd331a366fca10a663a48
2013-06-18 13:02:38 +02:00
dd3f8fbaff fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO
- replace OSL_* with SAL_*

Change-Id: If89af70767c3fdc4b1d0cb5e51033ca98583bc5d
Reviewed-on: https://gerrit.libreoffice.org/4286
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 15:55:21 +00:00
10777b3753 fdo#65653, fdo#65619, fdo#65216: Missing check
Problem caused by commit:
16c9ce4877def18ca4578171a96615a632d08092
This commit contains code deduplication.
The deduplication removed one needed check (rParam.xFiled.is()),
which causes segfault when member function of rParam.xField
is called inside columnMatchP().

Change-Id: Ibbdaa758dbbce4b76094e6cc120022ef276b30c4
2013-06-15 11:02:32 +02:00
2ae6f9d1d2 RHEL-5 baseline ver of flex doesn't have nounistd
lets try this hack, if it fails revert and I'll just
manually update the baseline with a newer flex than
flex-2.5.4a-41.fc6

Change-Id: If644489e80fc4e4cdba97808af0fe4d544d08646
2013-05-23 13:57:20 +01:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
09373d4583 soltools: remove Package_inc and empty unistd.h nonsense
Change-Id: Ic05de69951b28b9cc8d62f0a534b507c424e6b25
2013-05-10 17:56:24 +02:00
a0b720c9fc remove never-generated "predicate_check" entry
Change-Id: Ib3957fbadf6bfebfaabd5bef09aaf7ab21862cd6
2013-04-26 16:49:50 +02:00
16c9ce4877 QueryDesign: in criteria, remove matching column_ref in simple expressions
Basically, in first children of infix predicates in search_conditions

Change-Id: I0e2f8fbdde023b088f33d2e2fcbd41110f0e02a8
2013-04-26 16:49:49 +02:00
fccfa69c15 remove unused const
Change-Id: I94c274e8afc70fa702063d61139299a7bde9165b
2013-04-26 16:49:49 +02:00
1bc4a49d9b QueryDesign: in criteria, remove column_ref when table *and* column name match
As opposed to only the column name

Change-Id: I261d13f23214f950daa55a5b63cd486e59a0e127
2013-04-26 16:49:48 +02:00
e9ae448b1e janitorial: indentation, spacing, ...
Change-Id: Ie794e91783f8eaacf236070e7cdeb5b5f4361e9b
2013-04-26 16:49:46 +02:00
e3d0f6ad11 sal_Bool -> bool
Change-Id: I157e0e84cbc9832dd863607b8f52359596b51c8c
2013-04-26 16:49:45 +02:00
6536d0eb4f reword comment
Change-Id: I13aaf37421c7652e8e293759e9f563fc76cb1344
2013-04-23 06:45:59 +02:00