Commit Graph

219 Commits

Author SHA1 Message Date
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
Noel Grandin
bb121c864c fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface
because it introduced method name conflicts (addEventListener).

Shouldn't be an issue since it was scheduled to be dropped anyhow,
and the service implementation still implements it, so existing clients
will be fine.

I dropped the interface XPropertySet from the combined IDL because nobody
seems to be using it, and it's primary purpose appears to be to set weird
flags.

I dropped the optional interfaces
   XStatusIndicatorFactory
   XDispatchInformationProvider
from the combined IDL because the service does not implement them, and
nobody seems to be using them. I suspect they were mistakenly copied
from XFrame.

I also did not convert the Title, UserDefinedAttributes and LayoutManager
properties to attributes, again because no-one is using them.

Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
2012-12-21 10:57:09 +02:00
Lionel Elie Mamane
6361491919 WaE: explicitly do nothing when nothing needs to be done
Removes compiler warning

Change-Id: Ied96ef294f25cca54887ca6a86ec07ecb2b1fae0
2012-12-02 18:56:48 +01:00
Lionel Elie Mamane
c25bb400bb fdo#42165 make nested joins as per strict ANSI SQL
Change-Id: I605d3811b27c33e35670306bb03b5a796ab72bc0
2012-12-02 18:34:33 +01:00
Lionel Elie Mamane
b245079a50 Expand comment
Change-Id: I7d699222940a6ee99595d84dd8b2068e9b86ee67
2012-12-02 18:34:30 +01:00
Lionel Elie Mamane
6174694ee7 janitorial: prefix increment when don't care about current value
Change-Id: Id19369bb9d9cb2a0bab0dacb200cf5bf488c3b20
2012-12-02 18:34:25 +01:00
Lionel Elie Mamane
0fe6d567be janitorial: simplify code, no behaviour change
operator[] on a map implicitly adds an entry and default-initializes value part

Change-Id: Iab7817fb7fef5e9a6afdeb74be0d523fde59b5c1
2012-12-02 18:34:22 +01:00
Eike Rathke
af60316514 some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-23 23:09:16 +01:00
Lionel Elie Mamane
10359585eb Columns should know their table
For example dbaccess::OSingleSelectQueryComposer::appendOrderByColumn expects it
(via impl_getColumnName_throw via getTableAlias)

There is some vagueness:
Should the TableName property contain just the table name,
or the *composed* table name
(that is with catalog and/or schema if used by this DB)?
In the case of a query, should it contain the table name (alias)
*in* *the* *query* or of the original table?
In the former case, what meaning do SchemaName and CatalogName have?
They should be empty?

For now, commit as such and deal with the fallout, if any,
when it hits the fan.

If we really need to store these *different* values,
(that is, some code validly needs them)
it would be easier / cleaner / ...
to define *different* properties
for these *different* notions.

Change-Id: I032e619a60e7563cd51478db16cb5e0e5452bfde
2012-11-02 10:54:12 +01:00
Stephan Bergmann
4a69252e2c -Werror,-Wunused-private-field (Clang towards 3.2)
Change-Id: I55ad905bef36b54fadc245bfb22f687e47d20c3a
2012-08-31 09:04:17 +02:00
Caolán McNamara
bccf34c19a ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
2012-07-03 21:24:35 +01:00
Michael Meeks
577cf8ff67 re-base on ALv2 code. 2012-06-14 17:41:07 +01:00
Caolán McNamara
8f5629fd5a remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
2012-06-11 14:46:46 +01:00
Takeshi Abe
9902f0ee3d removed unused const rtl::OUString
Change-Id: I7c3409ac39e690fcf2f7e4085bf6857e6bd182fb
2012-05-17 22:44:43 +09:00
Caolán McNamara
5dcf536b69 merge the 5 ConstAsciiString duplicate classes together
a) merge them together and move it into comphelper
b) turn it into a POD rather than having vast amounts
of destructors registered into the cxa_atexit chain

Change-Id: I04d3b9d7804f8e233013c916df9d617a0f84f96a
2012-05-17 14:03:26 +01:00
Takeshi Abe
5d9b072cef removed duplicate includes in dbaccess 2012-03-30 00:42:35 +09:00
Lionel Elie Mamane
9f6e09e241 fdo#47560 properly separate each new sorting column 2012-03-20 11:07:15 +01:00
Lionel Elie Mamane
08ba87c558 fixup: use introduced preprocessor constant instead of hardcoded constant 2012-03-15 18:54:48 +01:00
Lionel Elie Mamane
80c235510a fdo#46843 look for order by clause as fifth child of select_statement
Since commit 33b9b857ea (dba34c: #i20306# support for window function and limit fetch first, ... added), order by is the fifth child. It was the fourth one before.
2012-03-15 18:37:01 +01:00
Elton Chung
806bec7107 Fix typos in comments 2012-02-13 15:27:24 +00:00
Caolán McNamara
bacfd2dc4c add a comphelper::string::getTokenCount
suitable for conversion from [Byte]String::GetTokenCount
converted low-hanging variants to rtl::O[UString]::getToken loops
added unit test
2012-01-05 09:18:19 +00:00
Olivier Hallot
545921f914 Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII
Module
dbaccess
2011-12-21 09:52:48 +01:00
Norbert Thiebaud
281b13ce89 remove include of pch header in dbaccess 2011-11-27 13:04:48 -06:00