summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2019-08-12Fix typosAndrea Gelmini
Change-Id: I94d0e85c731801b8b0ec844ae2a8f268b2f1022e Reviewed-on: https://gerrit.libreoffice.org/77256 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-10Fix typosAndrea Gelmini
Information is always singular Change-Id: I55275d7c2fd76c3ec0ae4a98aa952777feb90460 Reviewed-on: https://gerrit.libreoffice.org/75645 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-08-08lok: Output a SAL_WARN only if message is not emptyTomaž Vajngerl
Because we call SetLastExceptionMsg with an empty message when we want to reset the exception message and this happens all the time in the LOK code. Change-Id: Iead1b561d303d610db5e02f79a7af6c72b43834a Reviewed-on: https://gerrit.libreoffice.org/77144 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-07Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: I76f3cbf866d20a3e70d06148fb42ca25998de34b Reviewed-on: https://gerrit.libreoffice.org/77063 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-06tdf#107471 Add checkbox to enable/disable sending crash reports to TDFGabor Kelemen
Also hide it when compiled with --disable-breakpad i.e. most Linux distributions Change-Id: I5d392e22410614550aa9602d0c30b0b81ec22ea0 Reviewed-on: https://gerrit.libreoffice.org/76771 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-03Fix typosAndrea Gelmini
Change-Id: I5c95e180681220fc592400435d90e4d46603d41c Reviewed-on: https://gerrit.libreoffice.org/76883 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-02clipboard: add profile zones.Michael Meeks
Change-Id: I2c005e78884fbe35c3045f76c203a7a369e97646 Reviewed-on: https://gerrit.libreoffice.org/76885 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-08-02clipboard: elide string constructor.Michael Meeks
Change-Id: I1f476d981989296138ab9b9b58075919da4c09b8
2019-08-02clipboard: elide string constructor.Michael Meeks
Change-Id: I18c01e77e0ddf4b86f2f5ba610509555160f96c3
2019-08-02Removed duplicated includeAndrea Gelmini
Change-Id: Ic54fab581f34f385f5a6395bb39020299fbf2bde Reviewed-on: https://gerrit.libreoffice.org/76882 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-02Use implicit OString constructor and cleanup casts.Michael Meeks
Change-Id: I686c32d3666bceb23dd86a4220428fa319ffdf45
2019-08-02clipboard: repair unit test so that it runs in the lok mode.Michael Meeks
SwTransferable::AddSupportedFormats needs the kit to be active. Change-Id: Id84210eb2e526785f35dfae609d861c310885314
2019-08-02clipboard: log before erasingAshod Nakashian
Change-Id: I6d59cdd31c62bbc7db81ccb8985745f68d19cd28
2019-08-02clipboard: check for null.Michael Meeks
Change-Id: I07060035a9744642c98d4a0946695408dc0f6b42
2019-08-02lok: share more of the clipboard mime-type handling code.Michael Meeks
Change-Id: I98fc9fa0fd1b5afa00c33b642d2d504eab0b62ba
2019-08-02clipboard: encourage paste to show up by having some dummy content.Michael Meeks
Having an empty system clipboard is a hyper-unusual state, but this is quite common for new lok instances. If we populate some dummy state we can hide that. Allows context-menu paste into new documents. Change-Id: Ia180dd370c180d2d666cc57330db6c1385578a36
2019-08-02Try harder to generate HTML from text.Michael Meeks
Change-Id: I5b4778cceefc652274a72b779cd6c060a50bf06c
2019-08-02Set clipboard for a window when createdSzymon Kłos
This allows to paste in dialogs input using tunneled context menu. Change-Id: Ie6cc6f1a6cd453734c8f6084b0bd50d1d7ab6c09
2019-08-02LOK: Copy Graphics as embedded PNG in HTMLAshod Nakashian
Change-Id: Id8c14d7304d30bfcd956b126dfe291ef044f62bf
2019-08-02lok: cleanup clipboards associated with a view on destruction.Michael Meeks
Also defer destruction potentially indefinitely for bad users who quit without destroying views, documents, shutting down nicely etc. Change-Id: Ieea6ad00b2983d372b745179bfe3b884c3c64eb0
2019-08-02LOK: Enable embedding images in text/html format outputAshod Nakashian
Change-Id: Ibd8bed796678ee26de2ceb6e434dce24da4eab05
2019-08-02LOK: detect Graphics in isComplex for WriterAshod Nakashian
Change-Id: I814d71a21fa5352a9a1051f5477cb452a0dc5c2f
2019-08-02LOK: Implement getSelectionTypeAshod Nakashian
Detects all complex scenarios, except for Graphics. DesktopLOKTest::testComplexSelection() has commented out check that currently fails due to the missing detection of Graphics nodes. Change-Id: Ifce17192d26daba218d2c3d38577cccec0699e99
2019-08-02clipboard: get view setting correct before setClipboard.Michael Meeks
Change-Id: If8e9b057b819074f035c598569e3bf6d3d2fff00
2019-08-02lok: clipboard: per view clipboard creation.Michael Meeks
A bit brutal, but the mess around clipboard instantiation is awful. Change-Id: I62d6af8bf6813e6bab81123417ea8bfb28394e29
2019-08-02lok: clipboard: per view clipboard creation.Michael Meeks
A bit brutal, but the mess around clipboard instantiation is awful. Change-Id: I62d6af8bf6813e6bab81123417ea8bfb28394e29
2019-08-02LOK: Support detecting complex selectionsAshod Nakashian
Includes unit-test, but is otherwise not complete implementation. Change-Id: I5fdcd543358caab1858f6351238c21312665839c
2019-08-02lok: use utf-8 for text/plain always.Michael Meeks
Change-Id: Ie91f89b3dc6ba3eddcf8383948dddc7878eae4d8
2019-08-02Add more powerful selection fetch & clipboard set methods.Michael Meeks
Change-Id: I6633356d13480377a83a006588ec69ebcb56a93f
2019-08-02Fix typosAndrea Gelmini
Change-Id: Ic7b6014e09e3ee1a1b4917008a267b8fa2dbc1f5 Reviewed-on: https://gerrit.libreoffice.org/76814 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-08-01remove unnecessary code in doc_registerCallbackNoel Grandin
after commit 98c0cefb18d8af7aa4732708ba0ae6be2e808d6f Date: Wed Jul 31 12:40:29 2019 +0200 desktop: fix UB in DesktopLOKTest::testCommentsCallbacksWriter() Change-Id: I254d8413e707d4525efbfb2050e5b29f70c4bed7 Reviewed-on: https://gerrit.libreoffice.org/76796 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-01clean up ViewCallback nicelyNoel Grandin
Change-Id: Idb882460092642bc77804560cd8fd6432a590323 Reviewed-on: https://gerrit.libreoffice.org/76776 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-01new loplugin:mapindexNoel Grandin
Change-Id: I6b5f73b2187009e95d4d666e03e5803f522cee06 Reviewed-on: https://gerrit.libreoffice.org/76584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31desktop: fix UB in DesktopLOKTest::testCommentsCallbacksWriter()Miklos Vajna
This was similar to the previous DesktopLOKTest::testWriterCommentInsertCursor() case. Also, go via the vtable in desktop/ so the callback caching there is not bypassed, which could be another source of dangling pointers. Change-Id: I78802b9014ece8f376ae3cf7c517b01c7d1076a0 Reviewed-on: https://gerrit.libreoffice.org/76737 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-07-31desktop: fix UB in DesktopLOKTest::testWriterCommentInsertCursor()Miklos Vajna
This was introduced in 70d3bbe11e56f12a339a5b8759b53a96b4fe84ab (sfx2: Enable sidebar on calc and writer, but not in impress, 2019-05-02). See <https://gerrit.libreoffice.org/76555> for an ubsan backtrace. Change-Id: Ib9bf9b12e78a29b2a165bb4ceda144c46f38f308 Reviewed-on: https://gerrit.libreoffice.org/76735 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): desktopStephan Bergmann
Change-Id: Ieefdb08d6b92a0d70ecd9188f318e1738d61d803 Reviewed-on: https://gerrit.libreoffice.org/76685 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30sfx2: Enable sidebar on calc and writer, but not in impressAshod Nakashian
Added by Noel to this commit: And add a special deregister mode to doc_registerCallback so we can unregister stack-based callback objects in the presence of multiple views. Reviewed-on: https://gerrit.libreoffice.org/71715 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit fba6d4267b3f827269d6550dcb003cc56b31e493) Change-Id: I8d846bc1f794cf16fd45486fd83ef87f43fd52c7 Reviewed-on: https://gerrit.libreoffice.org/76555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-29sfx2: Re-enable the sidebars for LOKAshod Nakashian
This re-enables the sidebars for LOK, which were disabled to avoid overheads. Also, fixes a regression where editing stopped when loading a new view because the sidebar window creation killed the edit view. Revert "Avoid various desktop GUI elements when used from LibreOfficeKit" This reverts commit c0b70ec34d5e056bb92a66cbf83838923cb41fee. Also (added by Noel to the above commit) (1) Comment out parts DesktopLOKTest::testPaintPartTile test that trigger a crash. We are installing a callback that points to something on the stack, and then not removing that callback, resulting in calls to random stack memory. There is a further problem in the LOK code in that we cannot uninstall a callback when we have multiple views because the uninstall code in doc_registerCallback can only remove a callback for the __current__ view, which I do not fix here. (2) prevent code from accidentally creating empty entries in the mpCallbackFlushHandlers map, which is what happens when you use the index operator on map, which results in a crash in doc_registerCallback because the std::shared_ptr is empty. (3) In SdTiledRenderingTest, only turn off LOK via LibreOfficeKit::setActive(false) once the document has been torn down. Otherwise, we don't remove entries from the statically allocated s_pLOKWindowsMap map in vcl/source/window/window.cxx, which means that at process exit, we have dangling Window objects. Reviewed-on: https://gerrit.libreoffice.org/71165 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 88565c3662c6fde240c98a9b4f2ce6dfbcf4094e) Change-Id: I06b06a990f05c06b1889fa89b698dff6f494e09c Reviewed-on: https://gerrit.libreoffice.org/76466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25Fix typosAndrea Gelmini
Change-Id: I1efccb8b926e4aa10e9ccee7e8e36919e38c05fc Reviewed-on: https://gerrit.libreoffice.org/76339 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-25LOK: support resizing windowsAshod Nakashian
And delegate resizing of floating windows. Currently used for resizing sidebars in LOK. Change-Id: Iadc1b71c15a7d16a8c9dd7246490ae6bd645644c Reviewed-on: https://gerrit.libreoffice.org/73509 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Do not offset window coordinates in LOKAshod Nakashian
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. (cherry picked from commit 171a2300d37d73065e5e3bd4b77678e35f678adf) Change-Id: Ib818b83c0f0c727944068cb244f8d10666e5bc1d Reviewed-on: https://gerrit.libreoffice.org/76323 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Reduce and improve logging of event compressionAshod Nakashian
Change-Id: I84e0e8806eb6f4fbda063ebc29fafa791d472bb8 (cherry picked from commit d5b900630caefc4d3b62a31906117cf4acd623b1) Reviewed-on: https://gerrit.libreoffice.org/76322 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Minor window event processing cleanupAshod Nakashian
This reduces the number of json reads we do when compressing window events, which happens quite often. (cherry picked from commit 0bb310d7ce39421ecc4ff90518ffdf6aa01d1b02) Change-Id: I1c85f28867b52cad85445fff8a031b990dad8b56 Reviewed-on: https://gerrit.libreoffice.org/76321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Refactor large event queueing casesAshod Nakashian
This makes it more readable and reduces indentations. No functional change intended. (cherry picked from commit 570a3c5361d58635e4d0ac8baf6df787bd2290ad) Change-Id: I129ecff9083c459d633c0965eab6e06ba3dcf499 Reviewed-on: https://gerrit.libreoffice.org/76320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Remove window invalidations prior to size_changedAshod Nakashian
A window size change is a full invalidation anyway, so remove any prior invalidations as they are redundant. Change-Id: I439a1bc38989df17b671e064beb26eb88c402be3 (cherry picked from commit 1a5af070d876b1ec4b69fe3be732426dba59b9af) Reviewed-on: https://gerrit.libreoffice.org/76319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Window creation supersedes any events on same windowAshod Nakashian
This happens when we get multiple created events on same window, interspersed with invalidations. Change-Id: I2dbaa0f84306d770f1de047a23996209c28304fe Reviewed-on: https://gerrit.libreoffice.org/76312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: Reduce logging while processing eventsAshod Nakashian
Change-Id: I8ca457387715fcd085bcbf3107839d2629580f7b Reviewed-on: https://gerrit.libreoffice.org/76296 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25LOK: remove duplicate cursor invalidations for same view onlyAshod Nakashian
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> (cherry picked from commit 8e9c36dfc346387abfbbaefbc15a518cbe3e257c) Reviewed-on: https://gerrit.libreoffice.org/76286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-25tdf#119228 Add storage and serialisation for the Resolved flagScott Clarke
Change-Id: I0278588dc533378104e544d05b60583c85271f6a Co-authored-by: Jim MacArthur <jim.macarthur@codethink.co.uk> Reviewed-on: https://gerrit.libreoffice.org/75858 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-25LOK: trace queue only when it is changedAshod Nakashian
Change-Id: I9b8e060c2c7655565b95004d82bf50ada2ed0d08 Reviewed-on: https://gerrit.libreoffice.org/71845 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/76267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>