summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2022-10-28It's Frame-Controller-Model, not Model-View-ControllerMike Kaganski
Change-Id: I23a867623f77502baed6639ad3e255c06673d67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-28Introduce utl::ConnectModelViewControllerMike Kaganski
And use it to avoid code duplication Change-Id: I18447bc1a0388d57a273b310977a0f0fb54152b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141946 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-03tdf#127856: sc: Status bar "languages" when you click...Henry Castro
the popup "More.." button it will show the format cells dialog. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idb60decf1c582c906d24d10fc248cfd20f8f4cbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138499 Tested-by: Jenkins
2022-09-30tdf#151172 crash in notebookbar with extension enabledMaxim Monastirsky
Change-Id: I60d777b27ffee095807490f4b181b1b08ed88462 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140683 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-28use more string_view in frameworkNoel Grandin
Change-Id: I9a79eef6d41696f1de7569f40d6eaf1d85ff77bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-18use more string_view in utl::TempFileNoel Grandin
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-14Fix typo signes->signsAndrea Gelmini
Change-Id: I3e673aba3190f3183c357681c2a379b2be8e2c84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139925 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-06tdf#150682 - bad shortcut in french langageNoel Grandin
the = key is } on a french keyboard, so remap the ctrl-alt-= shortcuts to ctrl-alt-} which means the user gets to keep pressing keys in roughly the same physical location for this action, regardless of keyboard Change-Id: I03e251dacc1c19e543182a44ae23fde2a57cfa45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-04tdf#150773: Avoid bringing loading files to front several timesMike Kaganski
The change attempts to establish this logic: 1. Honor the ForceFocusAndToFront setting uniformly: previously, it was ignored when reusing existing windows (opening in Start Center, in place of an empty document, or trying to open an already opened document); 2. When ForceFocusAndToFront is set, try to activate the window as early as possible (before loading begind), as a feedback to user, and also to avoid situations when activation would be impossible later (e.g., there is a timespan on Windows, during which entitled applications can bring themselves to foreground; a lengthy loading process can exceed that time); 3. If activated once, do not activate second time after loading ends, to avoid nagging users who deliberately switched to other tasks. Explicit calls to impl_makeFrameWindowVisible were removed from impl_searchAlreadyLoaded and impl_isFrameAlreadyUsedForLoading, because those functions are called from impl_loadContent, which makes sure that they are followed by a call to impl_makeFrameWindowVisible (either in impl_setResult -> impl_reactForLoadingState, or directly). A fix to tdf#83773 was adjusted; I checked that the bug doesn't reappear after that. Change-Id: I4bdcf978d43016d1e8979adf2fdf108a37f6ba2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139362 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-04Some refactorMike Kaganski
Change-Id: I5b87f9298bfeec70848654eacf5086803c19080a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139354 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-30tdf#149956 Remove previous vcl only solutionMaxim Monastirsky
Change-Id: Id67b75856a230e175ccc6328ec0838c78589191b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139020 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-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-16No need to use throwing Reference ctor from 'this'Mike Kaganski
Change-Id: I1a9d69d101d3adede0455e94d4026e38131e6c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138350 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-16Drop redundant warning after throwing checkMike Kaganski
Change-Id: I1cc9ce6c415eb8aef9a250b3b5f342a425071b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138349 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-10Missing colon in toolbar help idsMaxim Monastirsky
Regression of 5200a73627d13e2997f81b53f61e143e77e328ee ("use more string_view in various"). Change-Id: I402eb6c03dcfa661c79c5469cfca3c86ac528f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138066 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-10Make ToolBox::InsertItem take the command nameMaxim Monastirsky
For the next patch for tdf#149956 I need the command to be already set when the VclEventId::ToolboxItemAdded event is emitted. Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-10Unnecessary ToolBox::SetItemText callMaxim Monastirsky
Change-Id: I8d15e9657b3a6d01de9d07130ae3aa8284fbd178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138037 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-04tdf#150249 close of popover not detectedCaolán McNamara
the popover listened to here isn't the one that ends up getting actually used, its contents are transferred to another one, so the OnPopoverClosed wasn't called, its sufficient to just use the SubToolbarControl dtor to detect what is wanted here Change-Id: I3f4a038acfc183b863457919bf89d600517ddc01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137792 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-03tdf#149966 Crash on Windows and freeze on Linux when customizing MenuNoel Grandin
use the notifyEach helper, which unlocks the mutex while we are calling listeners, which means we can tolerate a re-entrant call to removeConfigurationListener. regression from commit dab35c152af3345786b8335e83cd067b67d08b81 Author: Noel Grandin <noelgrandin@gmail.com> Date: Sat Dec 18 20:24:15 2021 +0200 osl::Mutex->std::mutex in ModuleUIConfigurationManager Change-Id: I7a2fbffb1c734b8bd0e952614592ce12c1611328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21elide some makeStringAndClear() callsNoel Grandin
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-20move wintypes.hxx from tools to vclChris Sherlock
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-19Replace old png writer in imagemanagerimpl.cxxofftkp
Change-Id: I8bc30a218b67d165d1a8ae3d663e5482a8113aa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137118 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-18Simplify by using InitAnyPropertySequenceMaxim Monastirsky
Change-Id: I145ce892e101ba4e8906cbdb0d32a52a4c655d43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137151 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-18Remove the broken SupportsVisible hackMaxim Monastirsky
pController is always empty since commit ac1aefd5174258d9bcb41465ce566ed1a0819f3d ("Extend ToolBarManager to build weld::Toolbar"). But even before that it did nothing, as it was set only for controllers created by the sfx2 legacy factory, but neither .uno:SwitchXFormsDesignMode nor .uno:ViewDataSourceBrowser had such controllers (It did however work in the past for some other commands before commit fb60217569b0fb5bc949c58b054da71992fe2582 ("tdf#83320 Hide vertical text commands early"). Also, searching the codebase for SfxVisibilityItem reveals more commands that set visibility, and I'm not sure if hardcoding all of them here is a good approach in general. Change-Id: Id8c22e729d2402837de0598fa8ca4d41160804c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137150 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-17No need for SfxWeldToolBoxControllerFactoryMaxim Monastirsky
sfx2::sidebar::ControllerFactory::CreateToolBoxController only supports creating controllers using the uno factory, or GenericToolbarController as a fallback. Given that we already handle the uno factory case in ToolBarManager::CreateControllers, all this complexity is really just for creating GenericToolbarController with a different ctor, which we can do locally as well. Change-Id: I3a5a3cda95a6c5db97615286e93630214f76cbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137149 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-15Fix typo "vetor"->"vector"Andrea Gelmini
Change-Id: Ie706797e1bda4d1cd279fa68e93fb15beabb6a2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137077 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-13tdf#149956 Pass the correct frame to VclStatusListenerMaxim Monastirsky
Starting directly to Writer (i.e. with "--writer") will attempt to create VclStatusListeners for .uno:ImageOrientation before the frame is activated, causing the dispatcher to not be found. Also defer that stuff to after a toolbar is filled, so we get a correct initial state for toolbars which shown when the current paragraph is rtl already. (There is a similar problem with the NB, but it isn't handled in this patch.) Change-Id: Ie482007c10a4014b4a2fd4d53f05d433777ecfb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137014 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-05tdf#149741 Mirror insert column icons for RTL tablesMaxim Monastirsky
The usual approach of setting the respective property in *Commands.xcu won't work here, as that works with the paragraph direction, which doesn't have to be the same as the table direction. Change-Id: I9c4d49a5c553a8a74e7760d257167a0be42c89c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136818 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-28NewMenuController: Use status update to determine the default factoryMaxim Monastirsky
This is a follow-up to 2446fdba3ec4a81d6e3b619a1d9e91b3c6dcbd54 ("tdf#134887 Rework last item handling in NewToolbarController"). We should better get the information on what is going to be executed from the entity that will actually execute it, instead of guessing on our own. This makes a difference for at least XML Form Document, where CTRL+N used to be shown next to the "XML Form Document" entry, although pressing that shortcut will open a regular writer doc. Change-Id: Ib9b58ea2fb83a6cfe9a603af6be97fb36a25ddc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136554 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-17tdf#125040 Ignore the default contextMaxim Monastirsky
This isn't a meaningful context, but a way to represent a lack of context. Typically it's a temporary state, followed by a proper context being set. The problem becomes apparent when a context deactivation is caused by switching to another document window, as the further activation will happen only when the former window is focused again. This makes the contextual controls disappear in the meantime. Change-Id: I96c8356acb2434c579dc74407043b55eb5374a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136010 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-16tdf#125040 Avoid flickering on context changeMaxim Monastirsky
Change-Id: I442fada34e10fe13e68987abba34969a8ab50bc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135958 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-15Show start center when closing last documentSamuel Mehrbrodt
also when there are active UNO connections. (Behavior was different when there were active UNO connections) Change-Id: Ief37b0f362b7e2a47eccbec985ee3017c475046c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135905 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-14Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: I157b331195cc8262e6bd1dcc536cb653587fc45f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135775 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-13tdf#125040 Make single mode toolbar context awareMaxim Monastirsky
This patch modifies the "Standard (Single Mode)" toolbar to have an optional context-aware section, given that a corresponding singlemode-<context-name>.xml files exist. This is a lot like the "Contextual Single" NB, except that it's implemented with regular toolbars, so docking/ customization/extensions/uno api etc. are all working. In addition, the "Single Toolbar" mode was modified to not show any other contextual toolbar. (But of course the single mode toolbar itself is perfectly usable outside of this mode.) Change-Id: Id746d9df59340a81962a8689b132941deea54b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135591 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-08VCL add vcl::WindowPosSize abstract classJan-Marek Glogowski
... and use it to remove a duplicate and simplify code. Should mostly be a refactoring, which was mainly done by some larger sed calls, except for the new API calls, which helped shrinking some LOC. All data is also now private. Originally two of the "replaced" "classes" had unsigned width and height and one had signed. Noel pointed out, that during calculations, the value might get negative temporarly, so this now settles with signed values. Still the set size should never be negative and this is enforced this way. Not sure that is what Noel had in mind. This also includes: - rename WindowState => WindowData - rename WindowStateMask => WindowDataMask - rename WindowStateState => WindowState - move WindowState and WindowDataMask to vcl/windowstate.hxx - move WindowData(Mask) and WindowState into vcl namespace - readability: replace or'ed WindowState enums with "meta" enums + add "meta" WindowState enums PosSize and PosSizeState Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-06-02clang-tidy modernize-pass-by-value in frameworkNoel Grandin
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31Drop unnecessary cast to intStephan Bergmann
...when iterating over the enumerators of enum Image_XML_Entry Change-Id: Ic59da7543a41f8b498d6f89e48faafcdf40c6873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135194 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-30cid#1504574 Resource leakCaolán McNamara
make an owner for the PropertyMapEntries Change-Id: Ie915a8a312f2b24488566814ad67fdeef89b5941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135123 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-30framework: fix crash on Writer startup when using --enable-ext-wiki-publisherMiklos Vajna
As reported by Julien, once the mediawiki extension is installed, the xHandler in framework::DispatchProvider::implts_searchProtocolHandler() points to an UNO component implemented in Java, and we crash in dynamic_cast<>(), at least on Linux with gcc 7.5 and libstdc++. This dynamic_cast<>() call was added in commit c0fa456436947a5c167c652d19a884064b43c03d (tdf#149261 sdext: fix crash on starting the presenter console for the 2nd time, 2022-05-26), to allow the presenter console to opt out from protocol handler caching. It was expected that the proxy object created for a Java UNO component would simply return nullptr when we try to dynamic_cast<>() it down to a C++ interface. Fix the problem by moving the interface to an UNO one: this side-steps the dynamic_cast<>() crash at the price of introducing an UNO interface, which is not meant to be part of the public UNO API (but at least it's not published). It may still make sense to improve the bridges/ code at some stage to not crash in dynamic_cast<>() on generated Java proxy objects. Change-Id: Iaac44515339e0dc15dddc3be45ef7dee7331e47a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135114 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-05-27tdf#149170 framework,sfx2: don't add ReadOnly=falseMichael Stahl
There is a non-obvious difference in error handling when opening the file read/write for type-detection fails in utl::MediaDescriptor::impl_openStreamWithURL() - if ReadOnly=false is given, it will abort the file loading, whereas without any ReadOnly it will fall-back to a read-only opening of the file for type detection. At this point a StillReadWriteInteraction is used, so the user is never notified of the failure. (regression from commit 404c51f3664ffd4f7e2c1c8bb8a12ac70954fec2) Change-Id: I8c06fe23cc0bc0767df83f680a1a59e3700bbbbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135045 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-26tdf#149261 sdext: fix crash on starting the presenter console for the 2nd timeMiklos Vajna
This started with commit 3f768cddd28a2f04eb1ffa30bed4474deb6fbfc4 (framework: avoid re-creating protocol handler instances all the time, 2022-05-02). In case there are 2 monitors, then one monitor shows the slideshow, the other shows the presenter console. The presenter console's protocol handler in sdext::presenter::PresenterProtocolHandler::Dispatch::Dispatch() has mpPresenterController->GetWindowManager() as an empty reference on the 2nd time the presentation starts. The above commit started to cache protocol handler instances at a frame level for performance reasons, and this is meant to be safe in general, but the presenter console's window manager is re-created between slideshow runs, so it depends on framework/ code to re-create the protocol handler all the time, which is problematic here. Fix the problem by introducing a framework::CacheInfo interface that allows protocol handler implementations to signal if they want to avoid being cached. This should be good enough for now, but if later it turns out that there are too many broken protocol handlers out there, then we can consider flipping the default and only cache handlers which explicitly opt in for this behavior. This is not done in this commit. Change-Id: Ic159813b1b339540bc8c4e780c4d6d7d2d4d2445 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135020 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-25elide temporary vector in PathSettings::impl_convertPath2OldStyleNoel Grandin
Change-Id: Ib86933ef564b0d27c47dbbaddaa55f03b8426c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23tdf#149176 tdf#149178 fix Save autorecovery information.. optionTünde Tóth
Autorecovery information was saved in every 10 minutes, regardless of the "Save Autorecovery information every" setting. Change-Id: I1a52da2fa5febb53c270a8db7472e9a8c0e4c426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134642 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>