Commit Graph

412623 Commits

Author SHA1 Message Date
Stephan Bergmann
d4bd86f52d loplugin:redundantpointerops (clang-cl)
Change-Id: I5d4a1c3746b0eec02e022e5ffefd1a30a01948cd
2017-09-14 08:37:19 +02:00
Stephan Bergmann
7901d47cbb loplugin:unnecessaryparen (clang-cl)
Change-Id: Icd5e625f7c67c45ea3038455514e44c1c9449661
2017-09-14 08:36:20 +02:00
Stephan Bergmann
303380beef loplugin:unnecessaryparen (clang-cl)
Change-Id: I5335d639cddb07ad442d1e09f2d2ac694c38ccaf
2017-09-14 08:35:54 +02:00
Noel Grandin
c856ae17af clang-tidy modernize-use-emplace in vcl
Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070
Reviewed-on: https://gerrit.libreoffice.org/42259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 08:29:45 +02:00
Noel Grandin
2d2259c848 clang-tidy modernize-use-emplace in test..vbahelper
Change-Id: Ifbe1dd7c9d5dde33f7419548670434591b1a1d82
Reviewed-on: https://gerrit.libreoffice.org/42258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 08:29:11 +02:00
Noel Grandin
b0b0aef18f clang-tidy modernize-use-emplace in sw
Change-Id: I92fd035824f247dc61edfb18c54b960a7733fdf7
Reviewed-on: https://gerrit.libreoffice.org/42244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 08:28:31 +02:00
Noel Grandin
a4fb52ac0f convert ScAttrArray to use std::vector
instead of re-implementing it ourselves.

Which lead to some changes in Xf::AttrList since the import process
wants to donate it's array to ScAttrArray.

Change-Id: I176148131fb5f163e25691ad690f63398ba1a556
Reviewed-on: https://gerrit.libreoffice.org/42205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 08:28:15 +02:00
Thorsten Behrens
f70e0ec6b3 lokit: make parts of unstable API public for 6.0
[API CHANGE] publish all of LibreOfficeKitClass, and the
getDocumentType callback for the LibreOfficeKitDocumentClass

Change-Id: I4d6529a71b29a0014053b797c67255df53a6ccde
Reviewed-on: https://gerrit.libreoffice.org/42243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-14 01:19:42 +02:00
Andrea Gelmini
41b7713334 Fix typo
Change-Id: I5924efc90aa59ec948075bbe364858e1e1740ec6
Reviewed-on: https://gerrit.libreoffice.org/42255
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-13 23:08:17 +02:00
Christian Lohmaier
1a7b5c921d simplify configure for android that started to bitrot a little
aarch64 (and mips) for that matter were not updated to adjust for clang
As clang now is default and only toolchain, also got rid of some now
unnecessary conditionals/variables.
additionally group the target-dependent vars in one block instead of
spreading them around in the file

Change-Id: Ie7fa19d14bf9fc7c05a9bea5345309f42f414db7
Reviewed-on: https://gerrit.libreoffice.org/42252
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-09-13 21:10:43 +02:00
Michael Stahl
7af14994b5 onlineupdate: work around GCC7 -Werror=implicit-fallthrough
This is pretty stupid, but oh well...

Change-Id: I1e605b2858a917f61922df757809a2aceb14a914
2017-09-13 20:55:56 +02:00
David Tardon
1a2b33348e upload libwpg 0.3.2
Change-Id: Ib4362dc0b520fbb764fdc4b0c6b1e8887a3c0c53
Reviewed-on: https://gerrit.libreoffice.org/42236
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-09-13 20:43:53 +02:00
Michael Stahl
108bd86137 jpeg-turbo: upgrade to release 1.5.2
* jpeg-turbo.limits.patch.1, jpeg-turbo.arm_build.patch.1:
    drop these, merged upstream

Change-Id: I755c0216af8ebe93ae9ba5e227fb880c572169c4
Reviewed-on: https://gerrit.libreoffice.org/42248
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-13 19:15:13 +02:00
Jean-Sebastien Bevilacqua
e8d370e84a tdf#107267: Fix grand total calculation
To fix the grand total calculation, we add another step.
This step loop through all row to find the min and max of each value.
These min and max are then used by the grand total.

Patch by Linagora

Change-Id: If3200840764d0ad9cb63231ac9f67b5d5ed197f1
Reviewed-on: https://gerrit.libreoffice.org/42042
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-13 19:03:10 +02:00
Winfried Donkers
65ea925d17 tdf#109096 Allow 0 as argument value(s) to GEOMEAN()
Both ODFF1.2 and the mathematical definition allow 0 as value(s).
Excel does not allow 0 as argument value(s), but IMHO this is to be
regarded as an aberration of Excel.

