Commit graph

8298 commits

Author SHA1 Message Date
Henry Castro
898c47fbb4 wsd: fix the exception "Bad URI syntax"
if the file name has '%' character it throws
exception "Bad URI syntax", so use the encoded
file name string

Change-Id: I6a8d841761b46ac49a6c79956ba215e1affa53e5
Reviewed-on: https://gerrit.libreoffice.org/72385
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit b934c70f4f1f9f3ee4f873570633a3b1ec931652)
Reviewed-on: https://gerrit.libreoffice.org/72890
2019-05-24 08:57:36 +02:00
Michael Meeks
bf88897c47 Make renamefile more careful.
Change-Id: If39353fc01ea48d8e0077b228a6281839dde5c87
2019-05-23 17:55:38 +01:00
Miklos Vajna
d79666092d wsd: avoid UB in FileServerRequestHandler::readDirToHash()
wsd/FileServer.cpp:464:35: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/dirent.h:162:45: note: nonnull attribute specified here
    #0 0xbf566b in FileServerRequestHandler::readDirToHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/vmiklos/lode/dev/online/wsd/FileServer.cpp:464:27
    #1 0xbf8417 in FileServerRequestHandler::initialize() /home/vmiklos/lode/dev/online/wsd/FileServer.cpp:531:13
    #2 0x98617a in LOOLWSD::initialize(Poco::Util::Application&) /home/vmiklos/lode/dev/online/wsd/LOOLWSD.cpp:1155:5
    #3 0x7f17fc9c8263 in Poco::Util::Application::run() (/usr/lib64/libPocoUtil.so.60+0x3e263)
    #4 0x9c29f3 in main /home/vmiklos/lode/dev/online/wsd/LOOLWSD.cpp:3466:1
    #5 0x7f17fa739f49 in __libc_start_main (/lib64/libc.so.6+0x20f49)
    #6 0x5c1e19 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wsd/FileServer.cpp:464:35 in

Change-Id: Iadb90c4e98981283718be3e3e9f55cb0b7a3e917
2019-05-23 16:42:59 +02:00
Miklos Vajna
1e84ea37c7 Allow 'make run' after 'make build-nocheck'
This is useful for the sanitizers build, which can build the code, but
not yet the tests.

Change-Id: I02a0493dd18cf68f68572cd08af22d0f7805d97a
2019-05-23 16:30:44 +02:00
Samuel Mehrbrodt
2f861612e9 Some menubar folding/unfolding cleanups
Change-Id: I4e5abe59076a5dbd41b1c8d002c0f3c4e53569de
Reviewed-on: https://gerrit.libreoffice.org/72858
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 16:23:18 +02:00
Szymon Kłos
17dc46dcd1 Constraints for dialogs moving
Change-Id: If489126659684cd99f2a153135cb2c05b9312c02
Reviewed-on: https://gerrit.libreoffice.org/72855
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-05-23 15:08:14 +02:00
Szymon Kłos
5dc20e98d7 Allow to use pan gesture on desktop
Change-Id: Ifbc6102407add31f63b1be0173c5c8eeb3e8e2db
Reviewed-on: https://gerrit.libreoffice.org/72854
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-05-23 15:08:06 +02:00
Samuel Mehrbrodt
3c888d71d8 Move zoom selection dropdown to statusbar
No point having this in the toolbar when all zoom related functions are in the statusbar

Change-Id: Ia1ea8f724956eb2c521c60fb2360eb243190a76c
Reviewed-on: https://gerrit.libreoffice.org/72460
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 14:59:55 +02:00
Samuel Mehrbrodt
6167dc9c44 Disambiguate Highlight color vs background color
Highlighting is character level while background color is paragraph/cell level.
Use different uno commands/icons/texts for the two.

Change-Id: I79264fcdcd968734b68278f69450a377d6607323
Reviewed-on: https://gerrit.libreoffice.org/72786
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 14:33:52 +02:00
Samuel Mehrbrodt
e3bc157c0d Limit font name box to 150px
Otherwise this will get as big as the longest font name.
Seems this was intendend to be like this, but was broken at some point.

