summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2022-09-07add truncate-multiline for consistency with vcl and all the othersCaolán McNamara
Change-Id: I7ccc294308d487ce2443699a946753290344a92d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139589 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-07gtk4: caps-lock-warning is gone as a propertyCaolán McNamara
Change-Id: I66aac55f0ebb381bc2f9f1fffbdb887d4a016005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-07every other .ui is version="3.20"Caolán McNamara
Change-Id: Ifc45b74e06069855021b7c963a3e5c83c8eacfcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139587 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-02[API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bitMichael Weghorn
With 16k column support in Calc enabled by default in commit 4c5f8ccf0a2320432b8fe91add1dcadf54d9fd58 Date: Tue Mar 8 12:44:49 2022 +0100 change default Calc number of columns to 16384 (tdf#50916) , the number of Calc cells in a spreadsheet is larger than SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more enough and using it resulted in integer overflows in methods handling corresponding Calc cells in the a11y layer. This e.g. had the effect of the Orca and NVDA screen readers not announcing focused or selected cells properly when their a11y child index was out of the 32-bit integer range. Switch the internal a11y child indices to 64 bit to be able to handle this properly internally. Since the platform APIs (at least AT-SPI on Linux and IAccessible2 on Windows; from what I can see LO's macOS a11y bridge doesn't directly expose the child index) are still restricted to 32 bit, larger child indices still cannot be exposed via the platform APIs. As a consequence, use of the the IAccessible2 and AT-SPI methods that use the child index remains problematic in those cases where the child index is larger. However, as an alternative to using the AT-SPI Table interface and the IAccessibleTable/ IAccessibleTable2 interfaces with the child index to retrieve information about a specific cell, both AT-SPI and IAccessible2 also provide interfaces to retrieve that information directly from the cell object (TableCell interface for AT-SPI, IAccessibleTableCell for IAccessible2). Those interfaces are already implemented/exposed for winaccessibility (s. `CAccTable`) and the qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface` methods implemented in `QtAccessibleInterface`). With the switch to 64-bit internal a11y child indices, these now behave correctly for cells with a child index that doesn't fit into 32 bit as well. NVDA on Windows already uses the IAccessibleTableCell interface and thus announcing focused cells works fine with this change in place. Orca on Linux currently doesn't make use of the AT-SPI TableCell interface yet, but with a suggested change to do so [1], announcement of selected cells works with the qt6 VCL plugin with a current qtbase dev branch as well - when combined with the suggested changes to implement support for the AT-SPI TableCell interface in Qt [2] [3] and the LO change based on that [4] and a fix for a nullptr dereference [5]. The gtk3 VCL plugin doesn't expose the AT-SPI TableCell interface yet, but once it does so (via `AtkTableCell`), it also works with the suggested Orca change [1] in place. (Adding that is planned for an upcoming change, works with a local WIP patch.) For handling return values that are larger than what platform APIs support, the following approach has been chosen for now: 1) When the return value is for the count of (selected) children, the maximum value N supported by the platform API is returned. (This is what `ScAccessibleTableBase::getAccessibleChildCount` did previously.) The first N elements can be accessed by their actual (selection) indices. 2) When the return value is the child/cell index, -2 is returned for objects whose index is greater than the maximum value supported by the platform API. Using a non-negative value would mean that the index would refer to *another* actually existing child. A child index of -1 on the other hand tends to be interpreted as "child is invalid" or "object isn't actually a child of its (previous) parent any more)". For the Orca case, this would result in objects with a child index of -1 not being announced, as they are considered "zombies" [6]. What's still somewhat problematic is the case where more than 2^31 children are *selected*, since access to those children still happens by the index into the selection in the platform APIs, and not all selected items are accessible this way. (Screen readers usually just retrieve the first and last element from the selection and announce those.) Orca already seems to apply different handling for the case for fully selected rows and columns, so "All cells selected" or "Columns ... to ... selected" is announced just fine even if more than 2^31 cells are selected. (Side note: While Microsoft User Interface Automation - UIA - also uses 32-bit indices, it also has specific methods in the ISelectionProvider2 interface that allow to explicitly retrieve the first and last selected item, `ISelectionProvider2::get_FirstSelectedItem` and `ISelectionProvider2::get_LastSelectedItem`, but we currently don't support UIA on Windows.) Bound checks at the beginning of the methods from the `XAccessibleContext`, `XAccessibleSelection` and `XAccessibleTable` interfaces that take a child index (or in helper methods called by those) should generally already prevent too large indices from being passed to the methods in the lower layer code that take smaller integer types. Such bound checking has been been added in various places where it wasn't present yet. If there any remaining issues of this kind that show after this commit, they can probably be solved in a similar way (s.e.g. the change to `AccessibleBrowseBox::getAccessibleChild` in this commit). A few asserts were also added at places where my understanding is that values shouldn't be larger than what is supported by a called method anyway. A test case will be added in a following change. [1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131 [2] https://codereview.qt-project.org/c/qt/qtbase/+/428566 [3] https://codereview.qt-project.org/c/qt/qtbase/+/428567 [4] https://gerrit.libreoffice.org/c/core/+/138750 [5] https://codereview.qt-project.org/c/qt/qtbase/+/430157 [6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155 Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-09-02tdf#150712 limit the dialog to only a sample of the dataNoel Grandin
instead of the entire area, which makes the dialog pretty much instantaneous Change-Id: Icb08a09733ee872b67d5be00cb083139f05fba7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31Empty salvage item was handled aboveMike Kaganski
Change-Id: Id0882c2caabe47f435b693aac9eb3a1c96760c59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-31Resolves tdf#150697 - Improvements to terminologyHeiko Tietze
Change-Id: Ifeadc7ea92cac3f1b3883a694b38cd567153f4af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139088 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-08-31check IFrame "FrameURL" targetCaolán McNamara
similiar to commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 Date: Wed Aug 7 17:37:11 2019 +0100 warn on load when a document binds an event to a macro Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-31tdf#101302: Add option to clear unavailable files in menu/start centeroguzbalkaya
This patch adresses tdf#101302. It essentially adds a menu item to clear unavailable files from the menu and start center. Previously, they were visible as recent documents in the menu and start center, and caused error when selected. Change-Id: I55ee9f663b24c343a90817c438aff11d9230061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120480 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-30tdf#149956 Rework toolbar image flippingMaxim Monastirsky
An unified code, covering both vcl and weld cases. For SidebarToolBox, the controller is created before items are inserted, so we listen for item insert event to set initially correct state. Change-Id: I3841f21883104b4d3f8541c97ec7fa5fc0bec575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139022 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30tdf#149741 tdf#149956 Make flipping work also in the sidebarMaxim Monastirsky
- Reset the icon each time, as there seems to be no easy way to retrieve the existing icon from a gtk widget in order to mirror it, like we used to do for vcl. Similar approach is currently taken in ToolboxButtonColorUpdaterBase::Update. - Store the flipping state also in GtkInstanceToolbar, similar to vcl's ToolBox. This seems to be the easiest way to make flipping not break on icon theme change, covering all 4 cases (ToolBarManager, SidebarToolBox, ToolbarUnoDispatcher, GenericToolbarController), w/o too involved changes in each. This might benefit from some refactoring later on, but should be good enough for now. - One unsolved problem is the appearance of flipped icons with svg themes, as the regular variant is handed to gtk directly, whereas the flipped one is loaded by us, resulting with a different (blurry) look. Change-Id: I48c16827b46fb75fd798a041851af6e2648ae8fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139021 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-29ref-count SdrObjectNoel Grandin
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29tdf#53530 Only show 1 error dialog instead of 3 on export to PDFMatt K
SfxObjectShell::ExecFile_Impl is called when exporting to PDF, and the 3rd error message pops up here, so we just add a check to see if we're about to show the general IO error during pdf export and skip showing the error message there. The first 2 error messages pop up from SfxMedium::TransactedTransferForFS_Impl, and so we just add a check to see if the first error message popped up in which case an abort error code is returned and we then skip popping up the 2nd error. Change-Id: Ifa85ca1e451b1f87c6ddd89a98d377ea04aeaa0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138333 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-08-28cid#1500646 silence Resource leakCaolán McNamara
Change-Id: I68ae618a2f828de0d4043cf4d986c915ac1e1a7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138944 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26lok: use ".uno:SidebarDeck.DeckName" for the rest of the decksMike Kaganski
Allows to avoid introducing a dedicated UNO command for each and every deck. Change-Id: Icc9b2fa9ec3ac495f022970d412d9b19ec000a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138883 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-26tdf#150489: Drop Elements docking windowMike Kaganski
and make uno:ElementsDockingWindow open the respective sidebar panel. Change-Id: I9736d6804c579b83404636d5e327c49c2fdeb914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138458 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-25vcl: rename GetNonMnemonicString() and make it standalone functionChris Sherlock
Renamed GetNonMnemonicString() to removeMnemonicFromString() Change-Id: I272714f97bb6d9174360631c18c4fd9bb485698e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138103 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25lok: make sure flushPendingLOKInvalidateTiles() is calledLuboš Luňák
SwViewShellImp::AddPendingLOKInvalidation() collects invalidations, but this was relying on something eventually calling flushPendingLOKInvalidateTiles(), which wasn't guaranteed. If e.g. a spellchecker caused an invalidation from in idle callback and nothing else changed, then the LOK callback handling code didn't know there was something pending. So add an explicit call to ensure to notify about these pending invalidations. Change-Id: I0a9cb0d5aba2fdbbac126cd8a4a3412bef1cab25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136531 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-20cid#1509221 silence Dereference null return valueCaolán McNamara
Change-Id: I28c5479106e6521f52ec25d98c3ae0565fc1596b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18Fix typoAndrea Gelmini
Change-Id: Id785575c297d7e3e8867db319ddb4bffa0496426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138496 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-18cid#1500682 silence Untrusted loop boundCaolán McNamara
Change-Id: I44ae78fe7427d2647e3efe2688be8c124c16743c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138475 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18tdf#149768 Do not fix Templates dialog width and height in pixelsRafael Lima
This patch removes the fixed size of the Templates dialog in pixels so it works better in HiDPI displays. This patch also makes the dialog a bit wider and non-resizable. Change-Id: I256d8d5c8b76c8e32a4f008f3a235f80bf59634d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136922 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-08-18Make ElementsDeck the default deck for Math first startMike Kaganski
Change-Id: I471e268b6bb55d0cac9faed1b6631724b08b34a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138457 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-17Move application check to the point where it mattersMike Kaganski
This simplifies and deduplicates call sites, and also makes sure that we don't lookup strings until we need that. Also helps adding a check for Math in a follow-up. Change-Id: I6b073253f19afbb9a95f29806ab306c6a9f63f18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138413 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-17cid#1500682 silence Untrusted loop boundCaolán McNamara
Change-Id: I61900c89329b84ca07da09085be08a735569e392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-17Return std::optional instead of using bool* argumentMike Kaganski
Change-Id: I47f03411a6677f22291bea4dc06920ab9052349a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138399 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-17lok: register view callback also for nested sm viewMike Kaganski
This allows to send context change events that originate in the embedded views. Change-Id: I574ca347a2ffa67f9645a2ee790e42088ad8721f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138303 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-14tdf#104921: Cleanup Kashida insertion logicKhaled Hosny
Communicate Kashida insertion positions in an explicit way. Rest of LibreOffice communicate adjustments to character widths (e.g. for justification or spacing) using so-called DX array. DX array is an array of absolute character positions (e.g. DX[n] is the position after character n from the start of the lines, and its widths is DX[n] - DX[n-1]). This DX array is modified also when Kashidas are inserted after a given character for Arabic justification, by expanding its width. VCL would use this to know where to insert the Kashidas and how many ones. But because DX array is used for both widths adjustments and kashida insertion, this turns out to be a source of bugs since VCL has tosecond guess the DX array to find which is pure width adjustment and which also involves Kashida insertion, and the heuristics it uses are fragile. This change adds a second array of booleans that records where Kashida is inserted and communicates it all the way from where Kashida insertion is decoded in Writer and down to VCL layout. This change passes the Kashida array only when it seems necessary (e.g. during drawing but not when measuring text since the DX array is enough in this case). Hopefully no places where Kashida insertion needs to be passed down were missed. A couple of glyph and layout flags that were used for old heuristics and no longer needed and are removed. This also fixes: tdf#87731 tdf#106309 tdf#108604 tdf#112849 tdf#114257 tdf#127176 tdf#145647 tdf#146199 Change-Id: I4ed0850ef2fdc3e9143341afac649e7e7d463c39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-11lok: Simplify context change notificationMike Kaganski
Change-Id: I3ead4deb5bdfe638bc49e05bfba0d8c630687958 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138141 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-11make dtor order as reverse ctor orderCaolán McNamara
Change-Id: Ia5bff2361006d3dcb1032adef584ceb9910e56fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-11gtk4: get the menu in sidebar menubutton workingCaolán McNamara
this is an edge case where for gtk3 there has to be a GtkWindow present to support the accelerators, and for gtk4 the final window the menubutton is in must be the same one present when the actions were created. Change-Id: I08911daf8e7752b6eb589a162bb07edda76b6f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138091 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-10mnemonic-widget of showlocationCaolán McNamara
Change-Id: Ie0955c2c8efcec5d1f43c86fe12b3a2b964c4c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-10loplugin:passstuffbyrefNoel Grandin
Change-Id: Ib2b2650da7abc9260897f9b5aad619a0ea6ae941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138052 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-09sfx2: check saved last tab page name exists before restoring itCaolán McNamara
since GetPage might return nullptr on a nonexisting page See https://crashreport.libreoffice.org/stats/signature/SfxHelpIndexWindow_Impl::ActivatePageHdl(rtl::OString%20const%20&) Change-Id: I26e21f783645e8a87d56cbe76c0126de8947bf3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137990 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-09tdf#150278 sfx2: use provided aInfo, not factoryJustin Luth
This continues the revolution from tdf#81293 that was done for the MOD section of this function in 7.4. It looks like the same thing needs to be done for APP. Prior to this commit, opening up the same form control property dialog always opened up to the same initial tab, regardless of the last-used-tab. ONLY of document reload would the last-used-tab come into play. Now it always opens up immediately tot he last-used-tab. This is full fix for SAL_USE_VCLPLUGIN=gen. gtk3 needs an additional fix so it doesn't follow the second-last-used-tab instead. Change-Id: Ie7c13cfb48de87c4ab595460680f4306e8feaac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-01Add 'JobName' to PrintOptionsSamuel Mehrbrodt
Allow users to specify a job name which is sent to the printer (by default this is the current document name). Usage: Sub PrintWithCustomJobname Dim mPOpts(1) As New com.sun.star.beans.PropertyValue mPOpts(0).Name = "JobName" mPOpts(0).Value = "My Job Name" ThisComponent.Print(mPOpts()) End Sub Change-Id: Id7c1c0da7f581b1c050bb3e6d61dd01b7e8205f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137562 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-07-30tdf#117967 Fixes Save confirmation dialog for user cancelMatt K
The "Confirm save" dialog is launched from SfxMedium::CheckFileDate via "xHandler->handle( xInteractionRequestImpl );" and if the user canceled it the error is saved in the SfxMedium via "SetError(ERRCODE_ABORT);". Then, control is returned to the calling function SfxObjectShell::SaveTo_Impl which currently doesn't handle the cancel error condition, so this change just adds a check to detect it and return instead of doing more "save" processing. This return then goes to the calling function SfxObjectShell::DoSave_Impl which also does some save processing after cancel, in particular it updates the timestamps of the current SfxMedium (which are checked in SfxMedium::CheckFileDate from above and determines whether the "Confirm save" dialog will be launched), so this change prevents the updates to the timestamps by exiting early (i.e. before "DoSaveCompleted();" is called) if the abort error condition is seen so as to avoid a timestamp comparison result of equality which would prevent the "Confirm save" dialog from showing on every subsequent save action from the user. Now the behavior is for the timestamp comparison to fail equality (as would be expected if the file changed underneath the user) so as to ensure the "Confirm save" dialog continues to show for every subsequent save action by the user. Change-Id: I9c4aefc163a06029c80a8a28cdf4a09dff0031a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137540 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-07-30tdf#150045 Set secondary/explanatory labels apartAdolfo Jayme Barrientos
Rationale in commit 0ebbe1f0080f474fd583e5912c9605e6fb2e13d5, of which this is a follow-up. Change-Id: If75aa32bf02aeb8761f5b7f4ddbbeaa3bdcaab3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137618 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-07-29Resolves: tdf#147782 restore focus to launching frame asynchronouslyCaolán McNamara
Change-Id: I7ebde70e4e1aae861f6ac7d70a91741596cb2cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-28lok: add dumpState feature for better in-field diagnostics.Michael Meeks
Always suspicious that some un-expected dialog / state can cause strange behavior in a client. An initial cut at an API to make it easier to unwind such problems by exposing the toolkit state. Change-Id: If8f17943fa4837df4f9ca659a111dcdce5c23244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137504 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-07-28lok: Properly update sidebar context in MathMike Kaganski
Change-Id: I830c0d9bdeaa6340283eafc3e91251d02602d7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137247 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-28lok: Enable sidebar in MathMike Kaganski
Change-Id: I1554a924eef0bfcaffa893057a37ef45321a0cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137246 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-27sw content controls, plain text: send state changes to LOKMiklos Vajna
This is similar to commit 373f655acbdad88ff5d76324f32650fe3a005e2e (Send state changes of content control UNO commands to LOK, 2022-07-22), but plain text was not a type at that point. Change-Id: Ia317c60411280c07e1e063ee4b23f12e0d9f6dd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137502 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-26Resolves: tdf#149127 explain the infobar asking to refresh master passwordCaolán McNamara
Change-Id: Ia8439dd6f5dca91f008150ed759eef92fcc4b9a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-25Send state changes of content control UNO commands to LOKAron Budea
Change-Id: Id6b3f9a35c129078b564f7906e03f6aa9306a5f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137415 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-07-25loplugin:moveitNoel Grandin
make the plugin more conservative, so we see less false+ (although we also miss some possibilities in the process) Change-Id: I91b1806271e7f802d7459834ab7bcc569047da3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25use more o3tl::spanNoel Grandin
which means we can reserve precisely the right number of entries when building maps Change-Id: I580414699289369de4730caae09829bbd8759e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21tdf#150044 sc import: fix editing password in shared modeBalazs Varga
Set the readonly state back after we create the tempfile for shared files. It is necessary for later, when we checking the file is readonly or not and we need to give the editing password. TODO: filesave IO error is another bug Change-Id: Iafc4dc6e7ce825fc3b7fe18abaee65c014c49a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137281 Tested-by: Jenkins Reviewed-by: Tünde Tóth <toth.tunde@nisz.hu> Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Tested-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>