Commit Graph

412096 Commits

Author SHA1 Message Date
Stephan Bergmann
f192302a57 loplugin:constparams: basic (clang-cl)
Change-Id: Ia84473360333cb4905692a4d9d0358c93acebff8
2017-08-31 12:14:39 +02:00
Noel Grandin
b02998a7cb inline some use-once typedefs
and remove some dead ones

Change-Id: I6946d717d3c15dc5207489ed3d56d985dd953d59
Reviewed-on: https://gerrit.libreoffice.org/41746
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-31 12:06:50 +02:00
Thorsten Behrens
c54850b23a gpg4libre/comphelper: add storage helper for GPG encryption data
Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276
Reviewed-on: https://gerrit.libreoffice.org/41504
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-08-31 12:02:32 +02:00
Stephan Bergmann
f20810a131 Adapt external/beanshell to Java 9
For one, drop a spurious target="1.5" so that ant instead uses the passed-in
JAVA_TARGET_VER (which needs to be 1.6 for Java 9).

For another, the deprecated java.awt.Component.getPeer method finally got
removed, so bsh.util.AWTConsole would no longer compile.  But it looks like that
class is not used by us anyway, so just remove the problematic code.
(workdir/UnpackedTarball/beanshell/docs/manual/bshmanual.html: "Web Browser
Access:  After starting the server you can connect your web browser to the port
you specified.   BeanShell will respond by sending an HTML page offering you a
choice of the Swing based JConsole or the older AWTConsole.  You may choose
whichever is appropriate for your web browser.  [...]  The bsh.util.AWTConsole
is a legacy implementation of the GUI Console using AWT instead of Swing.  This
console does work, but it is not as slick or pretty as the JConsole.  The
primary reason it is still here is to support remote access from generic web
browsers using only Java 1.1.")

Change-Id: I9f1112caebae9a55e4eec7f9baa0114b2254ccda
2017-08-31 11:52:50 +02:00
Stephan Bergmann
4082b5874a Restrict loplugin:constparams cast-to-void check
Change-Id: I3c4d4f99b423f46136a79f3b06c5f0e1492872f1
2017-08-31 11:23:26 +02:00
Stephan Bergmann
72cfd4d024 loplugin:constparams: Also handle ObjCObjectPointerType
...in 0660a30d54 "Avoid loplugin:constparam when
param is subject of cast to non-const pointer"

But turns out this whole avoidance is ill-advised and should eventually be
reverted:

Aug 31 09:09:26 <sberg> noelgrandin, the way you originally handled CastExpr in
 constparam's checkIfCanBeConst, your intent was if there's code like
 static_cast<T*>(p) and param p is found it can be made const, one would also
 need to change that cast to static_cast<T const *>(p) when fixing the loplugin
 warning, right?
Aug 31 09:09:43 <noelgrandin> sberg, correct
Aug 31 09:10:10 <sberg> noelgrandin, I messed the up with
 0660a30d54
Aug 31 09:10:12 <IZBot> core - Avoid loplugin:constparam when param is subject
 of cast to non-const pointer -
 http://cgit.freedesktop.org/libreoffice/core/commit/?id=0660a30d54eb6762302cf1afd43de01e137f6393
Aug 31 09:10:24 <noelgrandin> sberg, I probably should have had a test for that
Aug 31 09:10:41 <noelgrandin> tests are better at expressing intent
Aug 31 09:10:56 <sberg> I ran across it in a function that needed to have the
 param non-const for API reasons (callback fn), and it looked like the "obvious"
 fix there, not needing to add the fn to the blacklist
Aug 31 09:11:26 <sberg> I'll eventually get that fixed again (but want to first
 get the Mac and Windows builds to succeed)
Aug 31 09:11:44 <noelgrandin> fair enough

Change-Id: Idef0cfc417ec0597a26a29c8720e3e4051a68e00
2017-08-31 11:13:38 +02:00
Stephan Bergmann
20b11e8dc4 ...in which Johnny returns from the fair for real
and finds loplugin:constparams adapted to ObjCIvarRefExpr also

