3700 Commits

Author SHA1 Message Date
Michael Stahl
192ca71f07 basic: replace boost::ptr_vector with std::vector<std::unqiue_ptr>
Change-Id: Ieba2fb34e0279871d36b4fe80d9de76e614b5cde
2015-10-26 16:09:19 +01:00
Stephan Bergmann
fc0b9a3493 loplugin:defaultparams
Change-Id: I5a3852f85f20543165e174da9cd9a36da9a3df8d
2015-10-20 11:44:49 +02:00
Stephan Bergmann
af9684f604 loplugin:defaultparams
Change-Id: Ib0f01af2c7a7186d138369c177a563b322a87214
2015-10-19 17:49:12 +02:00
Noel Grandin
0e8a40e8b8 calling IsSet() before Call() on Link<> is unnecessary
the Call() already does a check

Found with:
git grep -A 1 -w 'IsSet()'
    | grep -B 1 '.Call('
    | grep ':'
    | cut -d ':' -f 1

Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847
2015-10-15 12:29:01 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Noel Grandin
ccc5ea08d6 cppcheck:variableScope
Change-Id: I037feb335499629300309851dcda3bb661f03d4f
Reviewed-on: https://gerrit.libreoffice.org/19316
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12 06:52:56 +00:00
Stephan Bergmann
4d00131b67 Reduce variable scope
Change-Id: I87850db982f413b328976e043d8386b7577ba17c
2015-10-07 11:32:42 +02:00
Caolán McNamara
31ee230b6e Related: tdf#94814 some cleanup of static_cast following dynamic_cast
to the same type

Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af
2015-10-06 15:10:51 +01:00
Stephan Bergmann
e8233e1510 clang-analyzer-deadcode.DeadStores
Change-Id: I03769bd4105e4e1d140b2885978ea9da9ef866de
2015-10-06 15:31:16 +02:00
Stephan Bergmann
5e02785ff1 clang-analyzer-deadcode.DeadStores
Change-Id: Ib26cbbc839040c49288606f588cb7400d7e40b83
2015-10-06 15:31:15 +02:00
Stephan Bergmann
66ef464799 clang-analyzer-deadcode.DeadStores
Change-Id: I2ef946572a61eb766454d2df0cb2ff523050ed7e
2015-10-06 15:31:15 +02:00
Oliver Specht
89d39bc100 tdf#94559: 4th step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
    idl, editeng, sc, sd, sw, sfx2, sot, starmath

Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653
Reviewed-on: https://gerrit.libreoffice.org/19132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-06 07:29:37 +00:00
Caolán McNamara
e9ae1b64af checkUnoObjectType etc always deref their ptr arg, convert to ref
Change-Id: Iabdb057fb2dc05cfb8c98864dc5109360b50633a
2015-10-02 11:38:58 +01:00
Andrea Gelmini
2957be02c5 Fix typos
Change-Id: I776c517ba87838c0c3391f79010a30fa7fe2abd3
Reviewed-on: https://gerrit.libreoffice.org/18939
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-02 08:54:51 +00:00
Laurent Godard
ddb4526159 tdf#94617 allow to store nStart information greater than sal_Int16 limit
- preserve backward compatibility
- nDebugFlag is stored but not used when loaded
- Flag nDebugFlag set the top bit to 1
- stores the multiplier of sal_Int16 limit to reach nStart
- in load, test this flag bit
- rebuild correct nStart
- new B_CURVERSION file format for binary storage macro
- unit test for big modules

Reviewed-on: https://gerrit.libreoffice.org/18926
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit db17079fcff6f9a068c499b17f2501cc4c82d10b)

Change-Id: Iaa037982d828fef7195615e6eda546b7199a4fe8
2015-10-01 16:36:05 +01:00
Caolán McNamara
e31cd8f3ae coverity#1325250 Unchecked dynamic_cast
Change-Id: Id52cad11d2ca4ef42a31c0905ee123ccd53e0677
2015-10-01 14:41:29 +01:00
Caolán McNamara
62b39a7c48 coverity#1325255 Unchecked dynamic_cast
Change-Id: Ie1a6b231e0313d1c00ffb9ab0137af2beeb05e02
2015-10-01 14:05:27 +01:00
Noel Grandin
58aea3f36c loplugin:unusedmethods
- improvements to the plugin to find more method calls
- improvements to python script to remove more false+
- fix the FORCE_COMPILE_ALL build flag to include code in
  the $WORKDIR

Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836
Reviewed-on: https://gerrit.libreoffice.org/19064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 10:43:24 +00:00
Andrea Gelmini
9e4c87be31 Fix typos
Change-Id: Ie0e941d48457d758525353d6c5cf858652f86fd3
Reviewed-on: https://gerrit.libreoffice.org/18938
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 05:53:57 +00:00
Stefan Heinemann
c50eb68af3 Renamed wrongly prefixed boolean variables
Fixed tdf#94269