Also added tests for no arguments or negative arguments, which is not allowed by ODFF1.2.

Change-Id: I330206b6e817e0ec092fe19f713b044578da41d1
Reviewed-on: https://gerrit.libreoffice.org/42107
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-13 18:42:04 +02:00
Stephan Bergmann
23332fd650 Silence -Werror,-Wunreachable-code
Change-Id: I87faa8501b14a770194979cd1c575ed05b162e48
2017-09-13 17:53:38 +02:00
Matthias Seidel
14164f75a5 Removed quotation marks that destroyed some strings for Pootle export
(cherry picked from commit 4e2b0c14b49d5e74a2c7493ed4bcc1f8080efdb3)

Change-Id: I3d5e003a313228188119ee439c858c1ee505c9b0
2017-09-13 16:10:19 +01:00
Takeshi Abe
84b8e14ad3 svx: Simplify SdrHelpLineList with std::unique_ptr
This also kills no longer used SdrHelpLineList::GetObject().

Change-Id: I6e08e44214657c536717e96693c89104d7118cfd
Reviewed-on: https://gerrit.libreoffice.org/42234
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-13 16:13:59 +02:00
Miklos Vajna
1f582e38dd EPUB export: add options dialog
It just exposes the two options available at libepubgen level already.

Change-Id: I428919ffe495b6d7ec2773f542e2fea6733d0a1c
Reviewed-on: https://gerrit.libreoffice.org/42241
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-13 15:55:25 +02:00
Noel Grandin
158434ee87 no need to call GetNumerator() / GetDenominator() for Fraction
simplify the calculations - why have a Fraction and then just split
it up for the calculation?

Change-Id: I81af95e1ee1633f77e088c0990f308b1c169a6a2
Reviewed-on: https://gerrit.libreoffice.org/42242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 15:47:04 +02:00
Noel Grandin
1b1afc10f4 Fraction: make conversion operators and constructor explicit
and simplify some of the calculations that needed to be changed.

Which resulted in one unit test needing to change by one pixel,
let's hope not an indication of a real problem.

Change-Id: Ie56434f35f4e58d21ee6f671392e93dc7542fca3
Reviewed-on: https://gerrit.libreoffice.org/42240
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 15:46:47 +02:00
Noel Grandin
cc233992df clang-tidy modernize-use-emplace in slideshow
Change-Id: Ice6ab0dcd6785a751be5a66b262690640e0a2780
Reviewed-on: https://gerrit.libreoffice.org/42239
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 14:16:51 +02:00
Stephan Bergmann
781267bc8d Blind macOS -Werror,-Wunreachable-code fix
Change-Id: Ice41b6394bc4fc8e4b1d7b9c5689019361883b59
2017-09-13 13:57:45 +02:00
Christian Lohmaier
f4be69b407 add missing context to translatable strings in ui files
the context is requires to create translation templates (pot files,
using "make translate") to guarantee uniqueness of strings

Change-Id: Ie3df130f69c72ad468839235769f55286f4f3e48
2017-09-13 13:46:54 +02:00
Christian Lohmaier
9a7c53e589 having context in strings is not enough, it should also be ~unique
using the same context as in datastreams.ui causes duplicate (identical)
strings in pot files, and some translation tools stumble over those
see also tdf#109258

Change-Id: I88b083f56a45123a6cf7521ceaaefa89f77e0477
2017-09-13 13:46:53 +02:00
Eike Rathke
9e399bc613 icu: do not include non-standardized xlocale.h if U_PLATFORM_IS_LINUX_BASED
... should be more platforms ... but be conservative.
U_PLATFORM_IMPLEMENTS_POSIX does not hold what it promises.

"The file and this data structure is not standardized.  Don't rely on it.  It
can go away without warning."

...

And since glibc 2.26 it's gone.

https://ssl.icu-project.org/trac/ticket/13329

Change-Id: I4c1f6130571f5d094cb35ce70e4d333763cee32a
2017-09-13 13:43:12 +02:00
Stephan Bergmann
3f0fba004b New rtl::isUnicodeScalarValue, rtl::isSurrogate
There are apparently various places that want to check for a Unicode scalar
value rather than for a Unicode code point.  Changed those uses of
rtl::isUnicodeCodePoint where that was obvious.  (For changing
svtools/source/svrtf/svparser.cxx see 8e0fb74dc0
"Revert 'svtools: HTML import: don't put lone surrogates in OUString'".)  Other
uses of rtl::isUnicodeCodePoint might also want to use rtl::isUnicodeScalarValue
instead.

As a side effect, this change also introduces rtl::isSurrogate, which is useful
in a few places as well.

