Commit Graph

289 Commits

Author SHA1 Message Date
Lionel Elie Mamane
195674627c fdo#84658 on reexec, cancel modification before resetting IsModification state
Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911
2014-10-06 12:23:22 +02:00
Noel Grandin
a28e7f7aa9 loplugin: cstylecast
Change-Id: Ie478d1fcfd3b64d7a2128887c216b5e0b4501ab9
2014-10-03 15:20:04 +02:00
Lionel Elie Mamane
03a2b4a80c fdo#82151 when constructing column object, replace m_aCurrentRow by a function
The passed m_aCurrentRow becomes out-of-date as soon as the current row changes.
This also hides an implementation detail of ORowSet to ORowSet(Data)Column.

Change-Id: Ib9188743e5dd6dec240e9f5fd3fd9655c6761abc
Reviewed-on: https://gerrit.libreoffice.org/10792
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-08-06 13:49:32 +00:00
Lionel Elie Mamane
1e1b2c563d Don't leak the previous cache
Change-Id: I61cb1c608a7de8efc63533085e86c6c17c05f545
Reviewed-on: https://gerrit.libreoffice.org/10793
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-08-06 13:48:45 +00:00
Caolán McNamara
8923103eee coverity#706376 Uncaught exception
Change-Id: Ic18823fd60826c144058df32c27ab25d58664e30
2014-07-21 13:59:34 +01:00
Caolán McNamara
968f633b24 coverity#706382 Uncaught exception
and

coverity#706377
coverity#706378
coverity#706382

Change-Id: I17f672e31867b1be77c16a8a6e121a8f67df7c90
2014-07-01 16:43:05 +01:00
Julien Nabet
ef242d3ac8 Typo rong->wrong
Change-Id: I9665d0bd8eccfb16a53eeb733954cdc59af8ccdd
2014-06-22 23:35:48 +02:00
Lionel Elie Mamane
db7042cdba janitorial: update function name in SAL_INFO output
Change-Id: Ie01599c8f3ae465998113dd8bfd2a33b27d0a39d
2014-06-16 21:58:05 +02:00
Lionel Elie Mamane
21f2efbe5f dbaccess::ORowSet: separate impl_rebuild_throw
Used by two different callers that wanted different things.
Also, freeResources now always positions on BeforeFirst.
It is only called with _bComplete==false by execute()-related code.

Change-Id: I3e34f77ce37c239d8d3d6a8cd7514b125b049de6
2014-06-16 21:58:05 +02:00
Lionel Elie Mamane
767e15343f clean up fdo#79427 fix: force BeforeFirst only at execute(), not updateRow()
Change-Id: Iaa881d055923702acbb96862d187af41a6ded730
2014-06-16 21:58:05 +02:00
Lionel Elie Mamane
44cd9a17ca fdo#79427 after execute() a ResultSet is expected to be BeforeFirst
Change-Id: I38091d1ee2161d6e32da3a0bde60e3fc008aa83d
Reviewed-on: https://gerrit.libreoffice.org/9794
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-06-16 06:47:33 +00:00
Noel Grandin
ea41de0ba5 dbaccess: remove SAL_THROW macro
Change-Id: I01e43d6171dc2381ff8c151d5716e9ffede24822
2014-06-05 08:17:49 +02:00
Peter Senna Tschudin
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05: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
ca86511a6e dbaccess: remove SAL_INFO's that only make function entry
Change-Id: Ibdf92698446d0a7aed7c474ec7d3ea720cd2c2a6
2014-05-14 10:00:03 +02:00
Julien Nabet
fa51b55680 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part9
Change-Id: I82ed4a4868cb22566706ca0f4b1321e0d45016cf
2014-05-10 23:54:07 +02:00
Noel Grandin
fee4efcb54 dbaccess: sal_Bool->bool
Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a
2014-04-17 11:17:21 +02:00
Stephan Bergmann
aea96244d1 Missing includes
Change-Id: I08750fdaab137665205a6e55891d845b39b0147d
2014-04-14 10:54:34 +02:00
Noel Grandin
3194d22a24 connectivity: sal_Bool->bool and fix method name
Convert method name
  getBoleanComparisonPredicate
to
  getBooleanComparisonPredicate

Change-Id: I00c726b1fecd8352dc49f2af98c3ae3c799ef424
2014-04-01 07:38:08 +02:00
Stephan Bergmann
2f3be98732 dbaccess: simplify deprecated XTypeProvider.getImplementationId
Required some clean-up of getImplementationId vs. getUnoTunnelImplementationId
confusion.

