Commit graph

8811 commits

Author SHA1 Message Date
Ashod Nakashian
9c21408112 wsd: close iconv after converting
Change-Id: Idc0894362d0839449f7b1e1ae8c52c3ddb1dff45
Reviewed-on: https://gerrit.libreoffice.org/79352
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:25:04 +02:00
Ashod Nakashian
f7bd2c7e1d wsd: fix variable might be clobbered by ‘longjmp’ or ‘vfork’
As the comment details, this avoids having C++ objects
in the same frame as setjmp, which may reset their
contents without the dtor getting called.

Change-Id: I851ae8bffb4356d465a25dfc815a1fecb489fa30
Reviewed-on: https://gerrit.libreoffice.org/79338
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:24:36 +02:00
Ashod Nakashian
3c52aff8cf wsd: test: support test command-line args in any order
No longer is it necessary to run with --verbose
in case we need --debugrun.

Also, by default the log level is now warning instead
of error, which should hopefully be more useful in
troubleshooting issues (or at least to force us
better categorize log messages).

Change-Id: Iad4279ecf3bf77780adcd786d4f46d9c964f302d
Reviewed-on: https://gerrit.libreoffice.org/79351
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:23:49 +02:00
Ashod Nakashian
720c26176a wsd: improved kit thread naming
Now the wsd docbroker thread and its peer kit
thread are trivial to match, since they are called
docbroker_xxx and kitbroker_xxx (where xxx is the
instance ID) respectively.

Also, label spare kit instances as kit_spare_xxx
to differentiate from ones with actual documents,
where xxx is a running counter to differentiate
spare instances from one another.

Now we are able to easily see (and count) the number
of spare kit instances, and match wsd and kit threads
handling a given document.

Unit-test logic updated to reflect the new thread
naming scheme.

Change-Id: I154dc8f200fbe0e65f3f5984e6dad2cef1b52e22
Reviewed-on: https://gerrit.libreoffice.org/79328
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:23:27 +02:00
Henry Castro
08d7ddcb22 loleaflet: add menu item Format→Section
Change-Id: Iad9150b16f56e9460a9286f29813419fc50de90c
Reviewed-on: https://gerrit.libreoffice.org/67477
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-22 20:21:44 +02:00
merttumer
18c97f1fd2 Added "Table of Contents, Index or Biblography" option to insert menu
Change-Id: I6ee18c90ef2c254ca11387e5792412c21faa502b
Signed-off-by: merttumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/67076
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-22 20:21:44 +02:00
Ashod Nakashian
82a34a6cb4 wsd: improved logging of thread renaming
The thread name helps one track threads in logs.
When renaming threads it's important to log the process
and previous thread name (if any), so grepping is more
fruitful and tracking is easier.

Change-Id: I47a948d77629b387cc1e9fd58fdd88e1ae1168df
Reviewed-on: https://gerrit.libreoffice.org/79327
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:21:18 +02:00
Ashod Nakashian
477d6714d9 wsd: SessionId -> ConnectionId
"Session" is too generic and can be misleading.
This is really a connection ID, or a connection-session ID,
so it's more sensible to call it ConnectionId to
signify that it's a connection-specific ID.

Change-Id: I0f12b1cf80d4853a27535101093ef6b7a3e0d438
Reviewed-on: https://gerrit.libreoffice.org/79326
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:20:24 +02:00
Ashod Nakashian
fd5581e7a3 wsd: log before killing slow-loading docs
Change-Id: I85f045d1431feb51cb9ad093833c32a39ac38215
Reviewed-on: https://gerrit.libreoffice.org/79325
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:19:41 +02:00
Ashod Nakashian
68d834ac4f wsd: asan: stack-use-after-scope
Change-Id: Ia14e67f36b22ab45782cf0d1808b71e37b834104
Reviewed-on: https://gerrit.libreoffice.org/79324
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:18:51 +02:00
Michael Meeks
fbed7bf1ae Don't keep erronous dialogID around afterClose.
Avoids focus related exception in the map.

