Commit Graph

3227 Commits

Author SHA1 Message Date
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
2f928b2d09 remove NUMBERFORMAT_ constants
.. in favour of just using the underlying constants from
css::util::NumberFormat

Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
2015-02-25 10:34:27 +02:00
9473ba2469 fix marking of free slots in array
Change-Id: I5170b9bbc4a3acab8307f7ad5ebc5e4ba9d58352
2015-02-24 10:36:51 +02:00
3b513aefa4 tdf#86543: reinterpret_cast -1 of appropriate width as special marker
Change-Id: Idf0d2a77a78e0e8fcbf435984b9b8f4393e4c207
2015-02-23 13:13:39 +01:00
a8e6f0bea0 tdf#39440 - cppcheck cleanliness
Fixed some cppcheck defects

Change-Id: I25fd6aba9d76df98d20b9a1bb4c9d3c1bf6f84bb
Reviewed-on: https://gerrit.libreoffice.org/14487
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-02-17 06:15:54 +00:00
a1ceacc17e boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
78f25d565e Basic : Partially rewrite hex and octal constant reading.
Change-Id: I42f72e7b1ca897aba71950841f90b501cf3b6dc2
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-02-09 13:18:31 +01:00
96520ae764 Basic : Small OString usage simplification
Change-Id: I6d6032b3075e98abb38859207e4a25e1a2e13e98
Reviewed-on: https://gerrit.libreoffice.org/14351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-02-08 06:54:45 +00:00
d93bcf7790 loplugin:deletedspecial
Change-Id: Iabc7b3fe295743db014e0bce78f9dc65e069d848
2015-02-07 12:35:56 +01:00
0f86834bd5 Remove redundant explicit up-casts
Change-Id: I58fd91354fe41673216674f5ae9c11c17cb3f29d
2015-02-05 12:47:23 +01:00
6e1d28efb3 fdo#39440: replace C-style cast's
* Add get() method to tools::SvRef

Change-Id: I3825852176c9c37f3ee21f4fd57328b1c7451951
Reviewed-on: https://gerrit.libreoffice.org/14268
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-02-05 07:24:30 +00:00
d41b8ac9e5 callcatcher: shave off a few more
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a
2015-02-02 21:07:54 +00:00
4b9a9ce8a0 Use rtl/character.hxx in basic module when possible
Change-Id: I1296541ac1a6a65a613818a1264c2b7482915e64
Reviewed-on: https://gerrit.libreoffice.org/14170
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-01-31 09:48:27 +00:00
bf7b702814 coverity#1267698 Uninitialized scalar field
Change-Id: I79974d276a8f7f856dbf09b14b06ce3b1bb418f0
2015-01-30 20:52:52 +00:00
309574394b callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...

commit b44cbb26efe1d0b0950b1e1613e131b506dc3876
Author: Noel Grandin <noel@peralex.com>
Date:   Tue Jan 20 12:38:10 2015 +0200

    new loplugin: change virtual methods to non-virtual

    Where we can prove that the virtual method is never overriden.

    In the case of pure-virtual methods, we remove the method entirely.
    Sometimes this leads to entire methods and fields being
    eliminated.

Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-29 23:42:26 +00:00
a4faad707c tdf#76174: basic: lock SolarMutex in BasicScriptListener_Impl
... before calling into BASIC.

Change-Id: I51a59fe5ca9b15ff7ec509c052964523d87a9790
2015-01-29 21:48:12 +01:00
fe480d8136 remove unused typedefs
found with some minor modifications to find/find-unused-defines.sh

Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd
Reviewed-on: https://gerrit.libreoffice.org/14194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-28 06:19:49 +00:00
cd528c3099 implement css::i18n::XCalendar4 and LocaleCalendar2 service, tdf#63230
Implementation only, new local date/time routines not used yet from the
outside in this step.
2015-01-26 18:12:10 +01:00
b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
818c2021d1 coverity#1266457 Identical code for different branches
Change-Id: I809ad43ad4541e4dcd5c245b469d30605f9f0d27
2015-01-25 20:46:39 +00:00
b5938bf4b3 WaE: rewrite call of rtl::OUString::operator= ...
... with empty string constant argument as call of rtl::OUString::clear
[loplugin:stringconstant].

