7481 Commits

Author SHA1 Message Date
Stephan Bergmann
17e137d899 Improve exception construction
Change-Id: I2c1d28bb7c841f594fe2fdaf5f34fcdd730d8ee2
2016-08-25 11:20:04 +02:00
Stephan Bergmann
4a95aa62ba cid#1371770 Uncaught exception
Change-Id: I147e98d0eef2568c78ea95aee9fa68656f2e8e75
2016-08-25 11:16:10 +02:00
Caolán McNamara
fdcec8131e coverity#1371621 Uncaught exception
Change-Id: I82e500ce3b6022f7783f645bbcd4e957588f7bae
2016-08-21 21:06:55 +01:00
Caolán McNamara
982fbb183e coverity#1371622 Uninitialized scalar field
Change-Id: Id1408665b01889eabe449047f2d8f62229aeeb16
2016-08-21 13:05:26 +01:00
Stephan Bergmann
8f30da6386 Some clang-tidy misc-move-constructor-init
...by turning the relevant ctor parameters into "const &".

Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc
2016-08-19 16:55:06 +02:00
Wastack
0cc1ddf2d8 tdf#72987 GSoC Use Firebird backup format
Store embedded database files as an archive (.fbk) file.
The firebird database file is extracted when opening an
odb file, and archived for each saving.

Change-Id: I6c985f89a0fb01b2294f728b4581053521ca0c88
Reviewed-on: https://gerrit.libreoffice.org/28045
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-18 14:51:31 +00:00
Wastack
0a91231523 tdf#69949 GSoC Firebird implement autoincrement
Change-Id: I6fe08b575f01b986f0a3c96b341f254279427b68
Reviewed-on: https://gerrit.libreoffice.org/28062
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-18 12:25:18 +00:00
Wastack
3828e10f7c tdf#91324 correct firebird date format
Store date inside the embedded firebird database as:
Years as the years since 1900.
Months from 0 to 11.

Change-Id: Ic6269a183261c4c482f91f0d3871b42c54d4b99f
Reviewed-on: https://gerrit.libreoffice.org/28173
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-17 13:15:31 +00:00
Wastack
d3a510e6ec tdf#73073 GSoC Firebird Set autoCommit true
Use autoCommit for embedded Firebird database.

Change-Id: I5633960b8e3d4e6ee8f9b4f29406c7208a059521
Reviewed-on: https://gerrit.libreoffice.org/28047
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-17 13:14:48 +00:00
Wastack
45f42681f4 GSoC Upgrade firebird to 3.0
Embedded firebird is now version 3.0.

Supports MSVC 14.0.

Instead of fbembed, there are now two libraries: fbclient and
Engine12. fbclient is linked as fbembed before, Engine12 is loaded
at runtime from fbclient.

fb now needs system libtommath, which is supplied
as a new ExternalProject of LO.

Change-Id: I132939bdee745795b22f675e4265e9590079c45f
Reviewed-on: https://gerrit.libreoffice.org/27642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-17 13:05:40 +00:00
Noel Grandin
d5de00cc73 loplugin:unusedenumconstants in basctl..editeng
Change-Id: I49a23a197969d58a3a2d6b2be1fbe4a647c7fa08
2016-08-17 09:43:52 +02:00
Stephan Bergmann
2faa219ac8 loplugin:stringstatic
Change-Id: Ia5d7ca7864dbef1489294783438b9d718159614b
2016-08-16 11:10:20 +02:00
Noel Grandin
127f70d66a new loplugin to check for static OUStrings
that are better declared as OUStringLiteral

Change-Id: Ifb5d9a12bb31a68641940bec16971a8181a46567
Reviewed-on: https://gerrit.libreoffice.org/27377
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-16 06:30:09 +00:00
Wastack
70a295ea33 tdf#91324 GSoC adapt struct tm correctly for date
Change-Id: Id0413d735eeeb506b6e706c5d31e7bf989ab5e41
Reviewed-on: https://gerrit.libreoffice.org/27592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-11 12:48:58 +00:00
Lionel Elie Mamane
b6976604ca Revert "tdf#67302 Resolving tablesSupplier name clash for postgresql"
As explained in https://bugs.documentfoundation.org/67302
this is the right thing to do in that directory, but cannot
be comitted in isolation. All callers of that function in
all of LibreOffice need to be adapted to the new syntax
of the returned value (that is that the value is now properly escaped). This needs to be done at the same time in all drivers and all places that call this API (+documented in the release notes).

This reverts commit d43f4390e006716ca538ad92d09bd012179efd66.

