139 Commits

Author SHA1 Message Date
Noel Grandin
38023af6c1 loplugin:unusedmethods
Change-Id: If5090c330e12d6e537766bf4a9be0a2360381a7a
Reviewed-on: https://gerrit.libreoffice.org/17312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-24 10:36:20 +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
Stephan Bergmann
761e0ae0a7 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8bce930283301130ec7a2b1eab2a2c8f65c8abf9
2015-06-08 16:23:17 +02:00
Noel Grandin
ae451af87d basic: used typed LINKs
Change-Id: I8770a782e7ff5529e30aee13558711bdd8a4070d
2015-05-19 11:10:54 +02:00
Caolán McNamara
36b06104f7 missing semi
Change-Id: I3253f09d10cbe733fdf6387d90ab04d65ba9328e
2015-05-18 17:21:13 +01:00
Caolán McNamara
4b5091cfd7 cppunit: noExplicitConstructor
Change-Id: Iaf1387ea236bf3a5db9b2165d5b827dbdcf95207
2015-05-18 17:14:15 +01:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +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
Noel Grandin
ee094bd46f loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02:00
Stephan Bergmann
c3fb36ed26 Clean up C-style casts from pointers to void
Change-Id: I6dd7c7fbaf0d4b22abba0a7b1f5e37f0a46d0747
2015-03-28 19:09:17 +01:00
Tor Lillqvist
c1fed2a9a1 WaE: this method is empty and should be removed
Change-Id: Ia5ec3890a4e57c460dab58fcd690530ebf836140
2015-03-26 09:43:33 +02:00
Eike Rathke
1da0c806d5 remove trailing blanks rubbish
Change-Id: I97cee7ea1d63375b73f0d4003022e9f09ad38e5f
2015-03-23 09:40:26 +00:00
Eike Rathke
e19a11c788 more engineering notation format tests, tdf#30716
Change-Id: Iefb035af9258c21e4fcc7f9b997f40ec318ed1ff
2015-03-23 09:26:35 +00:00
Laurent Balland-Poirier
86a318ce62 tdf#30716 Engineering notation
Implement engineering notation: fomat ##0.00E+00 for instance
Saved in ODF thanks to https://gerrit.libreoffice.org/14875/

Change-Id: I1e401183a95ce05481a9af52e49bbcfe08cd1a20
Reviewed-on: https://gerrit.libreoffice.org/14886
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-03-23 09:21:59 +00:00
Julien Nabet
4e00df4f0b Related fdo#87834: add 2 unit tests
Change-Id: I4735b15c9535dc17665629510fdafe3dd4086e0b
Reviewed-on: https://gerrit.libreoffice.org/13708
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-23 20:33:19 +00:00
Andrea Gelmini
07e84cae98 Fix typo comments Resouce->Resource
Change-Id: Ia3195a21ad46b4c9830ee6293135dfe5945986a2
Reviewed-on: https://gerrit.libreoffice.org/13985
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19 06:13:25 +00:00
Tsutomu Uchino
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
Caolán McNamara
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
Julien Nabet
0bc1246745 Rename "Mid" unit tests to distinguish cases with 2 and 3 args
Change-Id: Ie9241d0a28dc3871c9242123c9f000100e1a2fa1
2014-12-30 22:04:18 +01:00
Stephan Bergmann
39ddeb53c0 basic: Use appropriate OUString functions on string constants
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
2014-12-18 14:12:23 +01:00
Noel Grandin
86b44e8e78 fdo#38835 strip out OUString globals
Change-Id: I8bc386ffa88e31988bdc778a845403bec0772799
2014-12-05 15:07:17 +02:00
Michael Stahl
51906611ab basic: move SbxAppData to a BasicDLL member
... so it is deleted by ~SfxApplication.

Change-Id: I161bd92eb9b5082d1fdeea603921d0372a4d97e6
2014-10-23 21:30:45 +02:00
Michael Meeks
857f72dfe3 vba - disable Currency test / invocation on master.
We're missing an effective SbxCURRENCY conversion here.

Change-Id: Id6530ed3a93623b31089304f3451d9693ab4f3af
2014-09-19 15:31:07 +01:00
Michael Meeks
01e14011e5 vba: add a different variant of the same compatibility function.
Change-Id: I92bc1dbceea2f10cbb055d97f68b33e575d9be11
2014-09-19 15:31:07 +01:00
Michael Meeks
19ee058a21 vba: initial impl. of compatibility methods.
Change-Id: Iebc25f1730766e96d2ad6921a8b4d2ea880c63f3
2014-09-19 15:31:06 +01:00
Stephan Bergmann
e6655225e6 Avoid static BasicDLL (that would be destroyed after DeInitVCL now)
Change-Id: Id8968a7746815ecce79b6eb1ce971b74e770efa4
2014-06-04 10:16:06 +02:00
Thomas Arnhold
a5b93782a1 basic: update descriptions and add some more tests
Change-Id: Ice829c70482171bbfc22719e4b9e30c5ac058f5e
2014-05-13 06:08:05 +02:00
Thomas Arnhold
c4e301acd0 basic: Add CDec unit test
Change-Id: I9152f00239e5d407f9b33016caadb6a01770fed3
2014-05-13 05:26:06 +02:00
Chris Sherlock
8bf0b9536c coverity#1209779 & coverity#1209780 Resource leak
Have the testBasics() function clean up after itself - delete p2 and
p4 at the end of the function.

