161 Commits

Author SHA1 Message Date
Stephan Bergmann
75838570c3 loplugin:staticcall
Change-Id: I7f22aa5576ca3c62fa363971f4fa5992b7711563
2014-06-13 17:54:24 +02:00
Caolán McNamara
231ae9c77c coverity#1158175 Missing break in switch, assuming its intentional
Change-Id: Ia0f1951f1e3edcd858a37ea091550feb2b9fd451
2014-06-05 13:35:54 +01:00
Thomas Arnhold
a2db194ea0 connectivity: fix includes
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-06-04 21:18:39 +02:00
Julien Nabet
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
Noel Grandin
7339ab25ee fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
this is a continuation of the above bug, removing SAL_INFO's
that only mark function entry.

Change-Id: Idb0f72481415594e3f8b7a11ad6e4b8835f6fca0
Reviewed-on: https://gerrit.libreoffice.org/9343
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-13 18:04:58 +00:00
Noel Grandin
199d333f13 connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
2014-04-16 11:51:51 +02:00
Noel Grandin
39d3f2bb3a connectivity: sal_Bool->bool
Change-Id: Ice855d69c70d4f5fc119ddf1ddebf18ee6add270
2014-04-01 07:38:09 +02:00
Alexander Wilms
ac9212feed Remove visual noise from connectivity
Conflicts:
	connectivity/source/inc/odbc/OConnection.hxx

Change-Id: I5ca98359e18cf1b27bf53037dde211774d798626
Reviewed-on: https://gerrit.libreoffice.org/8245
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 06:54:35 -06:00
Alexander Wilms
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
Takeshi Abe
3b06e5e646 Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I1ebfb33063d39f64dc59623df0f942501870c4e7
2014-02-22 21:51:27 +09:00
Stephan Bergmann
ead1525417 bool improvements
Change-Id: If35c939adede6a912dee14714a7ceeab84ac977e
2014-01-28 20:24:39 +01:00
Norbert Thiebaud
5de65dc2d6 coverity#440706 : Explicit null dereferenced
Change-Id: I9c078ba5cb413bdb1c790adc327796a85d870974
2014-01-27 03:24:18 -06:00
Noel Grandin
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
Noel Grandin
909b27df48 remove unnecessary double calls to OUString constructor
Change-Id: Ib2690e3ec9987b97363687b61fe8ddae4ace9058
2013-12-17 11:49:04 +02:00
Lionel Elie Mamane
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
Stephan Bergmann
b0926378ac Clean up includes of comphelper/stl_types.hxx
Change-Id: I00a8e794189d17ad91a90beb9ce6cb89b7bab2aa
2013-12-06 17:56:11 +01:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Noel Grandin
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
Noel Grandin
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
Luboš Luňák
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
Tor Lillqvist
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
Tor Lillqvist
986b39aa4f Avoid duplicate definition of xxx_pGLOBAL_SQLPARSER at linking stage
Change-Id: I29a3a68f9ee434332cad7199a90a1b01c22fbe0e
2013-07-10 20:48:49 +03:00
Lionel Elie Mamane
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
Lionel Elie Mamane
2cfb215de6 impl_parseLikeNodeToString_throw should be called only on a like_predicate
Change-Id: I3597aadab8b13703ed7b7731d530320c4e5999be
2013-06-28 16:26:07 +02:00
Lionel Elie Mamane
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
Lionel Elie Mamane
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
Lionel Elie Mamane
20499497b0 fdo#65653 make columnMatchP safer
Change-Id: Id994ab5aed6172d8a93fd331a366fca10a663a48
2013-06-18 13:02:38 +02:00
Radu Ioan
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
Zolnai Tamás
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
Tor Lillqvist
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
Lionel Elie Mamane
a0b720c9fc remove never-generated "predicate_check" entry
Change-Id: Ib3957fbadf6bfebfaabd5bef09aaf7ab21862cd6
2013-04-26 16:49:50 +02:00
Lionel Elie Mamane
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
Lionel Elie Mamane
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
Lionel Elie Mamane
e9ae448b1e janitorial: indentation, spacing, ...
Change-Id: Ie794e91783f8eaacf236070e7cdeb5b5f4361e9b
2013-04-26 16:49:46 +02:00
Lionel Elie Mamane
e3d0f6ad11 sal_Bool -> bool
Change-Id: I157e0e84cbc9832dd863607b8f52359596b51c8c
2013-04-26 16:49:45 +02:00
Lionel Elie Mamane
6536d0eb4f reword comment
Change-Id: I13aaf37421c7652e8e293759e9f563fc76cb1344
2013-04-23 06:45:59 +02:00
Lionel Elie Mamane
5143e162f8 isEmpty() instead of getLength()==0
Change-Id: I610ecd58f3f7fa7f3ab04db8b17259bbc54c2b74
2013-04-23 06:45:58 +02:00
Olivier Ploton
f0c38b6355 Base: fix incorrect field removal in criterion inside query design view 2013-04-23 06:45:57 +02:00
Lionel Elie Mamane
86ef5f6f8c remove impossible case
nCount == 5 is impossible; the grammar has changed since this code was written.
It used to refer to case '(' joined_table ')' range_variable op_column_commalist
which has become just '(' joined_table ')'
which thus has (by definition) no table range (alias).

