Commit Graph

735 Commits

Author SHA1 Message Date
b3d9852309 Remove more useless includes of tools/debug.hxx
Change-Id: If289dcbff125ac0088f01b5c9752f9f3173585dc
Reviewed-on: https://gerrit.libreoffice.org/11020
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-20 09:10:01 -05:00
e49e41f760 check return of Execute row and propogate error code
Change-Id: I75b2c454122aa2d75d66dc46865135e01277bbcb
2014-08-09 13:35:48 +01:00
8923103eee coverity#706376 Uncaught exception
Change-Id: Ic18823fd60826c144058df32c27ab25d58664e30
2014-07-21 13:59:34 +01:00
287ad2adeb coverity#706308 Uncaught exception
Change-Id: I852e701bd62929c1a7303b86286b8cbe66cdfc1f
2014-07-02 09:46:31 +01:00
6d45e2a4fc coverity#1224302 Uncaught exception
Change-Id: I622a7c41c9083f2deec21dc8c37572f978874127
2014-07-01 10:56:14 +01:00
4c6a27aaad Use rtl::Reference to make code clearer & exception-safe
Change-Id: I8cfdf792541b351a19e16f95d4e6f7127e3d33b2
2014-06-18 22:46:53 +02:00
2504ffccd0 fdo#80084 file driver PreparedStatement: close previous ResultSet on reexec
This partially reverts commit d87c2c59c9c1d5f5825f355c9eb941fdf95b42f6
"sdbc file driver (Prepared)Statement: created ResultSet owned by *caller*"

From that commit, we keep the part about not reusing the same
ResultSet on reexecution (client code may have disposed it or closed
it), but we revert the part about not closing / disposing the previous
ResultSet on reexecution.

Change-Id: I4946207f9740484b2f5fbc3575a5708fe39f357c
2014-06-18 16:17:32 +02:00
a2db194ea0 connectivity: fix includes
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-06-04 21:18:39 +02:00
332a67afdc coverity#736759 Dereference before null check
Change-Id: Ia36e192d32c46a5c1129eca050b2863ec1213bb4
2014-06-04 12:34:14 +01:00
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
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
fa51b55680 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part9
Change-Id: I82ed4a4868cb22566706ca0f4b1321e0d45016cf
2014-05-10 23:54:07 +02:00
199d333f13 connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
2014-04-16 11:51:51 +02:00
6835d9f307 It's "its", not "it's"
Change-Id: Ieaa787afd7cc622b4750a2ee8f17f6dad934ba63
2014-04-10 20:22:50 +03:00
fa2d66daa6 coverity#706300,306,983619: Uncaught exception
Change-Id: If46a483ba0a5334926ffb5c25db064a5d2b81e46
2014-04-06 13:11:30 -05:00
8728c34662 connectivity: sal_Bool->bool
Change-Id: Iafa52d3643b9313c20c75cf98f6b1ec231bf9d6d
2014-04-01 07:38:09 +02:00
2c7bef7b8d connectivity: sal_Bool->bool
Change-Id: Ic583deda8b0be3c89bcd644a1872ebd83276487a
2014-04-01 07:38:08 +02:00
5a1732eaab Remove remaining DBG_CTOR etc. remnants from connectivity
Change-Id: I9d7ca8354cef6a1474914ce290c476460f982bdd
2014-03-28 15:26:01 +01:00
ca9837247e coverity#705789 Dereference before null check
Change-Id: Ie33efea9070d1ccd97572cfbb642db847a2f32f7
2014-03-13 14:03:25 +00:00
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
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
ad73967e99 Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
2014-02-24 08:08:00 +01:00
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
65f620c99a Typo: execption -> exception
Change-Id: Ib57e0cc39c27595490e29dec46cc6d33067c34b5
2014-02-10 15:58:05 +01:00
ba71cfb7e1 coverity#707694 : Uninitialized scalar field
Change-Id: I77c5e82c64dd8385a75f4b0eaf9d412e94534e6d
2014-02-01 15:29:56 -06:00
ead1525417 bool improvements
Change-Id: If35c939adede6a912dee14714a7ceeab84ac977e
2014-01-28 20:24:39 +01:00
09dc581359 drop unnecessary tools/string.hxx includes
Change-Id: I2439ed19b554381f80e882aacbac05167622df92
2014-01-13 13:54:51 +00:00
e2591cdeeb drop STRING_MAXLEN uses from connectivity
Change-Id: I12a999c2c6bdd119c2e3e544bbbdabb0b0ce2ba2
2013-12-30 00:21:08 +00:00
d203855908 assert non-nullness
dd0990db74a4a5c3a129a7ff0ed2a739cd74a381 "fdo#72463 RowSet: on execute when not
dirty, rebuild cache" had temporarily introduced a bug that caused m_pParseTree
to be null here during JunitTest_dbaccess_unoapi, but Lionel states that it
cannot legitimately be null, even though the computation of m_bIsCount in the
ctor takes potentially null m_pParseTree into account.