Change-Id: I2db29834f7fd9c53efa5ba9da4e6f7f292a2eb08
Reviewed-on: https://gerrit.libreoffice.org/72816
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 14:31:32 +02:00
Michael Meeks
24b9d6008d Don't allow readonly views to removesession on editors.
Change-Id: I5c00b83d5a3a5fc59f7c722b9ed7f9753b2b0dc8
2019-05-23 12:13:11 +01:00
Samuel Mehrbrodt
6e87ebc91e 1GB should be enough for development
Change-Id: I7567f99c4cf54a25084e25b44887b7906bbc7b06
Reviewed-on: https://gerrit.libreoffice.org/72827
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 12:38:31 +02:00
Tor Lillqvist
977ca9a353 Drop unused variable
Change-Id: I927440f3c05956f3f244f6bc657a76a58e839231
2019-05-23 13:26:05 +03:00
Aron Budea
577d4a50a2 Display correct shortcut for paste
And use unsafeMessage dialog parameter to interpret HTML
tags.

After aa1d9ce196

Change-Id: Iba5a5dc2421c2eaf5ff217d825eac70da2fb1e0c
Reviewed-on: https://gerrit.libreoffice.org/72813
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-23 11:59:02 +02:00
Samuel Mehrbrodt
62850138fe Toolbar: Add IDs to breaks
Some of the breaks already had IDs, but not all.
This is useful to specify the button position via Insert_Button.

Change-Id: I97b0d3d0481f7f2edcdb2c0bbc617cd9ede32871
Reviewed-on: https://gerrit.libreoffice.org/72785
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 09:24:36 +02:00
Samuel Mehrbrodt
cc6c3607b5 Add postmessage method to remove toolbar buttons
Change-Id: I6ff2ee3008cf1915c18c2d971ffe1f9de1d926ae
Reviewed-on: https://gerrit.libreoffice.org/72727
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-23 09:24:23 +02:00
Samuel Mehrbrodt
584352dae4 PostMessage: Catch parsing errors
Change-Id: I844086c8641da5228e7dc817451456f0958be2a6
Reviewed-on: https://gerrit.libreoffice.org/72759
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:56:08 +02:00
Samuel Mehrbrodt
704a6e4cd7 Action_HideBusy: Move description to correct column
Change-Id: I12549e59553db5762227297a1ddc9762adb62232
Reviewed-on: https://gerrit.libreoffice.org/72760
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:55:48 +02:00
Samuel Mehrbrodt
45aaec3207 No more jake
Change-Id: I21187241142031cd324e63aebf03ce8ca949411d
Reviewed-on: https://gerrit.libreoffice.org/72757
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:55:21 +02:00
Samuel Mehrbrodt
ae6471d845 More specific instructions for setcap nopasswd exception
Change-Id: I1f151650331987c598f5a9d98d0f3a11542c12bd
Reviewed-on: https://gerrit.libreoffice.org/72756
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:55:04 +02:00
Samuel Mehrbrodt
575eb43871 Insert_Button: Add parameter to specify a uno command
Change-Id: Ibdb1ad1b25df38c12ab71386a5ab8fb92d3076d0
Reviewed-on: https://gerrit.libreoffice.org/72758
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:54:44 +02:00
Miklos Vajna
66fff0e8a9 test: avoid variable-sized object initialization
UnitHTTP.cpp:94:21: error: variable-sized object may not be initialized
        char buffer[str.size() + 64] = { 0, };
                    ^~~~~~~~~~~~~~~

Change-Id: I2e6c8b4ca123ac5bf6391aa460069d24066f728d
2019-05-22 15:23:59 +02:00
Miklos Vajna
c452b8d411 LocalServerSocket: can move sockFactory instead of copy
Change-Id: Ib503fa5987ad2153dee73f9bb1ee03a31278ea63
2019-05-22 14:09:02 +02:00
Michael Meeks
05ca302c2b tests for chunked transfer encoding parser.
Change-Id: Ic55669ab7cc55bb44e8f7a00f30231b44f10535a
2019-05-22 11:07:42 +01:00
Michael Meeks
9d723cb230 Initial chunked transfer encoding.
Important for convert-to on larger documents and/or with newer curls.

Change-Id: Id18be6d22741a3af7cee39a069c509e4f662977b
2019-05-22 11:07:42 +01:00
Samuel Mehrbrodt
cbbe43fcff Revert "Change package name to "libreoffice-online" instead of "loolwsd""
As discussed on IRC: This leads to incompatible changes (config directory changed) and instead we will use loolwsd on master branch too from now on.

