summaryrefslogtreecommitdiff
path: root/sfx2/source
AgeCommit message (Collapse)AuthorFilesLines
10 hoursfix non-PCH windows buildNoel Grandin1-0/+1
after commit a7f8882e4975e4194732506e4ffb9f7af6eb9c72 Author: Noel Grandin <noelgrandin@collabora.co.uk> Date: Mon Apr 29 14:31:15 2024 +0200 convert HeapAlloc to make_unique Change-Id: Idb2e67285018eeb3373ba11c464df5a00b54a87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166925 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
14 hoursconvert HeapAlloc to make_uniqueNoel Grandin2-34/+6
which means we don't have to explicitly handle OOM, and the resulting code is much cleaner Change-Id: I958d6678bb2d6878dda9de6bf82c5314f168db17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
40 hourscool#8066: calc: enable .uno:ToggleSheetGridHubert Figuière1-1/+2
Signed-off-by: Hubert Figuière <hub@collabora.com> Change-Id: Ibe5bca4d0622c4015030a21d4ecccd41d5e9f483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166529 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
40 hoursWaE: C6011 Derefencing NULL pointer 'pMF'Caolán McNamara1-20/+21
Change-Id: I76e85e8671623f7cdf994dce779c3944b8761acf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
40 hoursUnchecked HeapAllocCaolán McNamara2-17/+19
Change-Id: Icd49d0b5f996d57d8e9518cb08fd3c3fc54fa779 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166732 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
40 hoursWaE: C6387 'pEncodingName' could be 0Caolán McNamara1-1/+1
Change-Id: I3ff5050a88d8e5ae6c6581189597231d49e0f96a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166733 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
40 hoursrearrange to clarify that ThumbnailViewItem* was never nullCaolán McNamara3-20/+18
Change-Id: Ie10ed0193fbaeae2fb711caa9059906513c42e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166730 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
40 hourscall SfxViewShell::Current() just onceCaolán McNamara5-16/+30
Change-Id: Iea3777cfb86c64c01cf1029ff3ba6a834d8c3619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166706 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
40 hoursSfxViewFrame::Current() dereferenced without null checkCaolán McNamara3-8/+17
found with msvc -analyze and _Ret_maybenull_ Change-Id: Ia377822e93448dc61acd1482d34167c35a46836b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166705 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2 daystdf#160827: fix crash when retrieving _MarkAsFinal value (docx) (take 2)Julien Nabet1-1/+5
Change-Id: I3f2ad56a205877be54b0dbfe361b76db3436f5ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166798 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
3 daysRevert "tdf#160827: fix crash when retrieving _MarkAsFinal value (docx)"Julien Nabet1-7/+1
As Noel advised in https://gerrit.libreoffice.org/c/core/+/166724, it's better to test type this way: getValueType() == cppu::UnoType<bool>::get() This reverts commit f49d74edf76097d014ed891d0025cb2e9b197c5a. Change-Id: Ic148b27761141d1020b63eeba8044fd545bab2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166797 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
3 daystdf#160827: fix crash when retrieving _MarkAsFinal value (docx)Julien Nabet1-1/+7
xPropertySet->getPropertyValue("_MarkAsFinal") can retrieve an Any containing a boolean or a string Change-Id: I1c8bafc12cdaf7fb98d3500507ba83b3e90f69cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166763 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
5 daysMove ObjectInspectorWidgets code into cxx fileNoel Grandin1-0/+40
having this much code in a header file is not a good idea Change-Id: Ic21eca651335bb282ebbf9434811ae591b7e0b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 daysloplugin:constantparamNoel Grandin1-27/+14
Change-Id: I0e91da1e48326495f841b53f999a0d31ecd1a36e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 daysloplugin:constantparamNoel Grandin1-11/+11
Change-Id: I8ae27f060e46548aa364db8c6b82d77e6c8f3d3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 daysuse more OUString literalNoel Grandin1-5/+2
convert some functions which merely create an OUString on the fly from a char literal to 'constexpr OUString' literals Change-Id: I617490baf2d976291b324cc991b59cd18f4b242c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166392 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
14 dayssw lok: .uno:SetDocumentProperties: add file size parameterPranam Lashkari2-7/+16
problem: in LOK/online to support async save, files in jails may have different extensions (ie: .upload, .uploading) this caused problem to detect files as original file name may not exist. As result property like file size were always set to 0 Change-Id: I552aef203297470d01032659a266210970129e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165769 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit aa4e10efc6e9ac92b0c652f238526aacbe2096c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166171 Tested-by: Jenkins
14 daysDrop FRound, and use generalized basegfx::froundMike Kaganski1-2/+2
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-16sfx2 lok: simplify error handling in InterceptLOKStateChangeEvent()Miklos Vajna1-22/+13
The whole function is pointless without a viewshell, move the check & short-circuit to the top of the function, and drop all the duplicate checks. Also drop two calls to SfxViewShell::Current(): getting it from the view frame is better than getting some global state. Change-Id: I4aa7aeb7c89841bbced760ce2e43d2312bc97f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166139 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-15null-deref in SfxViewShell::isBlockedCommandCaolán McNamara2-12/+15
Change-Id: I43db7fabcc32971f951cc72dc9b1d22eba8df357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166094 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-14Use more o3tl::convertMike Kaganski1-1/+1
Change-Id: I2a4f109b8c1031d0330f249b7666ae65f9fae7ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166062 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-13sfx2: fix crash in InterceptLOKStateChangeEvent()Miklos Vajna1-7/+11
Notice how e.g. the TransformPosX case already performed the same null pointer check. Crashreport backtrace: > program/libmergedlo.so > InterceptLOKStateChangeEvent > sfx2/source/control/unoctitm.cxx:1143 > program/libmergedlo.so > SfxStateCache::SetState_Impl(SfxItemState, SfxPoolItem const*, bool) > sfx2/source/control/statcach.cxx:432 > program/libmergedlo.so > SfxBindings::Update_Impl(SfxStateCache&) > /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:919 (discriminator 2) > program/libmergedlo.so > SfxBindings::NextJob_Impl(Timer const*) > /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173 Change-Id: I141d4f9ec50d0ce7a0eeaba69752c31390a1f9ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166027 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166046 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-08tdf#159719 reset SfxPoolItemHolder when Pool changesArmin Le Grand (allotropia)1-0/+5
Change-Id: Ic2724c6e03acaa8cfc74dc2aadfac6b13d8561c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165883 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-04-06Enable allowing comment editing in readOnly view mode.Gökay Şatır1-2/+30
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I536448da395568cd43af6f4d1d36ef09f3c6a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165349 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> (cherry picked from commit 226e2263468da403d1f9db504115830f5a030229) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165834 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-06tdf#152336 Detect charset and separators for csv filesGabriel Masei1-0/+327
Change-Id: Ie8451b3d30e390d363d8f9e5ec8bdf47350ca3a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164936 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-04-04Remove duplicate code.Moritz Duge1-1/+0
Change-Id: Ia32b0525ecdf5944c2ebd3045dc3d536941ed394 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165763 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-04-04-Werror=maybe-uninitializedStephan Bergmann1-2/+5
...as reported at least with some recent GCC 14 trunk. Lets assume that those calls to GetWindowPos are never meant to fail. (If it turns out that they can fail after all, the code would presumably need some modifications to mitigate the uninitialized reads from nL/nP.) Change-Id: I7695d3e54de2bf5d1e91b32cfdc84e994ccdd57d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165783 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-03Use sdi properties for checking uno commands'a availability.Gökay Şatır2-83/+3
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: Ie70851756d1a4272876b07fefb876d7e6f8d4d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165287 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 68422af88576a799b22e472c303ed924c360784b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165734 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-03Allow more uno commands in readonly view mode.Gökay Şatır1-1/+29
So user can use keyboard for selection. Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: Ic7812c88110da9fbefe86d145f921e48360b4f34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165157 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165733 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-02tdf#146619 Drop unused 'using namespace' in: sfx2/Gabor Kelemen23-31/+0
Change-Id: I3748612644c9c4eb88d7fb6e2d512954de9c1002 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165538 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-31Convert SfxDocumentMetaData to comphelper::WeakComponentImplHelperNoel Grandin1-194/+197
Change-Id: Ib633595008224ff11486e9ff72b6801d2dbfb887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28null deref of mpSidebarControllerCaolán McNamara1-57/+60
follow the pattern used in the rest of this and skip the branch that depends on mpSidebarController existing git show -w Change-Id: I739754b2af7ad09fa80c36693d8adbf173ece2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165426 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-28show this infobar regardless of the exact reason for presenting itCaolán McNamara1-27/+36
Change-Id: I8af248efe8f9dda868e2f126beead875e391b563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165402 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-27Allow export commands in readonly view mode.Gökay Şatır1-1/+4
(cherry picked from commit 5c8c5db55e082eed3422e3fb9455943b2f285253) Change-Id: I88e9a45fd9e5c7b6bf1984a424e36b010aaaff4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165389 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-27Send ParaRightToLeft state messageto client sideDarshan111-2/+12
- Before this patch in online text in paragraph was changing according to uno command but client was not getting and info about is RTL true or TRL true - this will send message [:unoParaRightToLeft=true || :unoParaLeftToRight=true] at client side - added more properties like disabled and state information to handle both case at same time in online - which will be helpful to our existing locgic where to add or from where to remove selected class on element according to response Change-Id: Ia443215342d6a81f4e60fa9237149f6b18420e16 Change-Id: I08fb7e474e099822b26c732fe1e5dac8e773c58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164767 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164817 (cherry picked from commit fa93750070793cd548d028feb39e4d0e0e61ae5a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-27Resolves tdf#159573 and tdf#137931 - WhatsNew or Welcome dialogHeiko Tietze3-16/+39
To test the new dialog, change org.openoffice.Setup > Product > ooSetupLastVersion to some lesser value for the WhatsNew dialog or clear the entry for the Welcome version. Change-Id: Iec6de50edba0e5430e82f1db85e61d1e4501771d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163739 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-03-26Allow enabling saving when comment edit is allowed in readonly.Gökay Şatır1-1/+14
Change-Id: I88d535a5b23fb6d5de8e72eec61bdf3550bc757d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165334 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-26tdf#160184 ask user if they want to trust an untrusted certificatePatrick Luby1-0/+2
gpgme contexts uses the "auto" trust model by default which only allows encrypting with keys that have their trust level set to "Ultimate". The gpg command, however, gives the user the option to encrypt with a certificate that has a lower trust level so emulate that bahavior by asking the user if they want to trust the certificate for just this operation only. Also, abort saving if no certificates are selected which is an indication that the user cancelled the Select Certificate dialog. Change-Id: I20951b1e31b2dcf8adb82243742f8c00fbaca8c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165260 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-24for OSL_DEBUG_LEVEL >= 2, adapt to b55bf0cbdfdc6820Tomoyuki Kubota2-2/+2
Change-Id: Ie3b9746ca150fba8f9849649b6e6bbd0439e1a1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165234 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-23Harmonization of warning and error colorsHeiko Tietze1-6/+6
* hard-coded colors from infobar moved to settings * weld::LabelType::Warning and ::Error uses these colors * gtk3 native configuration removed Change-Id: Ia80584e9267b8385f7f6b25322f5a85a2570af68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165161 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-03-21ITEM: Remove InvalidateAllItems()Armin Le Grand (allotropia)7-16/+16
I checked if this is used, but it can be replaced using Clear() -> all. This prevents that the whole array of Items in an ItemSet gets set to INVALID_POOL_ITEM. I also checked if INVALID_POOL_ITEM/IsInvalidItem is needed at all representing SfxItemState::DONTCARE but it is and still will need to be set for individual Items. At last checked if SfxItemState::UNKNOWN and ::DISABLED really need to be separate states, but indeed there are some rare cases that need that. To make things more consistent I also renamed SfxItemState::DONTCARE to SfxItemState::INVALID to better match Set/IsInvalid calls at ItemSet. The build showed a missing UT and led to a problem due to the hand-made ItemSet-like SearchAttrItemList. The state 'invalid' seems to be used as 'unused' marker. It should be changed to use SfxPoolItemHolder and not need that. For now, set by using an own loop to set to that state. Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-21cool#8278 sfx2 lok: fix lost hide notification on sidebar switchMiklos Vajna1-10/+8
Similar to commit 55feb670ca28e0a48ac82a65b5559598704d993e (cool#8278 sfx2 lok: fix unexpected non-json sidebar status update, 2024-03-21), the trouble here was not around hiding the sidebar but around switching between decks. This went wrong in commit aaf6ce108e91b1504befe19afcee471e3316ae7a (cool#7492 sfx2 lok: set language/locale on async sidebar update, 2024-01-11), where I didn't notice that SidebarController::SwitchToDeck() may emit two callbacks, so the effort to avoid code duplication went a bit too far: the hide+show case only emitted a show callback. Fix this by building a list of state changes to emit, so once se switch decks, not only the new one is "on", but also the old one is "off". Change-Id: I1678ee61e004697a6a5c6ecaf40a18b2d1d47e61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165108 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-21Downgrade sfx::SfxBindings aAutoTimer to an idleMike Kaganski1-0/+1
This is a follow-up to commit f45402ae3f5241b460d9f1dcb04183893e1f91f7 (Fix a spurious JunitTest_sw_unoapi_3 failure, 2024-03-15). As noted by Stephan, the failure persisted; it was because the update of slots also accessed the changing document model, and it wasn't prevented by IdlesLockGuard, because aAutoTimer had a default priority. Change-Id: Iad8dfadcd35d9611e61e4c011511d6155a343f58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165090 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-21Moving parts of readonly checks from model to view.Gökay Şatır4-5/+57
Summary for what's done with this commit: init.cxx * Add guards for modify commands. viewsh: * Add "IsCurrentLokViewReadOnly" for ease of use. unocitm: * Add guard for modify comamnds dispatch.cxx * Implement readonlyview. objmisc: * Modify IsReadOnlyUI check for LokReadOnly view. svx.sdi: * Disable TableChangeCurrentBorderPosition command for readOnly views. sw-editwin: * Treat mouse moves as readonly when the view is LokReadOnly. gridwin: * For autofilter. impedit2, inputhdl: * For text input. svdedtc: * For sdr object dragging. Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165093 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-21Drop C/C++ DEBUG macroStephan Bergmann5-5/+5
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with OSL_DEBUG_LEVEL directly Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-21cool#8278 sfx2 lok: fix unexpected non-json sidebar status updateMiklos Vajna2-1/+55
Open an Impress document via LOK, open the slide layout sidebar, click the toggle icon so it gets closed: the toggle icon will signal that the sidebar is open, when it's closed already. This is a regression from commit aaf6ce108e91b1504befe19afcee471e3316ae7a (cool#7492 sfx2 lok: set language/locale on async sidebar update, 2024-01-11), previously we always emitted LOK_CALLBACK_STATE_CHANGED callbacks with plain text payloads for the sidebar, where the locale with implicit (with all its issues), but the above scenario worked fine. Fix the problem by making SidebarController::disposeDecks() consistent with SwitchToDeck(), so now we always emit JSON payloads for the sidebar deck changes. An alternative would be to improve the code around extractUnoCommand() in online.git to handle a mix of plain text and JSON payloads, but the plain text payload is tricky to extend, so using more JSON payloads sounds like a better fix. Change-Id: I5b75c2987c230c6720181a1e95ae579727943235 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165055 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-18cid#1594401 Explicit null dereferencedCaolán McNamara1-1/+1
Change-Id: I0ab5cedcf5c573fa00aca4c51f021251974337ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-18tdf#40244 tdf#160192: create tempFile elsewhere if LogicBase is ROJustin Luth1-0/+4
This avoids a crash/infinite loop in specific read-only folder situation (where the lock file already exists). It also fixes ODF files giving three misleading/unclear notices when attempting to save into a read-only folder. When LO saves a file, it saves to a temporary file and then moves that file overtop of the previous one, IIUC. Prior to 6.1 5259ab8104cfba60c40748ed0cd59d93df038c5b that temporary file was stored in the /tmp directory (IIUC), but was changed to be in the same folder for easier renaming, same filesystem etc. Note that typically this situation would fail since a locking file also could not be created. However in the case where the lock file already exists, then all the pieces are in place to actually modify the document. By falling back to the /tmp folder if the document's folder is read-only, we can still modify a writeable document. Change-Id: Ie027fc05934f2c071f7a91007255801c179bff49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164841 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-15tdf#160192: avoid hang when trying to overwrite doc/lockfile in RO dirJustin Luth1-1/+1
Bug exposed with 6.1 5259ab8104cfba60c40748ed0cd59d93df038c5b sfx2 store: create temp files next to local files tested on .doc format, code-read suggests it affects xls/ppt too, but they throw exceptions, apparently before hitting this section. I was seeing an infinite loop on SfxOleSection::SaveProperty's while((rStrm.Tell() & 3)) rStrm.WriteUChar( 0 ); because nothing checks to confirm that the tempfile is actually created/useable. Now, instead of an infinite loop, we get a crash... Change-Id: I9e093432361a8ad6f928ec9b47290274b3d4ef06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164840 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-03-13remove DBG_ASSERTNoel Grandin1-1/+0
this is testing the wrong thing anyway. I briefly converted it to a real assert, but surprise surprise, real code appears to now rely on being able to set this more than once, so just remove it. Change-Id: Ib272b002e3038eb8537df4768d980b3c3cf938fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>