Commit Graph

2710 Commits

Author SHA1 Message Date
Noel Grandin
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00:00
Stephan Bergmann
033517b4e6 Remove unused includes
Change-Id: I25bb67449c8c572075d354e62b1c731e95655b4f
2016-06-20 18:18:45 +02:00
Stephan Bergmann
82da3d95c1 loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-19 21:29:43 +02:00
Stephan Bergmann
9741e7a437 Clean up uses of Any::getValue() in forms
Change-Id: I335aabc92ecb5de107dad3ecdfa6e025ec0d1b0f
2016-06-10 18:55:13 +02:00
Noel Grandin
6cd3882bec remove some manual ref-counting in forms
Change-Id: I6334dca6e98bfd4531033bec203518ca27f64bc0
Reviewed-on: https://gerrit.libreoffice.org/26049
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-08 10:32:56 +00:00
Noel Grandin
4cad126dc1 split AddRemoveListener into two methods
Change-Id: I247dc8a9033b39d5e49dc06e725f638644fcd02d
2016-06-08 10:20:58 +02:00
Michael Stahl
62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Stephan Bergmann
d8545e78e7 Simplifiy unnecessary uses of int2enum
Change-Id: Ic811eac425717f7eac018dfd90c46bd72267c697
2016-05-30 18:30:40 +02:00
Lionel Elie Mamane
51c8d22ec5 tdf#93403 check for changed DataSource on all Controls on form reload
1) OBoundControlModel: when reload() asks us to connect to database column,
   redo it even if it was previously done.

2) FmXGridPeer: when getting Reloaded event that we subscribed to
   (and specifically from frm::ODatabaseFrom), pass along the event
   to all columns before we treat it. The columns (controls) are
   themselves subscribed to it, but they may get the event after us,
   which means our treatment still uses stale data, which we continue
   to display.

   The column controls should continue to subscribe by themselves for
   the case that they are not in a grid, but direct children of the
   form.

Change-Id: I0cbcf2dc792e8650157a69ddc414d755de0e549a
2016-05-27 15:48:50 +02:00
Noel Grandin
850a8d27ca Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 12:59:23 +00:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +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
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
0f3ac23d73 Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.

Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
Stephan Bergmann
1f7a31a461 Missing break in switch
Apparently forgotten when introducing the case PROPERTY_ID_GENERATEVBAEVENTS in
4fae740db7 "Disable fake VBA events for the
old-style form controls."

Change-Id: Id2783fd4f087669bd200a9c33eaad2bb6b7b50cd
2016-05-10 10:08:35 +02:00
Noel Grandin
1408f39eef fix windows build, ambiguous symbol
Change-Id: Ib3a2419198a6e2b1ee5330f99bc526f2d63edd7c
2016-05-09 13:47:36 +02:00
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Stephan Bergmann
a05ab9ef5e Remove unnecessary setBOOL, makeBoolAny
Change-Id: Id82c3f352fcc2d4dafad877517098cb6f5d046d4
2016-05-03 11:20:51 +02:00
Andrea Gelmini
506c929a0a Fix typos
Change-Id: Ifb7c33d6052efe5ea8a1e0e10b3178073cd29ca0
Reviewed-on: https://gerrit.libreoffice.org/24536
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-01 09:51:41 +00:00
Noel Grandin
5e4fc95409 clang-tidy modernize-loop-convert in f*
Change-Id: Id866aa244378758e3bdb9e99d02cdd2ae6104e16
2016-04-27 15:03:40 +02:00
Aron Budea
f91674bd4b tdf#60418: improve perf of opening/closing odts with form tags
Opening/closing times using "Without Frame tags" attached file from
bug report changed as follows on my system (debug build):

open: 2:06 -> 1:32
close (doc unchanged): 1:52 -> 0:18

The performance fixes in the different CXX files are independent,
eventattachermgr.cxx is related to doc close, the others to doc open.

