Commit Graph

4367 Commits

Author SHA1 Message Date
1f145776d8 New loplugin:conststringvar: desktop
Change-Id: Ib7b946fd033857d7b1b436ac478c1a9ecfccaa0d
2017-01-10 08:12:10 +01:00
a694748f93 New loplugin:externvar: desktop
Change-Id: I3942e7496c6014c0118a9e90a8fa8251bffe8443
2017-01-09 15:43:49 +01:00
baa99b4e3a add the locale info to the crashreporter metadata
We have a few crashes that seem locale dependent. Especially the font
related problems.

Change-Id: I0cc977413dc2328ea705c96c2d4048e4f3c58bbc
Reviewed-on: https://gerrit.libreoffice.org/32764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-06 20:59:50 +00:00
4654e312cf loplugin:nullptr
Change-Id: I279e65c2ec5fa7b3b06f01e7ef4e50ed822fcd03
2017-01-06 11:18:26 +01:00
b12b4fdaf6 Work around clang-cl -Werror,-Wmissing-field-initializers
...the same way as in other uses of GetStartupInfo

Change-Id: Ieeadf028d15c915df32e055e3725513b2047da4d
2017-01-06 11:18:02 +01:00
7e7fcb7ee6 desktop: remove unnecessary #define _WIN32_WINNT 0x0501
gb_OSDEFS already globally sets at least 0x0502

Change-Id: I52b75dc114eb498232faeb70ec75948ad01d3675
2017-01-03 21:21:01 +01:00
8885343a33 Fix inefficient usage of string::find() in condition (CWE597)
string::compare() will be faster when string::find's result is
compared with 0, because it will not scan the whole string.

Change-Id: I78596a6d796fe9779f88b7c7b91da09aa27b7035
Reviewed-on: https://gerrit.libreoffice.org/32430
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-02 10:39:04 +00:00
601bdc416b tdf#100826: Use parent console for output if possible
This patch uses either passed standard handles, or parent console
for output of --help and --version command line switches.

Change-Id: Iabbec79d3792ae091ca06d134345c1669eb1ac13
Reviewed-on: https://gerrit.libreoffice.org/31187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-23 04:54:35 +00:00
6b8ee3c9ba convert VclButtonsType to scoped enum
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1
Reviewed-on: https://gerrit.libreoffice.org/32285
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2016-12-21 16:19:37 +00:00
81f943e236 No apparent reason for an unnamed namespace in an include file here
Change-Id: I8467fbb8b4e82e58a66990ed049a12e26aabd4f0
2016-12-21 14:56:40 +01:00
fe18f5d51f tdf#95416 Fix an include for 2 files in unopkg
Change-Id: Id1fa09b6db6c90cd727182133e5f9f39383aa5e5
Reviewed-on: https://gerrit.libreoffice.org/32255
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-12-21 08:53:21 +00:00
9abac96518 tdf#95416 Fix an include for desktop directory
Change-Id: I04a2181b05f2b15a55db306f49b47855db7753db
Reviewed-on: https://gerrit.libreoffice.org/32204
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jan-Marek Glogowski <glogow@fbihome.de>
2016-12-20 16:59:22 +00:00
2c9972b8d4 tdf#104441 Addition to output to the console help
There is no documentation in the help on how to open a file and automatically
run a macro

Change-Id: I94c5e87ae0f573a5546a83b118021744b439c7cd
Reviewed-on: https://gerrit.libreoffice.org/32122
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-17 19:17:58 +00:00
c5ceb0134d lok: Fix state feedback for ToggleMergeCells
Now it broadcasts "disabled" to disable the command and
true/false to tell the status of the command which automatically
means "enabled"

Change-Id: I3314da77fb2b84d97f64b9832d65791b84fcd7df
Reviewed-on: https://gerrit.libreoffice.org/32086
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:07:31 +00:00
704fbec2bf loplugin:nullptr (clang-cl)
Change-Id: I557e752ca05146e2a571d027fc3d1875afd6ef26
2016-12-16 15:21:04 +01:00
f54d5cd7a1 -Werror,-Wnonportable-include-path (clang-cl)
Change-Id: I2a64b18c707085f7d4485ba46d599e8ab0df2408
2016-12-16 15:19:30 +01:00
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
d0a0abee5c -Werror,-Wunused-variable
Change-Id: I32e6bad89b7cdcf0b181c0bb3a158b003fcfb767
2016-12-14 04:37:25 +01:00
0fda52cc4a SafeMode: Restart goes into safe mode again
Looks like the XRestartManager keeps all command line arguments when
restarting, so it also keeps --safe-mode.

