Commit Graph

153 Commits

Author SHA1 Message Date
Noel Grandin
2ccde70d60 teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 08:50:31 +02:00
Caolán McNamara
a74c796865 coverity#1242834 Unused value
and

coverity#1242871 Unused value
coverity#1242900 Unused value

Change-Id: Ic8c9afa5ac9ea9de661f15403646424486901696
2017-05-26 12:23:19 +01:00
Stephan Bergmann
1649c76401 loplugin:stringcopy: cui
Change-Id: I5166036e4173292c9a7291a1a846e661fbbcd010
2017-05-19 17:18:38 +02:00
Caolán McNamara
2155e04d63 make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString

drop various defines

drop unnecessary toString calls

Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-19 15:40:40 +02:00
Caolán McNamara
cda860a8c9 can drop CUI_RESSTR now
Change-Id: I2e2319e661614dc8ba464479324b4719bcfa120e
2017-05-18 09:25:33 +01:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
Andrea Gelmini
3c3f7d784e Removed duplicated includes
No automatic tools. Manual checked and tested.

Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754
Reviewed-on: https://gerrit.libreoffice.org/36371
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-13 07:46:16 +02:00
Stephan Bergmann
f1bbafc584 Convert rtl_uString -> OUString in jfw_get/setVMParameters
Change-Id: I55f96873661f686cd9625d69523718ccb54659dc
2017-04-12 09:36:20 +02:00
Stephan Bergmann
346b5cfd90 Convert some rtl_uString -> OUString in jvmfwk
Change-Id: I08de5cab29dabc6fd824d5df8bac12c8520a05ae
2017-04-12 09:36:20 +02:00
Stephan Bergmann
87d4fd3b13 Remove unnecessary casts to void
Change-Id: Ib817e07d4becd7c4cf92501b747d7628ef231c55
2017-04-11 19:00:55 +02:00
Stephan Bergmann
7635e0c1c7 sal_Bool -> bool
Change-Id: If632eb547aa5082ad13eac8c2ad39a1742309fc7
2017-04-11 18:38:51 +02:00
Stephan Bergmann
33cf2b6613 Let jfw_isVMRunning return the result; there are no error conditions
Change-Id: I004b3d6f6b7b32d1bb41072d7fdd4a66f944d992
2017-04-11 18:33:31 +02:00
Stephan Bergmann
16f29aa720 sal_Bool -> bool
Change-Id: Iec70d6726e36af607a0a5b5a0f6dc86d05322435
2017-04-11 18:28:43 +02:00
Stephan Bergmann
f0454e72c1 Use std::unique_ptr<JavaInfo> for lifecycle management in jvmfwk/framework.hxx
Change-Id: Ie604c75e92c407ff3118aaa58155648d956c91fb
2017-04-11 18:04:54 +02:00
Stephan Bergmann
6bb4c48812 Determine accurate position for already added JREs
Change-Id: Ieef6aaeccd3368fa1cf79b3eab510b6b6c24427e
2017-04-11 17:52:50 +02:00
Gabor Kelemen
f747390b4f tdf#106943 Lock down Experimental features and Macro recording
Visually disable these features if they are locked by
system administrators

Change-Id: Ib35840312ad9c506e689ec6c9d432a88c07a5c28
Reviewed-on: https://gerrit.libreoffice.org/36095
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-06 11:24:05 +00:00
Samuel Mehrbrodt
a831608576 Remove newlines at end of file
Change-Id: I538bff61cbbd69c17f871698cf983b275dd68761
Reviewed-on: https://gerrit.libreoffice.org/35025
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-09 19:57:55 +00:00
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
Jan-Marek Glogowski
fdc612619c Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.

Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-17 16:08:47 +01:00
Noel Grandin
50151db9f7 convert FSysStyle to o3tl::typed_flags
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05 12:49:02 +02:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann
5536aea822 Let OUStringLiteral1 take its arg as ctor arg, not template arg
...which makes it more flexible, can now also be used on non-const arguments.
The drawback of the argument no longer being a compile-time constant is remedied
by making the ctor constexpr.

Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-30 07:43:52 +02:00
Caolán McNamara
a860df25dd masses of MessBoxes not being disposed promptly
since...

commit ba81e5c6bd
Date:   Thu May 28 21:35:43 2015 +0100

    tdf#91702 - fix stack-based MessBox allocation.

There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X

Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-07-26 11:26:52 +01:00
irem
a4e8419c8a tdf#99211 Use the restart dialog for notifications about restart
Change-Id: I97a10cddafc464ccbdd37902c5d24b73246f5c3f
Reviewed-on: https://gerrit.libreoffice.org/24877
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-23 08:34:38 +00:00
Muhammet Kara
98505584ba Give unique, comprehensible names to idles tdf#97087
Timers and idles should have programmer comprehensible, unique names.