Change-Id: I24fc4558f79b9123494a3939c0a313fcd47a067f
Reviewed-on: https://gerrit.libreoffice.org/24359
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-26 09:40:56 +00:00
Stephan Bergmann
715d4d803a Avoid reserved identifiers
Change-Id: Icc658a3adce2e93c3cc4e8a88689f462b1c7c8a1
2016-04-22 10:22:00 +02:00
Stephan Bergmann
be48e04b5b Elide const vars
Change-Id: I1b2a7b071f9740e8c848f543e32fd47f054c8318
2016-04-22 09:32:55 +02:00
Stephan Bergmann
bfb185c408 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I74cf43df85a878ee9af69901b2535f63461cb61e
2016-04-20 17:25:41 +02:00
Stephan Bergmann
e2baeba6e2 loplugin:simplifybool
Change-Id: I6e8c06c28d710709d4a6b240e634d0216823cbe4
2016-04-20 17:25:32 +02:00
Jochen Nitschke
322eaf80a7 cppcheck: silence known condition warning in forms
Change-Id: I191dc169eea01d49ee357716a6bcc249e91437ec
Reviewed-on: https://gerrit.libreoffice.org/24201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-18 15:54:48 +00:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Stephan Bergmann
a8ba4a1462 loplugin:passstuffbyref
Change-Id: Ic2625b08a57b0f8c1e93b861a8a8add12f02229d
2016-04-15 15:23:30 +02:00
Samuel Mehrbrodt
7ae232623a tdf#95845 Use CommandInfoProvider in forms
Change-Id: I697f8c442cc4db7b38601c32fb71e0201f145354
Reviewed-on: https://gerrit.libreoffice.org/24106
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-15 13:01:15 +00:00
Noel Grandin
62633dfe02 clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14 11:37:19 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Muhammet Kara
c03a11b8f0 tdf#97087 Give comprehensible names to timers
Timers and idles should have programmer comprehensible, unique names

Change-Id: I837d1890c687936f8a31278c0102391e6f87212d
Reviewed-on: https://gerrit.libreoffice.org/23917
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-04-13 08:06:29 +00:00
Stephan Bergmann
ea9939269e Avoid reserved identifiers
Change-Id: Ifc47504370a2ebc8119a60091fdf1ced4b532aa3
2016-04-12 20:03:44 +02:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
Jochen Nitschke
d84ef731d8 tdf#94306 replace boost::noncopyable ...
... in modules editeng to oox.
Replace with C++11 delete copy-constructur and
copy-assignment.
Remove boost/noncopyable.hpp includes and
one unused boost/checked_delete.hpp include in linguistic.

Change-Id: I5a38d8e5ac1b4286bdeb3858d56490a53d13fe80
Reviewed-on: https://gerrit.libreoffice.org/23928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11 07:22:50 +00:00
Noel Grandin
9866efe3e5 loplugin:constantparam
Change-Id: I821ed77a6c6014c9a82d31a4b117ed6f1b4abf18
Reviewed-on: https://gerrit.libreoffice.org/23832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05 11:29:54 +00:00
Jochen Nitschke
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
Noel Grandin
929eab2164 sequence->vector in forms
Change-Id: Iea09367a51af8d0003a3ae58f8e7e0e825906367
Reviewed-on: https://gerrit.libreoffice.org/23691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01 07:33:50 +00:00
Wastack
20ba5d464a tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: I8bcd7e8a492ee4dbfa5141416c7c038a1391cf20
Reviewed-on: https://gerrit.libreoffice.org/23673
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:45:36 +00:00
Noel Grandin
aec2477b41 loplugin:constantparam in forms
Change-Id: Iebce160fd6c3de63ba179d747768fd4cf420baec
2016-03-23 10:19:43 +02:00
Noel Grandin
218cd09611 inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5
Reviewed-on: https://gerrit.libreoffice.org/23235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-14 11:06:48 +00:00
Rohan Kumar
b430ec96e3 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals and in some
places i replaced OSL_ENSURE(..) with assert()

Change-Id: Ide7e4b633e85a699f680f47caac5bff36bf180a2
Reviewed-on: https://gerrit.libreoffice.org/23076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-11 23:36:55 +00:00
Wastack
ce549d2a09 tdf#97966: Remove 'static' keywords
Change-Id: Iced527f48afa828cc9acf5b6461674a2706cbcd7
Reviewed-on: https://gerrit.libreoffice.org/23135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11 08:59:30 +00:00
Noel Grandin
9039ba7995 loplugin:constantparam in forms
Change-Id: I5e2dce3a1fcdb0ce836b9297feb287852ebc7d17
2016-03-10 10:09:58 +02:00
Noel Grandin
b0e18a68c8 loplugin:unuseddefaultparam in forms
Change-Id: I5a2b50163acfda3878fe5625a605e3437a7cc700
2016-03-02 07:57:38 +02:00
Eike Rathke
c094049173 use SearchOptions2
Change-Id: I58d39616dc15fc973e1377ed205452a683baf080
2016-02-25 17:33:37 +01:00
Noel Grandin
ccb8b83070 convert FilterComponent to scoped enum
and simplify the overly-general logic in FilterManager

Change-Id: I2cbd9db6a53894cd13713a5cc0d1807cec456848
2016-02-25 13:50:25 +02:00
Noel Grandin
bf7690bc1b convert EComposeRule to scoped enum
Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9
2016-02-25 13:50:25 +02:00
Noel Grandin
c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Noel Grandin
db8067145f loplugin:write only fields
Change-Id: I44f249a17d0a510ec63a488b656d57a1a392f821
2016-02-22 14:34:21 +02:00