Case changed in mega-(merge-)commit:

commit c41efc6d0b2740be4243fd696385f8dbcec0aefe
Author: Jens-Heiner Rechtien <hr@openoffice.org>
Date:   Wed Nov 19 17:43:08 2008 +0000

    CWS-TOOLING: integrate CWS dba301a_DEV300

which seems to have done the other necessary adaptations to this code
and elsewhere.

Change-Id: I96ddbefbf34d6c155435b78aa9e5037a760232ed
2013-04-10 18:12:09 +02:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Stephan Bergmann
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
Tor Lillqvist
aac64d030f Fix warning: unused variable 'aMutex' [loplugin]
Change-Id: I1dc2d18f285bbd7fc4316a7a194a21769b11d545
2013-03-25 21:44:13 +02:00
Thomas Arnhold
6dddefc6e7 fdo#43460: use isEmpty()
Change-Id: Ia768e684d3cf255239c04d024b35488830cc9fe6
2013-03-09 21:47:31 +01:00
Thomas Arnhold
4f4e4e40f5 loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
2013-02-25 17:59:40 +01:00
Lionel Elie Mamane
5214bda61e SQL parser: no "as" rule anymore; now as_clause and opt_as
Change-Id: Ib0c7151b311029318c213abb86e6541e3b27d040
2013-01-23 16:32:53 +01:00
Lionel Elie Mamane
22fef9910e Make UNKNOWN_RULE the default value of connectivity::OSQLParseNode::Rule
Change-Id: I4e56da8820d5c92d3b6e2ff2c749bdc0cef46d73
2013-01-23 16:32:52 +01:00
Noel Grandin
b9a4a0b965 fdo#46808, Convert connectivity::SQLError to use XComponentContext...
...instead of comphelper::ComponentContext.

Change-Id: I40384c2d7cfcabd06506321d686dd8e7c7c5f266
2012-12-10 08:05:49 +02:00
Noel Grandin
0666e43c45 fdo#46808, use service constructor for i18n::CharacterClassification
Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76
2012-11-05 18:05:00 +01:00
Stephan Bergmann
03a9f139bd ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.

Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
2012-09-19 13:16:38 +02:00
Noel Grandin
369e3fdcda fdo#46808, Adapt i18n::LocaleData UNO service to new style
The implementation of the LocaleData implements the optional XLocaleData4,
so rather than creating a new interface for the new-style service, we simply
make the service implement XLocaleData4, which in turn implements
XLocaleData3, XLocaleData2, XLocaleData.

Change-Id: I3e9a48b031be6b2aa5e04b376b3940b942add85a
2012-09-17 14:28:21 +02:00