Change-Id: Ida131a4e3ddb7f065d876d78dd501fa831d4cf4a
Reviewed-on: https://gerrit.libreoffice.org/24605
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-16 01:06:48 +00:00
Noel Grandin
1342818790 convert SFXWB file dialog flags to scoped enum
Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b
Reviewed-on: https://gerrit.libreoffice.org/24881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12 06:57:19 +00:00
Noel Grandin
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
e5434c67b1 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I0953cecd363dd75e6a4438d34d47035f53f334a6
2016-04-20 17:25:38 +02:00
Noel Grandin
b0c0a074a2 clang-tidy clang-analyzer-deadcode.DeadStores
suspect that some of these may reveal latent bugs....

Change-Id: I9de9aabbda9c8952715631577c29c1830df1eb71
Reviewed-on: https://gerrit.libreoffice.org/24200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20 11:02:45 +00:00
Akshay Deep
e099c5bdaa Make InputDialog class global to reuse it's code and tdf#97425
tdf#97425 -> Use InputDialog to edit Java Class Parameter

Change-Id: I41ac9ffbc660c4bbb9d4fd3335e95d64ccdd2842
Reviewed-on: https://gerrit.libreoffice.org/23580
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-04 09:07:44 +00:00
Noel Grandin
c91b103930 convert SvButtonState to scoped enum
Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d
2016-03-18 12:46:35 +02:00
Stephan Bergmann
8e9a7cac42 No more need for jfw_freeJavaInfo
Change-Id: I2426a76936b4099a243ce8c102da867e7868aac3
2016-03-10 21:42:31 +01:00
Stephan Bergmann
5dcdb35ab1 Turn JavaInfo rtl_uString* members into OUString
Change-Id: Ieb23b0c36ef56a4793a56cdb450df34e4d9bce1d
2016-03-10 21:41:24 +01:00
Stephan Bergmann
220d9c24d0 include/jvmfwk/*.h -> .hxx (only ever included from C++ code)
Change-Id: Ia912e937d5a48afb6f8f5345b20bb7bd517fc4f1
2016-03-09 19:08:29 +01:00
Arnold Dumas
53bf3ea58e tdf#57950: Replace chained O(U)StringBuffer::append() with operator+
Change-Id: Ic76cf0130ebec4cf723b83d82f59ae45bfcb3ea1
Reviewed-on: https://gerrit.libreoffice.org/22350
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-15 07:38:21 +00:00
Stephan Bergmann
de92a3d67f loplugin:passstuffbyref
Change-Id: I90d10c9bde2ad1160a4c1e2de2b53c565cb7e80c
2016-02-12 11:54:57 +01:00
akki95
3ae9eaa793 tdf#97425 - JVM start parameters should be editable.
Added new dialog to edit Java start Parameter.
Modified UI of JavaStartParameterDialog using Glade.
Renamed Assign Button to Add.
Added a function to edit.cxx vcl file to move cursor to last letter of GTKEntry.

Change-Id: Ia43e2c0fbced5674a84187de02a9bc9460141f2d
Reviewed-on: https://gerrit.libreoffice.org/22220
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-02-12 09:43:10 +00:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
akki95
5008b9a692 tdf#96132 Enabling Experimental Features in UI doesn't warn about restart
Change-Id: I2efafee4f8ebd4cd7ba2b7a23f68ca08022eb659
Reviewed-on: https://gerrit.libreoffice.org/22064
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-02-03 13:55:10 +00:00
Noel Grandin
1ef9f3988e unnecessary use of OUString constructor
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1
Reviewed-on: https://gerrit.libreoffice.org/21945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31 12:04:02 +00:00
akki95
7e51aeaa67 tdf#97425 - JVM start parameters should be editable.
Bug Resolved.

Change-Id: I8bd5ee684a03f8e24f0b74d63ea98923945b0870
Reviewed-on: https://gerrit.libreoffice.org/21912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-01-30 07:47:37 +00:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Stephan Bergmann
b58d56c510 loplugin:nullptr (automatic rewrite)
Change-Id: I7257532b90e3e393d56d5349531c9ad397523bca
2015-11-10 10:31:22 +01:00
Stephan Bergmann
5de01333b6 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I52bdf6e2ee843e9cc08d0d4f1eb1bc6dcd15f10a
2015-11-06 09:35:16 +01:00
Noel Grandin
6f1313b3d4 convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6
Reviewed-on: https://gerrit.libreoffice.org/19405
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-16 09:11:29 +00:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Noel Grandin
3c99f8500f convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb
Reviewed-on: https://gerrit.libreoffice.org/19305
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12 10:48:13 +00:00
Noel Grandin
1e2119fd02 convert Link<> to typed
Change-Id: I3d35a0bb75b6989dd13371543d1bdf3ef5f47641
2015-09-17 08:19:34 +02:00