Commit Graph

3185 Commits

Author SHA1 Message Date
Stephan Bergmann
179810cdf2 Further clean-up
Change-Id: I20049b482c831e4ac2221fddfe80deb9847e72c3
2014-12-03 20:30:18 +01:00
Vishv Brahmbhatt
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
Tobias Madl
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
David Ostrovsky
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
Caolán McNamara
ecc56da366 busted loop condition
regression from

commit 119873328a
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
Caolán McNamara
ef076fa1c1 coverity#1255390 Resource leak
Change-Id: I3631d6bbcf45986deb1e911fcdb0e6606a0c6d91
2014-11-21 11:55:10 +00:00
Michael Stahl
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
Caolán McNamara
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
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Caolán McNamara
9dacd849b6 this is for detecting the type of a variable based on its name
which means legal input is any character which a variable can
start with

Change-Id: I0c2d13a92ba374f8020e86e90e8e5f18ce8a9c90
2014-11-14 14:31:24 +00:00
Caolán McNamara
41029bcdd0 coverity#1242865 Untrusted value as argument
Change-Id: Ie7a7a2e7894a204dd55833416b7cbc5b01826e64
2014-11-14 12:02:48 +00:00
Brij Mohan Lal Srivastava
d32be3ace8 fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.

Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14 09:20:38 +01:00
Michael Stahl
e815987104 vcl: move the Impl class of MapMode ...uhm... out of the public header?
And remove the tools/fract.hxx include.

