Commit Graph

1831 Commits

Author SHA1 Message Date
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
e4688a3d41 loplugin:staticmethods
Change-Id: Ibaad2adabecb878411fdd66383bca91f034477af
2015-04-07 10:24:54 +02:00
Stephan Bergmann
54e87df11f Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE

Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
2015-04-02 18:33:37 +02:00
Stephan Bergmann
44b3e56bb4 Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload

Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02 16:30:34 +02:00
Noel Grandin
edc189dbfa loplugin:staticfunction
Change-Id: I89f5984d73e7d42269189dc1d1bc2d59e5ab193f
2015-04-01 10:37:02 +02:00
Stephan Bergmann
f785d167b9 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I2f084bd6de707d21857e2182aebb96b446b51dcc
2015-04-01 08:42:27 +02:00
Caolán McNamara
2ec9d9dd81 Resolves: tdf#90228 1.06 turns into a monster
Change-Id: I8ebb57fe8b94da2569593ffa7cf374cae64a846a
2015-03-31 13:38:02 +01:00
Stephan Bergmann
a52cf476e7 Clean up template-parameter-dependent C-style casts
Change-Id: Ia1ab134a0afbeeb3ae40264bd4233a47df26b734
2015-03-29 15:13:45 +02:00
Stephan Bergmann
93a8ef5a2d Clean up C-style casts from pointers to void
Change-Id: I98cf0c0eee558662d1e3dd20cca99ec1ca8c9a2c
2015-03-28 19:09:27 +01:00
Stephan Bergmann
b627a4d98f const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I17a03b41555a6c9fd7fab90c2c47ac910219f3a6
2015-03-26 15:33:39 +01:00
Julien Nabet
76f33f1030 tdf#67990: Management of case in combobox
I noticed these 2 points:
1) Combobox were used with autocomplete with default (false) value for matchCase
=> so initialize autocomplete with true value for matchCase
2) FindMatchingEntry uses bLazy as !matchCase
but when bLazy = false, no autocomplete can work since you must type the whole word
so just use "entryCombo" startsWith "typed string" instead of "entryCombo" == "typed string"

(thank you Lionel for this tip: http://nabble.documentfoundation.org/Finding-the-right-location-for-tdf-67990-Base-module-td4143324.html)

Change-Id: Ib1063002c3284122fd5279f27c1ccbc177bbac7c
Reviewed-on: https://gerrit.libreoffice.org/14885
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-26 14:14:44 +00:00
Stephan Bergmann
3099c70b11 Fix various XServiceInfo implementations
...to match what is recorded in the .component files

Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-17 12:25:11 +01:00
Stephan Bergmann
d1c9e5ee53 tdf#43157: Fix format string violations in OSL_TRACE etc.
...for a 32-bit build, similar to what ee11e221d2
"tdf#43157: Fix format string violations in OSL_TRACE etc." did for a 64-bit
build

Change-Id: I05dd79ede3e66cb9ab7a33792319eb34b34c82dd
2015-03-13 18:21:36 +01:00
Caolán McNamara
924b2923b8 V801: Decreased performance
Change-Id: I9e9a00acf9503980f0c6c7cd0a20378e5ca7390d
2015-03-09 20:56:26 +00:00
Tobias Madl
f33d6800fb Idle Timer: Invented Base Class
Change-Id: I03db46afcc0cb5e5d7a134b1bdd327abb542e63c
2015-03-06 12:27:10 +00:00
Tobias Madl
57656eb1fa Idle and Timer are now completely independent
And everything is functionating pretty well.

Change-Id: Id7f5a995362f6f7c5235f2e9facb7c7f119f3140
2015-03-06 12:27:06 +00:00
Caolán McNamara
32f95a3551 V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
2015-03-04 13:07:40 +00:00
Stephan Bergmann
f02ee5b727 Avoid unnecessary bad downcasts to Button
Change-Id: I36baaa1cd46385430474f8a841eafaaba07a18fc
2015-02-24 13:25:14 +01:00
Julien Nabet
48f0a5ed35 Typos
Change-Id: I845a85e1aad4a0708f2b43f7d94606b4b5513ee4
2015-02-18 21:59:02 +01:00
Michael Stahl
6b3aa0fe40 tdf#78174: toolkit: work around GCC 4.9 -Os link failure
A build with gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1) for 32-bit x86
fails because of these undefined symbols:

> nm --demangle workdir/CxxObject/svx/source/fmcomp/fmgridif.o | grep
 \\bWindowListenerMultiplexer::acquire
         U non-virtual thunk to WindowListenerMultiplexer::acquire()

They should probably be generated inline.  Work around by out-lining the
definition of the methods.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812

Change-Id: I318f7c39bdf1243be385bc6dc0a47862b22e92c5
2015-02-16 22:32:52 +01:00
Caolán McNamara
a1ceacc17e boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
Caolán McNamara
c7258cfccd shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared

Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
2015-02-06 16:45:13 +00:00
Caolán McNamara
309574394b callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...

commit b44cbb26ef
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
Tsutomu Uchino
41146013ad Resolves: #i98734# save/load ScaleMode property of image control on dialogs
Suggested by: Frank Schönheit <frank.schoenheit@gmx.de>
(cherry picked from commit 350c4f9a01b88d4fd1006465151348ac5d459f1a)

Conflicts:
	xmlscript/source/xmldlg_imexp/exp_share.hxx
	xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
	xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
	xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
	xmlscript/source/xmldlg_imexp/xmldlg_import.cxx