Change-Id: Ib803cd80b01ad7a0fa07bddb77a873bb323a50c0
2017-08-31 11:02:38 +02:00
Stephan Bergmann
a5d4179ecf loplugin:constparams: vcl (macOS)
Change-Id: I993ab0021d0a0bee8e78975bba180355d2bfb19c
2017-08-31 11:01:22 +02:00
Stephan Bergmann
f734304a7f loplugin:constparams: connectivity (macOS)
Change-Id: I2d14eeea20d2622e06c7c34a1fa7e84439b3d224
2017-08-31 11:00:30 +02:00
Caolán McNamara
91c6fecc20 ofz#2896 turn off auto look up col/row names for import testing
Change-Id: I346a9760c0692449ce5301f5075b3de0271fdadf
2017-08-31 09:01:20 +01:00
Markus Mohrhard
b75e6efdd0 Check ENABLE_ONLINE_UPDATE_MAR in one more place
Change-Id: I76f5702aad9b57f3031bc35b5271a5dde8ed4f28
2017-08-31 10:41:07 +03:00
Noel Grandin
ec67943f59 class ViewDescriptor is unused
since

    commit 990691b144
    Date:   Mon Nov 23 09:58:38 2015 +0200
    loplugin:unusedfields in sdext/

Change-Id: I89b7e59d37af8ba4093ca2e941219b29fd7bd726
2017-08-31 09:25:49 +02:00
Michael Stahl
4b4ebb1545 sw: WW8 import: properly handle consecutive range annotations
moz1187869-1.doc crashes on export to ODF because an annotation
mark has been inserted that does not have a SwPostItField.

In fact, the SwPostItField exists, but the annotation mark is at
the wrong position.

There are 2 consecutive range annotations in the file, so when
Read_And() calls MoveAttrs(), the end of the both annotations
are moved 2 times, hence later SwFltControlStack::SetAttrInDoc()
will insert 2 annotation marks with the same end position,
and the 2nd one will overwrite the name that the 1st one set
on the 2nd SwPostItField, while the 1st SwPostItField remains
with an empty name.

Ensure that the end of an annotation mark is no longer moved
once it's on the position of the field inserted in Read_And().

Crash is a regression from 31c54fa7bb.

Change-Id: I0fd661e22e51701de67227f9145a13c62b10143e
2017-08-30 23:13:09 +02:00
Eike Rathke
4b6844343c Restrict GetDoubleFromDateTime() and GetDateTimeFromDouble() correction
... to specific 1899-12-30 vs. 1899-12-31 nulldate. Further check is needed to
do that only for OOXML transitional or dateCompatibility==true.

Change-Id: Ieecd3a5d061f900fbdec5bd9d1bf5ac61b966004
2017-08-30 21:49:36 +02:00
Caolán McNamara
2fdbf463f9 nothing is reading the futilely set WB_AUTOSIZE bit
Change-Id: Ifbc2dffcb8db1511d5c08e51c972e822355f41c6
Reviewed-on: https://gerrit.libreoffice.org/41737
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-30 20:14:02 +02:00
Caolán McNamara
cfc2022deb WB_AUTOSIZE is always on for SvtURLBox
Change-Id: I1c13392b4238fc8cdb1286b39c5eaaa62f7934cb
Reviewed-on: https://gerrit.libreoffice.org/41736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-30 20:13:02 +02:00
Caolán McNamara
14afb688d3 Resolves: tdf#95960 improve custom properties page
wrt widget heights and positions and other flakiness

take the natural combobox height as the line height, use a vclgrid
element for each row to get everything set to the same height

move the positioning code into Resize, etc.

Change-Id: I22de98ef91e39d1e7e45bbe62f68496d55c0c1cb
Reviewed-on: https://gerrit.libreoffice.org/41734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-30 20:12:33 +02:00
Tamás Zolnai
a2f2a40e37 tdf#112106: Corrupted pivot table after XLSX -> XLS conversion in Calc
Always write out a data layout name.

Change-Id: Ic0b43d9c0365eca5e417fe9f2fe4b77b538f3278
Reviewed-on: https://gerrit.libreoffice.org/41739
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-30 19:27:37 +02:00
Katarina Behrens
dce78f9caa gpg4libre: Add flag for filters that support GPG encryption
Change-Id: I48518f26a3ccbe430d36fb6657bdeff0943492d3
Reviewed-on: https://gerrit.libreoffice.org/41263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-30 17:56:41 +02:00
Stephan Bergmann
d5189db4df Compact content of external/rhino/rhino1_5R5-find_swing.patch to single place
...instead of adding something into the middle of the previous
external/rhino/rhino1_5R5.patch

