1587 Commits

Author SHA1 Message Date
Noel Grandin
5676ced825 make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code
that effectively looks like:

   #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR
       enum class XXX {
           ONE = 1
       };
       constexpr auto ONE = XXX_ONE;
   #else
      ...the old normal way..
   #endif

which means that for LO internal code, the enums are scoped.

The "constexpr auto" trick acts like an alias so we don't have to
use scoped naming everywhere.

Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4
Reviewed-on: https://gerrit.libreoffice.org/34546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04 06:38:03 +00:00
Caolán McNamara
2f33a8cd23 coverity#1403662 Mixing enum types
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947
Reviewed-on: https://gerrit.libreoffice.org/36020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-02 16:31:48 +00:00
Jens Carl
ad3681df0a tdf#39468 Translate German comments
Translate German comments and terms in dbaccess/, forms/, fpicker/, framework/,
and idl/

Change-Id: I08b3db9492f16fc1c457e8f5eff838c13561c945
Reviewed-on: https://gerrit.libreoffice.org/35888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-30 10:27:35 +00:00
Andrea Gelmini
e4af83972e Fix typos
Change-Id: Ifb779b6c96a009e6c770a8017bb2e2031a288f5f
Reviewed-on: https://gerrit.libreoffice.org/35630
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 08:57:51 +00:00
Stephan Bergmann
6291574d94 Remove unused #include <ctype.h>
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Stephan Bergmann
93360085da Use rtl::isAscii* instead of ctype.h is* with sal_Unicode arg
Change-Id: I2bc0cff65b1bacc041106406cd98c632eafeec51
2017-03-22 21:42:31 +01:00
Andrea Gelmini
d948d66509 Fix typos
Change-Id: I5c89a47e658ae4ad2b0cdfcdb4988c4b79353085
Reviewed-on: https://gerrit.libreoffice.org/35413
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-19 05:49:15 +00:00
Andrea Gelmini
15e3ce5328 Fix typos
Change-Id: I1488e2147fa0cd4a821eb5bfe172a58a4e396ace
Reviewed-on: https://gerrit.libreoffice.org/35224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-16 10:50:26 +00:00
Lionel Elie Mamane
4f4b06ce32 tdf#106462 old value and new value were swapped
in

commit 66ccfcd2908445b8194c364c89778056374b02af
Author: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Date:   Fri Oct 21 09:36:10 2016 +0200

    remove use of tryPropertyValue Any specialisation

    Change-Id: I3180cf5b9e63a3da9257b03ba02967a2d5402ec3
    Reviewed-by: Stephan Bergmann <sbergman@redhat.com>

Change-Id: I90dd3f6dba799eec9210dbb7560be105cb50e6d1
Reviewed-on: https://gerrit.libreoffice.org/35023
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2017-03-09 18:54:15 +00:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Andrea Gelmini
3063d55b8b Fix typos
Change-Id: I338dacd3cfe915714a9038e1dea4a60d586e9394
Reviewed-on: https://gerrit.libreoffice.org/34806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:05:43 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Stephan Bergmann
fb896ebc7e Remove wrong and broken encoding from INetMIMEMessage::SetHeaderField_Impl
INetMIMEEncodedWordOutputSink had been intended to encode (non-ASCII) content of
a "free-form text" header field as per RFC 2047.  It used a heuristic trying to
detect already encoded words (=?...?...?...?=) in the input, to pass them
through unmodified.  (Arguably, it could just as well have encoded them,
assuming they were meant to be genuine input.)  However, that heuristic had a
bug ever since 8ab086b6cc054501bfbf7ef6fa509c393691e860 "initial import", going
from STATE_FIRST_EQUALS to STATE_FIRST_EQUALS instead of STATE_FIRST_QUESTION,
rendering the heuristical detection logic effectively unused.

Instead of fixing the bug, 6e12729f715f142140d220dc7d3b28a4a0657016 "remove
unused enumerator from EncodedWordState" and
b8d8fb3f0cf4a961bbff54523eaca1a4f8179c7a "convert EncodedWordState to scoped
enum" crippled the code further by removing any reputedly unused cases.

