Caolán McNamara
5c2498545d
coverity#1309070 Uncaught exception
...
Change-Id: I33eca20633236ab98df0eabdec4e3761d544167d
2015-07-02 11:39:33 +01:00
Caolán McNamara
7ed80b1969
coverity#1308500 Uncaught exception
...
Change-Id: I38d6c03ee380ba6b3055e000f905a4cc568d5ab6
2015-06-28 13:23:00 +01:00
Takeshi Abe
0980095619
Replace boost::scoped_array<T> with std::unique_ptr<T[]>
...
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2015-06-17 15:50:45 +00:00
Noel Grandin
4729774b24
remove unnecessary check for null when calling delete
...
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'
Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Andrea Gelmini
1f408db497
Fix typos
...
Change-Id: Ifaa52b49b717d893846fc1e7ae4ac50735f824ac
Reviewed-on: https://gerrit.libreoffice.org/16260
Reviewed-by: Andras Timar <andras.timar@collabora.com >
Tested-by: Andras Timar <andras.timar@collabora.com >
2015-06-13 14:51:15 +00:00
Stephan Bergmann
9a1909a5d0
loplugin:cstylecast: deal with remaining pointer casts
...
Change-Id: Idca144969e2b978fee8cd5b0868fcf418b193967
2015-06-08 16:25:33 +02:00
Noel Grandin
49ea2258d4
loplugin:loopvartoosmall
...
Change-Id: I5518e40a30bdad53470cc52b59eff04ab6d873d4
2015-05-29 08:48:41 +02:00
Noel Grandin
e0b2e6e3f7
loplugin:loopvartoosmall
...
Change-Id: Icbe68b31d4ab04ca3cd9f572e3598413946a75c7
2015-05-29 08:48:41 +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
Caolán McNamara
d22519f62b
V801: Decreased performance
...
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
2015-03-09 22:04:31 +00:00
Julien Nabet
f00fce5b06
Typo: containted->contained
...
Change-Id: I678c35ca2007169a38529b36fd31367bac4ed481
2015-02-21 14:45:36 +01:00
Julien Nabet
b98ac70724
Typo: trough->through
...
Change-Id: I5af784709df88492695d1ac9c9a5b020e909f362
2015-02-21 14:45:36 +01:00
Caolán McNamara
cc464d1a94
Resolves: fdo#88970 fix Incorrect Extended-tips with dodgy ahelp tags
...
ahelp puts the tip on the previous bookmarks with hid branches
but has a scattergun effect if those previous bookmarks have
nothing to do with the current element being described.
So take the hid attribute of the ahelp and if its hid="." use
the current set of bookmarks as the context otherwise believe
it and apply the tip just to the stated hid
Change-Id: I00648daadf5673e1abc96f222a4526959f1f7d7a
2015-02-02 15:01:43 +00:00
Andras Timar
186508874e
replace '\n' to space in extended help text
...
Change-Id: Ida354ee41b4158716ab39a92f009fa7c9a2ce21f
Reviewed-on: https://gerrit.libreoffice.org/13919
Tested-by: Andras Timar <andras.timar@collabora.com >
Reviewed-by: Andras Timar <andras.timar@collabora.com >
2015-01-22 17:24:33 +00:00
Stephan Bergmann
b7c27fef4e
Some more loplugin:cstylecast: helpcompiler
...
Change-Id: I9e094356601cf156537f75d0629fd214710d80e8
2015-01-20 09:06:48 +01:00
Łukasz Hryniuk
9fd89a5952
fdo#39440 reduce scope of local variables
...
Beside scope changes, it fixes lack of initialization in a few places.
Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2
Reviewed-on: https://gerrit.libreoffice.org/13755
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-01-07 06:47:04 +00: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
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
Michael Weghorn
28d9983e2c
indent try-block, remove obsolete comment
...
indent block one level deeper than block in
which it is contained
Change-Id: Ibefd1a87c25100001f842f42f053d9e68feba8a6
Reviewed-on: https://gerrit.libreoffice.org/13498
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-12-17 07:32:11 +00:00
Caolán McNamara
d03d1ad55e
coverity#704150 Resource leak in object
...
and
coverity#704151 Resource leak in object
coverity#704152 Resource leak in object
Change-Id: I68c455adc25375b8027236fd44d99a397e372994
2014-12-15 09:33:09 +00: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
Stephan Bergmann
e50ef195bc
New loplugin:stringconcat
...
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-07-01 15:45:52 +02:00
Caolán McNamara
04a4671b2d
coverity#1223090 Uncaught exception
...
Change-Id: Iec100b86e2952a5efe4fa52bd85fbc00b51f78c3
2014-06-17 10:57:58 +01:00
Caolán McNamara
3cd26a85e3
coverity#983682 Uncaught exception
...
Change-Id: Ie5c7ce0ba499ce67365c5e2079a50d73b9849e73
2014-06-10 16:08:04 +01:00
Noel Grandin
184a00b962
loplugin: inlinesimplememberfunctions
...
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Stephan Bergmann
3eb7785398
Fix memory leak
...
...and add---most likely necessary---null check
Change-Id: I3f31c20442c45ddfd98429347f5c2521597c1769
2014-05-28 08:55:10 +02:00
Chris Laplante
3c1e30b77d
Correct common misspellings, and remove some ASCII art along the way.
...
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c
Reviewed-on: https://gerrit.libreoffice.org/9356
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org >
2014-05-17 12:38:38 +00:00
Thomas Arnhold
8bb2ce61c0
fixincludeguards.sh: some smaller dirs
...
Change-Id: Ic25bd678dc299627299b22145efd7bebcf2b39d0
2014-04-19 11:10:13 +02:00
Takeshi Abe
6a964dcf0f
Avoid possible memory leaks in case of exceptions
...
Change-Id: Ibadadacbe09a93e7d7a7210868c52a8fa582d427
2014-04-17 10:57:00 +09:00
Thomas Arnhold
8d202fa72f
typo: paramter -> parameter
2014-04-14 12:32:54 +02:00
Alexander Wilms
a78aa2038d
Remove visual noise from helpcompiler
...
Change-Id: Ied20352592de019c3b4735af8cc63947cd7d61a2
Reviewed-on: https://gerrit.libreoffice.org/8266
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-02-26 09:11:06 -06: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
Noel Grandin
52bbd9cc00
remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
...
Convert code like:
aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" ));
to:
aStrBuf.append( "ln(x)" );
which compiles down to the same code.
Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
2013-11-20 10:07:32 +02:00
Noel Grandin
e52779d2f8
remove unnecessary use of OUString constructor
...
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
Noel Grandin
aeb41c9b9b
remove redundant calls to OUString constructor
...
Change code like this:
aStr = OUString("xxxx");
into this:
aStr = "xxxx";
Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04 10:11:07 +02:00
Stephan Bergmann
176ac1e616
Remove unnecessary SyntaxHighlighter::Tokenizer statefulness
...
...which reveals that SyntaxHighlighter::notifyChange does nothing, so remove it.
Change-Id: I49834af29081ee703d9e62e182e3c1f8ce7e212e
2013-10-28 13:48:14 +01:00
Stephan Bergmann
c99267b326
Fold SyntaxHighlighter::initialize into ctor
...
...which reveals that m_pKeyWords, m_nKeyWordCount members are unused.
Change-Id: I55020e892d463f2e40d5bcf71efba92778b317c1
2013-10-28 13:48:14 +01:00
Stephan Bergmann
f5e8be8bb1
Remove unused SimpleTokenizer_Impl::nLine/nCol
...
...which are never read; remove thereby unused parameters from functions.
Change-Id: I644d2dc1b2d13ae2f932d04243521eef97e67e3e
2013-10-28 13:48:13 +01:00
Stephan Bergmann
9932749854
Use conventional std::vector idioms
...
Change-Id: I4d26372ea40e7890b76461a764435f8948466ae1
2013-10-22 18:19:18 +02:00
Stephan Bergmann
b7f20ef33f
Unwind HighlightPortions typedef
...
Change-Id: I0ecc15f9bfd557d0a70a05536906a4984a46463c
2013-10-22 18:19:18 +02:00
Matúš Kukan
ae1bb97f14
remove last uses of config 'GUI' variable
...
Change-Id: I97188235f0b72b5b54423e05deeaf17c5c681048
Reviewed-on: https://gerrit.libreoffice.org/4188
Reviewed-by: Andras Timar <atimar@suse.com >
Tested-by: Andras Timar <atimar@suse.com >
2013-06-20 11:51:10 +00:00
Michael Stahl
0bb8c03253
helpcompiler: remove Package_inc
...
Change-Id: Iddafa9068edcc20135c08ed205b8fb7fb5382eba
2013-05-07 01:41:23 +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
Michael Stahl
18af827875
HelpLinker: add comment for mysterious XML parsing
...
Change-Id: I9aa5fd2cb0cb4eae0a94f8d3d6b6185a1fcffdc4
2013-04-08 13:40:59 +02: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
Thomas Arnhold
8b27d78b4a
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
...
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2013-03-19 09:00:26 +00:00
nccuong
a6b9173005
fdo#60148 Clean up warnings from the Clang compiler plugin
...
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com >
Tested-by: Eike Rathke <erack@redhat.com >
2013-03-06 12:59:26 +00:00
David Tardon
cfe0fbb039
do not create index for shared help module
...
Change-Id: I83f9b99abcc952dfea924662a0db8d98efc56307
2013-02-28 12:30:50 +01:00
David Tardon
f094641d3a
add opt -nolangroot needed for gbuild
...
Change-Id: Id76dfc5698619f8095e0c682ae4ce5e181c9a599
2013-02-26 15:24:53 +01:00
David Tardon
2f1c0be453
avoid string substr/replace with invalid pos
...
Change-Id: Iceb9851bcb5e6fe66efd701fcb31e16596fe8b5a
2013-02-26 15:24:53 +01:00