Change-Id: If95f076a4c80f80cd58bba83521633fe8bb71f5d
2013-12-13 15:40:18 +01:00
d87c2c59c9 sdbc file driver (Prepared)Statement: created ResultSet owned by *caller*
That is the only choice that makes sense, since the
(Prepared)Statement could die (go out of scope) before the ResultSet.
User code could do that, if it does not "need" the (Prepared)Statement
anymore. Also, it is only natural for user code to dispose a ResultSet
that it does not need anymore.

So we need to create a fresh ResultSet each time.

The "luck" here is that the sdbc file driver does not implement
the XMultipleResults interface; things get more hairy then.

Change-Id: Ibf2cb5e5b7ca90432a289c185a6b4fe32d1ba565
2013-12-13 13:50:59 +01:00
7a64727f79 fdo#72148 if expecting table at begin, explicitly set it so
Change-Id: Ic876603e5860b987280b73726fd79a071a9c833c
2013-11-30 12:03:18 +01:00
ab5d1fbfb4 SAL_WARN_UNUSED com::sun::uno::Any
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14 21:02:40 +01:00
a556802b52 xub_StrLen->sal_Int32
Change-Id: I4ee33d8c5c564df62ad65cbcaf0d0cb253129fc8
2013-11-13 13:50:37 +00:00
0a9ef5a18e convert OUString 0==compareToAscii to equalsAscii
Convert code like:
   0 == aStr.compareToAscii("XXX")
to
   aStr.equalsAscii("XXX")
which is both clearer and faster.

Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11 12:58:12 +02:00
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
296329a926 convert xub_StrLen to sal_Int32
convert for loops using xub_StrLen to use sal_Int32

Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
2013-11-06 08:51:22 +02:00
0e6a2601b3 Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds.

Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-11-04 08:06:10 +02:00
2b91dc3ae6 fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a
Reviewed-on: https://gerrit.libreoffice.org/6172
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-09 15:03:38 +00:00
98de5b40c8 Related: fdo#38838 remove UniString::EqualsIgnoreCaseAscii
Change-Id: Ib5c3a2daa4a48bc286b14fa2cebb3306ea0012bc
2013-09-25 19:24:23 +02:00
4216518982 Update implementations of ColumnLocate::findColumn to throw on invalid column.
Change-Id: I7a9354ecd35a70a005c6c50e38d27de9b33332bd
Reviewed-on: https://gerrit.libreoffice.org/5922
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-09-12 17:26:12 +00:00
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
db91a572fb fixup
Change-Id: Ie2d4baafd775d1b051148b84d6227548a75837f8
2013-07-19 11:49:40 +02:00
8529e88518 Cleanup String in connectivity
Change-Id: Ica1cf0ac9e9da9c943e50ba77b1ce4a9dc7f8300
Reviewed-on: https://gerrit.libreoffice.org/4895
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2013-07-19 09:45:01 +00:00
652ccbdf31 i#108348 API CHANGE: add IsUTC to css.util.DateTime etc.
Add IsUTC member to:

com.sun.star.util.DateTime
com.sun.star.util.DateTimeRange
com.sun.star.util.Time

Add new stucts with explicit time zones:

com.sun.star.util.DateTimeWithTimezone
com.sun.star.util.DateWithTimezone
com.sun.star.util.TimeWithTimezone

Adapt the sax::Converter to read/write timezones, and fix the unit test.

Everything else just uses default (no time zone), this commit is just
to fix the API.

STRUCT: /UCR/com/sun/star/util/DateTime
    nFields1 = 7  !=  nFields2 = 8
    Registry2 contains 1 more fields
STRUCT: /UCR/com/sun/star/util/DateTimeRange
    nFields1 = 14  !=  nFields2 = 15
    Registry2 contains 1 more fields
STRUCT: /UCR/com/sun/star/util/Time
    nFields1 = 4  !=  nFields2 = 5
    Registry2 contains 1 more fields

Conflicts:
	sc/source/filter/oox/unitconverter.cxx

Change-Id: I01f7a6d082a6b090c8efe71d2de137474c495c18
Reviewed-on: https://gerrit.libreoffice.org/4833
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-07-15 11:46:41 +00:00
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
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
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
7298a2b0c7 fdo#46808, Convert XMultiServiceFactory to XComponentContext
Change-Id: I3a74d4edaa3ff3c2498c3db2720b0e4e5305c2e4
2013-05-22 15:20:03 +02:00
db6ab9f8f1 remove unused & suspicious method
calls m_pTable->seekRow with m_nRowPos instead of m_nFilePos...

Change-Id: Ibf9b4da3dffdd75402deb9e7a371a312e0464613
2013-05-19 14:05:18 +02:00
4f214b2b42 connectivity::file::OResultSet remove totally unused data member
Change-Id: I5c4b2d72b600c8ce9de070dc82bf489d66144342
2013-05-19 14:05:16 +02:00