Change-Id: I63109cc4e095bad680d7637a065080ea368860ae
Reviewed-on: https://gerrit.libreoffice.org/18851
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-29 18:33:40 +00:00
Noel Grandin
34180700b2 loplugin:removeunusedmethods, remove unused stuff
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29 15:08:43 +02:00
Michael Stahl
9555d03c98 remove unused #include <sal/alloca.h>
Change-Id: I490841fd2c526e4ca6d6c94cc7b9dba318c932a1
2015-09-29 14:57:43 +02:00
Michael Stahl
d70302ef5c basic: more plausible build fix than e5a8eb9e
Change-Id: I26fd8a76a17386de73fa12058509ccee7e768512
2015-09-29 14:57:39 +02:00
Caolán McNamara
e5a8eb9e29 fix dbgutil build
Change-Id: If2a9d330bd7fde8db5e998e97c278fb19c90f24a
2015-09-29 13:48:00 +01:00
Oliver Specht
d3c7c9ea81 tdf#94559: first step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
avmedia, basctl, basic, cui, dbaccess, vcl,xmloff

Change-Id: If4496762e82e896b6fbc362e6626502703c245f5
Reviewed-on: https://gerrit.libreoffice.org/18905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-29 12:26:20 +00:00
Caolán McNamara
365b13e152 pVar != null, so static_cast(pVar) != null
Change-Id: Id22808858b5884b2f87064b389eb411e0712bab4
Reviewed-on: https://gerrit.libreoffice.org/18881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-26 11:49:06 +00: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
Caolán McNamara
22b80ac8e2 boost->std
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 12:54:25 +00:00
Michael Stahl
b3ee922299 basic: one more WeakImplHelper<XPropertySetInfo> duplicate
This one may be quite busted even since it compares
sal_Int32(-1) with USHRT_MAX.

Change-Id: I894b382ad499ee49f4616c7704afbb90f0556744
2015-09-11 23:44:59 +02:00
Stephan Bergmann
1f6b082388 Fix previous commit
...4b4a7c0d87eb580272aba0777c9021789025bdc0 "Revert a fix that can never have
worked in the first place?"---which presumably did work after all, as Noel
thankfully pointed out to me,
<http://lists.freedesktop.org/archives/libreoffice/2015-September/070193.html>
"Re: [Libreoffice-commits] core.git: basic/source 'Revert a fix that can never
have worked in the first place?'"

Change-Id: I411bfaacbfebf50589290c6a3040d0300c256439
2015-09-09 10:54:03 +02:00
Stephan Bergmann
4b4a7c0d87 Revert a fix that can never have worked in the first place?
clang-analyzer-deadcode.DeadStores finds that conditionally assigning

  eTok = SYMBOL

inside the "if( SbiTokenizer::IsKws( eTok ) )" block is useless, as the directly
following

  if( DoParametersFollow( pParser, eCurExpr, eTok = eNextTok ) )

will unconditionally assign into eTok again, without intermediate use of the old
eTok value.

Now, the conditional "eTok = SYMBOL" assignment was added as
5d98ed5c6a4afc0a7943318c510e56aef8c45193 "INTEGRATION: CWS ab12fixes: #118234#
SbiExpression::Term(): Allow Input as symbol for action option compatible,"
while the unconditional "eTok = eNextTok" assignment had followed that block
ever since c25ec0608a167bcf1d891043f02273761c351701 "initial import."

The referenced "#118234#" was a Sun-internal bug and is no longer available, but
it does very much look as if this alleged bugfix never worked in the first
place.  So revert the code back to what it looked before
5d98ed5c6a4afc0a7943318c510e56aef8c45193, for now.