But the only remaining use of INetMIMEEncodedWordOutputSink is in
INetMIMEMessage::SetHeaderField_Impl, encoding MIME-Version, Content-Transfer-
Encoding, Content-Type, and Content-Disposition header fields.  And none of
those headers have any "free-form text" content that should be encoded as per
RFC 2047.  The first two have fixed ASCII-only content ("1.0" and "7bit",
"8bit", etc., respectively), while the latter two have structured content that
may contain parameters of arbitrary content, which must be encoded according to
RFC 2231 (but currently isn't).

And the only place where such arbitrary-content parameters are generated is in
the two calls to SetContentTransferEncoding in
forms/source/component/DatabaseForm.cxx.  (The calls to SetContentType there and
in tools/source/inet/ itself are all known to have unproblematic ASCII-only
content.)  So mark those two places with TODOs about the missing encoding (which
had been missing since forever) and, in INetMIMEMessage::SetHeaderField_Impl,
liberally convert the content to 8-bit via OUString::toUtf8 for now.

Change-Id: I4b2a219b396953b219ca66441a5227157a35951f
2017-02-21 08:22:19 +01:00
Eike Rathke
838fab822c Resolves: tdf#79250 add typed list to form control listbox
... so numeric and text data can be distinguished input.

Change-Id: I63280a93c272ccc6f5e7ca06a1a1fcbfb3db8455
2017-02-14 11:49:35 +01:00
Eike Rathke
d3293c7173 Revert "Resolves: tdf#79250 add typed list to form control listbox"
This reverts commit e387b69967aabc44d5da5aaad8d94191437dc57c.

It breaks toolkit.subsequentcheck with
propertyChangeListener wasn´t called for ´TypedItemList´

Back to the drawing board for the twisted property logic of forms and
toolkit uno control models.
2017-02-11 01:19:37 +01:00
Eike Rathke
e387b69967 Resolves: tdf#79250 add typed list to form control listbox
... so numeric and text data can be distinguished input.

Change-Id: I63280a93c272ccc6f5e7ca06a1a1fcbfb3db8455
2017-02-10 20:58:52 +01:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Noel Grandin
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
Noel Grandin
dce867e8c4 loplugin:stringconstant handle calls to constructors with one arg
Change-Id: Ide9148a908bef46ba14640dfa6f556beaf6e3f60
Reviewed-on: https://gerrit.libreoffice.org/33772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 07:57:16 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin
b98811106b use rtl::Reference in OImageControlModel
instead of storing both a raw pointer and an uno::Reference

Change-Id: If0e1380815e93015249cc19bc66b40befbfab50e
Reviewed-on: https://gerrit.libreoffice.org/33570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26 10:23:56 +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
Noel Grandin
dc33775281 use rtl::Reference in ODatabaseForm
rather than manual acquire/release

Change-Id: Ic5f013b7e4cafc597c659c61fbf568adccfd806a
2017-01-23 07:56:34 +02:00
Caolán McNamara
f9bad9e8fb don't need an intermediate Image
Change-Id: I090d94cfe433763ded70f28b5139772bca229c34
2017-01-20 17:17:52 +00:00
Stephan Bergmann
36d7778f46 New loplugin:dynexcspec: Add @throws documentation, forms
Change-Id: Ib5e1f2ef4143ad1c75ec705624a547e47affbc79
2017-01-19 18:03:20 +01:00
Noel Grandin
d3ff66999d use rtl::Reference in OClickableImageBaseModel
instead of storing both a raw pointer and an uno::Reference

Change-Id: I92dc79edef9046acc137a878d35dde935bb17674
2017-01-19 13:06:47 +02:00
Noel Grandin
afb60a273f use rtl::Reference in OComponentEventThread
instead of storing both a raw pointer and an uno::Reference

Change-Id: I8cd4d04ffb9f40a48d48ade2b171a9a9942cf87f
2017-01-19 13:06:47 +02: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
70fed865df new loplugin: useuniqueptr: forms..framework
Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3
Reviewed-on: https://gerrit.libreoffice.org/33164
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 11:31:40 +00:00
Caolán McNamara
4ec87ca784 add dbtools for !HAVE_FEATURE_DBCONNECTIVITY anyway
Change-Id: I7a769ab3c7881eae80849efc5e75eca5846d254f
2016-12-17 15:47:15 +00:00
Caolán McNamara
818d93f1db more !HAVE_FEATURE_DBCONNECTIVITY build fixing
Change-Id: I1f949c29020c498200decdac487e0519f48a4142
2016-12-17 15:21:26 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
803215142e convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05 12:49:02 +02:00
Stephan Bergmann
ccda3f37a4 loplugin:unnecessaryoverride (dtors) in forms
Change-Id: Ia6787aa9dc7963b1e44604f22bfc95e0333a7f79
2016-12-05 09:03:49 +01:00
Jochen Nitschke
66ccfcd290 remove use of tryPropertyValue Any specialisation
change return value of getCurrentMultiValue from Any<Sequence<Any> >
to Sequence<Any>.
return value of getCurrentSingleValue (Any of connectivity::ORowSetValue)
can't be changed to use tryPropertyValue.
inline functionality

Change-Id: I3180cf5b9e63a3da9257b03ba02967a2d5402ec3
Reviewed-on: https://gerrit.libreoffice.org/30091
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-21 14:36:11 +00:00
Noel Grandin
bb674aa550 loplugin:unusedfields
Change-Id: Id2dbbf384637223db3d334d95332251832918003
Reviewed-on: https://gerrit.libreoffice.org/30927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17 13:10:42 +00:00
Noel Grandin
1ba4bb6397 loplugin:countusersofdefaultparams in editeng..rsc
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-11 12:12:22 +02:00
Noel Grandin
389999abdb make comphelper::containerToSequence a little smarter
So we don't have to specify the source and destination type as often.

Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624
Reviewed-on: https://gerrit.libreoffice.org/30700
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 07:48:18 +00:00
Noel Grandin
bbf6c51717 loplugin:expandablemethods in forms..formula
Change-Id: Idc948ad06913def28cb642c3a4e5ea9322b9fb3b
Reviewed-on: https://gerrit.libreoffice.org/30688
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 09:49:48 +00:00
Noel Grandin
c123c528bf loplugin:unnecessaryvirtual in comphelper..forms
Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd
Reviewed-on: https://gerrit.libreoffice.org/30679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:57:57 +00:00
Noel Grandin
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
Caolán McNamara
798c107a1a coverity#1374310 Uncaught exception
Change-Id: Ie0ae4412d42d15e2c6c52a8cb0b7b3893405a16b
2016-10-27 21:47:03 +01:00
Caolán McNamara
f20a45808f coverity#1374311 Uncaught exception
Change-Id: I3f0e2fdfbf3c0517593ef87bc7bcbfe2ee693eef
2016-10-27 21:46:19 +01:00
Caolán McNamara
7580c5e5bd coverity#1374312 Uncaught exception
Change-Id: I901c5399cdc33d55c4d3bdfa7a566adc74340405
2016-10-27 21:45:06 +01:00
Caolán McNamara
3cc1a10c7b coverity#1374313 Uncaught exception
Change-Id: I9562deb23324f44b16735b0d376b4c37e20c58c1
2016-10-27 21:41:47 +01:00
Caolán McNamara
db337150cd coverity#1374315 Uncaught exception
Change-Id: Id7a01c652d1d11675b87ee732ff40ddd76de6236
2016-10-27 21:37:42 +01:00
Caolán McNamara
6e14070332 coverity#1374316 Uncaught exception
Change-Id: I32f872d74f167604de006f1d77a9219a37011bfa
2016-10-27 21:34:57 +01:00
Caolán McNamara
95af8bfcdf coverity#1374286 Uncaught exception
Change-Id: Ied3abcd1f2bd7754e3861905f441c46f828f7f5d
2016-10-26 09:56:30 +01:00
Caolán McNamara
b23e979157 coverity#1374281 Uncaught exception
Change-Id: Iaffb4b67c67b5877a5a53d9ae81927b28883fc56
2016-10-26 09:56:30 +01:00