Commit Graph

241 Commits

Author SHA1 Message Date
Julien Nabet
ee12e843c6 fdo#84073: change ODBC/JDBC escapes to lowercase
Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8
2014-10-09 18:22:15 +02:00
Noel Grandin
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
Stephan Bergmann
b396ae62f7 dbaccess: sal_Bool -> bool
Change-Id: Ifad71823e72be71cbd9f9f58a51f4553ff54e4d4
2014-09-12 16:15:27 +02:00
Markus Mohrhard
d6cae8aa53 fix build again
Change-Id: If3cfc7d1974036fe6110726da574b07975ab9aef
2014-08-16 00:54:34 +02:00
Thomas Arnhold
140d082fb1 ErrorBoxes from querydesign to String
Change-Id: I2aa9aa5b0d730c0546e8565d03b9b7d3d051235a
2014-08-15 23:30:29 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Stephan Bergmann
529e7619c5 loplugin:staticcall
Change-Id: I78895f3524086e1d00d9e8eafd52e505f786320b
2014-06-13 17:54:25 +02:00
Noel Grandin
fee4efcb54 dbaccess: sal_Bool->bool
Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a
2014-04-17 11:17:21 +02:00
Caolán McNamara
97865e0a72 coverity#983369 Dereference before null check
Change-Id: Ifadcbe32aa64a9653f4e8dd8742dd3c5da22facd
2014-04-10 21:07:56 +01:00
Caolán McNamara
a1dd3f712d coverity#704622 Explicit null dereferenced
Change-Id: Ibde2c27791d1be30d6207a338367b6c433acfc0b
2014-04-08 09:18:34 +01:00
Noel Grandin
39d3f2bb3a connectivity: sal_Bool->bool
Change-Id: Ice855d69c70d4f5fc119ddf1ddebf18ee6add270
2014-04-01 07:38:09 +02:00
Noel Grandin
2c7bef7b8d connectivity: sal_Bool->bool
Change-Id: Ic583deda8b0be3c89bcd644a1872ebd83276487a
2014-04-01 07:38:08 +02:00
Noel Grandin
86a32589e9 Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.

So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.

Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02: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
9cc60839f3 bool improvements
Change-Id: I294b930214ce82033402afecf2b3eb2d04299505
2014-01-28 20:26:29 +01:00
Arnaud Versini
5b2ba8ed5d DBACCESS : Remove usage of DBG_CTOR and DBG_DTOR.
Valgrind is capable of detecting such bugs. No need for extra macros.

Conflicts:
	dbaccess/source/ui/dlg/tablespage.cxx

Change-Id: I25ea9174a042050efdb371246417ee7f2edae997
Reviewed-on: https://gerrit.libreoffice.org/7532
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-21 16:20:10 +00:00
Stephan Bergmann
602c87b425 Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
2014-01-18 00:37:49 +01:00
Andras Timar
b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
Noel Grandin
2ac31b06ae Unnecessary use of OUString constructor inside OUStringBuffer constructor
Convert code like:
    OUStringBuffer sVal(OUString("0x"));
to:
    OUStringBuffer sVal("0x");

Change-Id: Idc5a3f6a8bf1dc33f93c2b488f866c8ea58d582a
2013-12-17 11:49:05 +02: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
08fe82e59c Remove unnecessary use of OUString constructor in + expressions
Convert code like
  aFilename =  OUString::number(nFilePostfixCount) + OUString(".bmp");
to
  aFilename =  OUString::number(nFilePostfixCount) + ".bmp";

Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +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
Noel Grandin
d9648d3567 remove unnecessary sal_Unicode casts in DBACCESS module
Change-Id: I4c4ab5d672e994b1e8e3beac027d3f4e8f700714
2013-11-14 08:17:30 +02:00
Noel Grandin
3ef88d370e remove unnecessary use of OUString constructor in DBACCESS module
Change-Id: I831a6506211be30c5b743c20724904c903c5b3c0
2013-11-11 11:21:24 +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
Noel Grandin
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
Noel Grandin
d11ed5a57e convert dbaccess module from String to OUString
Change-Id: I110c925f8d955dfd841cdd1092c13df4d8205393
2013-10-01 10:08:43 +02:00
Jelle van der Waa
2ec606730b fdo#62475 removed pointless comments
Conflicts:
	dbaccess/source/filter/xml/xmlfilter.cxx
	dbaccess/source/ui/dlg/ConnectionPage.cxx
	dbaccess/source/ui/dlg/detailpages.cxx
	dbaccess/source/ui/dlg/odbcconfig.cxx
	dbaccess/source/ui/querydesign/querycontroller.cxx