Change-Id: I980b037b1a52b270d1203e0688f2a645c562ff0b
2019-09-21 09:37:03 +02:00
merttumer
77a0e0bca3 Ability to switch slides by arrow up/down keys in edit mode
Change-Id: Ic465636df8a1960364074149a41ea7d0209dbdab
Signed-off-by: merttumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/68585
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
(cherry picked from commit f3ea0a6ffe03425c557297c53768cb927727b4af)
Reviewed-on: https://gerrit.libreoffice.org/79313
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-20 23:53:49 +02:00
Andras Timar
448f050372 Updated pot files
Change-Id: I560f9eff4556941d211d03080237d2cf0599aa6f
2019-09-17 10:52:53 +02:00
Aron Budea
ed132a68b2 loleaflet: change vex message to unsafeMessage for HTML text
Change-Id: I362d3ed50f1018f85d7c97f49cb66b3d1354aee6
Reviewed-on: https://gerrit.libreoffice.org/79030
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2019-09-17 07:22:16 +02:00
Tor Lillqvist
6892259703 tdf#126971: Fix localisation of tunnelled dialogs in the iOS app
This used to work fine, but at some stage it had regressed. I did not
bother bisecting to find the culprit. Anyway, now the JS part needs to
send a lang parameter in the load message, too, for the corrent
language to be used in the tunnelled dialogs. (Likely it affects also
other things in core.)

Change-Id: I339cddb28357978414669964106cb6fa472c967f
Reviewed-on: https://gerrit.libreoffice.org/77599
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79023
2019-09-16 17:36:53 +02:00
Tor Lillqvist
6c332c8182 Revert "Make the image resize and rotate handles larger in a mobile app"
There is now other code that takes care of it.

This reverts commit 3cc714b49b6e29429d45818a281cd77a209dbec2.

Change-Id: I9c777e1592d1c5e0fc931307b24e63743cd4da5b
Reviewed-on: https://gerrit.libreoffice.org/78279
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79014
2019-09-16 16:21:36 +02:00
Ashod Nakashian
d8aeb28aeb leaflet: fix dialogs hide on dragging regression
Change-Id: I23c869b60009cdad0d81abcfa886d81b81aa318c
Reviewed-on: https://gerrit.libreoffice.org/78982
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-16 15:12:30 +02:00
Ashod Nakashian
6dcbc7eac9 loolkitconfig: add colibre_svg
Change-Id: I67588fb2fa7a2e1bdc17cd9ebb1b905da3eb2095
Reviewed-on: https://gerrit.libreoffice.org/78731
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-16 15:12:03 +02:00
Tor Lillqvist
a7362d52ac Use portable format conversion specifier for uint64_t
Avoids a warning when compiling for iOS: format specifies type
'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned
long long').

Change-Id: I8b5205dd0c3a8ae2f531f1647b3e3bac27ea6065
Reviewed-on: https://gerrit.libreoffice.org/78985
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-09-16 13:52:14 +02:00
Tor Lillqvist
f89264047c Fix build failure in the MOBILEAPP case
We never exit an app process intentionally, so Log::isShutdownCalled()
can always return false.

Change-Id: I6b3cce85ccac5e3ffbb7b29ca552cb9e4441df2a
Reviewed-on: https://gerrit.libreoffice.org/78979
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-09-16 13:32:57 +02:00
Miklos Vajna
71a942c24b Log: rename isShutdown to isShutdownCalled
Class members that differ only in case are not great.

Change-Id: I2e54bf9b6da7e4e15e03389000a6ff86e98c16a6
2019-09-16 11:52:15 +02:00
Miklos Vajna
7f98a61367 UnitTiffLoad: remove not needed config.h include
And also others, pointed out by IWYU.

Finally, it's not needed to force-enable HTTPS after all, it seems.

