summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)AuthorFilesLines
2021-02-15tdf#123476 filter: Also handle empty ODFcp-6.2-29Mike Kaganski1-2/+4
This builds on top of commit ada07f303e7cd1e39c73abe0741aefe7d9d73a57, to allow 0-byte ODT, ODS etc. Possible TODO would be somehow use default template for such empty files, getting the template name using SfxObjectFactory::GetStandardTemplate. That would enable using 0-byte ODF files as means to "create new document at this location from default template" workflow. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 2854362f429e476d4a1ab4759c6a1f1c04150280) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110061 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: I36e07b80f60c42aecdcc6a7357e5bdd18f62e4f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110938 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-10Improve macro checksSamuel Mehrbrodt2-6/+22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb) Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110058 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-01-25tdf#139830: keep the right sidebar context for chart after view switch (calc).Tamás Zolnai2-0/+33
There is a general behavior to switch to the default sidebar context by view deactivation and switch back to the right context by view activation. See SfxShell::Activate() and SfxShell::Deactivate(). By activation, we use the selection to find out the right sidebar context. See GetContextForSelection_SC() method for example. However, for charts, this does not work, because the chart window is a separate environment and the shell does not know what is selected inside the chart window. So let's avoid context switches when we have a chart window active. Let the chart controller handle sidebar context changes. Change-Id: I272ee5c35ac30221eed2930201c4710a9a5877c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109790 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109901
2021-01-20lok: send uno command state update to the right view.Tamás Zolnai1-1/+1
We get the correct view as a parameter(pViewFrame). Change-Id: I36e99a7660fee69c6c7cb10977763b1136eb6e22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108511 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 0b1fb051d1bcbfc9f08f288193cff8b039558afd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109623
2021-01-20lok: send sidebar dialog update to the right view.Tamás Zolnai1-7/+7
SfxViewShell::Current() might point to wrong client, not the actual owner of the sidebar. Better to use the LOKNotifier which points to the correct view. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108444 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit a6a3b9b665a874e98cedebbb2566d57285a40772) Change-Id: I2a3f18eaf51e4bf9a9f811595ec4fc02ce86fa7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109622 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2021-01-11lok: send linespacing updatesSzymon Kłos1-1/+4
Change-Id: I2dd123b04a2d6a03eac92aca5db5a4413b386e7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108877 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108923 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-25sw tiled rendering: fix paint->invalidation loop when paint is started by vclMiklos Vajna1-2/+12
SwViewShell::PaintTile() already calls comphelper::LibreOfficeKit::setTiledPainting(), so by the time it would rearch SwViewShell::Paint(), callbacks (e.g. invalidations) are ignored during paint. Do the same for SwEditWin::Paint(), where we processed invalidations during paint, potentially leading to paint->invalidation loops. Conflicts: sw/qa/extras/tiledrendering/tiledrendering.cxx sw/source/uibase/docvw/edtwin2.cxx Change-Id: I8280f5c2571beeae6c0f2986d275dde3c2d33161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106543 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106601 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-11-08lok: sidebar: disable context deactivationHenry Castro2-8/+4
In the Collabora Online, for every SfxViewFrame instance, it has a relationship with a user name, and it is not allowed to deactivate the sidebar of the other user. However, in the Desktop case, a user name has a relationship to many SfxViewFrame instances and it can deactivate the sidebar when a SfxViewFrame instance receives the input focus. Change-Id: If1936f1dc3779664970bd584e2b9d6f595c4b072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104115 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-10-31tdf#123476 filter: try to detect 0-byte files based on extensionMiklos Vajna1-1/+5
A 0-byte ("empty") pptx file is obviously junk input, so it's not surprising if the catch-all generic_Text filter is chosen to open it in Writer at the end. But we can do better: if we really get an empty file URL with an extension we can recognize, that we can fake the filter type / filter name, so the empty "presentation" opens in Impress, and also a re-save works as expected. This builds on top of commit 8a201be240b6d408d15166be7ffc576b9e123634 (fdo#68903 Import .tsv and .xls plain text files in Calc by default, 2013-10-27), just the new way works for all supported file extensions and also with filters which would not handle empty input (e.g. pptx refuses the import if the ZIP storage is broken). Change-Id: Ie01650a5eb6ca42c35e090133965467b621bb526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104939 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105039 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-28lok: sidebar: avoid deactivation when the sidebar is paintingHenry Castro1-1/+4
When two views (SfxViewFrame) get activated and deactivated frequently when one view grab the focus and lose focus (respectively), in multiple user this is not true, both users have the view active at the same time. The patch removes the overhead when painting a sidebar window to avoid unnecessary deactivation. Change-Id: Ica5837c9f2eda5db1bee69ec2297e54c4845d467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103263 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-09-18lok:sidebar: deactivate the shell with no default contextHenry Castro1-1/+2
When a different view deactivates to current shell, then it is set to default context that cause a side effect into another view with different panels in the sidebar. Change-Id: Ie99cde89bdfdb08e1ac93aed947cf13048800c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102887 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-09-15Added new command to resolve the comment threadPranam Lashkari1-0/+1
Change-Id: I8a4e5f63ee6ea5e560fae8a5d3602178f2b58b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102779 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-15Revert "sidebar: restrict sending once a "created" message"Henry Castro1-7/+1
This reverts commit 855ce740ee1ce4cfdafdc34266ce9668cccc2874. It has so much damage in mobile devices, I do not understand the message "created", "close", it should means create de sidebar window, but it is used as "show", "hide" Change-Id: I5f45d58be577b7b6302adf57279cab5880f7060c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102743 Tested-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-09-14sidebar: restrict sending once a "created" messageHenry Castro1-1/+7
"SidebarDockingWindow::NotifyResize" is called when the sidebar resize so the idle task should send unique "created" message per view, another case it will create undesired effect Change-Id: I8a2da2e797032a1052fb0d33a5a03486425eae46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102347 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-08-31LOK: send state of FormatPaintbrushPranam Lashkari1-2/+2
Change-Id: I61057adff79e072aa4dc12e9c8943abd7166a260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98540 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 91ee7efe49581b774d4be116888b490eb132ac5d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101677 Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2020-07-22Send various state changes to LOKAron Budea1-2/+13
Change-Id: I0d5dc63015364cd1586555b6dced81afa50745bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92865 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit f2e059ca3b1d55c721c6a698e6761536534224ba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97585 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 5a08b856e5a5f722e6b49d2e5e526593a4ad65de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97794 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-07-21Revert "tdf#128502: Try to support multiple documents ...cp-6.2-20Andras Timar4-82/+17
in LibreOfficeKit-using process" This reverts commit b0da52d19ed40dd0871f208eb7387ec1d8252de4. We decided not to have this "multiple docs" feature in stable cp-6.2 because it caused regressions that we could not fix quickly. Change-Id: Ib9ad6e010935e6a936832c01756700735a8cc6c5
2020-07-21Revert "tdf#128502: Fix (haha) for a crash with multiple docs ...Andras Timar1-4/+1
open in the iOS app" This reverts commit 2768b5828df4b045c65c1fbfd724c8066761711a. We decided not to have this "multiple docs" feature in stable cp-6.2 because it caused regressions that we could not fix quickly. Change-Id: If9c6002782bf76957ad384556152a173dd2c18cb
2020-06-26tdf#128502: Fix (haha) for a crash with multiple docs open in the iOS appTor Lillqvist1-1/+4
Just a band-aid to avoid a crash. The LibreOfficeKit-related code would need a thorough re-factoring to properly be prepared for multiple open documents. Change-Id: I8c31e2badd747f3086526f89638fa495f4dcf295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97205 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-25tdf#128502: Try to support multiple documents in LibreOfficeKit-using processTor Lillqvist4-17/+82
The LibreOfficeKit-specific code typically has assumed that all the "views" (SfxViewShell instances) are for the same document, because all LibreOfficeKit-based application processes (including the "kit" processes in Online and the iOS app) so far have only had one document open at a time. It is now possible to pass several document file names on the command line to gtktiledviewer and that is an easy way to demonstrate how badly it still works even with this patch. Introduce a unique numeric document id that is increased in the LibLODocument_Impl constructor. Add APIs to access that. When iterating over views, try to skip views that are not of the document visible in the "current" view, if we know what the "current" view is. Also add a couple of FIXMEs at places where it is a bit unclear (to me) whether it is correct to iterate over all views, or whether only views for the "current" document are what we would want. Change-Id: I6e2d85e61a6743ca110500bf48b3d80b2027dfb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97085 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-25Revert "tdf#128502: Try to support multiple documents in ↵Tor Lillqvist4-82/+17
LibreOfficeKit-using process" This reverts commit 3d9e60524fcb4d62fbf17af0ccd1f9613b1b8470. Reason for revert: The commit dc13c656dc25ed35c31bec7b6c8ae7d0c6b258e3 that was merged in the meantime means that this change that now is reverted doesn't compile, and besides it doesn't handle the additional SfxViewShell loop that dc13c656dc25ed35c31bec7b6c8ae7d0c6b258e3 introduced. More work needed... Change-Id: I9886445d2f7b6ce939546c0673bdb8a32afe1abf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97053 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-24tdf#128502: Try to support multiple documents in LibreOfficeKit-using processTor Lillqvist4-17/+82
The LibreOfficeKit-specific code typically has assumed that all the "views" (SfxViewShell instances) are for the same document, because all LibreOfficeKit-based application processes (including the "kit" processes in Online and the iOS app) so far have only had one document open at a time. It is now possible to pass several document file names on the command line to gtktiledviewer and that is an easy way to demonstrate how badly it still works even with this patch. Introduce a unique numeric document id that is increased in the LibLODocument_Impl constructor. Add APIs to access that. When iterating over views, try to skip views that are not of the document visible in the "current" view, if we know what the "current" view is. Also add a couple of FIXMEs at places where it is a bit unclear (to me) whether it is correct to iterate over all views, or whether only views for the "current" document are what we would want. Change-Id: Id5ebb92a115723cdeb23907163d5b5f282016252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95353 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96356 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-17Add an option to send email encrypted PDF files via mailmerge.Gülşah Köse1-0/+28
Change-Id: I002e054b685bd3367c4183014adc1dbd0843a365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96303 Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Tested-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96535 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-17sw reqif-xhtml export: add a new RTFOLEMimeType parameterMiklos Vajna4-6/+21
This is similar to commit e0f20211a8048a87b078aa4cf0f28c0c847487ad (sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameter, 2019-12-16), except that was for the import and this is for the import. The situation was similar, SfxBaseModel::impl_store() still had the custom store parameters, but later functions lost it, so at the end OutHTML_FrameFormatOLENodeGrf() in the sw HTML export could not respect it. Fix the problem in a similar way, so the SfxMedium instance created for the duration of the export provides the custom options via SfxMedium::GetArgs(). Change-Id: I71d2c7920f42d98133f345703cfdfd50f0e8550c Reviewed-on: https://gerrit.libreoffice.org/85321 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96481 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-05-18jsdialog: handle nested tab pagesSzymon Kłos1-1/+3
Change-Id: I04d5df55af0df18948730fcd9ee387abce77ac27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94339 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-18tdf#93389: keep encryption information for autorecovered MS formatsMike Kaganski1-0/+16
The autorecovery data is stored in ODF, regardless of the original document format. When restoring, type detection generates ODF data, which is stored in the media descriptor attached to document, even after real filter was restored (see AutoRecovery::implts_openDocs). If real filter is not ODF, then at the save time, it doesn't find necessary information in encryption data, and makes not encrypted package. This patch adds both MS binary data, and OOXML data, to existing ODF data for recovered password-protected documents (regardless of their real filter). TODO: only add required information to encryption data: pass real filter name to DocPasswordHelper::requestAndVerifyDocPassword from AutoRecovery::implts_openDocs. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86201 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit dd198398b6e5c84ab1255a90ef96e6445b66a64f) Conflicts: comphelper/source/misc/docpasswordhelper.cxx Change-Id: I4717f067ad3c40167312b99eefef5584a467bfed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88330 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94347 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-18tdf#118639: store ODF encryption data for autorecoveryMike Kaganski1-6/+12
When saving autorecovery information, ODF is used. If the original document is password-protected, its autorecovery is also generated password-protected (since ef87ff6680f79362a431db6e7ef2f40cfc576219). But when the stored encryption data for non-ODF document does not contain "PackageSHA256UTF8EncryptionKey" value, following ZipPackage::GetEncryptionKey fails, so the whole save fails. So just generate and append ODF encryption keys where we still have user password. Reviewed-on: https://gerrit.libreoffice.org/84052 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 63634738dd03cc74806ce6843c16ff5e51a371a0) Reviewed-on: https://gerrit.libreoffice.org/84133 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit e569dc9824e95617d921bb8f115d243aea0125b9) Reviewed-on: https://gerrit.libreoffice.org/84232 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Change-Id: I776e28de784489521e4941d1075690f90c056014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94346 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-15LOK: sending status of paragraph outline buttonsPranam Lashkari1-1/+5
status of: OutlineRight, OutlineLeft, OutlineDown, OutlineUp Change-Id: I28dd805e1a620831c4092523969e1c4825b568f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-12Create weld::Builder implementation for JSDialogSzymon Kłos1-1/+6
and use for WordCountDialog on mobile Change-Id: I12c3455ff9b16c30918067f9282b72f49141a308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94041 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-11sfx2: lok: separate sidebar notifications to mobile and desktopAshod Nakashian1-4/+7
If we have two notifiers for mobile and non-mobile, we should check them separately, so we can support one without the other. Also, correctly check for null before dereferencing. Change-Id: I3f21d2f4d5d430b7c876aaf4e90d5b4e55df04ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93944 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-09lok: MSForms: Add callback for form field button.Tamás Zolnai1-1/+4
Show and hide the button and send the button area, where it should be displayed. Change-Id: I5922eb9f5e544483dd4efd12e4218d2e51270632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93657 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-05-08notebookbar: send uno items state updateSzymon Kłos1-0/+27
Change-Id: I56b9c64f11631bd28520b9294aef7d6db8da5733 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93700 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-07added ability to switch sidebar deck on init.cxx for mobilewizardMert Tumer1-0/+9
Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-29lok: set device form factor of the client on view creationMarco Cecchetti6-5/+28
This patch allows the lok core to know about the device form facor of the client requesting the creation of new view, immediately instead of a later time. When a new view is needed a "DeviceFormFactor" parameter is forwarded to lo_documentLoadWithOptions and doc_createViewWithOptions from the client. This parameter can have one of the following values: 'desktop', 'tablet','mobile' and it is used to set a global variable accessible by SfxLokHelper::setDeviceFormFactor and SfxLokHelper::getDeviceFormFactor. This global variable is retrived in the SfxViewShell constructor for setting SfxViewShell::maLOKDeviceFormFactor attribute. In SfxViewShell we have the following 3 methods: - bool isLOKDesktop() - bool isLOKTablet() - bool isLOKMobilePhone() which replace the following boolean functions: - comphelper::LibreOfficeKit::isTablet - comphelper::LibreOfficeKit::::isMobilePhone Change-Id: I9b36f354278df8c216fcb90f6a9da8256ec9c1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-15send state changes of .uno:NumberFormatDecimal command to LOKMert Tumer1-0/+1
Change-Id: I7872c0a0c123865c77d3aa8937775116368f1ffa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92203 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-01tdf#128662 Fix exception when accessing empty lock listJulian Kalinowski1-1/+1
This fixes an Access Violation Exception when a WebDAV server says a resource is locked but does return an empty lockdiscovery element on WebDAV Propfind. Without this patch, the code only checks that a list exists, but it should also check if it contains elements before accessing it. Change-Id: I5f555a9b5805102242392b018ab5a8009c7a203c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91412 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91392 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 37cb8ac6abfc9bfd44aed1a51f6374ad1e23583a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91396 Reviewed-by: Julian Kalinowski <julian.kalinowski@dataport.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-03-31listen for and broadcast FrameLineColor state changes.Michael Meeks1-1/+2
Change-Id: I53efdcc4c5a3871761c4feffb079751286d6fbd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91438 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-03-31LOk: notify the state values of the position and size property panelHenry Castro1-3/+24
Notify to client side when the UNO commands (TransformPosX, TransformPosY, TransformWidth,TransformHeight) have changed only valid for mobile devices. The state values are obtained from "position and a size" property panel of the sidebar and they have a converted units formatted text and simplify client side not to convert the units again. Change-Id: I0d37a9746d550e09bf2a5b182530ef7c2a0dee37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91238 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-03-31lok: introduce QueryControlState functionHenry Castro5-0/+55
The sidebar usually executes UNO commands to the core framework, however the controls already have formatted the text that is useful in Online client side. For example the units conversion. The QueryControlState method will retrieve the current formatted text of the sidebar control to be used in Client Side. Change-Id: I0b3e3a1462d4391ac911352f35808a5e5d9f9ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91237 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-03-26tdf#130310 Load Sidebar Icons for extensionsilhan1-3/+1
Changed else statement to include load of extension icons. Change-Id: I76ad068825ad1406329ca3807b2a919988091cbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91109 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-16Rename isMobile to isMobilePhone and introduce a separate isTabletTor Lillqvist3-6/+6
The intended semantics of isMobile() has been to say whether the device is a mobile phone ot not. Not whether it is a mobile device in general. So make that explicit. Adjust call sites as necessary. Also, in a couple of places where it is likely that what is relevant is whether it is a mobile device in general, not just whether it is a mobile phone, check both isMobile() and isTablet(). For stable interoperability with current Online, keep accepting also the .uno:LOKSetMobile "command" (and .uno:LOKUnSetMobile, except that Online never sends that), but Online will be changed to use .uno:LOKSetMobilePhone. Also drop the default value for the bool parameter to setMobilePhone(). Default bool parameters can be quite confusing, and it was especially silly in this case as there is one (1) call site. Change-Id: I2a71c37323ee151cbc671bd8e714e1dee10f8b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90560 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-02-29tdf#130348: Add special case for ChartDeck, tooTor Lillqvist1-1/+3
Change-Id: Idf6cc1469f074debfc4351a58826a3a7411391ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89722 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-02-24Fix currency symbol selection in Calc on mobileTomaž Vajngerl2-2/+41
In LOK we use one language identifier for both - UI language and the locale used. This is a problem when we determine that we a language for UI is not available and fall-back to the default "en-US" langauge, which also changes the locale. This introduces a separate variable that stores the language tag for the locale independently to the language. Another problem is that in some cases we don't reset the staticly initialized data, when the new document is loaded, which is on the other hand used to define which currency symbol is used as SYSTEM locale. That can in some cases select the wrong currency symbol even when we changed the locale to something else. This fix introduces a reset function, which is triggered on every document load. Change-Id: I55c7f467600a832895f94346f8bf11a6ef6a1e49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89320 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-17sidebar: Distinguish between Impress and the rest for LOKAron Budea1-7/+7
The parameter introduced in 26bcfbe48b30e0a525a0f25b73ddcacdd158256b was unused. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88829 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 99751473531c6d022c2089bf162901b41a616895) Change-Id: Iee928520bb1a4033cf10f0ca60c687b73d09aaf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88839 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2020-02-10Allow boolean valued statechange messages for...Dennis Francis1-1/+4
object align commands : ObjectAlignLeft [SID_OBJECT_ALIGN_LEFT] ObjectAlignRight [SID_OBJECT_ALIGN_RIGHT] AlignCenter [SID_OBJECT_ALIGN_CENTER] What is pending is to set correct align state items for Impress in DrawViewShell::GetMenuStateSel(). For doing that we need to store the object align state somewhere when we execute SID_OBJECT_ALIGN_* in DrawViewShell::FuTemporary(). For Writer the align state information was already available in frame-format-manager object. Change-Id: I86fcf59cfc66af98097611277201ecaa3b8c22cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88077 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-02-05lok: writer: Convert row height / cloumn width to the correct unit.Tamás Zolnai1-0/+12
In online, the mobile wizad displayed these attributes in the wrong unit. Change-Id: I165a8ee17bebbbfd8962ac9addc89df39c77851a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88004 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 017ae620604de06414dc3f780804c241b87e45c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88014 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-01-30lok: preserve mouse event logic position and use in calcTomaž Vajngerl2-10/+13
When clicking in online Calc any of the charts, shapes (and other objects), sometimes the cell underneath is selected instead. The problem is that the object is not correctly recognised to be hit. From lok we get the mouse event position in logic coordinates, which we usually can just use in writer and impress. In calc however we need the coordinates in pixels, so we transform them before sending the mouse event to calc. Still calc also uses common SdrObjects (chart, shapes,...), which operate in logic coordinates. So in case of SdrObject we need to convert the coordniates back from pixel to logic again, which causes problems because conversion doesn't have access to the displaying conditions on an stateless online client. OTOH we already had the correct logic coordinates, and we can just send them along. This is what this change does. It adds an optional maLogicPosition to MouseEvent, which is filled with logic position if those is known. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87681 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 82196472291c4ccbcacb5c2513d1961ba9460cdf) Change-Id: I26f6466085baf613850b5861e368f22cad7c1d26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87708 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-01-13WaE: unused pLockData.Michael Meeks1-0/+1
Change-Id: I3c074405f8645caf889f145a6f09f9f680d5a6b8
2020-01-10lok: jsdialog creation for sidebar panels cleanup.Michael Meeks1-6/+13
Use UNO panel names as ids on new Panel nodes. This avoids problems with over-writing child details, items like sd::PanelLayout don't have an empty parent to overwrite, but have an immediate valueset node. Change-Id: I00bab7f0d6a4fb247e0509bce7548b2da164bd23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86571 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-09lok: simplify jsdialog creation for sidebar panels.Michael Meeks1-0/+37
Remove some layers of nested and/or un-necessary content, also simplifies client-side JS. Change-Id: I67347035ceb9dbee9c62c99624b5084883d4e61a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86498 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>