562 Commits

Author SHA1 Message Date
Stephan Bergmann
9f0ed9d8eb Use o3tl/any.hxx in scaddins
Change-Id: Ifb19d216a00db90d6a267099077f90e6c54cd942
2016-06-06 09:47:32 +02:00
Noel Grandin
f469309e26 clang-tidy modernize-loop-convert scaddins to sdext
Change-Id: I63ccc56df1a1de8bc443abb95e520246c457912f
Reviewed-on: https://gerrit.libreoffice.org/24798
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10 06:29:32 +00:00
Stephan Bergmann
942b760088 Avoid reserved identifiers
Change-Id: I41a490832c9dd312775f420807e4bed93557a24e
2016-04-12 20:03:43 +02:00
Noel Grandin
682b9b33c7 loplugin:constantparam in sc
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-24 11:41:01 +02:00
Noel Grandin
b887f73ff0 loplugin:unuseddefaultparam in scaddins
Change-Id: I47f7ead34832c19d5194c1e4ccf190384262f436
2016-03-02 07:57:37 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Andrea Gelmini
534b2a4b58 Fix typos
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3
Reviewed-on: https://gerrit.libreoffice.org/21797
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-05 06:48:38 +00:00
Noel Grandin
318a23b4f4 loplugin:fpcomparison in scaddins/
Change-Id: I9a303a92f5531d549faf6d86ea0ce6360e115567
Reviewed-on: https://gerrit.libreoffice.org/21865
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-04 06:24:29 +00:00
Noel Grandin
db17d3c17c new loplugin: memoryvar
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr

Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 07:16:20 +00:00
Stephan Bergmann
2e3539813f loplugin:nullptr (automatic rewrite)
Change-Id: Id275f54b08da54c356db052b949d7a1f9154b22c
2015-11-10 10:31:37 +01:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Caolán McNamara
4ea0390faa cppcheck: noExplicitConstructor
Change-Id: I06186e8f0bbc8522f538e8639a68e816093becc2
2015-11-02 10:16:38 +00:00
Noel Grandin
d95a27f944 com::sun::star->css in scaddins,sccomp,scripting
Change-Id: Id9167341940bac65f055e1e33ff0670f6fa0f6c4
Reviewed-on: https://gerrit.libreoffice.org/19629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-28 06:31:27 +00:00
Noel Grandin
644487a115 loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27 08:20:43 +00:00
Stephan Bergmann
4b603aaa4a loplugin:defaultparams
Change-Id: I511b95a62f43f9f726fbe5253c7ffc6b510b0346
2015-10-19 17:50:56 +02:00
Noel Grandin
ed7361ef0b cppcheck:variableScope
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af
Reviewed-on: https://gerrit.libreoffice.org/19329
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-13 06:22:33 +00: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
Eike Rathke
40863a8221 be consistent with suffix
Change-Id: I40af1526bd8155ad66303f8519c8a6c36a5aa57b
2015-10-08 16:38:43 +02:00
Eike Rathke
f6d4788858 Number(s) makes no sense for one parameter, use Number instead
Change-Id: Iaf15e4a2b7d29dbdecafcc8089d96c0d6bee6d35
2015-10-08 16:32:57 +02:00
Winfried Donkers
91e15edd12 Make clear to user that Calc add-in functions GCD and LCM only exist for
interoperability with Excel2003 and before.
Follow up of commit 74010f1c502a4bd7eb1ef3ee3d0e8c45a1c9afee

Change-Id: I824df2fc50200fc29f7de61881d867f53056edc9
Reviewed-on: https://gerrit.libreoffice.org/19241
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-10-08 14:30:35 +00:00
Eike Rathke
74010f1c50 rename WEEKNUM_ADD to WEEKNUM_EXCEL2003 in UI, tdf#50950 follow-up
... and add description to clarify that it exists for interoperability
and for new documents WEEKNUM should be used instead.

Also NETWORKDAYS_ADD to NETWORKDAYS_XCL.