Change-Id: I4d9984d2485b1519bd5a9cc44834735e09a87058
2019-09-16 09:06:38 +02:00
Andras Timar
8d2dead15b Update documentation of Poco packages + ./autogen.sh
Change-Id: If3177e5defacf2b95390dad452992f814fc88dfa
Reviewed-on: https://gerrit.libreoffice.org/78862
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-13 11:02:04 +02:00
Andras Timar
e268299aa2 Since LibreOfficeOnline.conf has --disable-gui, we don't need these packages
Change-Id: Ic57af67bf50774c3cafdb26737ee4eeac2f54da0
Reviewed-on: https://gerrit.libreoffice.org/78852
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-13 11:01:45 +02:00
Miklos Vajna
08f5d74f63 Convert TIFF load testcase to a new-style one
This was originally added in commit
c2c7982e5e (Add TIFF load testcase,
2019-07-04), and still fails without the core.git fix.

Change-Id: I798b82ea8212dfeafc162e4b73f6fff707ac3de2
2019-09-12 23:10:04 +02:00
Miklos Vajna
24615d9dd0 test: avoid writing to cerr directly in TileCacheTests
So that we always know which line comes from which test, to make the
output more readable.

Change-Id: Icabfb45b719daf733fb4cff99f364a574cbdb65d
2019-09-12 23:09:54 +02:00
Andras Timar
99f76c7b2b add init script for RHEL6/CentOS6 2019-09-12 18:33:22 +02:00
Miklos Vajna
e310e76cfc test: fix memory leak
==18134==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x514db8 in operator new(unsigned long) /git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_new_delete.cc:105
    #1 0x9f836c in runClientTests(bool, bool) /git/libreoffice/online-san/test/test.cpp:113:28
    #2 0x9f7975 in main /git/libreoffice/online-san/test/test.cpp:77:12

Change-Id: Ib93625e2a77e37733b9bb052dd73ec3333bc2a71
2019-09-12 11:43:49 +02:00
Miklos Vajna
f8140acac7 Avoid static member access through instance
Change-Id: Ifbfdfbb0d5b6020908d041904b61a2ed3b8255c1
2019-09-11 12:23:59 +02:00
Miklos Vajna
a7d836dd7c Fix UB in unit-wopi
net/Socket.hpp:405:9: runtime error: member call on address 0x6070007a2210 which does not point to an object of type 'Poco::Logger'
0x6070007a2210: note: object has invalid vptr
 05 00 80 0e  7c 01 80 6f 3c 7f 00 00  c8 b8 0f 01 3c 7f 00 00  00 00 00 00 be be be be  38 22 7a 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior net/Socket.hpp:405:9 in

Which is use-after-free: once Poco::Logger::shutdown() is called, we
need to tolerate LOG_DBG() and other similar calls, even if they don't
go anywhere.

Change-Id: Ic76433743177dd2b604ff34e340309c506d83350
2019-09-09 15:41:09 +02:00
Tomaž Vajngerl
0189fb10fb fix HTTPWSTest::testInactiveClient test failure
Change-Id: I0974e289ecb48354fbc038dafe92b74da38fb25c
2019-09-07 19:15:09 +02:00
Tomaž Vajngerl
3ae259238f loleaflet: add column/row selection markers for the table
Change-Id: Iad1037338057e798c3a83695fedb4e6f9ea968f4
Reviewed-on: https://gerrit.libreoffice.org/78689
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-09-06 16:44:31 +02:00
DarkByt31
8aea22a32b tdf#107038 Poco::Timestamp replacement with std::chrono
Replaced Poco::DateTimeFormatter with Util::getHttpTimeNow

Change-Id: I1a8591a434140270929406386218d08c71a888cc
Reviewed-on: https://gerrit.libreoffice.org/78700
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-06 13:25:41 +02:00
kaishu-sahu
0f9492268e android: add support for screen dimming from JS.
Change-Id: Icd766c7dcc9c2d62ec90945ec88fa46f88a4711d
Reviewed-on: https://gerrit.libreoffice.org/76489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-06 11:23:29 +02:00
Andras Timar
becb72a6a9 tdf#121983 is fixed, remove the hack here
Change-Id: I93bfc410d21b6283c4566586b4240f1c3556ee0e
Reviewed-on: https://gerrit.libreoffice.org/78647
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:21 +02:00
Andras Timar
d5cf8afd57 docker: install selective set of poco libraries, only what we need
Change-Id: I2776b6817696fbc8d5f24a35165e26bf5ff8c4af
Reviewed-on: https://gerrit.libreoffice.org/78646
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:03 +02:00
Michael Meeks
79637655f6 Avoid PRIx64 format - we are 64bit only, so lx will do.
Fixes RHEL6 compilation problems around inttypes inclusion / definition.

