summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)AuthorFilesLines
2019-08-24sc: LOK: commit cell edits before saveasAshod Nakashian1-4/+52
Users typically don't recognize that changes done to a cell need to be committed (typically by hitting RETURN) before they are saved to file. This is especially true on the web. This patch commits any in-flight changes before SaveAs. This is currently done only for LOK and unconditionally at that. This can be controlled via a flag, if there is such a use-case. Change-Id: I2a88b2f1df47be764058f4505561b22830d9d67a Reviewed-on: https://gerrit.libreoffice.org/78012 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-15tdf#122529 lok - table border position manipulationTomaž Vajngerl1-2/+14
This adds a new LOK callback (LOK_CALLBACK_TABLE_SELECTED) that sends the border positions to the client when the user has the cursor or slelection in a table. In addition this adds a .uno:TableChangeCurrentBorderPosition uno command, which implements changing a specific border in the current table. Border can be either a column or a row border, which is either at the first, middle or last position. Reviewed-on: https://gerrit.libreoffice.org/77365 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 43cce4ef2cf865b2bb637e17b70102a4260295b0) Change-Id: Ife7cff14d91ffc84c95c040f0b42319e3d6194b4 Reviewed-on: https://gerrit.libreoffice.org/77484 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-08tdf#125655 disbale quick edit mode for iOS and AndroidTomaž Vajngerl1-0/+11
When clicking (tapping) on text in text based objects (shape with text or a text frame), it automatically enters editing mode, which is not a desired behaviour in a touch based environment. This behaviour comes from a quick edit mode, which is enabled by default on the desktop. For Andorid and iOS this is now disabled when LOK is initialized. For online this change might also make sense (if the user would use a mobile device), however this is not implemented now as this would require more than just changing the global configuration, as it needs to behave differently depending on the view/user. Change-Id: Ib4a71cba0aeb4238a5d5b708801a07b39fb5f316 Reviewed-on: https://gerrit.libreoffice.org/74986 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7d32994ad9dc45c7846664ec5ccb03bb796bb071) Reviewed-on: https://gerrit.libreoffice.org/74987 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-07-04vcl lok: pre-load graphic librariesMiklos Vajna1-0/+3
This is needed to be able to load e.g. TIFF files in Online, which does not have code in the chroot since online.git commit ad21717498cc214d5d5d5c0ff378238552137e2f (Avoid copying most code into the chroot jail., 2018-03-10). Conflicts: vcl/source/filter/graphicfilter.cxx Change-Id: Ib095191ee690d9da6269878a82b1c6995df50dfa Reviewed-on: https://gerrit.libreoffice.org/75078 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-06-17android: Unregistering in runLoop() is important even on Android.Jan Holesovsky1-2/+2
Otherwise we get crashes in online Kit when attempting to shutdown reasonably cleanly and the poll kicks in. Change-Id: I9a1744b42fec9f8ffddc6094773bda943caedf2a Reviewed-on: https://gerrit.libreoffice.org/74056 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-06-07lok: re-factor getTextSelection.Michael Meeks1-7/+89
Change-Id: I2c27c213ee980e19d6020e9599b2b72115e7f28e
2019-06-05android: Make the tiled rendering from the loolwsd actually work.Jan Holesovsky1-3/+15
Not to break the 'old' Android app, introduce a bool that can indicate if we are using the LOK from the 'old' (LOK-via-JNI-based) or from the 'new' (loolwsd-based) app. Change-Id: I38bd665cc1d5bc88018574171443ecabc46763df Reviewed-on: https://gerrit.libreoffice.org/70678 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-06-05android: Set the program path sensibly when we've got nullptr.Jan Holesovsky1-0/+9
Change-Id: I4415459ca5d758d06d866faeca85e1cf154d0567 Reviewed-on: https://gerrit.libreoffice.org/67877 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-06-05android: Generate liblo-native-code.so so that it can be linked against.Jan Holesovsky1-2/+2
And used for LibreOfficeKit directly, without a JNI wrapper. Change-Id: If4231f53b579417b6c9c90b39541193bf2e8f27c Reviewed-on: https://gerrit.libreoffice.org/67874 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-06-05The 2nd parameter to lo_initialize() is a URL so use such naming consistentlyTor Lillqvist1-4/+4
Change-Id: Id4e7f8556d6910ab43b0f7b8ba09e7be8b1ec1d1
2019-06-03LOK: Factor out iOS painting codeTomaž Vajngerl1-27/+44
Change-Id: Ica706842003fe60ba864e013614eb535580446bb Reviewed-on: https://gerrit.libreoffice.org/73365 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-06-03tdf#123697 we need to create a bitmap context with alphaTomaž Vajngerl1-1/+1
Change-Id: Ib934314e56163983e70a0b04eb667e6b8527c783 Reviewed-on: https://gerrit.libreoffice.org/73364 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-05-23sw: add IgnoreComments parameter to .uno:PasteMiklos Vajna2-0/+19
Which allows not hardcoding true for LOK. Conflicts: sw/source/uibase/dochdl/swdtflvr.cxx sw/source/uibase/inc/swdtflvr.hxx Change-Id: I644763ba052b148fc34283e361aa02f9bba2c5ee Reviewed-on: https://gerrit.libreoffice.org/72833 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-21tdf#125397: Fixes for threads and SolarMutex on iOSTor Lillqvist1-1/+13
We need to call SfxApplication::GetOrCreate() in lo_initialize() now. Otherwise we will crash in sfx2. No idea why it worked earlier. I think we want to avoid the "VCLXToolkit VCL main thread" ever running in the iOS app. I don't think we had it running earlier, but now for some reason it got started when creating a document from a template, and that seemed to cause a hang. Also, when creating a document from a template, lo_initialize() is called from the app's real main thread (the one that the process starts in). In that case we do want to release the SolarMutex after InitVCL() if this was the first time we called InitVCL(). Awful crack. Not really sure I fully understand all that is going on, but this change does seem to fix recent problems... All this thread and SolarMutex stuff is so incredibly fragile. Change-Id: Ib04498ad199b64f27701f89d2df7003bca316406
2019-05-14We apparently need to drop the Solar Mutex when exiting lo_runLoop() on iOSTor Lillqvist1-4/+11
It seems to be held after soffice_main() returns for the first document opened, but not subsequent ones, for some reason. So acquire it an extra time to be able to use Application::ReleaseSolarMutex()... Without this, when opening a subsequent document, the loleaflet loading progress bar just hangs. Change-Id: I4e4e7b814f0dba836b790b6f68470aab54f8bbb9
2019-05-14LOK: Do not offset window coordinates in LOKAshod Nakashian1-1/+1
This fixes the issue with selecting the incorrect color when clicking on the color presets in the color picker window in LOK. Because the window coordinates are shifted in Core, and LOK client sends in absolute coordinates, the shift causes a different color to be selected. Change-Id: Ib818b83c0f0c727944068cb244f8d10666e5bc1d
2019-05-14LOK: Reduce and improve logging of event compressionAshod Nakashian1-27/+32
Change-Id: I84e0e8806eb6f4fbda063ebc29fafa791d472bb8
2019-05-14LOK: Minor window event processing cleanupAshod Nakashian1-9/+9
This reduces the number of json reads we do when compressing window events, which happens quite often. Change-Id: I1c85f28867b52cad85445fff8a031b990dad8b56
2019-05-14LOK: Refactor large event queueing casesAshod Nakashian2-269/+308
This makes it more readable and reduces indentations. No functional change intended. Change-Id: I129ecff9083c459d633c0965eab6e06ba3dcf499
2019-05-14LOK: Remove window invalidations prior to size_changedAshod Nakashian1-0/+18
A window size change is a full invalidation anyway, so remove any prior invalidations as they are redundant. Change-Id: I439a1bc38989df17b671e064beb26eb88c402be3
2019-05-14LOK: Window creation supersedes any events on same windowAshod Nakashian1-0/+13
This happens when we get multiple created events on same window, interspersed with invalidations. Change-Id: I2dbaa0f84306d770f1de047a23996209c28304fe
2019-05-14LOK: Reduce logging while processing eventsAshod Nakashian2-7/+16
Change-Id: I8ca457387715fcd085bcbf3107839d2629580f7b
2019-05-13Fix comment to match realityTor Lillqvist1-1/+1
lo_runLoop() *is* used in the "Unipoll" case (i.e. current Online and mobile apps). Change-Id: I01ef3d8bc8140531f697952ef142150fc905a8d4
2019-05-13tdf#124923: Need to call InitVCL() on iOS before using SolarMutexGuardTor Lillqvist1-0/+4
Change-Id: If5781ae101e58c26368e57787cb301f84ffa82a5
2019-05-10CppunitTest_desktop_lib: close the document while LOK is still activeMiklos Vajna2-90/+18
Otherwise the LOK notifiers won't be released (since LOK is not active), and we leak vcl::Windows in GetLOKWindowsMap()::s_pLOKWindowsMap. In dbgutil builds, this leads to an assertion failure if the sidebar is active. (cherry picked from commit da17ccaec39f50de68c3fdd431bc66a2bec04127) On cp-6.0, this is a regression from the cp-6.0-only commit 49fe72fe93d6b292da275fd0508a01b49a86fa3b (sfx2: LOK: route the parent sidebar window instead of the deck, 2018-10-10). Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx Change-Id: Idedb9578478ff4a9f2e17c0cfd203da6f007bdbd Reviewed-on: https://gerrit.libreoffice.org/72098 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-10unipoll: let InitVCL tolerate double init.Michael Meeks1-18/+9
We need to get VCL initialized early in UniPoll mode, since the main setup doesn't occur until runPoll is invoked, and we want to call lots of virtual methods that take the SolarMutex before then - which requires VCL to be initialized. Change-Id: Id9c1b74c126cf7bb71d6560b7585d37327a9f5ef Reviewed-on: https://gerrit.libreoffice.org/72069 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-06LOK: remove duplicate cursor invalidations for same view onlyAshod Nakashian1-13/+4
This limits duplicate cursor invalidation removal to same view only, which seems to have been left in error. We should now remove any old cursor invalidations (for the same view) and only keep the latest (current) one. Change-Id: Ie2323d0c5fcf3977576a1bdc098c95351a5753e0 Reviewed-on: https://gerrit.libreoffice.org/71846 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-06LOK: trace queue only when it is changedAshod Nakashian1-16/+16
Change-Id: I9b8e060c2c7655565b95004d82bf50ada2ed0d08 Reviewed-on: https://gerrit.libreoffice.org/71845 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-06unipoll: emit user input-events & uno commands directly when in unipoll mode.Michael Meeks1-4/+7
Rather than emitting asynchronously at idle. Change-Id: I6c72e9fad0b5587941e3a4a4d17d331a0d889942 Reviewed-on: https://gerrit.libreoffice.org/71770 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-03unipoll: cleanup runPoll.Michael Meeks1-2/+5
Setting a custom thread name is a terrible idea for online unit tests. Change-Id: I1f5843255ab59072f806587ffcf655958380fe8e Reviewed-on: https://gerrit.libreoffice.org/71761 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-03unipoll: get SolarMutex lock counting right.Michael Meeks1-0/+1
lo_startmain drops the SolarMutex without taking it, interestingly. Change-Id: I2280e2fa6acb8739f970983032db72a8241d1c4f Reviewed-on: https://gerrit.libreoffice.org/71742 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-05-02tdf#120703 PVS: dereference before nullptr checkMike Kaganski1-158/+110
Use a function to consistently check if gImpl is valid before assigning last exception message. V595 The 'gImpl' pointer was utilized before it was verified against nullptr. Check lines: 2673, 2683. Change-Id: I18fc0d632c84f37b05e9d1c3c83689e6eaa6f66c Reviewed-on: https://gerrit.libreoffice.org/71488 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/71528 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-02lok: allow paste content to popup dialogHenry Castro4-5/+96
Change-Id: I1893d52df505bc43428c37a624ca05c569ba1bc0 Reviewed-on: https://gerrit.libreoffice.org/70958 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/71369 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-30LOK: support resizing windowsAshod Nakashian2-1/+23
And delegate resizing of floating windows. Currently used for resizing sidebars in LOK. Change-Id: Iadc1b71c15a7d16a8c9dd7246490ae6bd645644c
2019-04-30lok: chart: constrained dragging of pie segmentsMarco Cecchetti1-15/+17
The extra information for the graphic selection is now formatted according to JSON syntax so that is easier to parse. Information for allowing the client to performa constrained dragging of a pie segment is appended when needed to the graphic selection message. A polygon approximation of the pie segment in svg format is attached too to the graphic selection message. Core now is able to handle a specific msg from the client with data about the new pie segment offset computed by the client on drag end. This information is dispatched by the chart controller to a specific method: executeDispatch_LOKPieSegmentDragging. Change-Id: I42e7742508fa3a453383bf7b95e47df169f24834
2019-04-30lok: dragging and resizing chart elementsMarco Cecchetti1-2/+43
This patch make possible to set the new position or size of a chart object through setting directly the property value instead of sending mouse events to the core. Change-Id: Ifc06dac6bdad78081d63e0ea0db55563a1ae57bc
2019-04-26Unipoll: add LibreOfficeKit API for polling, and an option to use it.Ashod Nakashian1-5/+43
Change-Id: Iee7556ee52541ddbf1ef8f31e1ed4697f805a2ac Reviewed-on: https://gerrit.libreoffice.org/70898 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/71164 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-25lok: add missing parameter to PostExtTextInputEvent functionHenry Castro1-1/+2
Change-Id: I91fbfd97da0c4ad1ad90710ab781c71ca99367e5 Reviewed-on: https://gerrit.libreoffice.org/70609 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/70665 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-04-25Revert "sd: fix unittest failures due to enabling slide-sorter"Jan Holesovsky1-0/+2
At the moment, the commit that was supposed to fix the unit tests is actually breaking them for me, so let's revert. This reverts commit 72da60a4fac5657de69c0651dd8e0a94fcc49b97. Change-Id: I8ea636985de12ea19ad32a6064ece2d90589b7f9 Reviewed-on: https://gerrit.libreoffice.org/71272 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-25lok: add profile zones.Michael Meeks1-16/+131
NB. outside of the often contended SolarMutexGuard. Change-Id: Ieb651e2ed4349e692010a7588721f461af7d2b5b Reviewed-on: https://gerrit.libreoffice.org/70848 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-04-25lok: rename - emitted as events not on stdout now.Michael Meeks1-1/+1
Change-Id: Ie57c34eff1d917fada4e10e4b88b27adf8a34d1a Reviewed-on: https://gerrit.libreoffice.org/70788 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-04-24lok: emit ProfileZone data in messages when requested.Michael Meeks1-0/+36
Change-Id: I42a773e2d5b8e4deeafa8eeb2785913db36a47d7 Reviewed-on: https://gerrit.libreoffice.org/70688 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/70766 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-04-20SharePoint connection: Better handling of encoded URLsTamás Zolnai2-5/+5
Handle %7c with small letters. Make sure that the output parameter's content is not affected by decoding. Change-Id: Ie3faad2461815497c0edfb04a589fc57aeb7d66b Reviewed-on: https://gerrit.libreoffice.org/70873 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit f6dc5636c1eda8aebeac3f7b85dd61499523d6a3) Reviewed-on: https://gerrit.libreoffice.org/70984 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-04-20SharePoint connection: Handle encoded URL passed as command line argumentTamás Zolnai2-0/+27
Change-Id: I3352bf9ade88bd86f7ca3d53238364216547d52b Reviewed-on: https://gerrit.libreoffice.org/70830 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 2317ad572cc330c4c2de95065ef275f58a9c83a1) Reviewed-on: https://gerrit.libreoffice.org/70983 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-04-17clang-tidy bugprone-unused-raii in RequestHandlerNoel Grandin1-1/+1
The message from clang-tidy is: warning: object destroyed immediately after creation; did you mean to name the object? The guard in RequestHandler::ExecuteCmdLineRequests comes from commit cf333a878ceed18d0343520a2c65be69fc433b1f Date: Sun Jan 21 22:10:09 2018 +0300 tdf#38915: set cProcessed condition on any process outcome and I'm sure it's intention was to set the flag on exit from the function, not immediately. Reviewed-on: https://gerrit.libreoffice.org/60183 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins (cherry picked from commit 867ee21fe4c0c9216aea57850efec4de3c3fc554) Change-Id: Ibf874a5774770df00b9db7f673554e7ffda55072 Reviewed-on: https://gerrit.libreoffice.org/66168 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15sd: fix unittest failures due to enabling slide-sorterAshod Nakashian1-2/+0
Change-Id: Ife85b3c728c59f7fb4e0184211efc9b652c5f4e7 Reviewed-on: https://gerrit.libreoffice.org/69615 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-15LOK: sd: initialize slide-sorter in sdAshod Nakashian1-2/+0
Change-Id: I4cb6ce6d961b4ba4d542c14cb37370788cf75e45 Reviewed-on: https://gerrit.libreoffice.org/69613 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-15LOK: support for ordering/moving partsAshod Nakashian2-1/+20
Currently reordering of slides is only supported for presentations, although it is provisioned for spreadsheets as well. Change-Id: I6c35066d6a5ef7586d34a8e8b89db69a20b86572 Reviewed-on: https://gerrit.libreoffice.org/69612 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-15slide-sorter: multiple selectionAshod Nakashian2-1/+22
Change-Id: I8624de25b0bb66020002890f33758e52059a24ab Reviewed-on: https://gerrit.libreoffice.org/69610 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-10tdf#120249: escape trailing backslash in argument passed to soffice.binMike Kaganski1-1/+8
... to avoid treating \" as in-argument " instead of end of argument See https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw Change-Id: Ie283ba04117e13bc06c5b92412a945f945e67ff3 Reviewed-on: https://gerrit.libreoffice.org/61214 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit f4103a42d58535e21c48ff94ab000ab0305c62e3) Reviewed-on: https://gerrit.libreoffice.org/61222 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9bb9be742d74d412d27be3db4ce5ac5e9508cb5b) Reviewed-on: https://gerrit.libreoffice.org/70524 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>