126 Commits

Author SHA1 Message Date
Noel Grandin
ff339c89b5 loplugin:constantparam part2
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746
Reviewed-on: https://gerrit.libreoffice.org/36072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:42:40 +00:00
Stephan Bergmann
878a8ff3f0 Some simplifications, using UNO_QUERY_THROW
Change-Id: Ie7b5bb82868f517d056907567dd8e53a34d8a0b0
Reviewed-on: https://gerrit.libreoffice.org/34273
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:19:32 +00:00
Saurav Sachidanand
2bcefa7aab tdf#42982 Make UNO error reporting more descriptive
Change-Id: I0fae43ca1ab23f35e75fd6b88215940596aae09f
Reviewed-on: https://gerrit.libreoffice.org/33227
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-13 20:28:35 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Noel Grandin
83721f4365 makeAny->Any in basctl..chart2
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61
Reviewed-on: https://gerrit.libreoffice.org/33867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:50:50 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin
3a705ab405 OSL_TRACE->SAL in avmedia..canvas
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13 08:14:00 +02:00
Jochen Nitschke
0c6c37cb01 cleanup unused includes (related to tdf#88206)
cppuhelper/compbase*.hxx and cppuhelper/implbase*.hxx

compbase*.hxx includes implbase*.hxx replace compbase*.hxx if only
implbase*.hxx stuff is used.

Change-Id: I631a20aee411c6a32ffcf470f6e392621755f995
Reviewed-on: https://gerrit.libreoffice.org/31686
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 18:17:06 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
803215142e convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05 12:49:02 +02:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Jochen Nitschke
f1018190a8 tdf#88205 use list ctor for uno::Sequence a11y to canvas
Change-Id: Ib719c94c0488b8a48fdb013bc8fbd1a988595d18
Reviewed-on: https://gerrit.libreoffice.org/28866
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 07:23:51 +00:00
nadith
054cf21948 tdf#100726: Improve readability of OUString concatenation in basic module
Change-Id: I96c3215cf9f8932127e681aaaaee649774cac2e4
Reviewed-on: https://gerrit.libreoffice.org/27229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-15 08:39:51 +00:00
Stephan Bergmann
da50c790a7 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ib91f20761167ab78b68813d8877dceea5fef801f
2016-04-20 17:25:35 +02:00
Noel Grandin
f678b82f0e clang-tidy performance-unnecessary-value-param in basic
Change-Id: I997213ca28efc2df04d454ffaf3c81c9cbad09ac
2016-04-11 11:38:57 +02:00
Noel Grandin
8ca50d20c1 loplugin:constantparam in tools
Change-Id: I3774661799c074561c694515baba42a375d0a077
Reviewed-on: https://gerrit.libreoffice.org/23301
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17 06:09:42 +00:00
Michael Stahl
6a351c5cf9 basic: tdf#87530 if a new password is set, must set mbLoadedSource flag
... so that the library is stored (and encrypted), and not copied
unencrypted from source storage.

Change-Id: I9546087ec6f07007aa1ec377d2e959f2bae99a38
2016-03-07 12:05:32 +01:00
Arnaud Versini
14420e8329 BASIC : Add tools::make_ref and simplify SvRef usage
Change-Id: I8fe846dbd353bace05a8732a9b961f3507d97ef8
Reviewed-on: https://gerrit.libreoffice.org/22587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-22 12:33:52 +00:00
danielt998
2b31daf74e tdf#95857 Sort out German plurals ...
Made a start in removing the incorrect 'Infos' German plural

Change-Id: Ie989351a7473fc35b563e63ce6a4fb229093af60
Reviewed-on: https://gerrit.libreoffice.org/22301
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-02-12 15:29:25 +00:00
Noel Grandin
4c411636d9 sequence->vector in basic
Change-Id: Ic42f7218bda81effe870d950f666ba7653d60c66
Reviewed-on: https://gerrit.libreoffice.org/22177
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08 12:31:10 +00:00
Andrea Gelmini
92e60e1b80 Fix typos
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727
Reviewed-on: https://gerrit.libreoffice.org/21103
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-01-05 07:32:28 +00:00
Noel Grandin
70d14d2ccd loplugin:unusedfields in basic
Change-Id: I304f3903f305ba5b538964071ab95b57ebf2f970
2015-12-23 09:46:48 +02:00
Stephan Bergmann
08e49fa337 loplugin:nullptr (automatic rewrite)
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
2015-11-10 10:31:17 +01:00
Stephan Bergmann
a80bab7058 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I9979100550a86ac3f42d74a5403fb3ffd9d5006b
2015-11-06 09:34:39 +01:00
Caolán McNamara
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
Laurent Godard
8a7b7b7b72 New identifier for save/open macro with user defined types
no version bump but B_USERTYPE defined

fix test from commit de26ef85 that should be nMaxRecords

tested full round trip on password protected document (ie. use binary storage)
master --(0)--> master --(1)--> libreoffice 4.4 --(2)--> master --(3)--> master

(0) in master, User type supported, big module supported
(1) in libreoffice 4.4, user type not supported, big module supported, no loss of code
(2) in master, user type not supported, big module not found, no loss of code
    it is OK as libreoffice 4.4 saves to LegacyVersion
(3) in master, User type supported, big module supported (all is restored)
    it is OK as module was saved with CURRENT_VERSION (see sbxmod.cxx)

Change-Id: I237cf7de70adf1a755be1bc30987b21c43b6ab35
Reviewed-on: https://gerrit.libreoffice.org/17871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31 10:14:12 +00:00
Noel Grandin
2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00
Noel Grandin
b4ee16da65 com::sun::star->css in basic
Change-Id: I637fd7aedeb97b7dca22521474a54a1d4274f212
Reviewed-on: https://gerrit.libreoffice.org/17206
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 09:39:36 +00:00
Noel Grandin
22b094f5d8 loplugin:unusedmethods basic
Change-Id: Iddfbde451088750f8c74f3ac72c35b5ccfbe0ab1
Reviewed-on: https://gerrit.libreoffice.org/17044
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15 09:07:05 +00:00
Caolán McNamara
50bd0c8573 coverity#1308521 Uncaught exception
Change-Id: I6a189e0d1c4eb04e727fdf12585d46a1f4121f68
2015-06-28 17:55:52 +01:00
Stephan Bergmann
761e0ae0a7 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8bce930283301130ec7a2b1eab2a2c8f65c8abf9
2015-06-08 16:23:17 +02:00
Stephan Bergmann
dc47b2e513 Unwind SotStorageRef typedef
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
2015-05-07 11:05:04 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Caolán McNamara
5a308b1239 V801: Decreased performance
Change-Id: Iba139ede7bd72e23c0b7a28a8a4ff38ea816725a
2015-03-09 12:41:09 +00:00
Caolán McNamara
32f95a3551 V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
2015-03-04 13:07:40 +00:00
Stephan Bergmann
164276a0d2 Clean up previous commit
Change-Id: Iddade9d297be8f4a4e69b3bec5ab7588bf68c112
2015-02-26 15:34:57 +01:00
Chris Sherlock
a45a5501cc basic: convert sb.component to constructor usage
Change-Id: I45ddf460fa7d673c5210f9415b2a8015988a643e
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-02-26 15:05:23 +01:00
Stephan Bergmann
39ddeb53c0 basic: Use appropriate OUString functions on string constants
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
2014-12-18 14:12:23 +01:00
Takeshi Abe
6a53ea218c Avoid possible memory leaks in case of exceptions
Change-Id: Iad3de981a1c9660b1322315640e531c9891db0bf
2014-05-31 00:35:27 +09:00
Michael Stahl
5246fa2624 fdo#68983: basic: if the library is not loaded fully, copy source storage
Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix
for fdo#42899 caused the problem with password-protected libraries for
which the password is not known: only the binary representation of the
BAISC module was stored, not the source code; by simply copying from the
source storage the problem can be avoided.

It would be possible to ask for the password when storing, but that
would not work when non-interactive (called via API).

An alternative fix would be to pass in the
SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC
library's modify flag correctly, but that requires adding a
parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage().

(regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 )

Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0
2014-05-22 13:12:55 +02:00
Julien Nabet
5ec7a589be Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
2014-05-10 06:19:42 +02:00
Stephan Bergmann
cc725643fd Clean up function declarations and some unused functions
Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033
2014-04-09 10:12:02 +02:00
Noel Grandin
1eee88dd6b basic: sal_Bool->bool
Change-Id: I1c084ca86c0b1308eb2fc1451ba34d2e702c6a7f
2014-04-07 13:53:50 +02:00
Valentin Kettner
061130bd6d fdo#75280 Started cleaning up of sal_uIntPtr usage.
Converted wrong usage of sal_uIntPtr to appropriate other types in basic
module.

The bug is not fully fixed with this since many other occurences of sal_uIntPtr remain.

Update due to code review comments:
Fixed forgetting to change some declarations in iosys.cxx.
Cleaned up the one remaining sal_uIntPtr in iosys.cxx
Fixed adding a sal_uInt64 to a Date (uses long now instead) in methods.cxx
Fixed the VarDecFromUI4 call in sbxdec.cxx from sal_uLong to ULONG .

Conflicts:
	basic/source/runtime/iosys.cxx

Change-Id: Ia6460be04967deb68b92eb62d945da8814fae605
2014-03-28 20:08:46 +01:00
Noel Grandin
f288d7dcbd basic: sal_Bool->bool
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48
2014-03-27 13:45:08 +02:00
Noel Grandin
d7c5d9e385 basic: sal_Bool->bool
Change-Id: Idfe18863b2c6f60da5192d661f66e85a2bac09e5
2014-03-27 13:45:08 +02:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
6a38eace8c Remove visual noise from basic
Change-Id: I10865b94f67de39e9dbcbe71ede42aa94d81db61
Reviewed-on: https://gerrit.libreoffice.org/8234
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25 21:09:17 +00:00
Norbert Thiebaud
295bc8703f basic: remove use of sal_uIntptr in favor of more appropriate type
Change-Id: Ie878f43c7245838519fe7477b039827b079dde63
Reviewed-on: https://gerrit.libreoffice.org/8214
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-25 00:26:43 +00:00
Andras Timar
ac6e8ac7e4 typo fixes in comments
Change-Id: Idd49478d59cd062118fbf8e99d1c8bc5250013fc
2014-02-06 23:22:30 +01:00