Change-Id: I94a0e022776db67f50e785c45b0982977eec17f1
2017-08-30 17:43:03 +02:00
Stephan Bergmann
c4f0977ccc Pass "verbose" flag into ant
Change-Id: I76d7c8a41d64baae3591dd188a2d2e46f17622bb
Reviewed-on: https://gerrit.libreoffice.org/41735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-30 17:03:24 +02:00
Stephan Bergmann
64a4ad3a67 Avoid loplugin:constparam when param is marked as unused
...as in entry_group_callback
(sd/source/ui/remotecontrol/AvahiNetworkService.cxx),

  AVAHI_GCC_UNUSED void *userdata

Change-Id: I494067878181c51b77d581a21ab1c9ef81e482e5
2017-08-30 16:34:46 +02:00
Eike Rathke
9540916d82 Unit tests for tdf#91758
Change-Id: I4015a339ca18b214adca228b58319d897f0ad910
2017-08-30 16:30:47 +02:00
Eike Rathke
f49ef5b771 Force ISO date format again if ISO input, tdf#91758 follow-up
... and input doesn't match a date acceptance pattern, even if less than 3
digits in year.

Change-Id: Ib25aa8e813c06a224cfa95ead79c0f3bf2d2d672
2017-08-30 16:12:55 +02:00
Stephan Bergmann
b44f062df9 Adapt getcompver.awk to Java 9
...where at least <http://jdk.java.net/9/> "JDK 9 Early-Access Builds" 'java
-version' outputs a single-digit

  java version "9"

Change-Id: I7807f56593e5436418b49950ca6c2a178d6721f5
2017-08-30 15:16:22 +02:00
Stephan Bergmann
5d2e830a30 Avoid loplugin:constparam when param is cast to void
...which typically indicates that the param just has to be of the given type for
some reason

Change-Id: Ide30f514c5a849ae897c31c1744ece9df712a9fc
2017-08-30 15:14:19 +02:00
Stephan Bergmann
0660a30d54 Avoid loplugin:constparam when param is subject of cast to non-const pointer
...as in WriteCallback (desktop/source/minidump/minidump.cxx), where

  void *ptr

is use in

  static_cast<char *>(ptr)

Change-Id: I0bd44329029cd793390d0744de3c839612e0b494
2017-08-30 14:57:46 +02:00
Stephan Bergmann
67bff64e10 Adapt loplugin:constparam to jurt/source/pipe/staticsalhack.cxx
Change-Id: I0193ce3be582cb0a06cca17257b1e6587c5b3752
2017-08-30 14:57:10 +02:00
Stephan Bergmann
975d65eca3 loplugin:constparams
Change-Id: I8bc9fd2a3ad727f1a0f4b98254efdae085a2b8cd
2017-08-30 14:15:53 +02:00
Grzegorz Araminowicz
79b5d5037b SmartArt: grDir snake algorithm parameter
Change-Id: I643ed981cc9d02e5118f09a3c04abcea2fc5ecd7
Reviewed-on: https://gerrit.libreoffice.org/41516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-08-30 13:55:36 +02:00
Grzegorz Araminowicz
8ff306d81b tdf#43157 Clean up OSL_ENSURE in oox/drawingml/diagram
Change-Id: I9e3b80c365d6f43cd6f6f42ccdd0a8920f4ace14
Reviewed-on: https://gerrit.libreoffice.org/41513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-08-30 13:51:21 +02:00
Thorsten Behrens
5469157972 gpg4libre: request key from filepicker
Change-Id: I3a20f293bd12fc3de76fb1e846452c0a574e8794
Reviewed-on: https://gerrit.libreoffice.org/41503
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-08-30 13:42:36 +02:00
Michael Stahl
91635d5096 vcl: [loplugin:constparams]
Change-Id: Ic390dbb5a83a049635a868a14d09eaf1cfc2080f
2017-08-30 13:23:13 +02:00
Noel Grandin
80dd56035e fix ScJumpMatrixToken memory handling
ScJumpMatrixToken unconditionally deletes the ScJumpMatrix pointer it
receives. But it's copy constructor also just copies that pointer,
meaning that we could end up freeing that pointer twice.

ScJumpMatrix has no copy constructor, so I just managed it via
shared_ptr.

Change-Id: I9cf13312afb4f2869fdc878e5f34060614e31842
Reviewed-on: https://gerrit.libreoffice.org/41728
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-30 13:23:15 +02:00
Katarina Behrens
4e825d97a8 gpg4libre: Encrypt with GPG checkbox in SaveAs file dialog, 1st stab
LibO's own file dialog only so far

