core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/doc/objstor.cxx | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) New commits: commit 19ac02dbae7474a1c88a545e6cab6fda678fdb95 Author: Caolán McNamara AuthorDate: Thu May 16 14:37:52 2024 +0100 Commit: Michael Meeks CommitDate: Thu May 16 16:14:14 2024 +0200 always restore existing interaction handler after save In an error case we end up removing any existing interaction handler. So in all cases leave with the same interaction handler that existed before the save attempt. See also: commit 3b294f6139028014e72379ebe8eda24a2bd32195 Date: Thu Jun 8 20:53:16 2023 +0100 restore, not clear, existing interaction handler after save where the same problem can be reproduced of every change is a full-document invalidation once someone else joins a document which has had a save-fail. Change-Id: I211183c551b1d64898cfe4aaf11dd9ef23f8ca15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index f4826b93ad7d..ce548a81ea6a 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2734,17 +2734,21 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) if (pImpl->bPreserveVersions) pMediumTmp->TransferVersionList_Impl( *pRetrMedium ); +// Save the original interaction handler +Any aOriginalInteract; +if (const SfxUnoAnyItem *pItem = pRetrMedium->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false)) +{ +aOriginalInteract = pItem->GetValue(); +// The original pRetrMedium and potential replacement pMediumTmp have the same interaction handler at this point +assert(pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false)->GetValue() == aOriginalInteract); +} + // an interaction handler here can acquire only in case of GUI Saving // and should be removed after the saving is done -Any aOriginalInteract; css::uno::Reference< XInteractionHandler > xInteract; const SfxUnoAnyItem* pxInteractionItem = SfxItemSet::GetItem(pArgs, SID_INTERACTIONHANDLER, false); if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) && xInteract.is() ) -{ -if (const SfxUnoAnyItem *pItem = pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false)) -aOriginalInteract = pItem->GetValue(); pMediumTmp->GetItemSet().Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, Any( xInteract ) ) ); -} const SfxBoolItem* pNoFileSync = pArgs->GetItem(SID_NO_FILE_SYNC, false); if (pNoFileSync && pNoFileSync->GetValue()) @@ -2784,7 +2788,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) // reconnect to object storage DoSaveCompleted(); -pRetrMedium->GetItemSet().ClearItem( SID_INTERACTIONHANDLER ); +if (aOriginalInteract.hasValue()) + pRetrMedium->GetItemSet().Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, aOriginalInteract)); +else +pRetrMedium->GetItemSet().ClearItem(SID_INTERACTIONHANDLER); pRetrMedium->GetItemSet().ClearItem( SID_PROGRESS_STATUSBAR_CONTROL ); delete pMediumTmp;
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 9bbe40cc2d39f89ffcae57875d4c7ef7688d83d7 Author: Hubert Figuière AuthorDate: Wed May 8 17:34:47 2024 -0400 Commit: Szymon Kłos CommitDate: Thu May 9 08:52:37 2024 +0200 lokit: Properly handle state update for .uno:ToggleSheetGrid This is a follow up on cool#8066 Signed-off-by: Hubert Figuière Change-Id: I7d6ce4c9dfe7c2e9a2dda110e587c8c825c4df2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167370 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 6572761c11ea..d289cd2616a8 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -940,8 +940,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "SpacePara15" || aEvent.FeatureURL.Path == "SpacePara2" || aEvent.FeatureURL.Path == "DataFilterAutoFilter" || -aEvent.FeatureURL.Path == "CellProtection" || -aEvent.FeatureURL.Path == "ToggleSheetGrid") +aEvent.FeatureURL.Path == "CellProtection") { bool bTemp = false; aEvent.State >>= bTemp; @@ -1224,7 +1223,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra } } else if (aEvent.FeatureURL.Path == "ToggleMergeCells" || - aEvent.FeatureURL.Path == "SheetRightToLeft") + aEvent.FeatureURL.Path == "SheetRightToLeft" || + aEvent.FeatureURL.Path == "ToggleSheetGrid") { bool aBool;
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/doc/sfxbasemodel.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit e005690e9c648ce516c1ed60da6341c7215bf2c9 Author: Michael Meeks AuthorDate: Tue Apr 16 18:11:36 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Apr 16 20:49:26 2024 +0200 lok: avoid sending jsdialog messages during background save. This creates lots of enable/disable traffic that is no longer needed, and may trigger a fallback to non-background-save. Change-Id: I3dd789d13b6c28540422d99128014c9c17e00d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166157 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 062c594f2c4f..a42f9e6703b8 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -394,6 +394,9 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell const * pObjectShell ) if ( !pObjectShell ) return; +if ( comphelper::LibreOfficeKit::isForkedChild() ) +return; // no need to tweak UI when in the background + for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pObjectShell ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pObjectShell )
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) New commits: commit 9e4de8c5f4a0c04d19d823b3deb1f4fcf0a49352 Author: Miklos Vajna AuthorDate: Mon Apr 15 16:47:59 2024 +0200 Commit: Miklos Vajna CommitDate: Tue Apr 16 08:16:59 2024 +0200 sfx2 lok: simplify error handling in InterceptLOKStateChangeEvent() 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/+/166130 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index d6d13f82f0a4..37286cc2d71d 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -893,7 +893,8 @@ void SfxDispatchController_Impl::StateChangedAtToolBoxControl( sal_uInt16 nSID, static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFrame, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState) { -if (!comphelper::LibreOfficeKit::isActive()) +const SfxViewShell* pViewShell = pViewFrame->GetViewShell(); +if (!comphelper::LibreOfficeKit::isActive() || !pViewShell) return; OUStringBuffer aBuffer(aEvent.FeatureURL.Complete + "="); @@ -1121,17 +1122,13 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra else if (aEvent.FeatureURL.Path == "ParaLeftToRight" || aEvent.FeatureURL.Path == "ParaRightToLeft") { -const SfxViewShell* pViewShell = SfxViewShell::Current(); -if (pViewShell) -{ -tools::JsonWriter aTree; -bool bTemp = false; -aEvent.State >>= bTemp; -aTree.put("commandName", aEvent.FeatureURL.Complete); -aTree.put("disabled", !aEvent.IsEnabled); -aTree.put("state", bTemp ? "true" : "false"); -pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); -} +tools::JsonWriter aTree; +bool bTemp = false; +aEvent.State >>= bTemp; +aTree.put("commandName", aEvent.FeatureURL.Complete); +aTree.put("disabled", !aEvent.IsEnabled); +aTree.put("state", bTemp ? "true" : "false"); +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); return; } else if (aEvent.FeatureURL.Path == "AssignLayout" || @@ -1152,8 +1149,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "TransformWidth" || aEvent.FeatureURL.Path == "TransformHeight") { -const SfxViewShell* pViewShell = SfxViewShell::Current(); -if (aEvent.IsEnabled && pViewShell && pViewShell->isLOKMobilePhone()) +if (aEvent.IsEnabled && pViewShell->isLOKMobilePhone()) { boost::property_tree::ptree aTree; boost::property_tree::ptree aState; @@ -1198,11 +1194,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aTree.put("state", aString); std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); -const SfxViewShell* pShell = pViewFrame->GetViewShell(); -if (pShell) -{ -pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, OString(aStream.str())); -} +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, OString(aStream.str())); return; } else if (aEvent.FeatureURL.Path == "StateTableCell") @@ -1316,14 +1308,13 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra else { // Try to send JSON state version -SfxLokHelper::sendUnoStatus(pViewFrame->GetViewShell(), pState); +SfxLokHelper::sendUnoStatus(pViewShell, pState); return; } OUString payload = aBuffer.makeStringAndClear(); -if (const SfxViewShell* pViewShell = pViewFrame->GetViewShell()) -pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8()); +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) New commits: commit 776f73c28f7a4984c8a932a5316a0cc0837e71e3 Author: Miklos Vajna AuthorDate: Fri Apr 12 08:52:43 2024 +0200 Commit: Michael Meeks CommitDate: Sat Apr 13 12:30:45 2024 +0200 sfx2: fix crash in InterceptLOKStateChangeEvent() 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 Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165942 Tested-by: Michael Meeks diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index d99446d01d79..b62f0f4376c4 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1118,13 +1118,17 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra else if (aEvent.FeatureURL.Path == "ParaLeftToRight" || aEvent.FeatureURL.Path == "ParaRightToLeft") { -tools::JsonWriter aTree; -bool bTemp = false; -aEvent.State >>= bTemp; -aTree.put("commandName", aEvent.FeatureURL.Complete); -aTree.put("disabled", !aEvent.IsEnabled); -aTree.put("state", bTemp ? "true" : "false"); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); +const SfxViewShell* pViewShell = SfxViewShell::Current(); +if (pViewShell) +{ +tools::JsonWriter aTree; +bool bTemp = false; +aEvent.State >>= bTemp; +aTree.put("commandName", aEvent.FeatureURL.Complete); +aTree.put("disabled", !aEvent.IsEnabled); +aTree.put("state", bTemp ? "true" : "false"); +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); +} return; } else if (aEvent.FeatureURL.Path == "AssignLayout" ||
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/sidebar/SidebarDockingWindow.cxx | 117 +-- 1 file changed, 60 insertions(+), 57 deletions(-) New commits: commit 19ed6ec6bfbe1b4730cfb5f878eed63b0781039b Author: Caolán McNamara AuthorDate: Thu Mar 28 11:23:56 2024 + Commit: Caolán McNamara CommitDate: Fri Mar 29 09:48:54 2024 +0100 null deref of mpSidebarController 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/+/165425 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 23c3b459c3be..d0edf8066332 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -136,75 +136,78 @@ SfxChildAlignment SidebarDockingWindow::CheckAlignment ( bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent) { -NotifyEventType nType = rEvent.GetType(); -if (NotifyEventType::KEYINPUT == nType) +if (mpSidebarController) { -const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); -switch (rKeyCode.GetCode()) +NotifyEventType nType = rEvent.GetType(); +if (NotifyEventType::KEYINPUT == nType) { -case KEY_UP: -case KEY_DOWN: -case KEY_PAGEUP: -case KEY_PAGEDOWN: -case KEY_HOME: -case KEY_END: -case KEY_LEFT: -case KEY_RIGHT: -case KEY_BACKSPACE: -case KEY_DELETE: -case KEY_INSERT: -case KEY_RETURN: -case KEY_ESCAPE: +const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); +switch (rKeyCode.GetCode()) { +case KEY_UP: +case KEY_DOWN: +case KEY_PAGEUP: +case KEY_PAGEDOWN: +case KEY_HOME: +case KEY_END: +case KEY_LEFT: +case KEY_RIGHT: +case KEY_BACKSPACE: +case KEY_DELETE: +case KEY_INSERT: +case KEY_RETURN: +case KEY_ESCAPE: +{ +return true; +} +default: +break; +} +if (!mpAccel) +{ +mpAccel = svt::AcceleratorExecute::createAcceleratorHelper(); +mpAccel->init(comphelper::getProcessComponentContext(), mpSidebarController->getXFrame()); +} +const OUString aCommand(mpAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode))); +if (".uno:DesignerDialog" == aCommand) +{ +std::shared_ptr xPanelDescriptor = + mpSidebarController->GetResourceManager()->GetPanelDescriptor( u"StyleListPanel" ); +if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) ) +Close(); +return true; +} +if (".uno:Undo" == aCommand || ".uno:Redo" == aCommand) +{ +comphelper::dispatchCommand(aCommand, {}); return true; } -default: -break; -} -if (!mpAccel) -{ -mpAccel = svt::AcceleratorExecute::createAcceleratorHelper(); -mpAccel->init(comphelper::getProcessComponentContext(), mpSidebarController->getXFrame()); -} -const OUString aCommand(mpAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode))); -if (".uno:DesignerDialog" == aCommand) -{ -std::shared_ptr xPanelDescriptor = - mpSidebarController->GetResourceManager()->GetPanelDescriptor( u"StyleListPanel" ); -if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) ) -Close(); -return true; } -if (".uno:Undo" == aCommand || ".uno:Redo" == aCommand) +else if (NotifyEventType::MOUSEBUTTONDOWN == nType) { -comphelper::dispatchCommand(aCommand, {}); -return true; +const MouseEvent *mEvt = rEvent.GetMouseEvent(); +if (mEvt->IsLeft()) +{ +tools::Rectangle aGrip = mpSidebarController->GetDeckDragArea(); +if ( aGrip.Contains( mEvt->GetPosPixel() ) ) +mbIsReadyToDrag = true; +} } -} -else if (NotifyEventType::MOUSEBUTTONDOWN == nType) -{ -const MouseEvent *mEvt = rEvent.GetMouseEvent(); -if (mEvt->IsLeft()) +
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/doc/docfile.cxx | 35 +++ sfx2/source/doc/objstor.cxx |4 +++- 2 files changed, 34 insertions(+), 5 deletions(-) New commits: commit 53316a6b8228885a17bf53c4fae6fe9d8ef80d2d Author: Michael Meeks AuthorDate: Wed Mar 27 18:01:49 2024 + Commit: Caolán McNamara CommitDate: Thu Mar 28 15:37:46 2024 +0100 lok: avoid perturbing parent background save process' temp file. The temporary file that typically contains the content of thes currently open document is re-written, and deleted on save. Avoid deleting the original when we are background save worker. Change-Id: Ibbb3a963cb3420088623994c067115ff77b96f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165408 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index c961733d85ac..ba45c8eb9250 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -344,6 +345,32 @@ CheckReadOnlyTaskTerminateListener::notifyTermination(const css::lang::EventObje lock.unlock(); mCond.notify_one(); } + +/// Temporary file wrapper to handle tmp file lifecyle +/// for lok fork a background saving worker issues. +class MediumTempFile : public ::utl::TempFileNamed +{ +bool m_bWasChild; +public: +MediumTempFile(const OUString *pParent ) +: ::utl::TempFileNamed(pParent) +, m_bWasChild(comphelper::LibreOfficeKit::isForkedChild()) +{ +} + +MediumTempFile(const MediumTempFile ) = delete; + +~MediumTempFile() +{ +bool isForked = comphelper::LibreOfficeKit::isForkedChild(); + +// avoid deletion of files created by the parent +if (isForked && ! m_bWasChild) +{ +EnableKillingFile(false); +} +} +}; } class SfxMedium_Impl @@ -406,7 +433,7 @@ public: uno::Sequence < util::RevisionTag > aVersions; -std::unique_ptr<::utl::TempFileNamed> pTempFile; +std::unique_ptr pTempFile; uno::Reference xStorage; uno::Reference m_xZipStorage; @@ -3524,7 +3551,7 @@ void SfxMedium::CompleteReOpen() bool bUseInteractionHandler = pImpl->bUseInteractionHandler; pImpl->bUseInteractionHandler = false; -std::unique_ptr<::utl::TempFileNamed> pTmpFile; +std::unique_ptr pTmpFile; if ( pImpl->pTempFile ) { pTmpFile = std::move(pImpl->pTempFile); @@ -4035,7 +4062,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) } OUString aLogicBase = GetLogicBase(GetURLObject(), pImpl); -pImpl->pTempFile.reset(new ::utl::TempFileNamed()); +pImpl->pTempFile.reset(new MediumTempFile()); pImpl->pTempFile->EnableKillingFile(); pImpl->m_aName = pImpl->pTempFile->GetFileName(); OUString aTmpURL = pImpl->pTempFile->GetURL(); @@ -4131,7 +4158,7 @@ void SfxMedium::CreateTempFileNoCopy() pImpl->pTempFile.reset(); OUString aLogicBase = GetLogicBase(GetURLObject(), pImpl); -pImpl->pTempFile.reset(new ::utl::TempFileNamed()); +pImpl->pTempFile.reset(new MediumTempFile()); pImpl->pTempFile->EnableKillingFile(); pImpl->m_aName = pImpl->pTempFile->GetFileName(); if ( pImpl->m_aName.isEmpty() ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 17ee6bf6217d..4d7822613ac9 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1425,7 +1425,9 @@ bool SfxObjectShell::SaveTo_Impl // TODO/LATER: error handling if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() ) { -SAL_WARN("sfx.doc", "SfxObjectShell::SaveTo_Impl: very early error return"); +SAL_WARN("sfx.doc", "SfxObjectShell::SaveTo_Impl: " + " very early error return " << rMedium.GetErrorCode() << " " + << pMedium->GetErrorCode() << " " << GetErrorCode()); return false; }
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/dispatch.cxx |3 + sfx2/source/control/unoctitm.cxx | 83 --- 2 files changed, 3 insertions(+), 83 deletions(-) New commits: commit 68422af88576a799b22e472c303ed924c360784b Author: Gökay Şatır AuthorDate: Mon Mar 25 16:49:08 2024 +0300 Commit: Gökay ŞATIR CommitDate: Tue Mar 26 10:02:37 2024 +0100 Use sdi properties for checking uno commands'a availability. Signed-off-by: Gökay Şatır Change-Id: Ie70851756d1a4272876b07fefb876d7e6f8d4d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165287 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 8505c5ea8477..67f78885a033 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1591,6 +1591,9 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, SfxSlotServer& rServer) bool bReadOnly = ( SfxSlotFilterState::ENABLED_READONLY != nSlotEnableMode && xImp->bReadOnly ); +if (!bReadOnly && comphelper::LibreOfficeKit::isActive()) +bReadOnly = xImp->pFrame && xImp->pFrame->GetViewShell() && xImp->pFrame->GetViewShell()->IsLokReadOnlyView(); + // search through all the shells of the chained dispatchers // from top to bottom sal_uInt16 nFirstShell = 0; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 3e2a3f125cfd..d99446d01d79 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -520,83 +520,6 @@ void collectUIInformation(const util::URL& rURL, const css::uno::Sequence< css:: } -// Checks if LOK is active and uno command is allowed for the current LOK view. -static bool isCommandAllowedForViewType(const OUString& command) -{ -if (SfxViewShell::IsCurrentLokViewReadOnly()) -{ -// This is a sublist of "sUnoCommands". -constexpr OUString allowedCommandList[] = { -u"Copy"_ustr, -u"SelectAll"_ustr, -u"SelectColumn"_ustr, -u"SelectRow"_ustr, -u"EntireRow"_ustr, -u"EntireColumn"_ustr, -u"EntireCell"_ustr, -u"RowColSelCount"_ustr, -u"SpellOnline"_ustr, -u"StatePageNumber"_ustr, -u"StateWordCount"_ustr, -u"StateTableCell"_ustr, -u"SelectionMode"_ustr, -u"PageStatus"_ustr, -u"LayoutStatus"_ustr, -u"ToolbarMode"_ustr, -u"ChangeTheme"_ustr, -u"CopyHyperlinkLocation"_ustr, -u"ExportDirectToPDF"_ustr, -u"ExportToPDF"_ustr, -u"ExportToEPUB"_ustr, -u"CharRightSel"_ustr, -u"CharLeftSel"_ustr, -u"WordRightSel"_ustr, -u"WordLeftSel"_ustr, -u"EndOfParaSel"_ustr, -u"StartOfParaSel"_ustr, -u"GoRight"_ustr, -u"GoLeft"_ustr, -u"GoToNextWord"_ustr, -u"GoToPrevWord"_ustr, -u"GoToNextPara"_ustr, -u"GoToStartOfPara"_ustr, -u"GoUp"_ustr, -u"GoDown"_ustr, -u"GoRightSel"_ustr, -u"GoLeftSel"_ustr, -u"GoUpSel"_ustr, -u"GoDownSel"_ustr, -u"GoLeftToStartOfData"_ustr, -u"GoRightToEndOfData"_ustr, -u"GoToStart"_ustr, -u"GoToEndOfData"_ustr, -u"GoUpToStartOfData"_ustr, -u"GoDownToEndOfData"_ustr, -u"GoLeftToStartOfDataSel"_ustr, -u"GoRightToEndOfDataSel"_ustr, -u"GoUpToStartOfDataSel"_ustr, -u"GoDownToEndOfDataSel"_ustr -}; - -bool allowed = std::find(std::begin(allowedCommandList), std::end(allowedCommandList), command) != std::end(allowedCommandList); - -if (!allowed && SfxViewShell::Current() && SfxViewShell::Current()->IsAllowChangeComments()) -{ -constexpr OUString allowedCommentCommandList[] = { -u"InsertAnnotation"_ustr, -u"DeleteComment"_ustr, -u"DeleteAnnotation"_ustr, -u"EditAnnotation"_ustr -}; -allowed = std::find(std::begin(allowedCommentCommandList), std::end(allowedCommentCommandList), command) != std::end(allowedCommentCommandList); -} - -return allowed; -} - -return true; -} - void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs, const css::uno::Reference< css::frame::XDispatchResultListener >& rListener ) @@ -623,12 +546,6 @@ void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, return; } - -if (aURL.Protocol == ".uno:" && !isCommandAllowedForViewType(aURL.Path)) -{ -return; -} - if ( !(pDispatch && (
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) New commits: commit 38baaed9c11a65bda4079274a3d73bbd7035af7c Author: Gökay Şatır AuthorDate: Fri Mar 22 13:34:38 2024 +0300 Commit: Gökay ŞATIR CommitDate: Fri Mar 22 12:37:57 2024 +0100 Allow more uno commands in readonly view mode. So user can use keyboard for selection. Signed-off-by: Gökay Şatır Change-Id: Ic7812c88110da9fbefe86d145f921e48360b4f34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165157 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 59d51a8c3cf1..3e2a3f125cfd 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -547,7 +547,35 @@ static bool isCommandAllowedForViewType(const OUString& command) u"CopyHyperlinkLocation"_ustr, u"ExportDirectToPDF"_ustr, u"ExportToPDF"_ustr, -u"ExportToEPUB"_ustr +u"ExportToEPUB"_ustr, +u"CharRightSel"_ustr, +u"CharLeftSel"_ustr, +u"WordRightSel"_ustr, +u"WordLeftSel"_ustr, +u"EndOfParaSel"_ustr, +u"StartOfParaSel"_ustr, +u"GoRight"_ustr, +u"GoLeft"_ustr, +u"GoToNextWord"_ustr, +u"GoToPrevWord"_ustr, +u"GoToNextPara"_ustr, +u"GoToStartOfPara"_ustr, +u"GoUp"_ustr, +u"GoDown"_ustr, +u"GoRightSel"_ustr, +u"GoLeftSel"_ustr, +u"GoUpSel"_ustr, +u"GoDownSel"_ustr, +u"GoLeftToStartOfData"_ustr, +u"GoRightToEndOfData"_ustr, +u"GoToStart"_ustr, +u"GoToEndOfData"_ustr, +u"GoUpToStartOfData"_ustr, +u"GoDownToEndOfData"_ustr, +u"GoLeftToStartOfDataSel"_ustr, +u"GoRightToEndOfDataSel"_ustr, +u"GoUpToStartOfDataSel"_ustr, +u"GoDownToEndOfDataSel"_ustr }; bool allowed = std::find(std::begin(allowedCommandList), std::end(allowedCommandList), command) != std::end(allowedCommandList);
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 5c8c5db55e082eed3422e3fb9455943b2f285253 Author: Gökay Şatır AuthorDate: Mon Mar 18 15:17:32 2024 +0300 Commit: Gökay ŞATIR CommitDate: Mon Mar 18 14:41:09 2024 +0100 Allow export commands in readonly view mode. Signed-off-by: Gökay Şatır Change-Id: I88e9a45fd9e5c7b6bf1984a424e36b010aaaff4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164969 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 8072e1a9ad8d..59d51a8c3cf1 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -544,7 +544,10 @@ static bool isCommandAllowedForViewType(const OUString& command) u"LayoutStatus"_ustr, u"ToolbarMode"_ustr, u"ChangeTheme"_ustr, -u"CopyHyperlinkLocation"_ustr +u"CopyHyperlinkLocation"_ustr, +u"ExportDirectToPDF"_ustr, +u"ExportToPDF"_ustr, +u"ExportToEPUB"_ustr }; bool allowed = std::find(std::begin(allowedCommandList), std::end(allowedCommandList), command) != std::end(allowedCommandList);
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/unoctitm.cxx | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) New commits: commit fa93750070793cd548d028feb39e4d0e0e61ae5a Author: Darshan11 AuthorDate: Wed Mar 13 16:34:38 2024 +0530 Commit: Szymon Kłos CommitDate: Mon Mar 18 13:16:51 2024 +0100 Send ParaRightToLeft state messageto client side - 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 Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164817 diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index fade31109f35..8072e1a9ad8d 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1096,8 +1096,6 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "DeleteNote" || aEvent.FeatureURL.Path == "AcceptChanges" || aEvent.FeatureURL.Path == "SetDefault" || - aEvent.FeatureURL.Path == "ParaLeftToRight" || - aEvent.FeatureURL.Path == "ParaRightToLeft" || aEvent.FeatureURL.Path == "ParaspaceIncrease" || aEvent.FeatureURL.Path == "ParaspaceDecrease" || aEvent.FeatureURL.Path == "TableDialog" || @@ -1169,6 +1167,18 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra { aBuffer.append(aEvent.IsEnabled ? std::u16string_view(u"enabled") : std::u16string_view(u"disabled")); } +else if (aEvent.FeatureURL.Path == "ParaLeftToRight" || + aEvent.FeatureURL.Path == "ParaRightToLeft") +{ +tools::JsonWriter aTree; +bool bTemp = false; +aEvent.State >>= bTemp; +aTree.put("commandName", aEvent.FeatureURL.Complete); +aTree.put("disabled", !aEvent.IsEnabled); +aTree.put("state", bTemp ? "true" : "false"); + SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); +return; +} else if (aEvent.FeatureURL.Path == "AssignLayout" || aEvent.FeatureURL.Path == "StatusSelectionMode" || aEvent.FeatureURL.Path == "Signature" ||
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source svx/source sw/source
sfx2/source/appl/module.cxx | 14 +- sfx2/source/dialog/mgetempl.cxx |4 +--- sfx2/source/sidebar/ControllerItem.cxx | 12 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |4 +--- svx/source/sidebar/possize/PosSizePropertyPanel.cxx |4 +--- sw/source/uibase/sidebar/PageFormatPanel.cxx|4 +--- 6 files changed, 25 insertions(+), 17 deletions(-) New commits: commit 3ca938a25439d6f23bbd6830a96e5180ff94f757 Author: Jaume Pujantell AuthorDate: Fri Mar 8 16:24:11 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Mar 11 09:17:21 2024 +0100 lok: use locale units in dialogs and sidebar When oepning tha same doucment with different locales, the dailogs and sidebar show units (cm/inch) of the first locale (or the locale used in preloading, en-US) for all the views. This patch changes the units used according to the LOK locale. Change-Id: I3d515873bde661f2d9048bbc405843e83134cca7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164589 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 03f4fc2fa8f5..b610c2ee8e2a 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -32,6 +32,8 @@ #include #include #include +#include +#include #define ShellClass_SfxModule #include @@ -245,11 +247,7 @@ FieldUnit SfxModule::GetCurrentFieldUnit() FieldUnit eUnit = FieldUnit::INCH; SfxModule* pModule = GetActiveModule(); if ( pModule ) -{ -const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC ); -if ( pItem ) -eUnit = static_cast(static_cast(pItem)->GetValue()); -} +return pModule->GetFieldUnit(); else SAL_WARN( "sfx.appl", "GetModuleFieldUnit(): no module found" ); return eUnit; @@ -257,6 +255,12 @@ FieldUnit SfxModule::GetCurrentFieldUnit() FieldUnit SfxModule::GetFieldUnit() const { +if (comphelper::LibreOfficeKit::isActive()) +{ +MeasurementSystem eSystem += LocaleDataWrapper(comphelper::LibreOfficeKit::getLocale()).getMeasurementSystemEnum(); +return MeasurementSystem::Metric == eSystem ? FieldUnit::CM : FieldUnit::INCH; +} FieldUnit eUnit = FieldUnit::INCH; const SfxPoolItem* pItem = GetItem( SID_ATTR_METRIC ); if ( pItem ) diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index a9b62452591e..7e9faad8dcd3 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -301,9 +301,7 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() SfxModule* pModule = SfxModule::GetActiveModule(); if ( pModule ) { -const SfxPoolItem* pPoolItem = pModule->GetItem( SID_ATTR_METRIC ); -if ( pPoolItem ) -eFieldUnit = static_cast(static_cast( pPoolItem )->GetValue()); +eFieldUnit = pModule->GetFieldUnit(); } switch ( eFieldUnit ) diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index e02276ec0cdd..28248710f1a6 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -20,6 +20,11 @@ #include #include +#include +#include +#include +#include +#include using namespace css; using namespace css::uno; @@ -59,6 +64,13 @@ void ControllerItem::RequestUpdate() { std::unique_ptr pState; const SfxItemState eState (GetBindings().QueryState(GetId(), pState)); +if (GetId() == SID_ATTR_METRIC && comphelper::LibreOfficeKit::isActive()) +{ +MeasurementSystem eSystem += LocaleDataWrapper(comphelper::LibreOfficeKit::getLocale()).getMeasurementSystemEnum(); +FieldUnit eUnit = MeasurementSystem::Metric == eSystem ? FieldUnit::CM : FieldUnit::INCH; + static_cast(pState.get())->SetValue(static_cast(eUnit)); +} mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState.get()); } diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 20e05096d6c4..8e88bdc2c656 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -374,9 +374,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI SfxModule* pModule = pSh->GetModule(); if ( pModule ) { -const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC ); -if ( pItem ) -eUnit = static_cast(static_cast(pItem)->GetValue()); +eUnit = pModule->GetFieldUnit(); } else { diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/dialog/dinfdlg.cxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit f8f89de7a49db563b870dbaada6f010f2f75254f Author: Méven Car AuthorDate: Thu Feb 8 17:43:25 2024 +0100 Commit: Szymon Kłos CommitDate: Tue Feb 20 11:05:04 2024 +0100 Allow Document properties tab custom properties for LOK Change-Id: I4860f9bad69b3db0eef7b0e98159ca2b336b4f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163611 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 26f34882ec42..fc8754e5f12a 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1324,10 +1324,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxIte AddTabPage("general", SfxDocumentPage::Create, nullptr); AddTabPage("description", SfxDocumentDescPage::Create, nullptr); -if (!comphelper::LibreOfficeKit::isActive()) -AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr); -else -RemoveTabPage("customprops"); +AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr); if (rInfoItem.isCmisDocument()) AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 5fec109a88b9833a005dd95892eec464a254d268 Author: Tomaž Vajngerl AuthorDate: Thu Feb 8 18:55:44 2024 +0900 Commit: Caolán McNamara CommitDate: Wed Feb 14 10:06:52 2024 +0100 lok: remove unneeded mutex guard Change-Id: I9e9ef3fd4ad43c2523c286f534e14e839aada453 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163114 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna (cherry picked from commit 21c215a0345feb347c7adeea5aca766ede23f54a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163282 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 3cc4db8084bb..80bdb38aa13a 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -1142,11 +1142,9 @@ void LOKEditViewHistory::Update(bool bRemove) if (!comphelper::LibreOfficeKit::isActive()) return; -static std::mutex aMutex; SfxViewShell* pViewShell = SfxViewShell::Current(); if (pViewShell) { -std::lock_guard aLockGuard{aMutex}; int nDocId = pViewShell->GetDocId().get(); if (maEditViewHistory.find(nDocId) != maEditViewHistory.end()) maEditViewHistory[nDocId].remove(pViewShell);
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/control/dispatch.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 3ef653dc57015c17894163b0aedce362149cd530 Author: Caolán McNamara AuthorDate: Fri Dec 8 14:10:11 2023 + Commit: Caolán McNamara CommitDate: Wed Feb 7 22:15:55 2024 +0100 kit mode is similar to !HAVE_FEATURE_DESKTOP mode wrt menubar in that it is not used. SfxDispatcher: :SetMenu_Impl is 3.1% of long-profiling use Change-Id: I07bf0f130791795a49835e91ac8b8c5bec749f33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162465 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index fe7271677fbf..461de314d577 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1010,6 +1010,9 @@ void SfxDispatcher::SetMenu_Impl() if ( !xImp->pFrame ) return; +if (comphelper::LibreOfficeKit::isActive()) +return; + SfxViewFrame* pTop = xImp->pFrame->GetTopViewFrame(); if ( !pTop || pTop->GetBindings().GetDispatcher() != this ) return;
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/view/viewfrm.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 031f11bd9096fb192ced1328f9bbcd1b1903e3e7 Author: Szymon Kłos AuthorDate: Fri Jan 26 16:54:14 2024 +0100 Commit: Tomaž Vajngerl CommitDate: Mon Jan 29 04:47:59 2024 +0100 lok: always toggle sidebar deck This fixes regression from: commit 53fc5fa0fed077b7d11e39b710280f0a84b631ff tdf#142978 Show a11y sidebar when finding issues on PDF export LOK was unable to close sidebar Change-Id: Icd96394523020c30e63858bc372ba136c2be8158 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162608 Tested-by: Szymon Kłos Reviewed-by: Tomaž Vajngerl diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index abb616ce5505..b76354b14705 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3350,8 +3350,11 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest ) if (pDeckIdItem) { const OUString aDeckId(pDeckIdItem->GetValue()); +// Compatibility with old LOK "toggle always" +// TODO: check LOK with tdf#142978 Show a11y sidebar when finding issues on PDF export, hash: 53fc5fa +const bool isLOK = comphelper::LibreOfficeKit::isActive(); const SfxBoolItem* pToggleItem = rReq.GetArg(SID_SIDEBAR_DECK_TOGGLE); -bool bToggle = pToggleItem && pToggleItem->GetValue(); +bool bToggle = isLOK || (pToggleItem && pToggleItem->GetValue()); ::sfx2::sidebar::Sidebar::ShowDeck(aDeckId, this, bToggle); } rReq.Done();
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/appl/sfxhelp.cxx |4 1 file changed, 4 insertions(+) New commits: commit 885c58bd8ca54cf10046bf245dadbc305c7ffea8 Author: Andras Timar AuthorDate: Fri Jan 19 15:49:49 2024 +0100 Commit: Andras Timar CommitDate: Sat Jan 20 20:18:03 2024 +0100 LOK: disable popup bubble for hyperlinks Change-Id: I0ca21a90561affa453bd249c86e58793618f809e (cherry picked from commit 88fea772610a4feef018ba03fd19749841772225) diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index b596a4e33efa..785872ddee0b 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -665,6 +665,10 @@ OUString SfxHelp::GetHelpText(const OUString& aCommandURL, const weld::Widget* p OUString SfxHelp::GetURLHelpText(std::u16string_view aURL) { +// hyperlinks are handled differently in Online +if (comphelper::LibreOfficeKit::isActive()) +return OUString(); + bool bCtrlClickHlink = SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink); // "ctrl-click to follow link:" for not MacOS
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/appl/appserv.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit e5bf1f77e1b5e40ce0c7ba04f6b28f4270960792 Author: Andras Timar AuthorDate: Tue Apr 17 14:06:38 2018 +0200 Commit: Andras Timar CommitDate: Sat Jan 13 21:10:45 2024 +0100 [cp] Send feedback to he...@collaboraoffice.com Change-Id: Ic734235426001e4aa7119476c1e6884b7c39776d diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 2abc1a57..f1a6227e23e1 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -508,10 +508,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SEND_FEEDBACK: { OUString module = SfxHelp::GetCurrentModuleIdentifier(); -OUString sURL(officecfg::Office::Common::Menus::SendFeedbackURL::get() + //officecfg/registry/data/org/openoffice/Office/Common.xcu => https://hub.libreoffice.org/send-feedback/ -"?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() + -"=" + utl::ConfigManager::getUILocale() + -"=" + module.subView(module.lastIndexOf('.') + 1 ) ); +OUString sURL("mailto:he...@collaboraoffice.com?Subject=Version:%20; + utl::ConfigManager::getAboutBoxProductVersion() + +",%20Locale:%20" + utl::ConfigManager::getUILocale() + ",%20Module:%20" + module.subView(module.lastIndexOf('.') + 1 ) ); sfx2::openUriExternally(sURL, false, rReq.GetFrameWeld()); break; }