Change-Id: I4f4647c7954c32d90dad94a43c630af24d551d78
2019-09-05 22:53:09 +01:00
Andras Timar
69140fcdbb CPPUNIT_ASSERT_GREATEREQUAL is not available in cppunit of older distros
Change-Id: I37001791e05df9a55c25b48fff3bbe5d6bd050e2
2019-09-05 23:02:18 +02:00
Michael Meeks
6338bf2032 test: add --gdb option to run_unit.sh
Change-Id: Iff253d95a1a611536fe5c1244c33471e77c77c81
2019-09-05 14:10:20 +01:00
Michael Meeks
81aa1a0782 test: print out the correct way to run all-local test.
Change-Id: I2a9a90beff7b2dc689dc2de7df86404018b514fb
2019-09-05 14:10:20 +01:00
Michael Meeks
6d1cc6c01d Avoid using std::get_time to compile on older Linux.
Change-Id: I862e5f342ea485a9b65b413ab0c1bdea4f5fbb8d
2019-09-05 14:10:20 +01:00
Aron Budea
77da6afae1 leaflet: support show/hide of Format menu
Change-Id: Id40c0788c226aabadb52417a921da4a1371095f1
Reviewed-on: https://gerrit.libreoffice.org/78014
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 13:37:54 +02:00
DarkByt31
d24071e91b WhiteBoxTests: testTime corrections
Change-Id: Ia73a69396ba12921370fa12b57c249593c36e3d8
2019-09-04 22:09:50 +01:00
Tor Lillqvist
80ddb46392 Fix portability problems after 22f1656e08
It is std::chrono::system_clock that has to_time_t.
std::chrono::steady_clock does not have to_time_t.

std::chrono::high_resolution_clock is either the same as system_clock
(in libstdc++, on Linux) or steady_clock (libc++, on iOS).

(This change does not fix the actual bugs in the code, just makes it
compile for iOS. The new ISO8601 fractional time code is not unit
tested at the moment. The testTime() function is not part of the test
suite in WhiteBoxTests.cpp. If it is made part of it, it reveals
problems in the code (and/or in the unit test code).)

Change-Id: Id33342bc8b26465632f3d21d6ec2f3c975ae3681
Reviewed-on: https://gerrit.libreoffice.org/78550
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-03 13:50:27 +02:00
Ashod Nakashian
8deb0fbcbd leaflet: minor cleanup of sidebar
Change-Id: I0c3e9e0a35a093f529346ea3b3afbd44ed875570
2019-09-03 01:53:12 -04:00
Ashod Nakashian
2dbb7e23d9 leaflet: support creating size_changed on sidebars too
Change-Id: Iee13732838ac2c5b80256c1d2c2e8ece720244dc
2019-09-03 01:53:12 -04:00
Ashod Nakashian
53bd11c8e7 leaflet: Sidebar is not a popup window
Change-Id: Ib786a4038bfb55ee71e7e66a0e195fd43c9603af
2019-09-03 01:53:12 -04:00
Ashod Nakashian
97a7b1f170 wsd: sanitize url when error reporting
(cherry picked from commit 2b35ae713943abd5f51de383fb2d26ab96f73988)

Change-Id: I7937429f2f987212beaeb9a97b48bfedb0a7ac58
2019-09-03 01:53:12 -04:00
Ashod Nakashian
5772bbd8c9 leaflet: save only when not read-only
Change-Id: I0cff68d2a2e8354b8c5a6888faa9fa823295c98e
2019-09-03 01:53:12 -04:00
Ashod Nakashian
ee0f9c8d53 leaflet: add id to Format menu
Change-Id: I16569eadefde1d4bd9d841688cbb5a2a43c25f44
(cherry picked from commit 78ad91b92348dd56388c3cb7512cb67edc0688cb)
2019-09-03 01:53:12 -04:00