Actually, no need to clear the string here as it already is empty, surely?

Change-Id: Ib4b1a6e1b0c0f59c1c964fe58d26058b492c3821
2015-01-24 08:10:50 +02:00
b7d02d7a5a Resolves fdo#87834: strange behavior of mid()-function
See https://bugs.freedesktop.org/show_bug.cgi?id=87834
Thank you Michael Büssow for pointing these cases

Change-Id: I3a9b58360ddab529d1fb2f7eeba7f1c7ae69ba7c
Reviewed-on: https://gerrit.libreoffice.org/13707
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-23 20:32:52 +00:00
4130c64355 Some more loplugin:cstylecast: basic
Change-Id: Ib22bc7408d333a7080fa44c9c3ac9535ccf00752
2015-01-20 09:06:45 +01:00
2f69f6efa0 remove unnecessary parentheses
left over from "SVStream operator>> to Write method" conversion

Change-Id: I619eb743d7890d5c70d0a94e51ce263567fa6f3b
2015-01-16 08:08:44 +02:00
c32a5a3b8e simplify Date/Time/DateTime conversion code
add constructors to Date/DateTime/Time,
that take the css::util counterparts,
to simplify code converting between these type

Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7
Reviewed-on: https://gerrit.libreoffice.org/13855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2015-01-13 15:24:04 +00:00
bf964151a7 Related: #i94895# revert the part of revision 1650261
replaced string should be starting with the start postion if specified

(cherry picked from commit 68c6265584fb6cb0469098507dd287e6e1127324)

Conflicts:
	basic/source/runtime/methods.cxx

Change-Id: Ib729facfa78ffddebc258440324f05d037fae46f
2015-01-11 20:45:28 +00:00
476f75802a Resolves: #i94895# fix illegal result of Replace runtime function"
and adjust the basic test-case, which is surely wrong

The syntax for REPLACE is:

// Replace(expression, find, replace[, start[, count[, compare]]])

surely in the case of a start of 3 the preceeding chars should
be returned unchanged in the result, not stripped off as before
this change.

This reverts commit 869402a58720b45e7227438b2e56e5a9532c0000.

Change-Id: Ie710e4de9e7e35c84abe2770142a963532820af4
2015-01-09 12:05:37 +00:00
2e3655bb51 loplugin:cstylecast
Change-Id: I86aaad9f38ad63121805fa3dc05b3a8a33428ef7
2015-01-09 10:54:45 +01:00
a272f5b7b3 Resolves: #i63614# fix strange type mismatch when Iif function is used
Second or later compilation uses value type returned by previous execution of code.
Use the defined type as return value of the runtime function of Basic always.

(cherry picked from commit 7470c682e136a4a89c1e9474bbc79b2d61f31048)

Conflicts:
	basic/inc/basic/sbxmeth.hxx
	basic/inc/basic/sbxobj.hxx
	basic/source/runtime/stdobj.cxx
	basic/source/sbx/sbxobj.cxx

Change-Id: I3064e8403286a9c1401ef658bf139bedeae11f17
2015-01-09 09:24:44 +00:00
2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
869402a587 Revert "Resolves: #i94895# fix illegal result of Replace runtime function"
This reverts commit 340ca294d43f2c5b9fda1afbf178609a015f71e3 as CppunitTest_basic_vba
breaks, so needs revisiting to see which is right

Change-Id: I10168d454a8c67d91eee5bb8939aff74bba42954
2015-01-08 20:35:35 +00:00
340ca294d4 Resolves: #i94895# fix illegal result of Replace runtime function
(cherry picked from commit a2700f75af61837033ff213607445cc1f74b36d6)

Conflicts:
	basic/source/runtime/methods.cxx

