Commit Graph

1234 Commits

Author SHA1 Message Date
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
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
e6edfb6324 cppcheck: unread variable
Change-Id: I809cdbeb71bf4cf014e6d578f35c8a646a5c937e
2013-06-06 23:53:52 +02:00
95c0d568fd use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.

Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
2013-06-05 08:13:23 +02:00
cd2f2e772c make OSingleSelectQueryComposer use *system* parse context
and pass it to the parser and PredicateInput constructors.
This makes the whole story consistent; before system locale settings were already manually passed to parseNodeToPredicateStr, which led to some things being parsed as en_US and others as system locale.

Change-Id: Ib9571b10d79183571e8ab3f79660b41594dc2d1c
2013-05-19 14:05:18 +02:00
e894e57aab dbaccess: {DECLARE,IMPLEMENT}_CONSTASCII_USTRING are no longer needed
Change-Id: Id404f8f3a5bdbf32c207ee81c6f6be9c9d328679
2013-04-25 11:02:34 +02:00
0987f56912 WaE: unused variable 'insert_result'
Change-Id: I5b0b7eeaa44e3e9e215b8d0bba7e7189c63c766c
2013-04-09 01:49:04 +03:00
ba044b1e96 remove needless forward rtl::OUString declarations
Change-Id: I97d91a758dd82d64768d75c1d2ddd279de5f6034
2013-04-07 14:23:12 +02:00
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
a789a2fc94 fdo#46808, convert sdb::QueryDesigner to new style
Change-Id: I694dd16920304d0f07369e97c87a4a97b92eadeb
2013-04-02 12:54:41 +02:00
2b7ee1db28 remove boilerplate comments
Change-Id: I44a476a9843816f70a7a4d84b8c35edeecd5daaf
2013-04-01 22:45:36 +02:00
a066525b42 fdo#46808, Convert a bunch of comphelper::ComponentContext stuff
.. to Reference<XComponentContext>
mostly in the dbaccess module, but it also affected some other
modules.

Change-Id: I09b3f6fe7a9b33498b11d98b5521b5aeeb8882be
2013-03-20 07:32:53 +02:00
6dddefc6e7 fdo#43460: use isEmpty()
Change-Id: Ia768e684d3cf255239c04d024b35488830cc9fe6
2013-03-09 21:47:31 +01:00
3912e47044 Work around -Werror=unused-local-typedefs from comphelper/stl_types.hxx
Change-Id: Id9f588e551b40a64bc86cae7c6d50f99659f94ab
2013-03-09 13:03:06 +01:00
8035a3af26 some further OUString cleanup
Change-Id: I13eb94092e29ececc9fbf494074acde5f893b605
2013-03-08 04:51:28 +01:00
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
db7a441342 Typo fix: informations -> information and a few other adjacent typos.
FDO:60724

Change-Id: I73ad9f1c37cbbcf28d996ed73c75cf09553e499b
Reviewed-on: https://gerrit.libreoffice.org/2479
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-03-02 02:45:55 +00:00
a2db9096e2 fdo#61203 initialise m_aComposedTableName *before* trying to use it
Change-Id: Ie7a19bdfe9e7bc729a62191362ce0779d73385a0
2013-02-28 18:07:20 +01:00
8b66c00a0c janitorial: simplify test expression without semantics change
The "sComposerFilter != m_sRowSetFilter" could not influence the result.
Proof.
 The right hand-side of the || is evaluated only when m_sRowSetFilter.isEmpty()
 So the only case where the removed test could have an influence is when
 m_sRowSetFilter.isEmpty().
 However, the right hand-side of the && is evaluated only when !sComposerFilter.isEmpty().
 We have m_sRowSetFilter.isEmpty() and !sComposerFilter.isEmpty().
 In particular, (sComposerFilter != m_sRowSetFilter) is true.
Qed.

Change-Id: I1484d78cf2d7a5e8ca44f382eb7c440c84d8c10e
2013-02-27 07:01:12 +01:00
cb9e5e786b fdo#51976 make "refetch one row" query easier to optimise
Instead of playing tricks with parameters that when filled in force a part of the WHERE clause to have not influence, actually use several different statements and hardcode in each the kind of test to be done

Change-Id: I93e1978f0420bc627a02291f209c788b9b4f2e96
2013-02-27 07:01:12 +01:00
a4322a23a9 janitorial: save one object
Change-Id: I52b7d8204bb2d34639dea544833318fe86a5ddcf
2013-02-27 07:01:11 +01:00
0c87818750 janitorial
- more const qualifiers
 - remove unnecessary cast
 - don't hardcode magic number
   (length of hardcoded string)