Change-Id: I01e705d57f0b31983950ac0e47ecb894f657de88
2015-10-07 15:43:59 +02:00
Noel Grandin
d68a0fc050 loplugin:unusedmethods
Change-Id: Ie1603adf3908fd0668bcbe8f75c6bafa0d0bfd6c
Reviewed-on: https://gerrit.libreoffice.org/19072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-02 06:20:35 +00:00
Noel Grandin
e209d115d4 remove old standalone Sun bug numbers
Sun bug numbers without any accompanying text are completely useless.

Fixed with
   git grep -lP '//\s*#\d+#\s*$'
       | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print'
And then hand-checking the result to restore places where it deleted code.
And then some more grepping and hand-editing to kill the others.

Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29
Reviewed-on: https://gerrit.libreoffice.org/19023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 06:57:19 +00:00
Andrea Gelmini
c15d93f252 Fix typos
Change-Id: Ia41f4f0ca30ae3346d0720271478ec5bcdab797b
Reviewed-on: https://gerrit.libreoffice.org/18967
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 07:07:18 +00:00
Takeshi Abe
ee7da352b8 Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I7154f9472f02fdf47d27ba715db55bb1ec669a8a
Reviewed-on: https://gerrit.libreoffice.org/18580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-15 06:19:28 +00:00
Ian
3f4482ebc2 Removed another FuncDataList collection
This time the existing collection used a vector internally and mapped
operations onto its standard interface.

Removing it in favour of a raw typedef'd vector and find_if reduces the
volume of code and simplifies the lookup mechanism.

Change-Id: I86fdb85773577019073803c2fc249d04196afe31
Reviewed-on: https://gerrit.libreoffice.org/17680
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2015-08-13 12:04:24 +00:00
Ian
12761ab705 migrated some raw pointers to unique_ptr's
Change-Id: Ibbe088e73bdf987bf3784b61aa8b38a86d6654e3
Reviewed-on: https://gerrit.libreoffice.org/17679
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2015-08-13 11:57:20 +00:00
Ian
4498c5e1d0 tdf#90222: Removed ScaList and cleaned up usages
- Removed now-unused ScaList type
- Changed ScaFuncDataMap from a map to a vector, using find_if for
  lookup.

Change-Id: Ia22763f221f9a58d85dc363cab2585d7df37877c
Reviewed-on: https://gerrit.libreoffice.org/17678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2015-08-13 06:50:43 +00:00
Ian
2e23b6b9fc tdf#90222: Removed ScaList from pricing scaddin
Removed the ScaList type.

Migrated the ScaFuncDataList to a vector and changed lookup to
std::find_if with a functor. This reduces memory use slightly and makes
the use of the lookup result a little simpler.

Change-Id: I4e5f4d27107512a7c53935f123d5e7e8aca625ee
Reviewed-on: https://gerrit.libreoffice.org/17652
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2015-08-12 11:11:37 +00:00
Ian
a5cebd1bfc tdf#90222: Removed ScaFuncDataList type
This repeats the same change in the pricing addin as already carried out
in datefunc.

This type was a special case of a custom implemented list, and wasused
like a map. I have replaced it with a std::map typedef'd as
ScaFuncDataMap.

Since the map key also exists in the value object, there are more
memory-efficient ways to implement this with a vector and a predicate
functor for searching at the cost of some code complexity. I opted for
the simpler code afforded by using a std::map implementation.

Change-Id: I7d28e0bc58f713cf4f4e962302e09788b3ac4218
Reviewed-on: https://gerrit.libreoffice.org/17651
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2015-08-12 10:59:19 +00:00
Ian
46ae639272 tdf#90222: Removed ScaFuncDataList type
This type was a special case of a custom implemented list, and was used
like a map. I have replaced it with a std::map typedef'd as
ScaFuncDataMap.

Since the map key also exists in the value object, there are more
memory-efficient ways to implement this with a vector and a predicate
functor for searching at the cost of some code complexity. I opted for
the simpler code afforded by using a std::map implementation.

Change-Id: Idd450f4a908ff503cb02e8e363ddbe3512903f47
Reviewed-on: https://gerrit.libreoffice.org/17579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-11 07:09:59 +00:00
Ian
25534a62b2 tdf#90222: Removed redundant collection type
Removed ScaStringList collection and replaced it with
std::vector<OUString>