Change-Id: I645dd80d24efe7ed5224b220911eed8ad880b7c0
2014-03-10 17:39:54 +01:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Stephan Bergmann
b7259532d8 Remove unnecessary bool2any
Change-Id: Ie2caee1d5a7912011d76172539c2f8f37eaee5cf
2014-02-24 08:08:00 +01:00
Stephan Bergmann
ad73967e99 Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
2014-02-24 08:08:00 +01:00
Stephan Bergmann
05f742d28b comphelper: sal_Bool -> bool
Change-Id: I6fc331ae0706f4bb193543011c8d4ae0a385fcc0
2014-02-17 17:55:19 +01:00
Norbert Thiebaud
c2b50457ef coverity#707725 : Uninitialized scalar field
Change-Id: Ia5ebaca5bbb35946250854abf78ab9ab2041757f
2014-02-01 15:29:58 -06: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
Lionel Elie Mamane
2042665c6d fdo#72696 set parameters when they have changed
Change-Id: Id470f98456200ed51418e31904e8a9a457fda638
2013-12-16 04:17:33 +01:00
Lionel Elie Mamane
dd0990db74 fdo#72463 RowSet: on execute when not dirty, rebuild cache
Change-Id: I3f27b7572b88cd1200483121614c29d414c37e20
2013-12-12 20:19:06 +01:00
Marcos Paulo de Souza
afd32065b6 fdo#54938: Convert dbaccess to use cppu::supportsService
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Conflicts:
	dbaccess/source/core/dataaccess/connection.hxx

Change-Id: Id7602b969790b13538868b937842bc945ce3e31e
2013-12-10 08:33:25 +01:00
Lionel Elie Mamane
56cdaa1869 fdo#72163 belts and suspenders
1) Do not dispose m_xComposer, might still be used by our m_pCache

2) Do not create a new m_xComposer if the previous one will do, so
   that we do not gratiously use a different one than our m_pCache.

Change-Id: I6540c035c9159017c694b36e676721ec3e42db51
2013-12-02 23:57:16 +01:00
Lionel Elie Mamane
d4b7e3d12a fdo#72163 after updating m_xComposer, command facets are not dirty anymore
Else we dispose m_xComposer too eagerly; still used by m_pCacheSet.

Change-Id: I205488465c19a356534df17b8a5e9a20ce6766c9
2013-12-02 23:57:15 +01:00
Noel Grandin
3ef88d370e remove unnecessary use of OUString constructor in DBACCESS module
Change-Id: I831a6506211be30c5b743c20724904c903c5b3c0
2013-11-11 11:21:24 +02:00
Lionel Elie Mamane
1883d4f10f when reading a bool from a database, treat is as a bool
This in particular allows recognition of strings "true" and "false".

Change-Id: I590a5357206e4fb0b92b78b8ee4655e445e6f152
2013-10-16 18:45:19 +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
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
Lionel Elie Mamane
76b5ac2193 doing it once is sufficient
Change-Id: If31845aa575b3f9459507deefb1b469ac3715e35
2013-08-14 17:39:58 +02:00
Julien Nabet
8dc5b9d6a2 unusedeasy remove ORowSet_CreateInstance
Change-Id: I17e9eb168c664514dacc03d66911f72faf80e117
2013-07-04 17:12:18 +02:00
Radu Ioan
61db96daa8 fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO
- replace OSL_* with SAL_*

Change-Id: I26761cf1d4c1cfe21dec7d8ede6df6f177bf2c3e
Reviewed-on: https://gerrit.libreoffice.org/4620
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-07-03 07:59:33 +00: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
Noel Grandin
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
Stephan Bergmann
3912e47044 Work around -Werror=unused-local-typedefs from comphelper/stl_types.hxx
Change-Id: Id9f588e551b40a64bc86cae7c6d50f99659f94ab
2013-03-09 13:03:06 +01:00
Julien Nabet
1443a9f7ab [Uu]sefull -> [Uu]seful
Change-Id: I5dad83789ff9b6815561208679a5e19821041e1f
2013-02-22 11:12:33 +01:00
Gergő Mocsi
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
David Ostrovsky
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
Noel Grandin
38cc919efb fdo#46808, use service constructor for sdbc::ConnectionPool
Change-Id: Id12226af5e537b1eeacbb062ad937a3551e245c0
2012-11-28 13:06:18 +01:00
Eike Rathke
af60316514 some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-23 23:09:16 +01:00
Norbert Thiebaud
df706c23dc missing system header
Change-Id: Ieb97d877238941d06aab1aa2ef67186bbc3a995a
2012-10-01 16:11:38 -05:00
Arnaud Versini
36a2db3722 Replace usage of rtl_*Memory with equivalent from string.h
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159
Reviewed-on: https://gerrit.libreoffice.org/734
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-10-01 18:48:05 +00:00
Stephan Bergmann
a00c4e02ac Improvements on previous commit
* Made XDatabaseContext inherit XDatabaseRegistrations non-optionally, adapted
  call-sites to just use XDatabaseContext w/o querying.  (The previous commit
  had inadvertantly effectively removed support for XDatabaseRegistrations from
  the ODatabaseContext implementation, as an optional UNO super-interface does
  not lead to a super-class in the corresponding C++ class hierarchy, but making
  the super-interface non-optional fixes that anyway.)

* Adapted some more call-sites to just use XDatabaseContext w/o querying.

* Added @since tag.

* Replaced new uses of comphelper::ComponentContext::getUNOContext with
  comphelper::getComponentContext (see 03a9f139bd
  "ComponentContext::getUnoContext -> getComponentContext simplification;" I
  intend to get rid of comphelper/componentcontext.hxx much sooner than of
  comphelper/processfactory.hxx).

Change-Id: I68d09f2dbe651629f79ed21cd40cdb6d6b32c624
2012-09-27 15:03:32 +02:00