This reverts commit 1dbbc5acc7.

Change-Id: Ifa38144f830578c12cda7454354b60d09426e704
Reviewed-on: https://gerrit.libreoffice.org/72734
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 12:07:07 +02:00
Jan Holesovsky
3a03f50784 Revert "Adapt paths to new package name"
It is not a good idea to change the configuration directory, it will affect all the existing installations.

And the service is called loolwsd - so the configuration should be called that way too.

This reverts commit 9278574289.

Change-Id: I7e6eee644e21ad2dd842742585d16133ff8e36c9
Reviewed-on: https://gerrit.libreoffice.org/72730
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 12:06:06 +02:00
Samuel Mehrbrodt
9278574289 Adapt paths to new package name
After 1dbbc5acc7

Change-Id: I64a12fb13bc8f9371821b2d5969941bfddc2514a
Reviewed-on: https://gerrit.libreoffice.org/72728
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 10:27:33 +02:00
Jan Holesovsky
720fffedf2 mobile: Avoid uncaught exceptions when some toolbars don't exist at all.
Change-Id: Ie29c2cdf83bce5d65bf64cd982917186f7adbc8e
2019-05-22 10:16:12 +02:00
Florin Ciornei
4bf4ba0212 android: Implement returning using the back button
Pressing back button now returns you to the document browser.

Change-Id: I93f281bd6251522422a578e2e23bd68e75c9af7d
2019-05-22 10:16:11 +02:00
Michael Meeks
83d687825d Avoid exceptions in some shutdown corner cases.
Change-Id: I1c301dc96d925fd5d74c00bf4b9417782822a997
2019-05-22 02:56:11 +01:00
Michael Meeks
4f804a48fe Initial HTTP Expect: 100-continue implementation.
Change-Id: Ic9aa59cac5103151d91f6eb59d12313e545c7916
2019-05-22 02:56:11 +01:00
Michael Meeks
1845ed42af tdf#123482 - cleanup convert-to folder even more reliably.
Problems could occur if exceptiosn thrown when parsing the input stream.

Change-Id: Id82b3816450194164fc2093554c730b4a94acef1
Reviewed-on: https://gerrit.libreoffice.org/72695
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-22 01:57:48 +02:00
Samuel Mehrbrodt
1dbbc5acc7 Change package name to "libreoffice-online" instead of "loolwsd"
The name on master is "loolwsd" while the official relase branches
(libreoffice-6-2 e.g.) have "libreoffice-online".

This leads to various issues, e.g. some scripts expect the config files
to be in /etc/loolwsd while changing the name also changes that folder name
to /etc/libreoffice-online.
So at least docker builds from the release branches don't work.

The package name should be consistent, either we use "libreoffice-online"
on master also, or we change the release branches to also use "loolwsd".

My preference is to have "libreoffice-online" as the name. "loolwsd" is an
internal term and hard to associate with LibreOffice online for "outsiders".

Change-Id: I1b1efda2fa6083f1a0d211fd73f1fa062f3286cc
Reviewed-on: https://gerrit.libreoffice.org/72590
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-21 17:29:15 +02:00
Tor Lillqvist
936f3a1435 tdf#125410: Handle pasting of text/plain strings into the iOS app
Also, initialise this._keyHandled as true in L.Control.MobileInput, as
that is the value it has between key event sequences, so presumably it
should be so before the first key is hit, too.

Change-Id: Ie67e9fcdd14871e76f9d9487c14f03ae54476e60
2019-05-21 16:05:57 +03:00
Florin Ciornei
0297c42549 android: Send a BYE signal when stopping.
This triggers the save-on-exit operation.

Change-Id: Ibf76ca5a5e87906e6abbc9d8ae17871ec4d5d11a
2019-05-21 11:55:48 +02:00
Jan Holesovsky
11000f11f0 android: Logging must be initialized only once, otherwise it crashes.
Change-Id: I78d5f03951bef5603f0e84d992e656c222a1416e
2019-05-21 11:31:28 +02:00
Jan Holesovsky
aa33301997 android: Update to a newer gradle.
Change-Id: I5eec51a8531ab763634aa78ef80b2fc1964444ac
2019-05-21 11:30:56 +02:00
Miklos Vajna
73108db913 wsd: fix -Werror,-Winconsistent-missing-override
Change-Id: Ide9921e410a8e1401a25b85fda04de1b5a45617a
2019-05-21 09:13:13 +02:00
Miklos Vajna
6fb9fcceca Disable HTTPCrashTest::testBarren() for now
Till it's clear how to fix it, so 'make check' keeps passing, without a
second consistently failing test appearing.