Change-Id: I8f33fd68ec09d67dd6d38ae50d8ae156f11c5357
Reviewed-on: https://gerrit.libreoffice.org/26593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-08-07 16:53:23 +00:00
Noel Grandin
7fa183cb1a loplugin:countusersofdefaultparams in chart2..desktop
Change-Id: Iaca94acd6ef91f07ed0c0085390500c418099dee
Reviewed-on: https://gerrit.libreoffice.org/27896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 10:28:25 +00:00
nadith
efef273e2c tdf#100726: Improve readability of OUString concatenation
this bug fixed in the modules between canvas - cppu

Change-Id: I2022b022897dafde20251352376e3facdb9b8d75
Reviewed-on: https://gerrit.libreoffice.org/27663
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-01 06:12:30 +00:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Noel Grandin
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
Andrea Gelmini
8278be9860 Fix typos
Thanks to Carlo Bertoldi for the german translation.

Change-Id: I76f554e757318aed4e28b5a05fae0ba15bd46afb
Reviewed-on: https://gerrit.libreoffice.org/27355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2016-07-22 21:45:22 +00:00
Stephan Bergmann
08367272b9 loplugin:redundantcast
Change-Id: I2d963eb8395b8eca776032d32d72f5ec85891c70
2016-07-15 22:02:09 +02:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Wastack
ba3f703f01 tdf#71009 GSoC firebird metadata functions
Implement getImportedKeys funtion in order to have
a working tools->relationships feature.

Change-Id: I7f1660f284bfdc960d3aca034c3d26109770b4cb
Reviewed-on: https://gerrit.libreoffice.org/26882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-07-15 11:18:12 +00:00
Wastack
88346f606a tdf#91324 GSoC adapt struct tm correctly
Change-Id: I645ebe888186e550b95dd072e063260bc69aa178
Reviewed-on: https://gerrit.libreoffice.org/27120
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-07-15 11:15:49 +00:00
Stephan Bergmann
c8720ee6ec Remove useless comments (one was even wrong)
Change-Id: I4ef60e11878676b8276f85811e811908242ab1b2
2016-07-13 14:25:58 +02:00
Stephan Bergmann
a6060e02f7 Fix typo relase_ChildImpl -> release_ChildImpl
Change-Id: I68faf8cfb8eb390e7970383b8a6596a9dd3f95f7
2016-07-12 15:57:36 +02:00
Stephan Bergmann
9624bde1c3 tdf#100866: Don't let exception pass connectivity::release
...which is only ever called from onexcept XInterface::release overrides:
connectivity::release itself appears to be only called from
connectivity::OSubComponent::relase_ChildImpl [sic], which in turn is only
called from various XInterface::release overrides across connectivity.

Change-Id: I94b682ec531acecd0ef9f8c100f67a71c361941e
2016-07-12 15:05:41 +02:00
Eike Rathke
6d4f2dcc7c Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendar
... implementing signed years with year 0 gap.
Date(31,12,-1) last day BCE
Date(1,1,1) first day CE

New class Date member functions:
* AddYears(sal_Int16) to be used instead of
  aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap.
* convenience GetNextYear() to be used insted of GetYear()+1
* convenience GetPrevYear() to be used insted of GetYear()-1
* AddMonths(sal_Int32)
* operator=(const css::util::Date&)

New class DateTime member functions:
* operator=(const css::util::DateTime&)

Made some conversion ctors explicit, specifically Date(sal_Int32)

Adapted hopefully all places that used a sal_uInt16 year to use
sal_Int16 where appropriate.

Eliminated some quirks in date handling found on the fly.

Added era handling to i18npool icu calendar setting interface, which
missing was responsible for 0001-01-01 entered in Calc being set as
-0001-01-01, hence subtracting one day resulted in -0002-12-31.

Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f
Reviewed-on: https://gerrit.libreoffice.org/27049
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-08 20:41:02 +00:00
Stephan Bergmann
8a75a6c105 loplugin:redundantcast: redundant static_casts in connectivity
Change-Id: I2428e27f04b9f967c21ea0dd29eff6ee63167ec3
2016-07-08 16:47:31 +02:00
Stephan Bergmann
e0341d9be8 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I9a647ba5c867e2152c204e1da98b5139091e51bd
2016-07-07 18:59:55 +02:00
Jochen Nitschke
3cc30343be tdf#43157 clean up OSL_ASSERT in connectivity
replace with compile time checks