Change-Id: I3a05649efa3a43dd8d8fb069fc1bce14ca0a6338
Reviewed-on: https://gerrit.libreoffice.org/5484
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
2013-08-27 16:11:09 +00:00
Jelle van der Waa
9a95669e50 fdo#43460 dbaccess: use isEmpty()
Change-Id: Ie27a81f4e59c48ef5aa03fb82ab38e920c0646a1
Reviewed-on: https://gerrit.libreoffice.org/4321
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:45:38 +00:00
Luboš Luňák
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02: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
fae7a3d060 String -> OUString
Change-Id: Ibf566a11a383b77a930d46967e496752c88b39e4
2013-04-26 16:49:47 +02:00
Miklos Vajna
e894e57aab dbaccess: {DECLARE,IMPLEMENT}_CONSTASCII_USTRING are no longer needed
Change-Id: Id404f8f3a5bdbf32c207ee81c6f6be9c9d328679
2013-04-25 11:02:34 +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
Ricardo Montania
7ee37c3ac6 String::AppendAscii cleanup in dbaccess
Change-Id: I6a6d695c9e4b850bc19a3a80c2d8343147724df6
Reviewed-on: https://gerrit.libreoffice.org/3068
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-28 16:46:15 +00:00
Thomas Arnhold
5bb4a2ba1d further OUString cleanup
Change-Id: I19954ee5976cb881a5fe73a889c8e04a19b14eb6
2013-03-19 14:18:10 +01:00
Thomas Arnhold
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
Thomas Arnhold
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
David Verrier
8fd81a1119 fdo#39468: Translate German comments in dbaccess/source/ui
Change-Id: I9eb3c97ffe2dd122960bb4c5f5b0594767ea0fb9
Reviewed-on: https://gerrit.libreoffice.org/2556
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-07 10:53:59 +00:00
Thomas Arnhold
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
Luc Castermans
d1e99f5802 translated German comments (file is clean now)
Change-Id: I1f833fe4a2332c1b2fa1e98fd320e55f7e19c649
Reviewed-on: https://gerrit.libreoffice.org/2517
Reviewed-by: Joren De Cuyper <joren.libreoffice@telenet.be>
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
2013-03-02 20:27:11 +00:00
David Verrier
b1b8e14c4f Translated German comments and some messages into English
Change-Id: I2d92db30bacc52d487df2a0a118b430bc3425f69
Reviewed-on: https://gerrit.libreoffice.org/2427
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-02-26 13:53:02 +00:00
Zolnai Tamás
9a471b8cd8 Database: Add Limit in Query Desing View
Levels of implementation
 - Add a new toolbar item to ui (designobjectbar.xml)
 - Make a control for this element( LimitBox: derived from NumericBox)
 - Make an own controller for this control (LimitBoxController) and
   register it
 - Add new feature to the general\central controller (OQueryController)
   and construct a communication channel between the two controller
 - Modify the view switching (SQL<->Design) methods to use\set limit
   value (QueryDesignView.cxx)

Conflicts:
	dbaccess/source/ui/querydesign/QueryDesignView.cxx

Change-Id: I0eb09d1d40cfdb9b8a2a57ab8911faca91d5e690
Reviewed-on: https://gerrit.libreoffice.org/1994
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-02-25 20:04:03 +00:00
elixir
5269589ae4 fdo#38838,::rtl::OUString_to_OUString
Change-Id: I7c9ebd01c16ff066008e53de865560ad78215bab
Reviewed-on: https://gerrit.libreoffice.org/2330
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-02-25 13:00:14 +00:00
Thomas Arnhold
405caad685 loplugin: unused variables
Change-Id: I46a748bf2c54d15c0f5718901197f3b4c34b82bf
2013-02-25 03:14:00 +01:00
Lionel Elie Mamane
f1bde8cb0e fix handling of subqueries in query design
- don't remove parentheses around subqueries
   (without the parentheses, it is not valid SQL)
   * when saving a Field (name value) typed by the user interactively
   * when parsing SQL and constructing the initial Query Design view

 - automatically add the necessary parentheses
   when a SELECT statement is entered as column name

Also:

In code saving a Field (name value) typed by the user interactively,
factorise some common code

Assorted minor fixes (typos in comments, etc)

Change-Id: I3843258323c903cba23238b0730ec4eb5875f792
2013-01-23 16:32:53 +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
ce59b1b397 ISO8859-1 -> UTF8 in comment
Change-Id: I8a67235e5110618f45fe9d9467bbb7ff90c7c712
2013-01-23 16:32:52 +01:00
Lionel Elie Mamane
8f766122f0 mark *all* tables of a nested join as added
Else, if the n^{th} (with n>2) table also appears in a (non-NATURAL) INNER JOIN, it is repeated later, leading to an error from the database engine

Change-Id: I03e0f0ef51f45be9d7ddfa63a9dbe09dc500f8dd
2013-01-18 18:48:15 +01:00
Zolnai Tamás
9f82a20777 fdo#58842 Handle case of non-distinct statment
Change-Id: I1797dd4e0bc6a2e4ec475c860e6b903085d2aae1
2012-12-28 23:38:57 +01:00