Change-Id: Id8165ec556c913213b5be22c731b78f6b325f22c
2013-02-27 07:01:11 +01:00
1b77302ef9 spelling in comments
Change-Id: I3a7df167a91dd6ef845d16d5e6cf46ff5a82d455
2013-02-27 07:01:11 +01:00
dd3e879cfd remove some trivial duplicates
Change-Id: Ie736cb6d5ff7f4d1998338f4a3a3a3b0a67c79ad
2013-02-25 19:34:36 +01:00
568b3bdb9b remove duplicate line
This came in with 3ecdcbaee0a906bc0d1700f60a4d360f4f51291c and is
apparently wrong.

Change-Id: Ic048d20c728aca2f8c97a90ede74d77e51b16e1c
2013-02-25 17:59:39 +01:00
405caad685 loplugin: unused variables
Change-Id: I46a748bf2c54d15c0f5718901197f3b4c34b82bf
2013-02-25 03:14:00 +01:00
1443a9f7ab [Uu]sefull -> [Uu]seful
Change-Id: I5dad83789ff9b6815561208679a5e19821041e1f
2013-02-22 11:12:33 +01:00
1da3af5f1e fdo#38838, ::rtl::OUString, String to OUString
I have cleared out String and ::rtl::OUString calls in module dbaccess/source/core/misc.
It was mainly file dbaccess/source/core/misc/dnstypes.cxx , and it's usages. There are
still some calls in dbaccess for this class(ODnsTypeCollection), that needs refactoring
(eg. in file DbAdminImpl.cxx, method "String ODbDataSourceAdministrationHelper::getConnectionURL() const").
Remaining calls will be my next task (in module dbaccess). I also clear out deprecated macro
RTL_CONSTASCII_USTRINGPARAM every time I find one. The class I've mentioned above
(ODnsTypeCollector) is OK.

Change-Id: Ia0f3bb8cc649d1ecf8decc093f8a1a20ee23c33c
Reviewed-on: https://gerrit.libreoffice.org/2289
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-02-22 09:48:50 +00:00
616c6924f1 s/the the/the/
Change-Id: Iadacffaad832c6ff06757e8567e24f929f24a4c3
2013-02-22 09:58:19 +02:00
3cfe6ad137 fdo#38838, ::rtl::OUString to OUString, String to OUString
::rtl::OUString was replaced to OUString and all occurences of String was replaced to OUString in dbaccess/source/core/api

Change-Id: I9771708408e04dcebe18f49a75c83036740f0ca2
Reviewed-on: https://gerrit.libreoffice.org/2239
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-02-19 11:59:10 +00:00
cd5b03ecc1 Fix busted multi-repeated column in evolution database view
In the evolution address book where we have real column names of e.g.
first_name, second_name and city. On parsing via
OSQLParseTreeIterator::appendColumns that creates some labels using those real
names but the evo XResultSet gives them proper labels of First Name, Second
Name and City the munge means that here we have e.g. just "City" as a label
because it matches, while the others don't

The symptoms are to load the evolocal.odb and of the 128 columns column 5 is
repeated until 128

This is all a horrible confusing mess. It seems safest to catch the
mismatch of column counts and throw away the partial list and force
a generate of a full list.

Change-Id: I1d6e2a282bdd43acac63c366eb2a9d029aa17878
2013-02-07 17:22:15 +00:00
2bd856e643 ORowSetValue: clean up sign/unsigned union member
Also switch BOOLEAN constructor from sal_Bool to bool.

old/new signed/unsigned storage situation:

-------------------------------------------------------
 SQL type | signed    | unsigned old     | unsigned new
-------------------------------------------------------
 TINYINT  | sal_Int8  | sal_Int16        | sal_uInt8
 SMALLINT | sal_Int16 | sal_Int32        | sal_uInt16
 INTEGER  | sal_Int32 | sal_Int64        | sal_uInt32
 BIGINT   | sal_Int64 | pValue (String*) | sal_uInt64
-------------------------------------------------------

When sticking an UNSIGNED TINYINT into an Any,
silently promote it to UNSIGNED SMALLINT (that is sal_uInt16),
else Any would take it as a sal_Bool and normalise to
sal_True (1) or sal_False (0).

When constructing an ORowSetValue from a sal_Bool,
silently keep it as an unsigned 8 bit integer
(that is understand it as a sal_uInt8).
This will work in most cases,
since when asked back for a bool or sal_Bool,
we'll give back the right value.
Only code looking at the type tag could possibly
make a "wrong" decision.
The main (hopefully only?) path
through which this would happen is
through an implementation of
  XParameters::setBoolean
  XRowUpdate::updateBoolean