Change-Id: I2a11809112c0b1b53349f5b74dca20897d4a6acd
2015-01-27 10:46:43 +00:00
Michael Stahl
91567c26f4 calling alloca() requires #include <sal/alloca.h>
Change-Id: I59e5ede0c0cfb10f4196d79ae762132ae4ecb9bb
2015-01-23 11:05:24 +01:00
Stephan Bergmann
17fe7fc590 Some more loplugin:cstylecast: toolkit
Change-Id: I8f2963e7bbd1053ea12af22424f4f7a0f65a3486
2015-01-20 09:06:52 +01:00
Noel Grandin
5333782d09 convert SETTINGS_ #defines to 'enum class'
and dump the ones that nothing is listening to

Change-Id: I253ef284df785812a439dd160edba1b07fdbaac4
2015-01-12 12:57:05 +02:00
Noel Grandin
a5b5ad9f93 fdo#84938: replace DATACHANGED_ constants with 'enum class'
and drop DATACHANGED_DATETIME because no-one is using it

Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
2015-01-12 12:57:04 +02:00
David Ostrovsky
2ce0030227 Fix long/sal_IntPtr mismatch on x86_64 platform on windows
25e2914382 changed Link class to
use sal_IntPtr instead of long, but missed to adjust number of
occurrences.

Change-Id: I966185083a41b41c7385947a03369a8ce65c61b8
Reviewed-on: https://gerrit.libreoffice.org/13852
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: David Ostrovsky <david@ostrovsky.org>
2015-01-10 21:37:08 +00:00
Matúš Kukan
5c5edaef89 Revert "Use SVLIBRARY instead of gb_Library_get_runtime_filename"
$(call gb_Library__get_name,foo) returns "libmerged" if library foo is merged.

This reverts commit ee567a63fa.

Change-Id: I6ab9b7f0b01262a6f9d5a6834a6cffdd6ffc6f8a
2015-01-09 07:17:35 +01:00
Michael Stahl
2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
Noel Grandin
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
Stephan Bergmann
ee567a63fa Use SVLIBRARY instead of gb_Library_get_runtime_filename
Change-Id: I0d21d9685cdc801f7d6975a752999788c1f132e4
2015-01-06 10:28:58 +01:00
Stephan Bergmann
9720e8e5ef Some loplugin:revisibility clean-up
Stumbled across such redundant visibility re-specifications when looking at the
odd case of cppu_unsatisfied_iquery_msg declared CPPU_DLLPUBLIC in
cppu/source/cppu/cppu_opt.cxx and used in inline code in
include/com/sun/star/uno/Reference.hxx with only a declaration lacking
CPPU_DLLPUBLIC visible, and wondering how that actually works on Windows.

However, this plugin is probably not worth it being run all the time, so
committing it to compilerplugins/clang/store/.

Change-Id: Ibc3c4e7499213de1b419ce7eb85455cb832e1510
2015-01-05 13:10:48 +01:00
Julien Nabet
7da92fdcb0 cppcheck: Possible inefficient checking for <var> emptiness
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04 19:11:13 +01:00
Caolán McNamara
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
Stephan Bergmann
44199e81a1 toolkit: Use appropriate OUString functions on string constants
Change-Id: Iad8c0ffce9f0b17556f5305929715ddc0cce1042
2014-12-18 14:12:35 +01:00
Tor Lillqvist
58bec49af3 Kill createScreenCompatibleDeviceUsingBuffer
A certain 3rd party uses processEventsToIdle() from XToolkitExperimental, and
their code is not C++, so it should be OK to change the ABI of
XToolkitExperimental, says mmeeks.

Change-Id: I4ba641ad98c17ae42a2ae2eff389fd3354618597
2014-12-18 12:00:40 +02:00
Stephan Bergmann
45fe77164c toolkit: Use appropriate OUString functions on string constants
Change-Id: I3bb1e560eb325046f5b170da0c4c46c1139f3225
2014-12-12 12:23:58 +01:00
Stephan Bergmann
9af9d2c5c4 Split into individual definitions, one per line
Change-Id: Ib64def97e04273e66f7a2e514c49f0caecc10fe6
2014-12-10 08:18:49 +01:00
Noel Grandin
2979ff295c fdo#38835 strip out OUString globals
Change-Id: I1a435214af102461e02217f7d95248dac14e5f1a
2014-12-08 14:13:17 +02:00
Chris Sherlock
7304f974d8 vcl: remove unnecessary typedef VCLXGraphicsList_impl
Change-Id: Iaaf2f0edf721567f88ffc948501548fddd648428
2014-11-22 22:38:03 +11: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
Michael Stahl
721366ebe1 cppu: clean up public headers with include-what-you-use
Unfortunately iwyu gets quite confused by the weird cyclic dependencies
between various foo.h/foo.hxx and cppumaker generated headers, so it's
not obvious if any improvement here is realistic...

Change-Id: I0bc66f98b146712e28cabc18d56c11c08418c721
2014-11-18 18:51:48 +01: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
Noel Grandin
31d902d3c0 fdo#84938: replace MOUSE_ modifier constants with enum
and make the two categories of constants non-overlapping, we
really don't need to risk confusion in order to save 6 bits in
a data structure like this.

Change-Id: I2251195d8e45ed04e2a89e47ae9c3e52cf0475c0
2014-11-07 14:53:36 +02:00
Stephan Bergmann
fc0d57b7af Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06 17:24:13 +01:00
Noel Grandin
05050cdb23 use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-06 13:51:10 +02:00