Change-Id: Ic5f6c180afb5d4e0fc151ad57d769b99ad7fbdf3
Reviewed-on: https://gerrit.libreoffice.org/41292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-30 13:16:49 +02:00
Stephan Bergmann
99fb14ef72 ...in which Johnny returns from the fair
and finds loplugin:constparams adapted to ObjCMessageExpr

Change-Id: I6e1ddd0fb1a8a61d5a78c156bccfc29f7233909e
2017-08-30 12:22:19 +02:00
Noel Grandin
eb08f19c73 loplugin:constparam
Change-Id: I81055d60c3c5d35e46e7d0c3a451e93e42d86783
2017-08-30 12:17:34 +02:00
Eike Rathke
b0f759560b Correct a test that worked only by chance, tdf#91758 follow-up
... but now doesn't anymore.

Change-Id: I573bdda023c69b895afe9959f345fc0e6d862cf8
2017-08-30 12:03:14 +02:00
Caolán McNamara
e63e3e37f3 Resolves tdf#112101 crash on particular file with office:event-listeners
Change-Id: I99a007543f90f4024666d296e9a775f8cee15086
Reviewed-on: https://gerrit.libreoffice.org/41723
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-30 11:36:57 +02:00
Eike Rathke
1cfe6a904d Resolves: tdf#91758 more stringent check for ISO date like looking input
Already check at the end of input analysis whether it could be an ISO date to
not apply x-y-z onto MDY or DMY later. For an acceptable ISO input, apart from
M and D restrictions, Y-M-D year numbers must be greater than 12 in MDY order
or greater than 31 in DMY order, or have at least 3 digits (possibly leading 0).

Change-Id: I8d3eb7e2403421469050850e45d1db5c0be018f5
2017-08-30 11:06:36 +02:00
Eike Rathke
6254fbf8a7 Related: tdf#91758 shortcut CanForceToIso8601() for MayBeIso8601() results
Change-Id: I3cd6967931abcbf806a539a19f7f9371398567c2
2017-08-30 11:06:36 +02:00
Eike Rathke
ae6c5083f0 Related: tdf#91758 don't remember nCanForceToIso8601 state
CanForceToIso8601() can be called twice for different DateOrder.

Change-Id: I656d499b8a557814326fe71333fcb644c7d3e909
2017-08-30 11:06:36 +02:00
Noel Grandin
008199ee75 loplugin:constparam in various
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed
Reviewed-on: https://gerrit.libreoffice.org/41721
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-30 10:58:56 +02:00
Mohammed Abdul Azeem
da8cf43b4f Refactoring fastcontexts code:
Moved all the casts inside ::createFastChildContext and
used reference to it as an argument in the constructors. This
avoids spreading the cast statements all over the place.

Also removed some of the empty createFastChildContext(), they are
unnecessary as the parent class already has it.

Change-Id: I344ede732a53878a7e265c0178b07d73b5398237
Reviewed-on: https://gerrit.libreoffice.org/41178
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-08-30 10:55:28 +02:00
Miklos Vajna
0365ca351a pdfium: update to 3196
Change-Id: Ia3bfe918d5dcb52faf3829d59d8a8c3b95e31bbc
Reviewed-on: https://gerrit.libreoffice.org/41722
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-30 10:55:14 +02:00
Tor Lillqvist
310efe2d58 This can be const
Change-Id: I5d9f96111a17ec49deeb5716e1a8d38e444dad20
2017-08-30 11:31:10 +03:00
Tor Lillqvist
1cfb07cb0b This variable can be const, and calculated once before the loop
Change-Id: I18aa862a6568891f1c44d5b6da78fc2ac45e8075
2017-08-30 11:29:37 +03:00
Miklos Vajna
dfdc113bbd EPUB export: support char props on text outside a span
The librevenge model is simpler: text is always in a span, and paragraph
(automatic) styles don't contain char props, either. So handle this
complexity on our side.

Change-Id: I017222539d8981d2bbbc632258662444bf3a79c8
Reviewed-on: https://gerrit.libreoffice.org/41705
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-30 10:02:32 +02:00
andreas kainz
0be2ac10cb remove insertsymbol cause we have now CharmapControl
Change-Id: I955fe255021996bd717cada64a1c69751a83cf45
Reviewed-on: https://gerrit.libreoffice.org/41715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-08-30 09:09:29 +02:00
Stephan Bergmann
58a84aa216 Update external/nss/asan.patch.1
...after c6df07f905 "nss: Upgrade to release
3.31.1 and update patches"

Change-Id: I0f18659ee65d9b917377ef75e94f3b9fb8ece58e
2017-08-30 08:43:48 +02:00