that would use its sal_Bool argument
to construct an ORowSetValue.
So make sure each implementation
constructs a proper BOOLEAN so as not to get confused.

For authorship/copyright purposes, this patch is a cooperation between
 Lionel Elie Mamane <lionel@mamane.lu>
and
 David Ostrovsky <david@ostrovsky.org>

Change-Id: I3f1f08716127147f077bff4edb6ec558b1b09e09
2013-02-05 15:46:17 +01:00
614e31aa24 fdo#46808, Adapt sdb::TableDefinition UNO service to new style
The service already existed, it just did not have an IDL file

Change-Id: Iaac84da8baa3a060eef339d8e477f86ca49fae08
2013-01-28 08:23:11 +02:00
1cf1f9338c fdo#57950: dbaccess: STRINGPARAM and more chained appends
Change-Id: Iab1ba5eb6702d386e2775d7426c3398b606d2d97
Reviewed-on: https://gerrit.libreoffice.org/1706
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-16 19:00:12 +00:00
36e1e0ce12 fdo#57950: Remove some chained appends in dbaccess
Also simplify logic a little bit.

Change-Id: I342f8d1d22e70023d23c6c8ca3976d501e18fb90
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1559
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-07 13:53:20 +00:00
2b0b5f7df0 fdo#57950: More fixes for chained appends in dbaccess
And also:
	Remove some RTL_* macros
	Remove ::rtl prefix

Change-Id: I9c3902672518559e8a139c37bc1933843bebfe5d
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1561
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-07 13:50:36 +00:00
2e22005234 fdo#57950: Remove some chained appends and more in dbaccess
- Sanitized some OUStringBuilder, avoiding creating a new one and after
	make some appends
 - Removed some ::rtl prefixes
 - Remove RTL_* macro

Change-Id: Ide3d78f20c68774cd4864b82cb8d29784228d1cd
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1552
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-07 09:36:27 +00:00
b9a4a0b965 fdo#46808, Convert connectivity::SQLError to use XComponentContext...
...instead of comphelper::ComponentContext.

Change-Id: I40384c2d7cfcabd06506321d686dd8e7c7c5f266
2012-12-10 08:05:49 +02:00
dbafb1663e Don't force refresh when higher up code did not request it
Change-Id: I0f415c96fc05c1d776d14885751aef020c42f4ae
2012-12-06 19:39:08 +01:00
bd60c90f85 fdo#53281 Don't cache whole row in KeySet
This was done for the sake of ODBC,
but the cost was imposed on all backends.

The ODBC problems are now solved cleanly (and more efficiently)
in the SDBC<->ODBC layer.

Change-Id: Ib8a864da08deaaacc96a379fb72b3b7cbb34598c
2012-12-06 19:38:28 +01:00
773ad75b0d fdo#46808, Adapt util::NumberFormatsSupplier UNO service to new style
Change-Id: I58436d9eea0c38d14cde2dc01aa463d5d71912e9
2012-12-06 13:20:31 +02:00
38cc919efb fdo#46808, use service constructor for sdbc::ConnectionPool
Change-Id: Id12226af5e537b1eeacbb062ad937a3551e245c0
2012-11-28 13:06:18 +01:00
91fff62c87 Typo in comment
Change-Id: I63e866d5ad6ae76c8e19d04f3be1476f82966e31
2012-11-26 06:56:58 +01:00
af60316514 some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-23 23:09:16 +01:00
0666e43c45 fdo#46808, use service constructor for i18n::CharacterClassification
Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76
2012-11-05 18:05:00 +01:00
25a868011c include stl headers for used features
Change-Id: I6b0d3b3feea88b6e3605f751df9e1154e4231127
2012-11-02 12:21:47 +01:00
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
76dd7fc60b Don't abort when column has no (Catalog|Schema|Table)Name
Especially since the rest of the function is prepared to handle
no/empty (Catalog|Schema|Table)Name.

Change-Id: Ic0bb59ead5789e671c90887ef850588f4924f5e7
2012-11-02 10:50:55 +01:00
806d18ae7b optimisation: take ref to OUString instead of constructing temp object
Change-Id: I9dcb821cd71f89fa5b3d8274fd93facc1f43863f
2012-11-02 10:50:52 +01:00
9e716494a8 fix some VS 2010 specific issues
Change-Id: Iae27a96c1e2ed72d2744fcbe100d6ada7dc41c82
Reviewed-on: https://gerrit.libreoffice.org/914
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-28 18:09:02 +00:00