Change-Id: I1fe1178d2c5b0c0372da32b8dd0f2dfbdb22a1ae
2015-09-08 10:57:54 +02:00
Noel Grandin
751c771adc loplugin:mergeclass, merge BiNode with NameNode, Obj0Type with ObjkType
Change-Id: Icbc0dfc6096a6e2c651dad4fe9f78d176f389390
2015-09-08 09:20:31 +02:00
Julien Nabet
f0208db49d cppcheck: fix some redundantCondition warnings
Change-Id: If53d33fb4d9ca9dc1babb9043bd07c5d29fe74c2
Reviewed-on: https://gerrit.libreoffice.org/18353
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-05 13:42:02 +00:00
Arnaud Versini
d417059dae BASIC : SbiParser::DefXXX Only convert the first letter to uppercase
Change-Id: Iccee4712459653b35b11d8dbe99c45df753307be
Reviewed-on: https://gerrit.libreoffice.org/17859
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-09-05 09:22:41 +00:00
Michael Stahl
3fb50fbe2b basic: remove over-engineered XEnumeration service
... that was causing duplicate WeakImplHelper symbols now.

Change-Id: Ibbf84a2059f30bfeb5c265adcafb4b56d2534dc8
2015-09-03 16:31:59 +02:00
Stephan Bergmann
37a6fdf890 loplugin:stringconstant also for cases using char const v[] = "..."
Change-Id: Iba38686620624178a7be39d703389402bbcea4cb
2015-09-03 09:34:00 +02:00
Caolán McNamara
79f060d451 coverity#1242865 Untrusted loop bound
Change-Id: I9332fa9b805e702fb56067efc308aff09310f603
2015-09-01 09:40:21 +01: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
Stephan Bergmann
ba4276efa3 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I349e1b9e3ea81c0684c6234497b6d44b47666b09
2015-08-31 08:04:43 +02:00
Daniel Robertson
6900bf41e2 o3tl/cow_wrapper: remove boost dependency
Remove boost dependencies from ::o3tl::cow_wrapper, and add
the necessary includes to files including checked_delete and
noncopyable that do not already include the necessary files.

Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686
Reviewed-on: https://gerrit.libreoffice.org/18125
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-29 22:51:36 +00:00
Damjan Jovanovic
9e318c0977 Resolves: #i112383# CLng("&HFFFFFFFF") fails on 64-bits...
rather than returning -1

Found-by: andrew
Patch-by: Damjan Jovanovic

(cherry picked from commit 175afdcb151d9ce1238dc9fec59f2dfc2eb07345)

Change-Id: I996bbfa82b10716318944f390ea53e0a5ae7c89c
2015-08-28 10:32:01 +01:00
Noel Grandin
bd8b93fdff make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-28 09:49:56 +02:00
Stephan Bergmann
a6050c32f3 Clean up aEmpty
Change-Id: I4c4294b7fb1cb537ba3ae3e6e7e747a3333b7469
2015-08-27 08:00:32 +02:00
Stephan Bergmann
43c00bc489 Clean up aEmptyStr
Change-Id: I5befe9deac917a28e80ed193b67ff29b5ba35149
2015-08-26 21:24:29 +02:00
Damjan Jovanovic
94a52f9ffa Resolves: #i117989# Basic functions return wrong results for dates <1900-1-1
Also extended our spreadsheeet test to search through more columns, open spreadsheets
with macros enabled, and added a test for the the Year(), Month(), Day(), Hour(),
Minute(), and Second() functions comparing Calc's formulas vs StarBasic's runtime functions.

Found-by: villeroy
Patch-by: Damjan Jovanovic

(cherry picked from commit a68493266e9212119f31e58c256f00fb9bcc8d20)

Change-Id: I8f2115c623a1d35db5b7fc8184a9118c3eca6fcd
2015-08-26 12:43:59 +01:00
Noel Grandin
167bc621ef Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-26 11:15:35 +02:00
Caolán McNamara
de26ef857b coverity#1242865 Untrusted loop bound
Change-Id: I9c6f821f7bd1e9bd3eb8f47e269e62a792523f1a
2015-08-23 16:57:37 +01:00
Laurent Godard
6e40334663 null pointer guard if no user defined types declared at the module level
Change-Id: I368a168c636e4029e9cd9bbe4a4df5d9b846c923
Reviewed-on: https://gerrit.libreoffice.org/17834
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18 12:16:29 +00:00
Laurent Godard
ba5fd0cc77 correct wrong comments
Change-Id: I6682248873bcd6302b1d8d041bbc2e19a8e0ba7b
Reviewed-on: https://gerrit.libreoffice.org/17831
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18 11:40:26 +00:00