Solution is to add a flag file when restarting from safe mode,
to prevent going into safe mode again.

Change-Id: I9820d3ccbddf98b0bf6132f254c989f52ea5e808
Reviewed-on: https://gerrit.libreoffice.org/31913
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-12-13 07:25:31 +00:00
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
7803f6ba19 coverity#1397042 Unchecked return value
Change-Id: Ibb24dea2464c2e0bba289f08bba053efe6fe57fc
2016-12-12 09:47:41 +00:00
cc777d31c1 coverity#1397048 Unchecked return value
Change-Id: Ie33ef6565cadcddb59c1d78a63aec666e8693f87
2016-12-12 09:47:40 +00:00
80049d110a don't overwrite the crashreport info that are written before upload
There was a race condition that the OpenGL code was initialized before
the old report has been uploaded. Therefore the OpenGL setting was
overwritten by the new start and we were not getting the old value.

Now we store any value that wants to be added before the dump.ini is
ready in a temporary map and will write them as soon as we write all the
common information.

This problem was introduced by the dialog requesting permission to
upload the crash report.

Change-Id: I29391a1ff56bac6381218c5a4aefb58c2c03f024
Reviewed-on: https://gerrit.libreoffice.org/31846
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-11 03:31:57 +00:00
7f3410880e loplugin:staticmethods
Change-Id: I385e54f5ddadda894102be2bb9a7dc408415ac68
2016-12-09 13:15:33 +02:00
a66731982e convert SFX_HINT to scoped enum
Notes

