Commit Graph

446 Commits

Author SHA1 Message Date
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
3b06e5e646 Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I1ebfb33063d39f64dc59623df0f942501870c4e7
2014-02-22 21:51:27 +09:00
ead1525417 bool improvements
Change-Id: If35c939adede6a912dee14714a7ceeab84ac977e
2014-01-28 20:24:39 +01:00
5de65dc2d6 coverity#440706 : Explicit null dereferenced
Change-Id: I9c078ba5cb413bdb1c790adc327796a85d870974
2014-01-27 03:24:18 -06:00
09c749cc57 coverity#440711 Explicit null dereferenced
Change-Id: I794ac29dc81b1d42b959135277284de1f8c33ccf
2014-01-23 17:01:04 +00:00
12ca5ec6f4 Drop unused #include
Change-Id: I06d3b5dde967a424df1ad20ab2c02878c7d0fbb9
2014-01-17 10:29:01 +09:00
8548abbac5 Remove unnecessary use of OUString constructor in OUStringBuffer::append calls
Convert code like
  aStrBuffer.append(OUString(" AS "));
to
  aStrBuffer.append(" AS ");

Change-Id: I8c1884b5a875f40f0b5e511b6ef38c6c8eeee656
2013-12-17 11:49:04 +02:00
909b27df48 remove unnecessary double calls to OUString constructor
Change-Id: Ib2690e3ec9987b97363687b61fe8ddae4ace9058
2013-12-17 11:49:04 +02:00
c69b6417af fdo#72598 Remove SunStudio cruft from code base
Change-Id: Ia6799c852eb95d496fbc8dcfdabde62dffc263a6
Reviewed-on: https://gerrit.libreoffice.org/7066
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-12-13 09:07:07 +00:00
ee712dd696 fdo#72267 boolean_test is subsumed by general case "foo IS [NOT] bar"
Change-Id: Ie9666b1c8878dd26593629b4b64d74b7448f98c1
2013-12-07 21:35:57 +01:00
b0926378ac Clean up includes of comphelper/stl_types.hxx
Change-Id: I00a8e794189d17ad91a90beb9ce6cb89b7bab2aa
2013-12-06 17:56:11 +01:00
c78f7d85ab Get rid of DECLARE_STL_MAP
Change-Id: Ifbda934a89087fcc1c031978d3e5b5783722b328
2013-12-06 10:37:50 +01:00
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