grep -l -r fract.hxx workdir/Dep/*Object* |wc -l
before: 4569
after:  1851

Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3:
libvcllo.so by 473k (0.35%)
libswlo.so by ~1Mb (sadly that is just 0.2%)

Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
2014-11-14 01:08:47 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Caolán McNamara
7d6c07fa2b coverity#1242689 Untrusted loop bound
Change-Id: Ie226805ef8d430eb3f7b3abaa54ac3af31f72f7b
2014-11-05 21:03:25 +00:00
Caolán McNamara
1409c0bd88 coverity#1242865 Untrusted loop bound
Change-Id: I9dc9cd98d0a02a2867d4c40c7afb7bf873513143
2014-11-05 21:03:24 +00:00
Caolán McNamara
5b0c95d81e coverity#1242794 Untrusted loop bound
Change-Id: I902a5bf989a8f385994a2f927cce4975b18f06d2
2014-11-05 21:03:24 +00:00
Caolán McNamara
12bcfec04f markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
Noel Grandin
705c48d32e fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.

Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00
Caolán McNamara
cb0e009a9e document array_vs_singleton dismissals
Change-Id: I8d7eb4c01197e885abca717c7814c61a7641ac9d
2014-10-30 10:10:09 +00:00
Caolán McNamara
bec2803362 coverity#704558 Dereference after null check
Change-Id: I6fe44d8926acd185bb6bc671fb7df8ae935998c1
2014-10-24 09:24:53 +01:00
Michael Stahl
28adfcdcbc fdo#84935: basic: avoid silly SolarMutex asserts on exit on Mac
Change-Id: If22b8ff962d2b68130176de3b7b9eccacfc850dc
2014-10-23 21:30:45 +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 Stahl
a7498603d8 basic: pimplify that
Change-Id: I0abe66ded0fd69a2720ad64e1a1426aafc7dfffb
2014-10-23 21:30:45 +02:00
Jan Holesovsky
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
Jan Holesovsky
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
Marcos Paulo de Souza
2e52086aa0 fdo#60689: replace SUPD variable
Change-Id: Iad63330f8762b595ba5ee94fc20bc2c64ac92f6b
Reviewed-on: https://gerrit.libreoffice.org/11937
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-10-23 14:38:27 +00:00
Michael Stahl
a1fad26e04 fdo#84935: basic: DocBasicItem is a UNO service, lock SolarMutex in dtor
Change-Id: Ia31d735ba54d18f406653debce04a07c077d09eb
2014-10-23 15:38:20 +02:00
Tor Lillqvist
9ecac3874d Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-22 09:30:23 +03:00
David Tardon
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
Julien Nabet
4c12951a03 Typo: compatability->compatibility
Change-Id: If0b98a30452a9d1fcc340173deb6856755926471
2014-10-12 13:00:46 +02:00
Juan Picca
47a2d7642d fdo#81356: convert Fraction to boost::rational<long> - wip
* Added rational util functions used by Fraction class not
  available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
  1. fraction.IsValid() -- rational only allow valid values, ie
     denominator() != 0
  2. rational.denominator() == 0 -- always false
  3. rational.denominator() < 0 -- always false but implementation
     detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
  1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
  boost::rational throws the exception boost::bad_rational

Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-09 11:33:33 +00:00
Michael Stahl
fca62934f4 basic: use SolarMutex to lock SfxLibraryContainer
Originally this used both SolarMutex and an own mutex, then a deadlock
was resolved in 2fe6a4a34b by not locking
SolarMutex.

Since the class will call event listeners without dropping the mutex
e.g. in insertNoCheck(), using the SolarMutex appears better anyway.

With this, installing a BASIC extension no longer triggers SolarMutex
asserts in SfxBroadcaster.

Change-Id: Ib9a2ee491ef53b1a53855af0fc22e863c5e7cb91
2014-10-08 15:46:06 +02:00
Michael Stahl
26b79470ca basic::ImplRepository: use SolarMutex instead of own mutex
The locking strategy in the basic module is totally unclear to me, there
does not appear to be a dedicated mutex for the core stuff callable via
StarBASIC, just a bunch of SolarMutexGuards at random locations;
let's try to use SolarMutex at the UNO entry points...

Change-Id: Ia9c45fdcfb5ffd0a4acc77ef5d2fabfb8743ad38
2014-10-08 15:46:05 +02:00
Eike Rathke
f84dac9b1f back out even more wrong tools::Time changes, geez..
Change-Id: I52eb3400769999d7f554c3bdb8746f65b7990388
2014-10-08 14:35:36 +02:00
Eike Rathke
04a810cee4 back out more wrong and confusing tools::Time comment changes
Apparently fc04f76336 used some sed script
to change all ...

Change-Id: Ie609bd02a2c5d70109fc6185cf4440480f29d8f5
2014-10-08 14:24:21 +02:00
Noel Grandin
fbf3aa391b spelling: instanciated -> instantiated
Change-Id: I99f3010e30f81786b938dc11736ea1597cd5530d
2014-10-08 11:02:55 +02:00
Caolán McNamara
8f436d3de7 use comphelper::rng::uniform_*_distribution everywhere
and automatically seed from time on first use

coverity#1242393 Don't call rand
coverity#1242404 Don't call rand
coverity#1242410 Don't call rand and additionally allow 0xFF as a value
coverity#1242409 Don't call rand
coverity#1242399 Don't call rand
coverity#1242372 Don't call rand
coverity#1242377 Don't call rand
coverity#1242378 Don't call rand
coverity#1242379 Don't call rand
coverity#1242382 Don't call rand
coverity#1242383 Don't call rand
coverity#1242402 Don't call rand
coverity#1242397 Don't call rand
coverity#1242390 Don't call rand
coverity#1242389 Don't call rand
coverity#1242388 Don't call rand
coverity#1242386 Don't call rand
coverity#1242384 Don't call rand
coverity#1242394 Don't call rand

Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-06 14:13:27 +01:00
Caolán McNamara
0f6c6baf61 coverity#1242481 Dereference null return value
Change-Id: I21e6bdd643d898a3515a96e4c9c17c2d6f98b0e4
2014-10-03 16:30:32 +01:00
Noel Grandin
c625525ddc rename SvRef::AddRef to AddFirstRef
to make it's intended purpose clearly distinguishable from AddNextRef

Change-Id: I5da780b48b19fd873667b648031bc394113f953b
Reviewed-on: https://gerrit.libreoffice.org/11763
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-03 05:25:41 +00:00
Noel Grandin
059f5a95b2 loplugin: cstylecast
Change-Id: Ic7c9c978baf5602a508aff5976220a02ed03a680
2014-10-02 07:37:19 +02:00
Noel Grandin
fa537124ac loplugin: cstylecast
Change-Id: Ie3d13eccdf444d569cbe40befb45eb86941160b6
2014-10-01 13:08:41 +02:00
Luboš Luňák
dc7ca91a04 avoid calling OUString::copy() with length being -1
Which asserts in dbgutil build.

Change-Id: I0f8205ae98c5a57c430b7d8a574e4c0019855841
2014-10-01 11:45:01 +02:00
Noel Grandin
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
Noel Grandin
4e26b91568 remove unnecessary casts in misc calls to SvStream.Write*
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ib80032e8626f5476a89b958f590441994594f4e4
2014-09-26 15:27:18 +02:00
Noel Grandin
5cefde06ea remove unnecessary casts in calls to SvStream.WriteUInt32
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
2014-09-26 15:27:17 +02:00
Noel Grandin
04fd62096f remove unnecessary casts in calls to SvStream.WriteInt32
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I0c0172519479be0535a447e41a592fbf782751bd
2014-09-26 15:27:17 +02:00
Noel Grandin
5501c8d222 remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
2014-09-26 15:26:48 +02:00
Noel Grandin
dedfa972bc remove unnecessary casts in calls to SvStream.WriteInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ie44bec6b988f3e46fe78d14b740818c9141f5df0
2014-09-26 15:26:48 +02:00
Noel Grandin
bec72dd34f remove unnecessary casts in calls to SvStream.WriteUChar
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I2ea4c7d97e745b3e6a3834f41ac7bfefa4883c7a
2014-09-26 15:26:19 +02:00