Stephan Bergmann
61fe89e0b5
loplugin:deletedspecial
...
Change-Id: I035d584af8a802d08dd4e50070b4d290210e20b6
2015-02-07 12:36:05 +01:00
Noel Grandin
f61dbc3029
followup code removal after changing virtual methods to non-virtual
...
This cleanups up indentation and removes dead classes.
This is a followup patch to commit
272b1dd55797aacf511fb4342b0054e3697243f6
"new loplugin: change virtual methods to non-virtual"
Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26 08:42:29 +02:00
Noel Grandin
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
Stephan Bergmann
473c20d86e
Some more loplugin:cstylecast: xmlhelp
...
Change-Id: I1aa45f669711a90cce52bafd839bd84eb711436a
2015-01-20 11:31:42 +01:00
Noel Grandin
45ec1d9b56
brute-force find-and-remove of unused #define constants.
...
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02: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
fb4fec646d
xmlhelp: Use appropriate OUString functions on string constants
...
Change-Id: I8642ec147cb0dca32dce7ec7f3efec93bcb99cb4
2014-12-18 14:12:38 +01:00
Stephan Bergmann
180f0791da
comphelper: Use appropriate OUString functions on string constants
...
Change-Id: Id1d5c3cf2f76dbb33606cec1c0f17d4a1f282247
2014-12-18 12:34:40 +01:00
Stephan Bergmann
e09a8259e4
xmlhelp: Use appropriate OUString functions on string constants
...
Change-Id: I28f68ff0c43366b3877244ba272acf967f141e54
2014-12-15 10:22:06 +01:00
Jan Holesovsky
8c2e25b376
images: Tango is the most complete theme.
...
Change-Id: I211d21b09223dfacac18e879993b0f0943b94741
2014-12-04 11:17:26 +01: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
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
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
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
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
Noel Grandin
8c8d6f0849
loplugin: cstylecast
...
Change-Id: Ia3055b00c20a885dfa0584f864f0e91ccad1e9c9
2014-10-20 13:33:11 +02:00
Stephan Bergmann
ad9498f8b8
More -Werror,-Wunused-private-field
...
...detected with a modified trunk Clang with
> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp (revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp (working copy)
> @@ -1917,9 +1917,10 @@
> const Type *T = FD.getType()->getBaseElementTypeUnsafe();
> // FIXME: Destruction of ObjC lifetime types has side-effects.
> if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> - return !RD->isCompleteDefinition() ||
> - !RD->hasTrivialDefaultConstructor() ||
> - !RD->hasTrivialDestructor();
> + return !RD->hasAttr<WarnUnusedAttr>() &&
> + (!RD->isCompleteDefinition() ||
> + !RD->hasTrivialDefaultConstructor() ||
> + !RD->hasTrivialDestructor());
> return false;
> }
>
> @@ -3517,9 +3518,11 @@
> bool addFieldInitializer(CXXCtorInitializer *Init) {
> AllToInit.push_back(Init);
>
> +#if 0
> // Check whether this initializer makes the field "used".
> if (Init->getInit()->HasSideEffects(S.Context))
> S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
> return false;
> }
to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html >
"-Wunused-private-field distracted by side effects").
Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
Daniel Sikeler
32d6415617
fdo#83512 Make use of OUStringHash and OStringHash
...
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com >
2014-09-18 13:12:48 +02:00
Stephan Bergmann
fcf0158324
(Rudimentary) C++11 support is a hard requirement now
...
Change-Id: I43ed776d52336b822aa6152f0f2a29e39303bb75
2014-09-11 15:50:50 +02:00
Caolán McNamara
ad40561d13
Resolves: fdo#82025 use strlen instead of stored length byte
...
Change-Id: I58cf2391d7bf2480cd12d2b1b4cf73f346f4f95f
2014-08-11 11:28:18 +01:00
Noel Grandin
184a00b962
loplugin: inlinesimplememberfunctions
...
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Noel Grandin
adc20c3937
compareToAscii -> equalsAscii
...
convert places using compareToAscii that should be using equalsAscii
Change-Id: I97b4da7f6e867c3967b2f65b70d6886f83b4a4e5
2014-06-04 11:52:31 +02:00
Jens Carl
8e115c6008
fdo#68849: Add header guards to all include files
...
added header guards for directories basebmp/, chart2/, cppuhelper/,
include/test/, io/test/, sax/test, shell/, writerfilter/, and xmlhelp/
Change-Id: I0e29a9b75c26d71f58aa98986b52f6d3b46015a6
Reviewed-on: https://gerrit.libreoffice.org/9615
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2014-06-02 08:46:30 +00:00
Jens Carl
626a428367
fdo#68849: Add header guards to all include files
...
Added header guards to files in directories xml*/*
Change-Id: Ia5dfb9ab494bfbfae7537f2d54ff11331dc8c922
Reviewed-on: https://gerrit.libreoffice.org/9539
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-05-29 09:02:51 -05:00
Thomas Arnhold
e6ff6f9a71
use namespace css instead of com::sun
...
Change-Id: I47582b072bb939cf270a76e430a9f7908b5c1d93
2014-05-27 14:00:28 +02:00
Thomas Arnhold
3930127dfb
cppcheck: redundantAssignment
...
Change-Id: I6fcece7f7a77060bfa3cd3d40db3fa4f253cf261
2014-05-24 15:46:42 +02:00
Noel Grandin
e7bc3cab01
remove boilerplate in UNO Exception constructor calls
...
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Julien Nabet
036a660a86
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11
...
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
2014-05-13 23:20:26 +02:00
Julien Nabet
fa51b55680
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part9
...
Change-Id: I82ed4a4868cb22566706ca0f4b1321e0d45016cf
2014-05-10 23:54:07 +02:00
Noel Grandin
4f9b21248f
simplify ternary conditions "xxx ? yyy : false"
...
Look for code like:
xxx ? yyy : false;
Which can be simplified to:
xxx && yyy
Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
Noel Grandin
abd8c2a0f6
xmlhelp: sal_Bool->bool
...
Change-Id: I0aa1b7023b5100fb855a8a839e44036988d8bc2e
2014-05-02 08:49:21 +02:00
Thomas Arnhold
8bb2ce61c0
fixincludeguards.sh: some smaller dirs
...
Change-Id: Ic25bd678dc299627299b22145efd7bebcf2b39d0
2014-04-19 11:10:13 +02:00
Stephan Bergmann
9d9f8151f3
Remove unused code
...
Change-Id: Ia624a624271b1143c96cd189cc9e4dab4c5ae302
2014-04-15 09:30:36 +02:00
Thomas Arnhold
0fb30c1e79
typo: misformed -> malformed
2014-04-14 12:32:21 +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
Stephan Bergmann
70cc2b191b
First batch of adding SAL_OVERRRIDE to overriding function declarations
...
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.
Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Norbert Thiebaud
03a6135292
de-macroize xmlhelp ContentProvider
...
Change-Id: I806cd7a263dbe37581c8845b4089a76a7d591628
2014-03-20 20:17:54 -05:00
Norbert Thiebaud
514a6de482
kill ucbhelper XTYPEPROVIDER_DECL macro
...
Change-Id: I1daf6661dd7b5be396bec980da84feaab6e6b80f
2014-03-20 19:33:47 -05:00
Norbert Thiebaud
27399c3433
de-macroize xmlhelp tvfactory
...
Change-Id: Ie4b0e0923ade427f7ab637e8e76769a6dca957c5
2014-03-20 18:03:00 -05:00
Norbert Thiebaud
db5407b6ac
de-macroize xmlhelp TVBase
...
Change-Id: I92e9bc4bbdf18273d26d666d98401cd83a9b1560
2014-03-20 17:56:12 -05:00
Noel Grandin
86a32589e9
Find places where OUString and OString are passed by value.
...
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.
So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.
Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
Norbert Thiebaud
2ef98b947e
kill XINTERFACE_IMPL_6
...
Change-Id: I1445524d3c15a3dec881c1499910779b9d61b840
2014-03-05 09:44:18 -06:00
Norbert Thiebaud
66f2c35fac
de-macroize XINTERFACE_DECL
...
Change-Id: Iaa1cf999189f6b62547c208eadc38150400ca0fe
Reviewed-on: https://gerrit.libreoffice.org/8454
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com >
2014-03-05 09:29:24 -06:00
Marcos Paulo de Souza
4d6560f506
fdo#54938: Convert some places to use cppu::supportsService
...
The last cases are non obvious, so it's pratically done
Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547
Reviewed-on: https://gerrit.libreoffice.org/8445
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com >
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com >
2014-03-04 07:30:02 -06:00
Stephan Bergmann
5e21a413c7
cppuhelper: retrofit std::exception into overriding exception specs
...
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
003342bfef
Remove visual noise from xmlhelp
...
Change-Id: Idd4d9d556d6644350d1a14b9f81f5fd0df8ee2d1
Reviewed-on: https://gerrit.libreoffice.org/8344
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-02-26 03:50:15 -06:00
Caolán McNamara
5c94648354
coverity#708696 Uninitialized scalar field
...
Change-Id: If22c709ebab80d626d3d409fd6ba718781cff07d
2014-02-21 12:40:36 +00:00
Noel Grandin
08fe82e59c
Remove unnecessary use of OUString constructor in + expressions
...
Convert code like
aFilename = OUString::number(nFilePostfixCount) + OUString(".bmp");
to
aFilename = OUString::number(nFilePostfixCount) + ".bmp";
Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +02:00
Caolán McNamara
6b713bafe4
Related: fdo#72022 internal links busted
...
regression since 58fa3d50aa
Change-Id: I499704d18872da6f2f01cf955a6496104c53dd3f
2013-12-06 15:00:25 +00:00
Caolán McNamara
57b15f2dcd
Resolves: fdo#72022 Integrated help ignored if installed
...
regression since 58fa3d50aa
Change-Id: Ia20f28daace30181652bbbbec3f9845045db03b4
2013-12-06 13:27:57 +00:00