summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2020-08-25LOK: send status of the sidebarPranam Lashkari
sidebar button did not show status initially similarly view->sidebar did not show checked/unchecked initially and same problem can be seen in notebookbar Change-Id: Ie5fdf298d343435514954efaaebfdc628d4a90fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101182 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-20LOK: send state of FreezePanesPranam Lashkari
Change-Id: I817117d05f7f0f75f65c8e6dbf6105d120ab275d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101031 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-18Fix hyperlink popup does not show upMert Tumer
The popup does not show up when double clicking same cell after first one when the cell has a hyperlink. This is because LOK_CALLBACK_INVALIDATE _VISIBLE_CURSOR message is filtered out when it is duplicate and hyperlink is inside this callback. Selecting different cell after editing one does not make calc to send another invalidate cursor message because it is only sent if the selected cell is being edited. This confuses the ui experience, so this patch prevents the callback from being filtered out if only it contains a hyperlink. If there is not a hyperlink on the cursor position the duplicate callbacks will still be filtered out. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100934 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-08-13lok: send cell border state updatesSzymon Kłos
Change-Id: I400ee3cb9f0a98804d98e25d0164fa5148b79191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100424 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100640 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-11sfx2: lok: reliably support multi-documentsAshod Nakashian
Instead of using the current view to set the DocId, we instead make sure that the ShellView object has the DocId set at construction time. This turned out to be necessary in at least one case (which has a unit-test that failed), which is when events fired during the creation of a new view. The cursor position is notified before we have a chance to set the DocId and because of that we miss the notifications (or worse, we end up sending them to all other documents' views in an effort to fix this bug). This approach is clean and always guarantees that all views have the correct DocId set as soon as possible and that all notifications are sent as expected. A unit-test is added to exercise mult-document usage, which exposed a number of bugs and issues that have been addressed in this patch. Change-Id: Icf5145fb1dabd0d029368310c2b9bf73ae927ccc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-10allow to .uno:Save a PDF doc - divert to SaveAs to the doc. fileTomaž Vajngerl
To save PDF annotations, we need to allow a .uno:Save if the document was opened from a PDF file. When we get a .uno:Save command, we need to divert that to SaveAs into the same file as the current document was opened with. Change-Id: I0c511c4e5501de03ea8b0efb5aaf37cd09936e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99463 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6f55a64f002d80a19201e2a9b0171725fb71a7fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99883 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-08-10add test for editing of annotations (using .uno:EditAnnotation)Tomaž Vajngerl
Change-Id: Ic798ab94bb63a3ae80882e77cf1582d875e27d4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98583 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit fbecbb6872db7c40c8d632955589223a6c456475) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99882 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-08-10DesktopLOKTest: cleanupAshod Nakashian
Refactor the handling of document loading and unloading and cleanup to allow more flexibility when loading multiple documents and for manual destruction. Also, correctly set the document type when loading, which was defaulted to TEXT even when loading spreadsheet and presentation documents. Minor misc cleanup such as dangling semicolons and unregistering the callback twice. Change-Id: Ia244aafd526d60f73c46e99fb8c7e63f63b0a8f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99974 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-10sfx2: lok: refactor notifications and const correctnessAshod Nakashian
This reduces the stringification and reuses the notificaiton helpers to reduce code duplication. Change-Id: Icf9f9c50f3eeee61a0ded741d39fed37cfcc8da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99972 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-04lok: send state updates for shape editing commandsSzymon Kłos
Change-Id: I0fcb8ef76df89723ee74aa96a003e0d49d558872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100081 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-04lok: update track changes status for calcSzymon Kłos
Change-Id: Ifb5ac3739ff19154b97ea1258c77739bde0cfb80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100075 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-03lok: state updates for vertical alignmentSzymon Kłos
Change-Id: I6767904e3d3366e1316c932555b979a26e77b8c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99998 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-03lok: state updates for commands in WriterSzymon Kłos
Change-Id: Id3d429ff4788abce03e9d7c5522655f362d6c249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99996 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-01lok: set to export PDF bookmarks by default when save-as a PDFTomaž Vajngerl
Change-Id: Ieb182b9a0d1f18a29a83ce369881578c06e217ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 224160656d549b5b1891edd1b3cee251b754e69b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99880 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-07-24lok-freezepanes: Generalize FreezePanes* uno-commands...Dennis Francis
to allow an integer parameter as the row/column index of the freeze and use them to set/get freeze indices (row/column) from the lok clients. The behaviour of the exisiting freeze/split-panes controls in desktop Calc is not affected, but new menu/notebookbar options can be added for freezing on a specific row/column in a follow-up commit. For now, the freeze-panes are shared between all views for each tab of the spreadsheet. "Private" freeze-panes support can also be added without much difficulty (for this we need another uno command for the private/shared flag, but that can be in a separate commit). Notes regarding compatibility: Since Online-Calc has support only for the freeze-panes functionality presently, any pre-exisiting 'real splits' in the spreadsheet (created using the native-desktop Calc or alternatives) are converted to equivalent 'freezes' on import, but on export, such 'freezes' are re-converted and written as 'real splits'. In case the spreadsheet has 'freezes' on import, they are used/exported as such. In short, the type of sheet-window splits in the document is preserved. Change-Id: Ia990616f5cedfb2b5db820770c17ec7e209f0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99352 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-24LOK: send state of ShowResolvedAnnotationsPranam Lashkari
Change-Id: Icd8756719bc75bbd780cbf25d21f7834a1d7fc8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99252 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-07-04lokit: add new callback type LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRYDennis Francis
This is to notify the clients about changes in current sheet's geometry data. Use this to notify clients of various sheet geometry invalidations if the new feature flag scPrintTwipsMsgs is set. Change-Id: I478d2e646606320399905d7b15881a165a53146d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96969 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-03jsdialog: optimization, use latest state, ignore previousSzymon Kłos
Change-Id: Id637accc4f006ae6206b4e87a44b30d1a8340723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97849 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-02jsdialog: move executor code to vclSzymon Kłos
Change-Id: I9247a652707fe3239dc488a605a2c506d8eec95c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97736 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-02jsdialog: execute entry set testSzymon Kłos
Change-Id: I9e7d7da0bc0b6494b59270c683ae4a18d927bf4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97624 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-01Send various state changes to LOKAron Budea
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>
2020-06-30notebookbar: early initSzymon Kłos
Change-Id: I2a129911b6949fd0e165065fd6d02f3546613407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97232 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-26Fix .uno:SidebarHide command works for onlineMert Tumer
Change-Id: I03743d15300687b1da947d3c44be6a42aab83107 Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97059
2020-06-26mobile: fix calc chart wizard properties is not shownMert Tumer
Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061 Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-26added ability to switch sidebar deck on init.cxx for mobilewizardMert Tumer
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97062 Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-26most of jsdialogbuilder is not used outside vclCaolán McNamara
so split it into the bit that is needed and just include that. add missing license headers Change-Id: I875f91176e6881e830fee6a58368d0b28ce9a0f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96774 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97118 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-26jsdialog: change sendDialogEvent API parameterSzymon Kłos
WindowId with 64bit length is needed Change-Id: Ia11530fb4666fc64d7acde653085ed258058c169 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97100 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-25jsdialog: get widget depending on viewshellSzymon Kłos
Notebookbar always gets window id 0 what causes conflict in map and some widgets doesn't work Change-Id: I15b4e83d385e83bcf898148a871ddf540257cc81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97099 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-24tdf#128502: Try to support multiple documents in LibreOfficeKit-using processTor Lillqvist
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/+/97024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-24jsdialog: working number format fieldSzymon Kłos
Change-Id: Ibc3dcd34008767a7a38cc9b52a23935e0387f67e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97016 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-24jsdialog: weld toolbarSzymon Kłos
Change-Id: If105d6716fc43f471f63f4eb60fa85498cb3dcc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96934 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-23jsdialog: try call welded action even if window doesn't existSzymon Kłos
Change-Id: I8ae96d2e61899c89b5ddb8ff362d8a066ded3960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96922 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-23jsdialog: click action for drawing areaSzymon Kłos
Change-Id: I2434bec675559a97e5d251c6d6a958464b6db034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96853 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-22lokit: Introduce new flag "sc_print_twips_msgs"...Dennis Francis
for conditioning all changes needed to allow calc messages in print twips coordinates. Change-Id: I407b4d4d4e0a1dfb2c4339cafa10b368b437c82d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96904 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-06-22Introduce ITiledRenderable::getSheetGeometryData()Dennis Francis
ITiledRenderable::getSheetGeometryData(bool bColumns, bool bRows, bool bSizes, bool bHidden, bool bFiltered, bool bGroups) and implement it for the Calc derivation (ScModelObj). The aim is to use it actively in LOOL instead of the interface: ITiledRenderable::getRowColumnHeaders(const tools::Rectangle& /*rRectangle*/) This is used by the LOOL to fetch the sheet geometry data for just the current view-area in the clients, so LOOL queries this everytime some client's view-area changes. Like the existing interface, the new one will provide all 'kinds' of sheet geometry info [col/row sizes(twips), hidden/filtered and grouping]. But the difference is, it generates data for the whole sheet (not view-area specific). So the method need not be queried every time the view area changes in the LOOL clients, and more importantly it enables the clients to locate any cell at any zoom level without any further help from the core. This means core needn't send various client(zoom) specific positioning messages in pixel aligned twips. It just can send all positioning messages in print twips uniformly to all clients. Change-Id: Ib6aee9a0c92746b1576ed244e98cb54b572778c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96892 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-06-19new json writer for LOKNoel Grandin
we shave about 3 memory copies off in the process, and make the class play nicely with our string types. Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96393 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-28formula bar: Change completeFunction() to accept string instead of index.Jan Holesovsky
The 'index' is unsafe, because the set it tries to index can change in the meantime. Instead, use the function name and search for it in the set, to get the recent index. Change-Id: Id2a021c32f421057c87b6f7f4fffcc1c98009acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93666 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93910 Tested-by: Jenkins
2020-05-28lok: set device form factor of the client on view creationMarco Cecchetti
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/+/93340 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-28Move uno:Text param from core to online - core partMuhammet Kara
Change-Id: Idf51a688a868c2d140fcf5eb54e1bfdefc3690b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92394 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> (cherry picked from commit d9a0e2fe5bf95bf0bfba424a3625d7f952884932) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92304 Tested-by: Jenkins
2020-05-28send state changes of .uno:NumberFormatDecimal command to LOKMert Tumer
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> (cherry picked from commit 2f6cbb67099edde535a81e7b0a32c1418805d6d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92290 Tested-by: Jenkins
2020-05-28lok: Create Text boxes directlyMuhammet Kara
Change-Id: I281d4648d0e91f74d6f0f5880945d8e7e8659efe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89344 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89709 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-05-28Fix currency symbol selection in Calc on mobileTomaž Vajngerl
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89343 Tested-by: Jenkins
2020-05-27desktop: unit-test to check SpellDialog works in multiple viewsAshod Nakashian
Unfortunately, this isn't fully functional, but didn't want to lose the effort. The problem is that there is no proper config for languages in the unit-tests. So even when we set the language explicitly, it still doesn't apply to the SpellCheckerDispatcher, which is where it matters. This seems to be because the config is not properly propagated and broadcast. Below is the stacktrace as works on desktop. During the unittest the Broadcaster has no change listener for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList doesn't get called. #0 0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795 #1 0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826 #2 0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:181 #3 0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::star::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...) at /home/ash/prj/master/unotools/source/config/configitem.cxx:143 #4 0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182 #5 0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171 #6 0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025 #7 0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847 #8 0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765 #9 0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) () at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext= uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool) (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991 #16 0x00007f4800776778 in com::sun::star::linguistic2::LinguServiceManager::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true) at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322 (cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839) Reviewed-on: https://gerrit.libreoffice.org/85007 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 66c1f6bee6f463786540b2e73d52f35461063589) Reviewed-on: https://gerrit.libreoffice.org/85683 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Change-Id: Iffef03502c78311427aa8883739678120cc84931
2020-05-27sfx2: sidebar: new .uno commands to show and hide sidebarsAshod Nakashian
Change-Id: I9afba5eec855d6de590086736177b543d52d3b20 Reviewed-on: https://gerrit.libreoffice.org/85192 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-27LOK: don't send LOK notifications while switching viewsAshod Nakashian
Changing the active view is done for virtually every LOK API, and in some cases simply changing the view results in a flurry of notifications that themselves caues further API calls that need to change the view. This moves the disabling of callbacks during setView to SfxLokHelper to make sure no view gets any notifications. This is needed because even when we disable notifications for the current view, the _other_ view(s) can still get notified as they lose their frame. Change-Id: Ia88a58d6a1162e48c40f4c4ce73c40ecb2c1fb7e Reviewed-on: https://gerrit.libreoffice.org/84417 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2020-05-27tdf#131230: Sidebar: Can't set Automatic colorPranam Lashkari
This also solved the issue in sidebar with some controls when selecting an item it selects the item below Change-Id: I607b8bc44402b57b5c4833f918fb41b23ddf48c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93099 Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94855 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-24lok: MSForms: Handle event about item selection of a drop-down field.Tamás Zolnai
Change-Id: I095013097348c98361b6614e4ddf1e9029923c7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93659 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-05-23LOK: spelldialog: don't create the dialog when loading new viewsAshod Nakashian
By default dialogs/decks are re-created when a new view is created/attached, if they are visible. For the spell checker this is unexpected, as the user doesn't expect to be doing spell checking upon loading a document, just because another user was at the time spell checking. Currently the suppression is for LOK only. This also adds support to suppress the recreation of any dialog by flagging it with the SfxChildWindowFlags::NEVERCLONE flag upon invoking RegisterChildWindow. (cherry picked from commit e3fb48fe4f84b5609730c64fdb49b1bd7ddd1f96) Reviewed-on: https://gerrit.libreoffice.org/85004 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit e573919cd8561a81d967c1a4566c5733dd44b7b1) Change-Id: I7d71c664f1b2804910c96eeb0431164d48b5679b Reviewed-on: https://gerrit.libreoffice.org/85680 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-05-21enable crashreport on WindowsAndras Timar
(cherry picked from commit ce263269dff121af85634ada7870f33632e02bdd) Change-Id: I55df3da63919f76afcd4905b1898287e26c8c4f1 Reviewed-on: https://gerrit.libreoffice.org/78401 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94477 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-21jsdialog: implement plus/minus for welded spinfieldsSzymon Kłos
Change-Id: I8a0bf4190c09520d7be78c44742902539cb9bf38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94483 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>