Change-Id: Iba9680454a7a154cc445e2b5c8a436917868b40e
Reviewed-on: https://gerrit.libreoffice.org/17573
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-07 14:02:45 +00:00
Ian
09a9234c02 tdf#90222: Removed ScaStringList and replaced all uses with std::vector
Change-Id: Icd12e4a1557b39fd387173ce261118c27200dd2b
Reviewed-on: https://gerrit.libreoffice.org/17543
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-07 07:03:39 +00:00
Noel Grandin
d69d4f7174 loplugin:unusedmethods reportdesign,scaddins
Change-Id: I3e2ccdbc0dd97f276a96eae5c041c09e69cede91
Reviewed-on: https://gerrit.libreoffice.org/17235
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21 06:52:35 +00:00
Caolán McNamara
5b2f823194 add a SAL_RAND_REPEATABLE for repeatable random nums
merge the formula and comphelper ones together

Change-Id: I2e7e2cdb176afc6982e384fa1e007da5b914e6f0
2015-07-10 08:58:20 +01:00
Andrea Gelmini
3dfdd18707 Fix typos
Change-Id: Iddcc22f62ea134ea797292daa02e47042d52d0d1
Reviewed-on: https://gerrit.libreoffice.org/16710
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:22:11 +00:00
Caolán McNamara
e632eaecfc coverity#1308576 Uncaught exception
Change-Id: Ic31670bd8999961dc9571c8d55817951a702d417
2015-06-29 12:58:07 +01:00
Caolán McNamara
69dcc8f4e5 coverity#1308594 Uncaught exception
Change-Id: Ic320ba53565ef735d24a3538bf1863b3fb37c97a
2015-06-29 12:58:05 +01:00
Caolán McNamara
9e92e3ae52 coverity#1308584 Uncaught exception
Change-Id: I55178c48f57c26f7eec7efa052abd9edbf7adeb0
2015-06-29 12:58:03 +01:00
Phillip Sz
4ccb0fb9eb tdf#39468 Translate German Comments - scaddins/
Change-Id: I95ea40b1b349f03e8ce45906a50e18f7a95ca5e9
Reviewed-on: https://gerrit.libreoffice.org/16525
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-29 10:17:56 +00:00
Caolán McNamara
ed450f7e65 coverity#1308568 Uncaught exception
Change-Id: Ic9e4136619d9babe5333f815c9a0268830fbc0d6
2015-06-29 09:43:32 +01:00
Caolán McNamara
662f294a48 coverity#1308597 Uncaught exception
Change-Id: Ibcbdd39952a573e72edbe1813c9d8b73c5e32f78
2015-06-29 09:43:31 +01:00
Caolán McNamara
6c0a94a957 coverity#1308546 Uncaught exception
Change-Id: Ia5b1c50ecff3fde4b698012304cd75fa1a7b4ce6
2015-06-28 17:56:02 +01:00
Caolán McNamara
9935affa7b coverity#1308538 Uncaught exception
Change-Id: Ib1e110617911ae3e9c13f013f8e807576abb00e6
2015-06-28 17:55:59 +01:00
Caolán McNamara
5ef73c74bc coverity#1308529 Uncaught exception
Change-Id: I8a91a9016e198e7f27d5c0e92789ae458f98f713
2015-06-28 17:55:56 +01:00
Caolán McNamara
d38e09c273 coverity#1308518 Uncaught exception
Change-Id: I511989f80316eb6791d3418848b1e5c7c4b97a85
2015-06-28 17:55:51 +01:00
Julien Nabet
2a65bf32ec Revert "Typo: iff->if"
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d.

iff can mean "if and only if" so not a typo
2015-06-23 20:42:27 +02:00
Julien Nabet
cf92da3d6e Typo: iff->if
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-23 20:30:11 +02:00
Stephan Bergmann
deb7a093b0 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Id1b618d9e0bfa69e3d118b6735fd421d0517c3d9
2015-06-08 16:27:40 +02:00