Change-Id: If9c671a612de87d8d37bfc40704a97a6062fd150
2015-01-08 16:51:10 +00:00
45ec1d9b56 brute-force find-and-remove of unused #define constants.
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02:00
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
a509a8d995 Resolves: fdo#87003 Kill BOOST_FOREACH on master
use C++11s range-based for() loops instead

Conflicts:
	sd/source/filter/eppt/pptx-epptooxml.cxx

Change-Id: I0868eb345932c05b7e40b087035da252b99bf0b9
Reviewed-on: https://gerrit.libreoffice.org/13714
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-05 09:34:08 +00:00
f8922b67a4 Remove unnecessary comphelper::string::getToken
Change-Id: I49192637121441b9a1980350b9bb32cd995d4386
2015-01-02 14:22:21 +01:00
7f476fea47 boost::unordered_map -> c++11 std::unordered_map
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
2014-12-27 23:00:45 +00:00
39ddeb53c0 basic: Use appropriate OUString functions on string constants
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
2014-12-18 14:12:23 +01:00
0f5e917024 Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call).  Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).

(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added.  The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like

  'x' == s

is an abomination that shall not be abetted.)

Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-17 16:39:33 +01:00
898c414700 basic: Use appropriate OUString functions on string constants
Change-Id: Ied7e5eba39672363065083493bd5e60449fda371
2014-12-12 10:21:45 +01:00
19d0950451 Resolves: fdo#86843 avoid getting deleted before finishing Broadcast
Change-Id: I19181f9e2fbd5f906e6e5d807b1b2483e7881cf0
2014-12-09 14:13:26 +00:00
93124f7710 reduce scope of local variables
This eliminates some of the warnings from Cppcheck report of
2014-11-29.

Change-Id: Ic4bf3bd8f5982d2ea2f25a28c0dd61084c59af11
Reviewed-on: https://gerrit.libreoffice.org/13331
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-12-06 14:12:31 +00:00
179810cdf2 Further clean-up
Change-Id: I20049b482c831e4ac2221fddfe80deb9847e72c3
2014-12-03 20:30:18 +01:00
9de4fe9853 Code clean-up/consolidation task.
Removing the duplicate code,and consolidating changes
by using  method "getExpandedFilePath" of comphelper.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>: adapted to recent change
from comphelper::getExpandedFilePath to comphelper::getExpandedUri; fixed the
two changes in framework to actually modify the by--non-const--ref argument;
fixed a loplugin:unreffun.  More clean-up to follow.

Change-Id: Ie8875bcb61b616385bd64151f0a915bf7cce04e5
2014-12-03 20:30:18 +01:00
57fe576778 fdo#84938 replace BASERR_REASON_ constants -> enum
Change-Id: I80fe0108c2d27b72d2fadc23032cf2b52c3193a6
Reviewed-on: https://gerrit.libreoffice.org/13268
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-03 08:25:02 +00:00
e6e51a0a90 Add missing include header
Change-Id: I59d6f1401cdfc37c0949cc9d439cb7ff52857079
Reviewed-on: https://gerrit.libreoffice.org/13286
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-12-03 08:04:05 +00:00
ecc56da366 busted loop condition
regression from

commit 119873328acd70ca3569c21a0b1fe36277e8bf4c
Date:   Thu Oct 21 15:34:02 2010 -0500
    convert vos/process.hxx and related API

Change-Id: I36527a4f0109105b9853a79773b4c92f9bc4e902
2014-11-21 11:55:11 +00:00
ef076fa1c1 coverity#1255390 Resource leak
Change-Id: I3631d6bbcf45986deb1e911fcdb0e6606a0c6d91
2014-11-21 11:55:10 +00:00
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
6b709b27b3 coverity#735399 Logically dead code
we can only enter the bAssumeExprLParenMode controlled block once
because the block sets bAssumeExprLParenMode to false

bAssumeExprLParenMode is only true if the first token read in the
method is LPAREN

so we can only enter this block if the current token is LPAREN and
its the first token processed, so the token can't be BYVAL

Change-Id: I6e668fca4d127d7dbfe447e2d9f2231e05278a7d
2014-11-17 14:53:24 +00:00