summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-19Bump version to 6.4-20cp-6.4-20Andras Timar
Change-Id: Ieddb6a702659dc09a23cb453b03516b96da5424d
2021-01-19lok: add global notifier to the "Macro Security Warning"Henry Castro
dialog. This message dialog is especial, because it is shown before loading the document so no way to get access to view shell notifier when the model/view/controller were not created. Change-Id: I5da3ca9d1009f174f2d96c1302770f4509a807cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108291 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109147 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19fix location of change tracking boxes in OnlineNoel Grandin
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108849 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 042bb632978a1d01f3240890ea9d39ead707633d) Change-Id: I65fcb52e224dce7df2a5a7baed2b8f23d0d49397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108861 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-01-19lok: Send rows heights invalidation on pasteDennis Francis
... when the dest cell has wrap-text option set. Change-Id: I9f0dd157694701c96fd91e02b8232ed205f13ae4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109602 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-01-19lok: add missing global notifierHenry Castro
Occurs when server shows the "Macro Security Warning" before load the document if enable/disable macros, but there are no instances for document/view/controller yet. So it is required to use the global notifier so it can be sent messages to the client side using the JSDialog framework. Change-Id: I67f15b21cbaf21906b88145f3c5835cf0e1ff79d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108288 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109168 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19lok: fix the "disable button" of the "Macro Security Warning"...Henry Castro
Dialog. The client side cannot disable macros and close the message dialog Change-Id: Id78060d3c2b3c9c8ac010d8b951e7640b02ca715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108489 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109146 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: override weld_message_dialogHenry Castro
It is required to create the "Macro Security Warning" message dialog Change-Id: Ic802b6e4f1a2f8c5c294aa5432f3ad5274b5e105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108289 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109145 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: disable row activated on "select" actionHenry Castro
Unfortunately, when the "Macro Selector Dialog" is shown and issue the "select" action, it closes the dialog because the row activated trigger double click the macro selected. for moment comment the unexpected side effect Change-Id: Ibdfa09c444ee79376a9e2251e919f5f06dba577d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107964 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109144 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: add the "expand" actionHenry Castro
to the tree list view control Change-Id: I69f1b06748053fdfe9164c52e889629e51f91409 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107914 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109204 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: fix disable idle notifyHenry Castro
There is a possible crash due to nullptr deference Change-Id: I3e2034ad89832eec61f1d6910a5ffd34c56df6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108224 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109203 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: use "WindowPaint" event to updateHenry Castro
If the idle notifier is disabled instead it uses the "WindowPaint" when the model has changed to notify update status to client side. Anyway the "WindowPaint" is supposed to be asynchronous. Change-Id: I0bb99526c72510a97e3906340c1e9269478da8cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107916 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109143 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: use the "WindowShow" eventHenry Castro
If the idle notifier is disabled use the "WindowShow" event to notify the dialog status. This ensures the dialog is initialized with all children and its properties. There is a bug with the "WindowShow" event, it looks like it receive 2 times. Change-Id: I81947de8498aee99c3ea4ad504611c7afa62d7c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107915 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109142 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19jsdialog: disable idle notifyHenry Castro
After testing on client side, when showing the Macro Selector Dialog its receive 5 times the same data. So add an option to not use the idle notifier instead it will use the event 'WindowShow'. Change-Id: Ib5657f3c823fc6e998581b99052aaf578d0913e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107893 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109141 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-19lok: check if the tree list box model has changedHenry Castro
It is necessary to know when the tree list model has changed to notify client side changes. Change-Id: I188a97223e06520d0b34cd9272eff6449a14d60e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107892 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109140 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: add parameter "MacroExecMode"Henry Castro
It is required to execute VBA scripts. Change-Id: Ibaafc62ecedcefcd0596c701728039783b5a0de7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107891 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109139 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: add "ondemand" property to dump the TreeView propertyHenry Castro
The "SalInstanceTreeView" instance does not use the flag "CHILDREN_ON_DEMAND", but instead it creates a "<dummy>" child. However the client side requires "on demand" information to request and trigger the "On Expanding" event. Change-Id: I4d8667fc83dae2c5f1d477fefa9c9917a5e6c90d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107576 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109138 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: run async the Macro Selector DialogHenry Castro
Required to be called by the client side Change-Id: I9c9d22dd249839009bdc6a701553f3b9d776347a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107246 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109137 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: jsdialog: fix possible nullptr dereferenceHenry Castro
p = nullptr; if (p) { } p->Somenthing(); Change-Id: I2a46d6a8e7eae96928210c8941ec71eed88bf631 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107245 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109136 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: jsbuilder: avoid sending early id to client sideHenry Castro
In the case of Macro Selector Dialog it is not required to send the id too early when the dialog is created and it is not initialized yet. Change-Id: I22fb05bd9ecff49b3e9eda19737750379a61dd69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107244 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109135 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: use JSDialog Builder to create a Macro Selector DialogHenry Castro
The Macro Selector Dialog should be created for desktop too. The JS Builder has an implementation to send "jsdialog: " data to the client side. Change-Id: If29660467e494323ac26605e704ee9bf15725fd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107243 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109134 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: jsbuilder: fix disable dialog tunnelingHenry Castro
When a client side issue command to show the Macro Selector Dialog to the server side, it is not necessary the dialog sends window invalidate. I guess the dialog tunneling progressively will be deprecated in favor of JSDialog, that it will send JSON data to client side, then it will be constructed to html element using a javascript dialog builder. (I am wondering why sending JSON?, the server side can just send the HTML string, and no need for javascript dialog builder). Change-Id: Ia88f431ed9a860bb9bb30caaaf0f7f889d765115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107240 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109133 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18lok: initialize to dispatch ".uno:RunMacro" commandHenry Castro
The ".uno:RunMacro" command it is needed for client side to show the Macro Selector Dialog. Change-Id: I8f01b9f5cc985119c9215734a6484ed7a0e30080 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107886 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109132 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18filter: svg: when date/time field is edited directly in mp, is not shownMarco Cecchetti
If a date/time or footer text field in the master page is editede directly instead of being filled through the header/footer dialog, is not displayed by the js engine. Change-Id: I4a8aa3a6b5e9931ea0b997d611ce54e8481dbbcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109175 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-01-18sidebar: avoid invalidation thrash with LOK.Michael Meeks
Avoids complete sidebar invalidate when entering text into a cell and hitting enter. Change-Id: I88ee3792589a1c0a16ae555da77ed7c12ca5f296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109455 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2021-01-18sidebar: only invalidate when things change.Michael Meeks
Change-Id: Icc9c5bcde224cc979b834585531b847f1c5f7d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109454 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2021-01-18Revert "pivot table: make options cancel button working" + fix crash againJulien Nabet
In the dialog, you have 3 buttons "Help", "Cancel" and "OK" Using "Cancel" will call "close" which doesn't revert back changes. To test this: - Launch Calc - Create an array with 2 cols (qtX and qtY) and put 2 rows of values - Create a pivot dialog - Put qtX in "Filters" part - Double click on qtX (=> "Data Field" dialog appears) - Click "Options..." (=> "Data Field Options" dialog appears) - Enable any checkbox (eg: Empty line after each time) + click "OK" (=> dialog "Data Field Options" closes) - Click "Options..." again (the checkbox is still enabled as expected) - Disable the checkbox + click "Cancel" (=> dialog "Data Field Options" closes) - Click "Options..." again (the checkbox is still enabled as NOT expected) So revert the below quoted commit and fix this by using "cancel" in: - action-widget response - id for the GtkButton - the use of the id to initialize m_xBtnCancel with m_xBuilder->weld_button This reverts commit c2a349bc1482482d3e5ec06232c166d77fe9b602. Change-Id: I555a90706de635e90b0ee397dfd958df55b5c40a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109193 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109255 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-18do not preload all images in the pptx importerLuboš Luňák
Now with my GraphicFilter::MakeGraphicsAvailableThreaded() patches for Impress images will be loaded in parallel as they are needed, which should usually be more efficient than loading all of them immediately. This basically reverts commits: b1319842a49cdf6512bbd9e81081e2a9edbd6089 04e27df3c162f1df02f061b94434a38d1eaa3a46 9eb8e2737d3a4d52ce1b0cc44091a3b7ecf59e3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107945 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit afa3dff9c7b963f1d312ef8c2efcbc8ab7271e62) Change-Id: I46bb0d6d93fb69f03f464308f6fce1603aafdfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109393 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-18tdf#138122 Add window scaling for retina displays on macOS, plus fixes for iOSThorsten Wagner
(1) Remove hack to make application look as if being linked against SDK 10.13 (2) Use quad storage size on virtual devices for displaying on retina displays thereafter (3) Apply workaround to downsample bitmaps from scaled layers (to be implemented) (4) Disable dark mode (to be implemented) (5) Provide new environment variables: VCL_MACOS_FORCE_WINDOW_SCALING: window scaling on non retina displays VCL_MACOS_FORCE_DARK_MODE: enable dark mode (macOS 10.14, iOS 13 and newer) VCL_MACOS_USE_SYSTEM_APPEARANCE: use light mode or dark mode (macOS 10.14, iOS 13 and newer) as configured by system preferences In this branch, this change also contains the below follow-up fix by tml in order to pass Jenkins for iOS: Make vcl compile again for iOS and make the Collabora Office iOS app work again when built against a master build of core. For now, keep the old versions of the functions touched by [this change] in vcl/ios/salios.cxx, and move the modified versions to the new file vcl/osx/salmacos.cxx. Keep the functions as they were except that ifdefs for MACOSX or IOS are expanded. Keep the formatting as it was to make comparisons easier. Thus add the new files to the clang-format exclusion list. While at it, also move vcl/quartz/salgdiutils.cxx to vcl/osx as it is compiled only for macOS anyway. Change-Id: I99877cd62a98cb91bcbf27af62b043c31c5f5fc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109072 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109493 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-17CGLayerHolder::getScale() can be constTor Lillqvist
(Upcoming bugfix will require that.) Change-Id: I727b2b5f1035ae70d62d3c5339a814161e3ec92a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108663 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109491 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-17hide background options in master slide view in sidebarPranam Lashkari
Change-Id: Idecf4c849f9f5ac338ea24ca04cbbf9afe5cad5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106213 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 962bd10e456d95c7579ffb380b3e69f67cf5ea11) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109401
2021-01-16Make JsonWriter::writeEscapedOUString() handle surrogate pairs properlyTor Lillqvist
It is wrong to iterate over UTF-16 code units one by one. We have OUString::iterateCodePoints() to iterate over Unicode code points. The two UTF-16 code units of a surrogate pair (for a non-BMP code point) should not be encoded separately to UTF-8 bytes. It is the code point that should be encoded (to four bytes). Change-Id: Ica4341308deb6618c9c2da8dcee8a11ef4e8238d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109425 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-16tdf#68198: sign the rest of binariesMike Kaganski
Change-Id: I89bad00245e9e2c9f8cad1cdc33e40007ae6f80d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109414 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit d534a4c7b45ff254b339e806c6a11f13d9ff0043) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109396 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-15Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on iOSTor Lillqvist
This should fix https://github.com/CollaboraOnline/online/issues/849 This is based on the corresponding fix for macOS. Much of our clipboard code for iOS is based on that for macOS. We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME type that includes the typename attribute, because the code in sc checks for that when it decides whether it is a proper OBJECTDESCRIPTOR. Simplify the data in the flavorMap array. No need to duplicate the same MIME type string as both the pasteboard type and MIME type, for those cases where the MIME type is used diretly as pasteboard type. We also know that for those types, the MIME type might have additional parameters, so be more lenient in checking. With this change, and my recent change to sot, this now works: Start the Collabora Office app. Open a spreadsheet. Select a cell range. (It can include formulas.) Copy. Close the spreadsheet document. (Killing the app process is not necessary, as no in-process clipboard is kept on iOS, but to make sure you are really accessing the system pasteboard and not some in-process cache, feel free to kill the process. After that, start Collabora Office again.) Open a spreadsheet. Paste. You get the very same cells that you pasted as such (with relative cell addresses in formulas properly adjusted, as expected). Previously, it would paste an image of the copied cell range, which is fairly pointless. There is still lots of opportunity for cleanup in the clipboard code for macOS and iOS. Change-Id: I4a385d52bbaafcd2ab8cb18e8f613c5efa592d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109368 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109373 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-15Avoid assertion failure related to cursor sizes on macOSTor Lillqvist
No idea why this assertion failure started to show up now (at least when viewing a presentation slide show). Anyway, apparently the code needs to handle 256x256 cursors, too, and not just 128x128 and 32x32 ones. Apparently the assertion failure is caused by icon-themes/colibre/vcl/res/null.png. Sadly I don't really understand the code around here, but this commit gets rid of the assertion failure, and that is good enough for me for now. This problem was reported in a comment in the otherwise unrelated tdf#138122, and the assertion failure caused a hang, which is not good, reported as tdf#139535. That general problem is not fixed by this commit. Change-Id: I1390f00e03e0766d54969d9d62311a55da8e8945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109083 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109370 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-15tdf#136861 ODT export: fix writing resolved state for non-ranged commentsMiklos Vajna
It was probably not intentional to write the resolved state only in case the annotation has a name. Conflicts: xmloff/qa/unit/text.cxx Change-Id: Ia3a6b2320e2288528c43c832211ebfcde492881e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109364 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-15Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOSTor Lillqvist
This fixes a demonstrable problem, and affects only macOS. This is also on the path towards fixing https://github.com/CollaboraOnline/online/issues/849 , even if the code touched here is for macOS only. The iOS pasteboard handling code is based on the macOS one. We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME type that includes the typename attribute, because the code in sc checks for that when it decides whether it is a proper OBJECTDESCRIPTOR. Simplify the data in the flavorMap array. No need to duplicate the same MIME type string as both the pasteboard type and MIME type, for those cases where the MIME type is used diretly as pasteboard type. We also know that for those types, the MIME type might have additional parameters, so be more lenient in checking. With this change, and my recent change to sot, this now works: Start LibreOffice. Open a spreadsheet. Select a cell range. (It can include formulas.) Edit > Copy. Quit LibreOffice. Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the very same cells that you pasted as such (with relative cell addresses in formulas properly adjusted, as expected). Previously, it would paste an image of the copied cell range, which is fairly pointless. There is still lots of opportunity for cleanup in the clipboard code for macOS and iOS. It is presumably rather pointless to put images on the pasteboard in Windows bitmap format, for instance. Just PNG should be enough. No idea why the code provides the TIFF pasteboard type for images. Ditto for Windows metafiles (WMF and EMF). It is also unclear how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for instance. Change-Id: I573648480b03972b506203b4f470d513bcb81212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109353 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-15Make SotExchange::GetFormat() accept a MIME type with additional parametersTor Lillqvist
For instance, if SotExchange::GetFormat() is passed a flavor with MIME type "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\";typename=\"LibreOffice 7.2 Spreadsheet\"" we do want to recognize it as SotClipboardFormatId::OBJECTDESCRIPTOR, even if the MIME type in the entry for it in the array in ImplFormatArray_Impl only has the windows_formatname parameter. This is part of fixing https://github.com/CollaboraOnline/online/issues/849, but it will help for corresponding problems with LibreOffice on macOS, too. Note that on Linux, SotExchange::GetFormat() gets called with a flavor with a MIME type that does *not* have all the extra parameters (classname, typename, displayname, viewaspect, width, height, posx, posy) (See the GitHub issue mentioned above.) This change does not remove any checks for classname, typename, etc. There are/were no such checks in SotExchange::GetFormat(). But, in the (much different) code path for macOS (and iOS), with my work in process in vcl, SotExchange::GetFormat() gets called with a flavor with a MIME type that *does* contain those extra parameters. I don't see the point in introducing checks of the "sanity" of those into SotExchange::GetFormat(). (In this branch, already contains the add-on fix to use the existing OUString::matchAsciiL() instead of requiring a new OUString::startsWithAsciiL().) Change-Id: Ie65ed1ab922cdaa6557eb65d980b9e886d3c6971 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109254 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109352 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-01-14filter: svg: slide custom background unit testMarco Cecchetti
Change-Id: I29990218bfa6095c368ed36ebc9cca909d2136fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109189 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2021-01-14filter: svg: slide with a custom background are not exported correctlyMarco Cecchetti
When a slide has a custom background, the background overlaps any master page object: text fields, shapes, ... Change-Id: Icc410617760502fa4092cfe248155b3e20906abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109089 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2021-01-14lok: sort: invalidate the row-height cache tooDennis Francis
Change-Id: I13e59dc045b23a6ea60cd4cf34dda3166dbf5aad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109208 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-01-14lok: send sheetGeometry invalidation after sortDennis Francis
...just for the rows to let the client know the row sizes/spans have changed. Change-Id: I26f985ab0ba4eb5b21db5783a8ac3957c64c2f22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109207 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-01-13oox smartart: fix crash in pyra algorithm with a single child shapeMiklos Vajna
Regression from commit 14a56533ff2c9c859d22cd3039ada75b99e94bc0 (SmartArt Pyramid: Now lays out shapes, 2018-07-10), the added pyramid algorithm by first centering the topmost children, then decrementing the horizontal postion of each additional shape, with the end goal of having 0 horizontal position of the last children. This means that simply avoiding the division in the 1-child case leads to correct results, because in this case the only child is also the last child at the sane time. (cherry picked from commit f2e04fe98e313cffa3f98d55eae641415142a431) Change-Id: Ifd0027e9616b0909dbfde43e1555427b50de4dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109223 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-13tdf#137417 oox smartart: avoid considering rules in vertical linear layoutsMiklos Vajna
Regression from commit 0024c48b4822062995effed7db4f1281196384bb (oox smartart: consider rules when scaling in linear layout, 2020-07-31), the problem is that I only tested horizontal layouts and this is not working for vertical layouts. Just disable the vertical case for now, to avoid unwanted side effects. (cherry picked from commit c719db99166a7b4770855a9599ec65c70cd256c5) Change-Id: I31a894157996a2371b8d0ec482ee91dc4d5b053e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109222 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-13oox smartart: extract snake algo from AlgAtom::layoutShape()Miklos Vajna
AlgAtom::layoutShape() is more or less the single function where all layouting happens for all algoritms. Extract the snake algorithm part from it to a separate SnakeAlg::layoutShapeChildren() before that function grows too large. (cherry picked from commit 99e51aaf2ad216888622a46a625479e1b42946d4) Conflicts: oox/source/drawingml/diagram/diagramlayoutatoms.cxx Change-Id: I5e5ae66d16770fa72db6edf5df4cbd2ef3eea9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109221 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-13lok: Prevent from crash on cancel Fontwork dialogSzymon Kłos
Change-Id: Icb24652d6efd46e642efbb91c9941761dd152cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109219 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13sw edit win: fix read-only selections while handling ExtTextInputMiklos Vajna
When typing into a protected section (or other read-only area), the code goes through SwEditWin::KeyInput(), which checks for HasReadonlySel(), and calls into sw::DocumentContentOperationsManager::InsertString() in the read-write case. When typing via ExtTextInput (e.g. Online), then SwEditWin::Command() called into sw::DocumentContentOperationsManager::InsertString() without such a check. The convention is to do a read-only check in the first Writer function called by vcl, so handle this in SwEditWin::Command(), to have exactly 1 read-only popup on typing a character. (cherry picked from commit 0c03a97fb8844ad0de1abea79b5265617a509460) Conflicts: sw/qa/extras/tiledrendering/tiledrendering.cxx Change-Id: I7d002e7d76bffeb6f16750de735c5bbf13a7bba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109212 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-13lok: don't turn off online spelling by view change.Tamás Zolnai
Since we don't exit editing for LOK inside this NotifyChange() method, we should keep also spelling functionality alive. See also the comment we have here: "As long as the content is not edited, turn off online spelling." So it seems a good idea to make this spelling modification dependent of bStopEditing flag. This causes issues, during view switches. Change-Id: Ic684073d129c1cac4b6f4d11f34cd64cb5db3295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109206 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2021-01-13tdf#139566: Fix select all (table + text) when document window looses focus.Tamás Zolnai
Without setting mbSelectAll properly the selection cursor is converted to a SwShellTableCursor, which can't handle if a selection is extended outside of the table. Change-Id: Ibd43097ac782b9fc02ff818d3911ebcd20efbd21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109185 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2021-01-13We only use the systemwide general pasteboardTor Lillqvist
Simplify code to explicitly use it then instead of using variables. Change-Id: I915a44cf7275fbf2140671a2edf1da29f1bf4e40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109202 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-13Log successful mapping from system pasteboard format to internal MIME typeTor Lillqvist
Change-Id: I98bedc8fc07a56fbbf3e175277cc9846da46a8c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109201 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>