Change-Id: Ib0c732e1962da94fde0e0da307f610dd36f49eda
2014-05-02 00:18:10 +10:00
Andras Timar
c79a5f87b1 remove executable bit
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-17 15:11:14 +02:00
Stephan Bergmann
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
Noel Grandin
39c7532933 basic: prefer passing OUString and OString by reference
Change-Id: I8121204cdb37d4e1d8967397f3e45bdab6aaddad
2014-03-13 08:39:26 +02:00
Tobias Lippert
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
Julien Nabet
4eda1a0293 Add some unit-tests for Mid vb function (includes fdo#73771)
Change-Id: Ib5ee18207897cbe16a818096769cdb055dc9dad7
Reviewed-on: https://gerrit.libreoffice.org/7583
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2014-01-22 13:56:51 +00:00
Takeshi Abe
526a60086c Drop duplicate #include
Change-Id: I05569ef98293445916e8f48e7f06abd795fe9bb5
2013-12-08 17:20:40 +09:00
Stephan Bergmann
2a6976dfa9 -Werror,-Wunused-member-function
Change-Id: I32e4a80e99885c561a30e8f059c9b9a24c4bd3c7
2013-11-14 10:15:16 +01:00
Stephan Bergmann
1b3e9bcdfa -Werror,-Wunused-member-function
Change-Id: I4e47b5194992d3847a689284d7600be92a4ead26
2013-11-14 10:15:15 +01:00
Norbert Thiebaud
8b308d510e basic: include <> for external includes
Change-Id: I4715bbe853d60ef15f20a4d2441c688003ca568e
2013-11-11 22:37:24 -06:00
Thomas Arnhold
4adf622925 fixincludeguards.sh: basic
Change-Id: Id797a8969e42876092da347d8e1bba6195b697dc
2013-10-28 15:16:20 +01:00
Eike Rathke
66a96c8274 clean up SbiScanner::NextSym() a little, fdo#70319 follow-up
Number recognition was suboptimal and didn't properly resync scan
positions after having detected an error.

Change-Id: I278fdaaf17ed40560785deaaad0e3412a249d90a
2013-10-15 12:52:15 +02:00
Eike Rathke
472ad8ba7e work around crappy SbiScanner::NextSym(), fdo#70319
just to make test not fail that was wrong anyway

Change-Id: Ibbb8214b64be0e9a82e2bde406abdcfd2e84c734
2013-10-14 16:00:27 +02:00
Noel Power
fbf8ae8241 fix for fdo#62323 fix duplicated and wrong tests
Change-Id: I73dc238f7de59367a0a9d00e5421ea6675b4f556
2013-08-20 09:12:59 +01:00
Noel Power
4c9a08e78b fix for fdo#62323 bad conversion of Hex strings for certain values
Basic hex literals are basic Integer ( e.g. 4 byte ) types with
-2,147,483,648 through 2,147,483,647 range. Interally the scanner
was using a long to form/scan the literal, this led to bad behaviour
on 64bit linux ( where normally long -> 8 bytes )

Change-Id: I1d0fcc55ed0eda636da1445329737d1684e69f33
2013-08-20 08:59:54 +01:00
Julien Nabet
a0c86b527f typo length
Change-Id: Idb698e0fc47bfb50db1127edbec4ee92c5b420f3
2013-06-01 00:43:26 +02:00
Michael Meeks
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Eike Rathke
876c619b94 new module i18nlangtag
Moved portions from module i18npool, all of former i18nisolang1 library
that now is i18nlangtag. Included are languagetag, isolang and mslangid.

This i18nlangtag code is now even used by module comphelper, so
disentangling i18npool and making this an own module was needed to not
create circular module dependencies.

Change-Id: Ib887c3d6dde667403fd22d382310ba5f1a9b0015
2013-04-05 19:10:48 +02:00
Eike Rathke
cafa2b948b added unit test for 10e308 math overflow
Change-Id: I492d991545239539d21fb59de3eccdd1ab56a9af
2013-03-21 19:44:12 +01:00
Noel Power
f69acf929b another variation of the localised Cdbl test
Change-Id: Icf6dd7428cb88f1891c6d816a24a4126ea2cc135
2013-03-21 11:33:53 +00:00