Change-Id: I9245f4f98b83877145a4d392f0ddb7c5d824a535
2017-09-13 13:35:49 +02:00
Stephan Bergmann
2d22b39fb7 Clamp minor/patchlevel when computing CLANG_VERSION
...so it doesn't overflow for odd version numbers like
<https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER
&full-log=1505293801.994#53>'s 'clang --version' reportedly returning "Android
clang version 5.0.300080  (based on LLVM 5.0.300080) […]"

Change-Id: I7e3b3e0fa93d48fbbfa7a9b71e91776f976ed0da
2017-09-13 13:16:10 +02:00
Muhammet Kara
6f60cfe259 tdf#112133: Drop the Add and Remove labels
and ensure consistent height of the controls
in the first row of the Customize dialog.

Change-Id: I6c2d75b647cad7a2ead8c875afc4fd38a182eef0
Reviewed-on: https://gerrit.libreoffice.org/42233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2017-09-13 13:04:17 +02:00
Caolán McNamara
53548b8d74 drop first/last link callback
of course this stuff is exposed through uno through
com::sun::awt::XSpinListener so VclEventId::SpinfieldFirst
and VclEventId::SpinfieldLast have to be retained

Change-Id: Icbf31cc8c62f2bc3bc0ccf966c0fd4f5c43dcf6b
Reviewed-on: https://gerrit.libreoffice.org/42231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-13 12:51:15 +02:00
Noel Grandin
0e39114783 clang-tidy modernize-use-emplace in svx
Change-Id: I52f062bf0b4c1af44576546d0593699758d71084
Reviewed-on: https://gerrit.libreoffice.org/42232
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 12:15:22 +02:00
Tamás Zolnai
39f4a8a60b This return value is unused now
Change-Id: I6145e9bd5736b5c48683d0a85d13ad02d66d5084
Reviewed-on: https://gerrit.libreoffice.org/42227
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-13 12:08:17 +02:00
Stephan Bergmann
9088ef89b7 Silence -Werror,-Wunreachable-code on Android
Change-Id: Ide7591b4012f23e8a3faa705537937efcac435a2
2017-09-13 11:17:26 +02:00
Michael Stahl
403c772973 sax: allow some debug logging in FastParser
Multi-threading makes this difficult; have it print synchronously
where it is in the input when setting:
SAL_LOG="+INFO.sax.fastparser+WARN" SAX_DISABLE_THREADS=1

Change-Id: I8c77974acb2b4d4e273fc9c0f273c345d8feb2ff
2017-09-13 11:11:36 +02:00
Michael Stahl
88c84e71e2 tdf#112311 oox: fix UAF of std::shared_ptr
OOXMLFastContextHandlerShape::sendShape() deletes the parent context's
ShapeTypeContext::mrTypeModel.

It looks like the sendShape() can't be delayed because writerfilter
wants to import the v:textbox content into a text frame.

Keep the shape alive until the end of the containing context.

Not sure if it's going to process the v:fill element properly,
but at lest valgrind is happy.

(probably regression from CWS writerfilter32bugfixes01)

Change-Id: Ifeab84751a1b20b2f272c4dd74b7097deb5eece0
2017-09-13 11:09:38 +02:00
Michael Stahl
b5368c913d sax: improve README
Change-Id: Ide71867ca1ad3ae43c18159585df6d0dafcbe586
2017-09-13 11:09:38 +02:00
Noel Grandin
c460201dfd clang-tidy modernize-use-emplace in sfx2
Change-Id: I3d6b9dfa86c3637e5cb6fad81702c15d4c894e72
Reviewed-on: https://gerrit.libreoffice.org/42229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 11:04:03 +02:00
Miklos Vajna
2d5c3782f3 sw: prefix members of SwFormatFieldHint
Change-Id: I58b2f9680397e7df28a5fde4cb4c90364075b20b
Reviewed-on: https://gerrit.libreoffice.org/42228
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-13 11:02:30 +02:00
Stephan Bergmann
7f3ca30951 Enable -Wunreachable-code
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code
at the end of a switch statement, after the last case's "break".

-Wunreachable-code appears to work well on Clang, while it appears to have no
effect on GCC.

Most of the affected places are apparently temporary/TODO/FIXME cases of
disabling code via "if (false)", which can be written with an extra set of
parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus
needed loplugin:unnecessaryparen to be adapted accordingly).  In some cases,
the controlling expression was more complex than just "false" and needed to be
rewritten by taking it out of the if statement to silence Clang.