Change-Id: I80a1ebd2b1264819c3e98f816b4c13984b961fbb
2019-05-21 09:10:40 +02:00
Tor Lillqvist
b5154eaf69 Make the document-specific threads in the iOS app go away more reliably
After a document is closed, the prisoner_poll, accept_poll,
websrv_poll, docbroker_nnn, and lokit_main threads that served that
document are supposed to go away as quickly and reliably as possible.
This change improves that significantly.

Change-Id: If658bea74f70a77d2d537f0ec6455a6b36f2667e
2019-05-21 02:40:28 +03:00
Michael Meeks
4e7f8b6e00 Remove vestige of legacy sockets.
Change-Id: I5c2175e95144b7e93eafce2a273ed5f3549850bb
2019-05-20 21:32:59 +01:00
Andras Timar
157e4bd680 loleaflet: updated pot files
Change-Id: I746741e060c9e995c58fd67a9542577231cf31ae
2019-05-20 22:02:07 +02:00
Jan Holesovsky
aa1d9ce196 The Internal Copy / Internal Cut / Internal Paste is just confusing.
Every user so far is confused of the existence of two clipboards - the
system one, and the Online internal one.

We are able to detect that the copy / paste is happening inside the
document and perform the "internal copy / paste" accordingly, so let's
do what the other online office suites do, and just warn when the user
tries to access copy / paste from the menu.

Change-Id: I904fc120fcf65b8ad4ba8fb5178803f976d707f4
Reviewed-on: https://gerrit.libreoffice.org/72614
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-05-20 21:50:30 +02:00
Tor Lillqvist
058b68fc3e tdf#122281: Prevent the WebView from scrolling
It is presumably possible to do it in the JavaScript, too, and then
the same problem would go away for normal Online viewed in Mobile
Safari, too. But I couldn't figure out how. Googling turned up various
advice that suggested using '-webkit-overflow-scrolling: auto;' for
the body of the page but it didn't seem to help. (I tried adding that
to the style attribute of the body element in loleaflet.html.m4.)

Change-Id: Iac3487a73eca218130583dde9decdb89c316c1fc
2019-05-20 16:25:52 +03:00
Tor Lillqvist
a31c7c851c Add some more core source files from sfx2/source/view
Change-Id: I3e7183ecea24ee0282cbd6fa6ad7d457fa5a781c
2019-05-20 16:25:52 +03:00
Michael Meeks
046ab32e46 Use compile-time rather than run-time string concatenation.
Saves some time & space.

Change-Id: If1e62056447fb7e8f26e8cf107451876adf3fecb
2019-05-20 12:30:01 +01:00
Tor Lillqvist
8c15d4f938 tdf#124906: Hack for dead keys in iOS app and iOS Safari against Online
Handle key events fairly separately for the iOS app and Mobile Safari
than for other mobile platforms. Use the key property of the keypress
event and avoid looking at the keyCode property of keyboard events.

There is still one problem left: After typing the dead key, it is not
displayed temporarily "waiting" for the following letter, as it
should. But that didn't work before either in the iOS app, as far as I
see.

Change-Id: I9df174ba294f855697df59dd016b39cd1b3d905b
2019-05-20 13:20:06 +03:00
DarkByt31
8e34705fe2 tdf#107038 Poco::DateTimeFormatter with Util::getHttpTimeNow()
Added a function to Util to get current time in HTTP
format using std::chrono.

Change-Id: I9e7a732f585c1758c9348c450a01713a66f1e7b7
Reviewed-on: https://gerrit.libreoffice.org/72585
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-20 11:53:13 +02:00
Marco Cecchetti
502dc97cb2 lok: update graphic selection callback description
Change-Id: Iebc3d17ac8e81ea99dda64cd97807656f5941637
Reviewed-on: https://gerrit.libreoffice.org/70574
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2019-05-20 10:40:05 +02:00