Change-Id: I9f3dd3b44fe0aa953feaa34a1bc0ccbdc3600899
Reviewed-on: https://gerrit.libreoffice.org/26801
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:51:06 +00:00
Noel Grandin
7855ea4830 remove comphelper::string::remove
and replace it with OUString/OString::replaceAll

Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a
Reviewed-on: https://gerrit.libreoffice.org/26850
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:49:52 +00:00
Noel Grandin
cd71034b26 comphelper::OBaseMutex -> cppu::BaseMutex
convert usage of deprecated class, and remove the old class

Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2
Reviewed-on: https://gerrit.libreoffice.org/26843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:49:07 +00:00
Stephan Bergmann
fd07d67bea clang-analyzer-deadcode.DeadStores
regression introduced by e1af7f0c438bc242e4562aa0286c99787b5ad544 "clang-tidy
modernize-loop-convert in c*"

Change-Id: I2f1fcb324f9bf7e97a8a514f41ac1208f1f1ca74
2016-06-27 16:02:02 +02:00
Stephan Bergmann
7de0439fe2 loplugin:unusedvariablecheck
Change-Id: Ia9c5ea707990d03dd4042c2e0a791976cc1b5f74
2016-06-23 15:08:26 +02:00
Prashant
d43f4390e0 tdf#67302 Resolving tablesSupplier name clash for postgresql
Change-Id: Ic9bedc678699e136c09a51575f1d27131c5ffd29
Reviewed-on: https://gerrit.libreoffice.org/25069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:14:55 +00:00
Michael Stahl
3fecccad4a connecitivty: [loplugin:nullptr]
Change-Id: Ic717e1d119e1a5b8a87caca263322d9e58fe6c68
2016-06-21 18:20:27 +02:00
Stephan Bergmann
8132d7f9d7 o3tl::tryGet on a temporary is dangerous
...so rename to o3tl::tryAccess to make it more obvious that the returned
proxy points into the internals of the given Any, and forbid calling
o3tl::tryAccess on a temporary

Change-Id: Ia412c6b2b06693811b9b7f0076a08bbf97142df9
2016-06-10 15:52:05 +02:00
Noel Grandin
aaebe3c45d remove some manual ref-counting in connectivity
Change-Id: I0d00b4566c13817b296f237e993f4ce63ef0c664
Reviewed-on: https://gerrit.libreoffice.org/26053
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-09 09:45:50 +00:00
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
Mark Page
22fa9289fd tdf#96099 Remove various smart pointer typedefs
Change-Id: I76843139e43ca1c158a977e24d210d5af93e4d0f
Reviewed-on: https://gerrit.libreoffice.org/26014
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-08 11:09:44 +00:00
Michael Stahl
62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Stephan Bergmann
d0bc637426 Normalize on using @throws instead of @raise[s]
...as the former is used almost exclusively

Change-Id: I38ff11cd0d5125534550df99dd427666011c3b7b
2016-06-06 17:07:35 +02:00
Michael Stahl
296125b0bf connectivity: -Werror=unused-variable
Change-Id: Idaef923205a5f21d7c4c84cc74d3a369107f7325
2016-06-06 15:28:14 +02:00
Stephan Bergmann
6bd1465395 loplugin:sallogareas
Change-Id: I32a1b278643ab54dd16966d0e41f3cee0bafb024
2016-06-06 15:27:23 +02:00
Michael Stahl
4849f342b6 connectivity: DBase: fix some obvious endian issues
These calls to SvStream::Read/Write operate on structs that contain
32-bit integers.

Change-Id: I2d45128ad482013cd9ef1fca0dd259dfc09c904f
2016-06-06 14:49:30 +02:00
Stephan Bergmann
61e0433fdf Use o3tl/any.hxx in connectivity
Change-Id: I5c0d84b20b9146c4fc65bfdc0e9c65a05c93d71c
2016-06-06 09:47:32 +02:00
Xisco Fauli
8a9559c59c tdf#89329: use unique_ptr for pImpl in TColumnHelper
Change-Id: I4a7594cb2a9424fddbd79e2b5d77431bf329eec9
Reviewed-on: https://gerrit.libreoffice.org/25903
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:08:18 +00:00
Noel Grandin
0323253a7c remove some manual ref-counting
triggered when I noticed a class doing acquire() in the
constructor and then release() in the destructor.

found mostly by
    git grep -n -B5 -e '->release()'

Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f
Reviewed-on: https://gerrit.libreoffice.org/25806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:34 +00:00
Stephan Bergmann
c6d553b5fa loplugin:refcounting
Change-Id: I97a2d4538e0667fe7220a94589a4296c02d882a2
2016-06-03 09:20:52 +02:00