(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.

(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice

(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids

(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.

Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 12:35:09 +00:00
828e77009b lokit: support password protected binary MS and OOXML documents
Change-Id: Id7fa1f428d07271e71f3df962bd6718a35372389
Reviewed-on: https://gerrit.libreoffice.org/31730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2016-12-08 10:04:08 +00:00
d10f2e5e6d loplugin:unreffun
Change-Id: I15d868892a3ea4eadd526a0d3371f9fea39910cf
2016-12-08 00:53:52 +02:00
55df4fa5d5 loplugin:staticmethods
Change-Id: I90bb57370853c7606304c721e294999626c2af01
2016-12-08 00:46:56 +02:00
878461f967 Fix typo in comments: et -> ed
Change-Id: I447c46cc3d66c7f482314626826dd708bf1c01c4
2016-12-07 19:38:49 +09:00
2d48f5fc0a convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba
Reviewed-on: https://gerrit.libreoffice.org/31675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 07:10:39 +00:00
0c6c37cb01 cleanup unused includes (related to tdf#88206)
cppuhelper/compbase*.hxx and cppuhelper/implbase*.hxx

compbase*.hxx includes implbase*.hxx replace compbase*.hxx if only
implbase*.hxx stuff is used.

Change-Id: I631a20aee411c6a32ffcf470f6e392621755f995
Reviewed-on: https://gerrit.libreoffice.org/31686
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 18:17:06 +00:00
d78f29ab3f tdf#100836 "Starting the LibreOffice Software With Parameters" help update
rewritten cmdHelp in accordance with the attached document in bug tdf#100836

Change-Id: I6453ee87039272388fe1bc0efd747dc706b570ff
Reviewed-on: https://gerrit.libreoffice.org/31244
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-05 16:18:12 +00:00
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
803215142e convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05 12:49:02 +02:00
96918103a0 Revert "lok: in preinit stage, do not force locale"
Fixes unit-prefork in online for me.

Kendy suggested to also change the forced locale to en-US.UTF-8
instead of just en-US, but that caused:
warn:i18nlangtag:32416:1:i18nlangtag/source/languagetag/languagetag.cxx:1369:
LanguageTagImpl::convertLocaleToLang: with bAllowOnTheFlyID invalid
'en-US.UTF-8'.

This reverts commit c3d25b8b74867b5b8419d09f6e362aa6c8eae34f.

Change-Id: I2cd8c50a783918c380505e7a3aaf37d578e76031
Reviewed-on: https://gerrit.libreoffice.org/31489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-12-05 09:47:25 +02:00
2a5d8d7306 Lok: better logging and warnings
Change-Id: Ia933ae65197893592eeb04cb8a1a617a931ad623
Reviewed-on: https://gerrit.libreoffice.org/31606
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:07:06 +00:00
8b86e9de38 first cut at adding a GDI handles attribute to the windows crash report.
Change-Id: I4e6fee65a1416398f6f59feb8734b3b00c0aed3b
Reviewed-on: https://gerrit.libreoffice.org/31570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-03 10:32:17 +00:00
9c218858f1 Lok: correct tile invalidation merging
Rectangles that are empty (i.e. IsEmpty() returns true)
were incorrectly considered to mean equivalent to "EMPTY".
The latter means full-area, while the former mean zero-area.

This fixes the issue by restrict full-area to rectangles
with 2 billion units on the each side (roughly INT_MAX) or
more, and using this new check rather than IsEmpty().

Change-Id: I12aca17267f5dd33b2932012d1d9db3545f9af6f
Reviewed-on: https://gerrit.libreoffice.org/31458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-02 12:54:06 +00:00
1517caa433 convert some anonymous enums to scoped
Change-Id: Ia989376c983ff475359e4964abeb1f5a2300ff5b
Reviewed-on: https://gerrit.libreoffice.org/31486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-02 06:36:48 +00:00
aa68c99d88 tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.
The existing osl::Condition is an API and reliability disaster area.

Change-Id: I3be84e1c6a83e58c43c40c9c8720790d923a6694
Reviewed-on: https://gerrit.libreoffice.org/31163
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-01 18:44:08 +00:00
b18b1e80e9 sw: use auto when initializing with a cast to avoid duplicating the type name
Change-Id: Ide7bd0f1f444824b78aa53cfe1db0129cbca1a5d
Reviewed-on: https://gerrit.libreoffice.org/31397
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-11-30 10:43:43 +00:00
098fb95772 lok: ensure positive values for width and height
also check the pointer memory block allocated

Change-Id: I0ded04e06f80400e64c5e58126a32ee503aeb394
Reviewed-on: https://gerrit.libreoffice.org/31388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-30 00:09:58 +00:00
e006b9cf2c Window::Invalidate must be called with SolarMutex locked
...it internally calls Scheduler::Start, which asserts now since
c00d8271ba443c4f0acf657c226eea4824597f95 "vcl: assert solar mutex is held for
various timer / scheduler ops."  Caused the assert to fire when removing an
extension via "Tools - Extension Manager... - Remove".

Change-Id: Ied0591b799af333b3a4c11af07f5f8f1657304d6
2016-11-29 14:03:52 +01:00
f7c4031641 Revert "Remove extra "=" symbol for "--splash-pipe" argument"
This reverts commit 87a098e3bb72910399473ee0fbe32a70cad9c737:

'--splash-pipe=N' is a "private" command line argument between oosplash
(desktop/unx/source/start.c) and soffice.bin
(desktop/source/splash/unxsplash.cxx).  No need to silently accept a bogus
'--splash-pipe' (without '=' part) provided by the user.
2016-11-28 10:27:19 +01:00
2db42ab241 sw lok: notify repair when exist a conflict of multiple users undo/redo
Change-Id: I026f4df6239fa87ee191f92127f9fa98ac2993eb
Reviewed-on: https://gerrit.libreoffice.org/31161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 02:26:23 +00:00
e2d5f1ba3f lok: avoid render font with empty rectangle
Change-Id: I58e24e0de37144ae5d67857b243e6a7091f2b77a
Reviewed-on: https://gerrit.libreoffice.org/31281
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 02:00:56 +00:00
af18b7d60f lok: in preinit stage, do not force locale
force locale load some fonts before the lokit process
is jail rooted, so it causes invalid rendering special
characters in doc_renderFont function

Change-Id: I25f00e5bb947753b820c6966a99a6c3849413315
Reviewed-on: https://gerrit.libreoffice.org/31280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-11-28 01:14:04 +00:00
f80140bf3a Lok: compress duplicate state-changed events
STATE_CHANGED callback events that have the form
of name=value are only removed when newer ones
are identical. This is not very helpful since
often the same name (i.e. state type) changes
its value and we need to superseed older ones
with new values.

This patch makes sure that a STATE_CHANGED with
a given name has its latest value and doesn't
change multiple times while in the queue.

Change-Id: Ibfa18359464d7137411e5846b1c6d415a0aad43d
Reviewed-on: https://gerrit.libreoffice.org/31258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-27 16:44:33 +00:00
87a098e3bb Remove extra "=" symbol for "--splash-pipe" argument
This argument ignores any parameters since commit
5c22a03320f20ae9ac2c3c16025e7c5e3a7915d5.
It is a part of documenting cmdline.

Change-Id: I9d7f06f692d77379b3d96b741987f83771bd13c2
Reviewed-on: https://gerrit.libreoffice.org/31243
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-26 19:47:08 +00:00
6bb20609a2 vcl: rename Window::Notify to EventNotify
There is annoying overloading between Window::Notify and
SfxListener::Notify, and the Window one has apparently fewer
implementations, so rename that and remove lots of disambiguating
"using Notify" in multiply inheriting classes.

Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-24 22:56:34 +01:00