One noteworthy case where the nature of the disabled code wasn't immediately
apparent:

  Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in
   ScExponentialSmoothingDialog::ApplyOutput
   (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in-
   progress or dead code?
  Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it
  Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of
   parentheses for now, to silence -Wunreachable-code (I wouldn't want to
   remove it, as I have no idea whether I should then also remove the "Initial
   value" comment preceding it)
  Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the
   "intital value"... so no

Another case where the nature of the dead code, following while (true) loops
without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx,
where I added TODO markers to the workarounds that silence the warnings for now.

basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic
storage duration, and without an initalizer at the top of a switch statement.
Clang warning about it is arguably a false positive.

Apart from that, this didn't find any cases of genuinely dead code in the
existing code base.

Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c
Reviewed-on: https://gerrit.libreoffice.org/42217
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-13 10:24:38 +02:00
Damjan Jovanovic
1963dc6455 Fix a locking bug in our Java ComponentBase class, where after the transition
to disposed, the relevant variables (bDisposed and bInDispose) are written to
outside a synchronized block.

The equivalent C++ implementation in main/cppuhelper/source/implbase.cxx,
method WeakComponentImplHelperBase::dispose(), already does this.

Patch by: me

(cherry picked from commit 2d382cef5450cf1593322184649257d3666cbbd8)

Change-Id: I6c3e2ef78bc3c945245fe9fb7b6b713eb83710be
Reviewed-on: https://gerrit.libreoffice.org/42189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-13 10:16:18 +02:00
Caolán McNamara
5c0bb1088a listening to modify is sufficient to get all changes
Change-Id: I9dc7301bed990838ac5fbb3bb5394bae5171bc22
2017-09-13 09:12:00 +01:00
Stephan Bergmann
66322c5f4a Silence warning C4701: potentially uninitialized local variable
Change-Id: Ia37347108f9fe7094f055a5c6f2ec9511c3aff1d
2017-09-13 09:12:26 +02:00
Jan Holesovsky
d0d026a158 Actually no need to make GetASCWriter public.
Change-Id: I6f0f18629c6a61b6a4c52c2b16cc7b45525a5259
2017-09-13 09:11:09 +02:00
Stephan Bergmann
f7d01f3ea5 Revert "Do not include non-standardized xlocale.h, include locale.h instead"
This reverts commit 274b2aee3b, which breaks in
external/icu on macOS, <https://ci.libreoffice.org/job/lo_tb_master_mac/20605/>:

> digitlst.cpp:497:8: error: unknown type name 'locale_t'
> static locale_t gCLocale = (locale_t)0;
>        ^
2017-09-13 09:04:50 +02:00
Noel Grandin
cd779b5f4e rename ScAttrEntry.nRow to nEndRow
since it's the last row that the pattern applies to

Change-Id: I80d6d5787768b1e98e958d7adc4c13c37c560ccd
Reviewed-on: https://gerrit.libreoffice.org/42211
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 08:49:10 +02:00
Jan Holesovsky
3563220f04 tdf#112191: Unit test.
This was the hard part of the fix :-)

Change-Id: Iae335c9d41d9b3420472b5d02113e2b42ab825da
Reviewed-on: https://gerrit.libreoffice.org/42203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-13 08:42:48 +02:00
Jan Holesovsky
9ead872643 tdf#112191: Don't export bullets when only one paragraph is selected.
Change-Id: Ibea54f857e78a850ea05643743884ae2157dae57
Reviewed-on: https://gerrit.libreoffice.org/42202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-13 08:42:38 +02:00
Stephan Bergmann
8e0fb74dc0 Revert "svtools: HTML import: don't put lone surrogates in OUString"
This reverts commit fc670f637d, which is no longer
needed after 08e78607ec "Make reading UTF-8
strict".  The bug doc fdo67610-1.doc (aka
<https://bugs.documentfoundation.org/attachment.cgi?id=83417>) now opens fine
without hitting the assert in OUString::toUtf8.
2017-09-13 08:35:35 +02:00
Stephan Bergmann
08e78607ec Make reading UTF-8 strict
Consider non-shortest forms, surrogates, and representations of values larger
than 0x10FFFF (which can even cover five or six bytes, for historical reasons)
as "invalid" (they used to be considered as "undefined" instead).

This is in response to fc670f637d "svtools: HTML
import: don't put lone surrogates in OUString" (which can now be reverted again
in a follow-up commit).  My fear would have been that some places in the code
rely on the original, relaxed handling, but at least 'make check' still
succeeded for me.

Change-Id: I017e6c04ed3c577c3694b417167f853987a1d1ce
2017-09-13 08:28:32 +02:00
Tor Lillqvist
caf9e56a81 Change assertion failure to SAL_WARN
I hit it multiple times and have no interest in figuring out
why. Or time.

Change-Id: I3f22c8b62fdcf987b760ac16bfe8a21a8870d33e
Reviewed-on: https://gerrit.libreoffice.org/42212
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-13 07:46:34 +02:00