[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/appl/linksrc.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 6dc7efa8067d4bd3a1e75eb85aabaf25485c389c Author: Szymon Kłos AuthorDate: Mon Nov 6 18:35:20 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Nov 8 20:00:32 2023 +0100 lok: fix crash on DDE Link modify 1. Open document with editable DDE Link section in 2 views 2. View A selects content containing section and copies that 3. View A is closed 4. View B tries to modify section Result: crash Avoid destroying SwTransferDdeLink in SwTransferable::~SwTransferable() what happens while calling RemoveDDELinkFormat in SwTransferDdeLink::DataChanged by keeping reference to it while iterating in SvLinkSource::NotifyDataChanged() Change-Id: Iba53a4c139f9d508d2f64bcc94b479761b84bf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159008 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 131992c51040..3a1af228f6a4 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -287,7 +287,8 @@ void SvLinkSource::NotifyDataChanged() if( ( p->nAdviseModes & ADVISEMODE_NODATA ) || GetData( aVal, p->aDataMimeType, true ) ) { -p->xSink->DataChanged( p->aDataMimeType, aVal ); +tools::SvRef xLink(p->xSink); +xLink->DataChanged( p->aDataMimeType, aVal ); if ( !aIter.IsValidCurrValue( p ) ) continue;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/control/dispatch.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 3af29fec6e9bfa14ee94a7e0b630435da289ca0e Author: Szymon Kłos AuthorDate: Tue Nov 7 11:18:04 2023 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 7 14:47:30 2023 +0100 lok: notebookbar: fix unit-copy-paste in online we can't remove hack in SfxDispatcher::Update_Impl yet because this made unit-copy-paste test in online broken reverts part of: commit 1a6d16cb14342f9a66f99960e96027af6e5369ef lok: notebookbar: query SID_NOTEBOOKBAR only when requested to switch UI Signed-off-by: Szymon Kłos Change-Id: I8cd801bbc912f2ab3f710f5c7133445f07c4e5de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159062 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 3915644e0d2a..9d85075de433 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1120,8 +1120,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) if ( xLayoutManager.is() ) xLayoutManager->unlock(); -if ( !comphelper::LibreOfficeKit::isActive() && -SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) +if ( SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) { const SfxPoolItem *pItem; SfxViewShell::Current()->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pItem);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/appl/workwin.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 1a7064571f68a38ae02fb1fb85447d41c47db997 Author: Szymon Kłos AuthorDate: Sat Nov 4 19:20:46 2023 +0100 Commit: Caolán McNamara CommitDate: Mon Nov 6 09:58:31 2023 +0100 lok: notebookbar: reduce calls to SfxNotebookBar::IsActive - in LOK case toolbars in core doesn't make any difference - SfxNotebookBar::IsActive which reads config makes doc_setView slower, avoid it in LOK case then - it was used for hiding contextual toolbars - introduced in commit 9bc1ffa2153d2474b023e0860d3c9c68ee18727b tdf#125040 Make single mode toolbar context aware Signed-off-by: Szymon Kłos Change-Id: I63de48faf2f7e7f30f8b509455061ac20a788f8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158898 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index fb3955ee2c5c..793adcd8df77 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1195,7 +1195,8 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Iterate over all Toolboxes xLayoutManager->lock(); -const bool isNotebookBarActive = sfx2::SfxNotebookBar::IsActive(true); +const bool bForceDestroyToolbars = +comphelper::LibreOfficeKit::isActive() ? false : sfx2::SfxNotebookBar::IsActive(true); for ( auto const & n: aObjBarList ) { ToolbarId eId = n.eId; @@ -1209,7 +1210,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Is a ToolBox required in this context ? bool bModesMatching = (nUpdateMode != SfxVisibilityFlags::Invisible) && ((nTbxMode & nUpdateMode) == nUpdateMode); -if ( bDestroy || isNotebookBarActive) +if ( bDestroy || bForceDestroyToolbars) { OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId); xLayoutManager->destroyElement( aTbxId );
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/appl/appserv.cxx |4 +++- sfx2/source/control/dispatch.cxx |3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit 1a6d16cb14342f9a66f99960e96027af6e5369ef Author: Szymon Kłos AuthorDate: Sat Nov 4 15:08:14 2023 +0100 Commit: Caolán McNamara CommitDate: Mon Nov 6 09:58:00 2023 +0100 lok: notebookbar: query SID_NOTEBOOKBAR only when requested to switch UI commit 5bd2931b57a6cb4ac1f39d7ddae874ac693cfab0 tdf#102063 Notebookbar wont appear on launch introduced some Query hack to SfxDispatcher::Update_Impl what causes many updates on lots of different actions. It breaks multi-view state of notebookbar in LOK case, so don't do that. It should be reviewed for regular case too. Change-Id: I8f26bddc6cff991c56a1172893d83b90fb225acd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158897 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 418bcb88430b..297f6f8f9e14 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -824,7 +824,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) aCurrentMode = comphelper::getString( aAppNode.getNodeValue( "Active" ) ); -if ( aCurrentMode == aNewName ) +if ( !comphelper::LibreOfficeKit::isActive() && aCurrentMode == aNewName ) { bDone = true; break; @@ -950,6 +950,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // Show/Hide the Notebookbar const SfxStringItem pItem(SID_NOTEBOOKBAR, aNewName); pViewFrame->GetDispatcher()->ExecuteList(SID_NOTEBOOKBAR, SfxCallMode::SYNCHRON, {}); +const SfxPoolItem *pNbItem; +pViewFrame->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pNbItem); // Show toolbars for ( const OUString& rName : std::as_const(aMandatoryToolbars) ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9d85075de433..3915644e0d2a 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1120,7 +1120,8 @@ void SfxDispatcher::Update_Impl( bool bForce ) if ( xLayoutManager.is() ) xLayoutManager->unlock(); -if ( SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) +if ( !comphelper::LibreOfficeKit::isActive() && +SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) { const SfxPoolItem *pItem; SfxViewShell::Current()->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pItem);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) New commits: commit 4e6848628cbff418896b7653eadac80c57ceaf25 Author: Marco Cecchetti AuthorDate: Sun Nov 5 21:08:26 2023 +0100 Commit: Marco Cecchetti CommitDate: Sun Nov 5 22:00:47 2023 +0100 lok: a11y: corelog: removing LOK_INFO in attachRecursive (3) Change-Id: Ic2967d9fa24674ed61ab7a251bd2a584a74e4cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158959 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 916899fdd694..1b39dcaf7acf 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1702,21 +1702,28 @@ void LOKDocumentFocusListener::attachRecursive( const uno::Reference< accessibility::XAccessibleContext >& xContext ) { -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " << xAccessible.get() -<< ", role: " << xContext->getAccessibleRole() -<< ", name: " << xContext->getAccessibleName() -<< ", parent: " << xContext->getAccessibleParent().get() -<< ", child count: " << xContext->getAccessibleChildCount()); +try +{ +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " + << xAccessible.get() << ", role: " << xContext->getAccessibleRole() + << ", name: " << xContext->getAccessibleName() + << ", parent: " << xContext->getAccessibleParent().get() + << ", child count: " << xContext->getAccessibleChildCount()); -sal_Int64 nStateSet = xContext->getAccessibleStateSet(); +sal_Int64 nStateSet = xContext->getAccessibleStateSet(); -if (!m_bIsEditingCell) +if (!m_bIsEditingCell) +{ +::rtl::OUString sName = xContext->getAccessibleName(); +m_bIsEditingCell = sName.startsWith("Cell"); +} + +attachRecursive(xAccessible, xContext, nStateSet); +} +catch (const uno::Exception& e) { -::rtl::OUString sName = xContext->getAccessibleName(); -m_bIsEditingCell = sName.startsWith("Cell"); +LOK_WARN("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): raised exception: " << e.Message); } - -attachRecursive(xAccessible, xContext, nStateSet); } void LOKDocumentFocusListener::attachRecursive( @@ -1726,7 +1733,7 @@ void LOKDocumentFocusListener::attachRecursive( ) { aboutView("LOKDocumentFocusListener::attachRecursive (3)", this, m_pViewShell); -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: this: " << this +SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: this: " << this << ", xAccessible: " << xAccessible.get() << ", role: " << xContext->getAccessibleRole() << ", name: " << xContext->getAccessibleName() @@ -1740,12 +1747,12 @@ void LOKDocumentFocusListener::attachRecursive( if (!xBroadcaster.is()) return; -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #2: xBroadcaster.is()"); +SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #2: xBroadcaster.is()"); // If not already done, add the broadcaster to the list and attach as listener. const uno::Reference< uno::XInterface >& xInterface = xBroadcaster; if( m_aRefList.insert(xInterface).second ) { -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #3: m_aRefList.insert(xInterface).second"); +SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #3: m_aRefList.insert(xInterface).second"); xBroadcaster->addAccessibleEventListener(static_cast< accessibility::XAccessibleEventListener *>(this)); if (isDocument(xContext->getAccessibleRole()))
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit fd08e16e96cfd2d84b9eb4200f35fa6b4b4e3bd5 Author: Marco Cecchetti AuthorDate: Sun Nov 5 18:13:22 2023 +0100 Commit: Marco Cecchetti CommitDate: Sun Nov 5 19:15:53 2023 +0100 lok: a11y: corelog: re-introducing LOK_INFO in attachRecursive Change-Id: I5866e9990a4758fad4b1c2a5e26072c31658db89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158955 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 729ef95d266f..916899fdd694 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1688,7 +1688,7 @@ void LOKDocumentFocusListener::attachRecursive( const uno::Reference< accessibility::XAccessible >& xAccessible ) { -SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(1): xAccessible: " << xAccessible.get()); +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(1): xAccessible: " << xAccessible.get()); uno::Reference< accessibility::XAccessibleContext > xContext = xAccessible->getAccessibleContext(); @@ -1702,7 +1702,7 @@ void LOKDocumentFocusListener::attachRecursive( const uno::Reference< accessibility::XAccessibleContext >& xContext ) { -SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " << xAccessible.get() +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " << xAccessible.get() << ", role: " << xContext->getAccessibleRole() << ", name: " << xContext->getAccessibleName() << ", parent: " << xContext->getAccessibleParent().get() @@ -1726,7 +1726,7 @@ void LOKDocumentFocusListener::attachRecursive( ) { aboutView("LOKDocumentFocusListener::attachRecursive (3)", this, m_pViewShell); -SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: this: " << this +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: this: " << this << ", xAccessible: " << xAccessible.get() << ", role: " << xContext->getAccessibleRole() << ", name: " << xContext->getAccessibleName() @@ -1740,12 +1740,12 @@ void LOKDocumentFocusListener::attachRecursive( if (!xBroadcaster.is()) return; -SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #2: xBroadcaster.is()"); +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #2: xBroadcaster.is()"); // If not already done, add the broadcaster to the list and attach as listener. const uno::Reference< uno::XInterface >& xInterface = xBroadcaster; if( m_aRefList.insert(xInterface).second ) { -SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #3: m_aRefList.insert(xInterface).second"); +LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #3: m_aRefList.insert(xInterface).second"); xBroadcaster->addAccessibleEventListener(static_cast< accessibility::XAccessibleEventListener *>(this)); if (isDocument(xContext->getAccessibleRole()))
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 6a9c4306c9c8173ff99184199b18f24f05b35b51 Author: Marco Cecchetti AuthorDate: Sun Nov 5 16:26:11 2023 +0100 Commit: Marco Cecchetti CommitDate: Sun Nov 5 18:11:19 2023 +0100 lok: a11y: corelog: re-introducing LOK_WARN in viewsh Change-Id: Ia76e079da1f532b0a4ce9ba24de1b058deef5a12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158953 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 1f8168a4cedf..729ef95d266f 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -537,7 +537,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv } catch( const lang::IndexOutOfBoundsException& ) { -SAL_WARN("lok.a11y", "Focused object has invalid index in parent"); +LOK_WARN("lok.a11y", "Focused object has invalid index in parent"); } } @@ -1648,7 +1648,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO } catch( const lang::IndexOutOfBoundsException& ) { -SAL_WARN("lok.a11y", +LOK_WARN("lok.a11y", "LOKDocumentFocusListener::notifyEvent:Focused object has invalid index in parent"); } } @@ -1678,7 +1678,7 @@ uno::Reference< accessibility::XAccessible > LOKDocumentFocusListener::getAccess } } -SAL_WARN("lok.a11y", +LOK_WARN("lok.a11y", "LOKDocumentFocusListener::getAccessible: Can't get any accessible object from event source."); return uno::Reference< accessibility::XAccessible >(); @@ -3376,7 +3376,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled) } catch (const uno::Exception&) { -SAL_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::attachRecursive"); +LOK_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::attachRecursive"); } } else @@ -3387,7 +3387,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled) } catch (const uno::Exception&) { -SAL_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::detachRecursive"); +LOK_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::detachRecursive"); } } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0e2df8c3f229e8807c7a6713ca3ea519411537bd Author: Marco Cecchetti AuthorDate: Sun Nov 5 12:52:03 2023 +0100 Commit: Marco Cecchetti CommitDate: Sun Nov 5 14:07:50 2023 +0100 lok: a11y: corelog: enable log in afterCallbackRegistered Change-Id: I4706fc04ee651e46fb12fe0fa18dbf2762cf95aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158949 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 7fd5f974ccc1..1f8168a4cedf 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -3285,7 +3285,7 @@ void SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles() void SfxViewShell::afterCallbackRegistered() { -SAL_INFO("sfx.view", "SfxViewShell::afterCallbackRegistered invoked"); +LOK_INFO("sfx.view", "SfxViewShell::afterCallbackRegistered invoked"); if (GetLOKAccessibilityState()) { LOKDocumentFocusListener& rDocFocusListener = GetLOKDocumentFocusListener();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 - sfx2/source/view/viewsh.cxx| 46 - 2 files changed, 24 insertions(+), 24 deletions(-) New commits: commit e6caece707a7d6f3a3e397e6213be9af6054f148 Author: Marco Cecchetti AuthorDate: Sat Nov 4 22:36:05 2023 +0100 Commit: Marco Cecchetti CommitDate: Sun Nov 5 05:07:58 2023 +0100 lok: a11y: corelog: removing log from LOKDocumentFocusListener Change-Id: I0194cd4548dbb44f9efce4c53c790c3eec938524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158940 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 93f92e21c577..8ace83445ae0 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -325,7 +325,7 @@ void SfxLokHelper::setAccessibilityState(int nId, bool nEnabled) for (SfxViewShell* pViewShell : rViewArr) { -if (pViewShell->GetViewShellId() == ViewShellId(nId)) +if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId)) { LOK_INFO("lok.a11y", "SfxLokHelper::setAccessibilityState: view id: " << nId << ", nEnabled: " << nEnabled); pViewShell->SetLOKAccessibilityState(nEnabled); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d4dc941151c6..7fd5f974ccc1 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -476,7 +476,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv if (xContext.is()) { -LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId +SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId << "\n xSource: " << xSource.get() << "\n role: " << xContext->getAccessibleRole() << "\n name: " << xContext->getAccessibleName() @@ -487,13 +487,13 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv } else { -LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId +SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId << ", no accessible context!"); } } else { -LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId +SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId << ", no accessible source!"); } uno::Reference< accessibility::XAccessible > xOldValue; @@ -524,7 +524,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv if (xContext.is()) { -LOK_INFO("lok.a11y", msg << ": " +SAL_INFO("lok.a11y", msg << ": " << "\n xNewValue: " << xNewValue.get() << "\n role: " << xContext->getAccessibleRole() << "\n name: " << xContext->getAccessibleName() @@ -537,7 +537,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv } catch( const lang::IndexOutOfBoundsException& ) { -LOK_WARN("lok.a11y", "Focused object has invalid index in parent"); +SAL_WARN("lok.a11y", "Focused object has invalid index in parent"); } } @@ -937,7 +937,7 @@ void LOKDocumentFocusListener::notifyEditingInSelectionState(bool bParagraph) std::string aPayload = aStream.str(); if (m_pViewShell) { -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEditingInSelectionState: payload: \n" << aPayload); +SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEditingInSelectionState: payload: \n" << aPayload); m_pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE, aPayload.c_str()); } } @@ -1350,7 +1350,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO aEvent.NewValue >>= nState; sal_Int64 nOldState = accessibility::AccessibleStateType::INVALID; aEvent.OldValue >>= nOldState; -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: STATE_CHANGED: " +SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: STATE_CHANGED: " << " New State: " << stateSetToString(nState) << ", Old State: " << stateSetToString(nOldState)); @@ -1474,7 +1474,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO if (nNewPos >= 0) { -LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: CARET_CHANGED: " +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit db5a78c8ab1eae30e442151f07b0dc4dcd017550 Author: Szymon Kłos AuthorDate: Fri Nov 3 08:52:32 2023 +0100 Commit: Noel Grandin CommitDate: Fri Nov 3 17:00:42 2023 +0100 lok: notebookbar: don't recreate toolbars too often commit 004512d87ab70587d95a708116a5c2f4b870565c notebookbar: allow to create multiple instances for online Changed SfxNotebookBar::StateMethod so in LOK case it always enter to the code block which is meant to be used for creating or reloading notebookbar. Change that so we check if notebookbar was initialized for given view already. Change-Id: Icfa1e572769043509479b7b98d055120ac3d1f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158872 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Szymon Kłos (cherry picked from commit b3d70fe909ff750002dd01f37832487e92bc4d62) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158893 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index ccaf3e5447ac..ac27619832b9 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -373,11 +373,12 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, bool bChangedFile = sNewFile != sCurrentFile; +const SfxViewShell* pViewShell = SfxViewShell::Current(); +bool hasWeldedWrapper = m_pNotebookBarWeldedWrapper.find(pViewShell) != m_pNotebookBarWeldedWrapper.end(); + if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || !pNotebookBar->IsVisible() -|| bReloadNotebookbar || comphelper::LibreOfficeKit::isActive()) +|| bReloadNotebookbar || (comphelper::LibreOfficeKit::isActive() && !hasWeldedWrapper)) { -const SfxViewShell* pViewShell = SfxViewShell::Current(); - // Notebookbar was loaded too early what caused: // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded @@ -414,8 +415,6 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, pNotebookBar = pSysWindow->GetNotebookBar(); pNotebookBar->Show(); - -bool hasWeldedWrapper = m_pNotebookBarWeldedWrapper.find(pViewShell) != m_pNotebookBarWeldedWrapper.end(); if ((!hasWeldedWrapper || bReloadNotebookbar) && pNotebookBar->IsWelded()) { sal_uInt64 nWindowId = reinterpret_cast(pViewShell);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/dialog/dinfdlg.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 6c7fd1dc50cbc3f8e61c741367223a4b4aefc98b Author: Gökay Şatır AuthorDate: Tue Oct 31 16:57:52 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Nov 1 13:22:13 2023 +0100 Get the current view with SfxViewFrame::Current(). It was getting a null ptr for some reason. Signed-off-by: Gökay Şatır Change-Id: Ib3e285dc86cd3918b631b6993e9afb221994bfab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158727 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mike Kaganski diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 52416c1f55d0..ec37a70828e0 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -798,9 +798,11 @@ IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, weld::Button&, void) tools::JsonWriter payloadJson; payloadJson.put("password", m_xPasswordDialog->GetPasswordToOpen()); payloadJson.put("isToModify", false); -pShell->GetViewShell()->libreOfficeKitViewCallback( -LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, -payloadJson.extractAsOString().getStr()); + +SfxViewShell *vShell = SfxViewShell::Current(); +if (vShell) + vShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, payloadJson.extractAsOString().getStr()); + pShell->SetModified(); } m_xPasswordDialog->disposeOnce();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/sfxbasemodel.cxx | 106 --- 1 file changed, 56 insertions(+), 50 deletions(-) New commits: commit b88f3190727b9aeaad429752db283a5e7cb8d13b Author: Noel Grandin AuthorDate: Thu Oct 26 13:36:46 2023 +0200 Commit: Caolán McNamara CommitDate: Fri Oct 27 20:38:17 2023 +0200 cool#6893 improve listeners in SfxBaseModel reduces CPU spent in UNO query'ing, and adds type-safety, which exposed a bug in SfxBaseModel::disposing Change-Id: I4b973f7dc38f491ce7a6281ad378e439b5450add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158500 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 1267a5761cb916048932e5d2b40716fa1a6bcff4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158448 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 85bef309f79a..ab05b4604084 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -200,7 +201,13 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument OUString m_sURL ; OUString m_sRuntimeUID ; OUString m_aPreusedFilterName ; -comphelper::OMultiTypeInterfaceContainerHelper2 m_aInterfaceContainer; +comphelper::OInterfaceContainerHelper3 m_aPrintJobListeners; +comphelper::OInterfaceContainerHelper3 m_aEventListeners; +comphelper::OInterfaceContainerHelper3 m_aModifyListeners; +comphelper::OInterfaceContainerHelper3 m_aDocumentEventListeners1; +comphelper::OInterfaceContainerHelper3 m_aDocumentEventListeners2; +comphelper::OInterfaceContainerHelper3 m_aStorageChangeListeners; +comphelper::OInterfaceContainerHelper3 m_aCloseListeners; std::unordered_map, std::vector>> maShapeListeners; Reference< XInterface >m_xParent ; @@ -232,8 +239,14 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument IMPL_SfxBaseModel_DataContainer( ::osl::Mutex& rMutex, SfxObjectShell* pObjectShell ) : m_pObjectShell ( pObjectShell ) -, m_aInterfaceContainer ( rMutex) -, m_nControllerLockCount ( 0 ) +, m_aPrintJobListeners( rMutex) +, m_aEventListeners ( rMutex) +, m_aModifyListeners ( rMutex) +, m_aDocumentEventListeners1( rMutex ) +, m_aDocumentEventListeners2( rMutex ) +, m_aStorageChangeListeners ( rMutex ) +, m_aCloseListeners ( rMutex) +, m_nControllerLockCount ( 0 ) , m_bClosed ( false ) , m_bClosing ( false ) , m_bSaving ( false ) @@ -340,12 +353,9 @@ void SAL_CALL SfxPrintHelperListener_Impl::disposing( const lang::EventObject& ) void SAL_CALL SfxPrintHelperListener_Impl::printJobEvent( const view::PrintJobEvent& rEvent ) { -::comphelper::OInterfaceContainerHelper2* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType::get()); -if ( pContainer!=nullptr ) +if ( m_pData->m_aPrintJobListeners.getLength() ) { -::comphelper::OInterfaceIteratorHelper2 pIterator(*pContainer); -while (pIterator.hasMoreElements()) - static_cast(pIterator.next())->printJobEvent( rEvent ); + m_pData->m_aPrintJobListeners.notifyEach(::XPrintJobListener::printJobEvent, rEvent); } } @@ -749,7 +759,13 @@ void SAL_CALL SfxBaseModel::dispose() } lang::EventObject aEvent( static_cast(this) ); -m_pData->m_aInterfaceContainer.disposeAndClear( aEvent ); +m_pData->m_aPrintJobListeners.disposeAndClear( aEvent ); +m_pData->m_aEventListeners.disposeAndClear( aEvent ); +m_pData->m_aModifyListeners.disposeAndClear( aEvent ); +m_pData->m_aDocumentEventListeners1.disposeAndClear( aEvent ); +m_pData->m_aDocumentEventListeners2.disposeAndClear( aEvent ); +m_pData->m_aStorageChangeListeners.disposeAndClear( aEvent ); +m_pData->m_aCloseListeners.disposeAndClear( aEvent ); m_pData->m_xDocumentProperties.clear(); @@ -776,7 +792,7 @@ void SAL_CALL SfxBaseModel::dispose() void SAL_CALL SfxBaseModel::addEventListener( const Reference< lang::XEventListener >& aListener ) { SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING ); -m_pData->m_aInterfaceContainer.addInterface(
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/objmisc.cxx | 46 1 file changed, 46 insertions(+) New commits: commit 61458a1b2221efc217778dcf3fb5764ed75f1474 Author: Henry Castro AuthorDate: Wed Sep 6 10:30:27 2023 -0400 Commit: Henry Castro CommitDate: Fri Sep 15 16:07:07 2023 +0200 sfx2: invoke handler "LoadReadOnlyRequest" It will ask the user if open the Excel documents "read only" Signed-off-by: Henry Castro Change-Id: I909fb39709198e02496f8c522f477c077fb875e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156624 Reviewed-by: Ashod Nakashian diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 6b86e2163ccb..57698b41f82e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include #include @@ -1093,6 +1094,51 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) bHasName = true; // the document is loaded, so the name should already available GetTitle( SFX_TITLE_DETECT ); InitOwnModel_Impl(); + +if (IsLoadReadonly()) +{ +OUString aFilterName; +if (const SfxStringItem* pFilterNameItem = +SfxItemSet::GetItem(pMedium->GetItemSet(), + SID_FILTER_NAME, false)) +aFilterName = pFilterNameItem->GetValue(); + +OUString aFileName; +if (const SfxStringItem* pFileNameItem = +SfxItemSet::GetItem(pMedium->GetItemSet(), + SID_FILE_NAME, false)) +{ +const INetURLObject aURL( pFileNameItem->GetValue() ); +aFileName = aURL.getBase(INetURLObject::LAST_SEGMENT, true, + INetURLObject::DecodeMechanism::WithCharset); +} + +if (aFilterName.indexOf("Excel") != -1) +{ +Reference xHandler(pMedium->GetInteractionHandler()); +if (xHandler.is()) +{ +beans::NamedValue aLoadReadOnlyRequest; +aLoadReadOnlyRequest.Name = "LoadReadOnlyRequest"; +aLoadReadOnlyRequest.Value <<= aFileName; + +Any aRequest(aLoadReadOnlyRequest); +rtl::Reference xRequest += new ucbhelper::SimpleInteractionRequest(aRequest, + ContinuationFlags::Approve | + ContinuationFlags::Disapprove); + +xHandler->handle(xRequest); + +if (xRequest->getResponse() == ContinuationFlags::Disapprove) +{ +SetSecurityOptOpenReadOnly(false); + pMedium->GetItemSet()->Put(SfxBoolItem(SID_DOC_READONLY, false)); +} +} +} +} + pImpl->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/objserv.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 2bbf0369acd228f1dcf376c2afee5168db068979 Author: Szymon Kłos AuthorDate: Mon Sep 11 12:54:34 2023 +0200 Commit: Ashod Nakashian CommitDate: Mon Sep 11 14:49:04 2023 +0200 lok: don't convert save request to save as Don't force save as in LOK but report that file cannot be written. Without that we go through save as process which is used for export functionality and client's browser downloads the file in the end instead of uploading to the storage. Signed-off-by: Szymon Kłos Change-Id: I2784bfc25055934363c304b5f5a87ae4da620a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156819 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 35716406cd80..b5bde70a3ca6 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1016,6 +1016,17 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest ) aDispatchArgs ); bool bForceSaveAs = nId == SID_SAVEDOC && IsReadOnlyMedium(); + +if (comphelper::LibreOfficeKit::isActive() && bForceSaveAs) +{ +// Don't force save as in LOK but report that file cannot be written +// to avoid confusion with exporting for file download purpose + +throw task::ErrorCodeIOException( +"SfxObjectShell::ExecFile_Impl: ERRCODE_IO_CANTWRITE", +uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_CANTWRITE)); +} + const SfxSlot* pSlot = GetModule()->GetSlotPool()->GetSlot( bForceSaveAs ? SID_SAVEASDOC : nId ); if ( !pSlot ) throw uno::Exception("no slot", nullptr);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bcb94a7da148f9da6bbb2b7fb9e4cda72e2de5d2 Author: Miklos Vajna AuthorDate: Thu Aug 17 08:24:05 2023 +0200 Commit: Caolán McNamara CommitDate: Thu Aug 17 10:03:09 2023 +0200 sfx2: fix crash in SfxLokHelper::notifyOtherView() Crashreport signature: Fatal signal received: SIGSEGV code: 1 for address: 0x0 program/libmergedlo.so SfxLokHelper::notifyOtherView(SfxViewShell const*, SfxViewShell const*, int, boost::property_tree::basic_ptree > const&) sfx2/source/view/lokhelper.cxx:473 program/libmergedlo.so ImpEditView::ShowCursor(bool, bool) editeng/source/editeng/impedit.cxx:1423 program/../program/libsclo.so ScViewData::SetEditEngine(ScSplitPos, ScEditEngineDefaulter*, vcl::Window*, short, int) sc/source/ui/view/viewdata.cxx:1635 program/libsclo.so ScTabView::UpdateEditView() sc/source/ui/view/tabview3.cxx:2190 Change-Id: I219a1e9685db9bc3ea03d6ab67ff5db74aac9343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155753 Tested-by: Jenkins CollaboraOffice 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 b4d873971416..b24cee1ecc55 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -466,7 +466,7 @@ void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell c int nType, const boost::property_tree::ptree& rTree) { assert(pThisView != nullptr && "pThisView must be valid"); -if (DisableCallbacks::disabled()) +if (DisableCallbacks::disabled() || !pOtherView) return; const int viewId = SfxLokHelper::getView(pThisView);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4a4837221ac1bf79ea23a45d2974ee852e85e9d6 Author: Miklos Vajna AuthorDate: Wed Aug 2 10:12:39 2023 +0200 Commit: Caolán McNamara CommitDate: Wed Aug 2 11:38:05 2023 +0200 sfx2: fix crash in SfxLokHelper::notifyOtherViews() Crashreport signature: program/libmergedlo.so SfxLokHelper::notifyOtherViews(SfxViewShell const*, int, boost::property_tree::basic_ptree > const&) sfx2/source/view/lokhelper.cxx:518 program/libmergedlo.so ImpEditView::ShowCursor(bool, bool) editeng/source/editeng/impedit.cxx:1447 program/libsclo.so ScViewData::SetEditEngine(ScSplitPos, ScEditEngineDefaulter*, vcl::Window*, short, int) sc/source/ui/view/viewdata.cxx:1635 program/libsclo.so ScTabView::UpdateEditView() sc/source/ui/view/tabview3.cxx:2190 program/libsclo.so ScTabView::extendTiledAreaIfNeeded() sc/source/ui/view/tabview.cxx:3098 program/libmergedlo.so doc_setClientVisibleArea desktop/source/lib/init.cxx:6248 The current view should ideally never be nullptr, but if that's the case, at least don't crash. Change-Id: I521faa54373d2ce5ffb0983bac6caf0705767fdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155210 Tested-by: Jenkins CollaboraOffice 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 83f05008a19b..b4d873971416 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -508,7 +508,7 @@ void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, const boost::property_tree::ptree& rTree) { assert(pThisView != nullptr && "pThisView must be valid"); -if (DisableCallbacks::disabled()) +if (!pThisView || DisableCallbacks::disabled()) return; // Cache the payload so we only have to generate it once, at most.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/control/unoctitm.cxx | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit f44aed75f1c1f64c07651376fd2f638f61e0c3b1 Author: Aron Budea AuthorDate: Sat Jun 10 03:50:04 2023 +0200 Commit: Henry Castro CommitDate: Wed Jul 26 13:38:28 2023 +0200 lok: sfx2: fix change state "SheetRightToLeft" 2nd attempt This reverts commit f86c951441270aaf75431369eabcfe26c35e4c63, and adds SheetRightToLeft in a different place. Change-Id: Id7001d06b247713de2e4dfe5076d156988e932d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152808 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 20de9bb29ad3..fad61699db90 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -948,21 +948,14 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "FormatPaintbrush" || aEvent.FeatureURL.Path == "FreezePanes" || aEvent.FeatureURL.Path == "Sidebar" || -aEvent.FeatureURL.Path == "SheetRightToLeft" || aEvent.FeatureURL.Path == "SpacePara1" || aEvent.FeatureURL.Path == "SpacePara15" || aEvent.FeatureURL.Path == "SpacePara2" || aEvent.FeatureURL.Path == "DataFilterAutoFilter") { bool bTemp = false; - -if (aEvent.IsEnabled) -{ -aEvent.State >>= bTemp; -aBuffer.append(bTemp); -} -else -aBuffer.append("disabled"); +aEvent.State >>= bTemp; +aBuffer.append(bTemp); } else if (aEvent.FeatureURL.Path == "CharFontName") { @@ -1212,7 +1205,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aBuffer.append(OUString::boolean(aBool)); } } -else if (aEvent.FeatureURL.Path == "ToggleMergeCells") +else if (aEvent.FeatureURL.Path == "ToggleMergeCells" || + aEvent.FeatureURL.Path == "SheetRightToLeft") { bool aBool;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 0cda4c31c6c7881ea7b5089b04ad5147b28117af Author: Tomaž Vajngerl AuthorDate: Mon Jul 17 17:14:21 2023 +0900 Commit: Michael Meeks CommitDate: Mon Jul 17 11:43:06 2023 +0200 disable add-ons for NotebookBar in LOKit - perf. issues Searching for add-ons to use in NotebookBar causes perf. issues, so disable them for now. This was discovered during a editing session and the flame-graph showed up the NotebookbarAddonValues method. See COOL GitHub ticket [1] for more details. [1] https://github.com/CollaboraOnline/online/issues/6896 Change-Id: I4b2ced2be966de1cd1282f801a4410bc1625f0f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154513 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index e8ea6c684794..30b4548ee44e 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -49,6 +49,9 @@ static void NotebookbarAddonValues( std::vector>>& aExtensionValues) { +if (comphelper::LibreOfficeKit::isActive()) +return; + framework::AddonsOptions aAddonsItems; for (int nIdx = 0; nIdx < aAddonsItems.GetAddonsNotebookBarCount(); nIdx++)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx | 54 ++-- 1 file changed, 32 insertions(+), 22 deletions(-) New commits: commit 71af9d8913c752c1b7eb7f96067b0dabf8fe9a05 Author: Marco Cecchetti AuthorDate: Mon Jul 10 17:26:52 2023 +0200 Commit: Marco Cecchetti CommitDate: Mon Jul 10 21:01:09 2023 +0200 Get LOKDocumentFocusListener to handle enable/disable a11y properly This patch fix the following problems: - Remove all children when accessibility is disabled - Update the currently focused paragraph when accessibility is enabled Change-Id: Ib65a14052ee8e0f965c0546897fd67641bba50ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154278 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 4447eef4274a..a459fd5d79c9 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -519,20 +519,23 @@ public: /// @throws lang::IndexOutOfBoundsException /// @throws uno::RuntimeException void detachRecursive( -const uno::Reference< accessibility::XAccessible >& xAccessible +const uno::Reference< accessibility::XAccessible >& xAccessible, +bool bForce = false ); /// @throws lang::IndexOutOfBoundsException /// @throws uno::RuntimeException void detachRecursive( -const uno::Reference< accessibility::XAccessibleContext >& xContext +const uno::Reference< accessibility::XAccessibleContext >& xContext, +bool bForce = false ); /// @throws lang::IndexOutOfBoundsException /// @throws uno::RuntimeException void detachRecursive( const uno::Reference< accessibility::XAccessibleContext >& xContext, -const sal_Int64 nStateSet +const sal_Int64 nStateSet, +bool bForce = false ); /// @throws lang::IndexOutOfBoundsException @@ -1032,25 +1035,30 @@ void LOKDocumentFocusListener::attachRecursive( { // Usually, when the document is loaded, a CARET_CHANGED accessibility event is automatically emitted // for the first paragraph. That allows to notify the paragraph content to the client, even if no input -// event occurred yet. However, in Cypress tests no accessibility event is automatically emitted until -// some input event occurs. So we use the following workaround to notify the content of the focused -// paragraph, without waiting for an input event. +// event occurred yet. However, when switching to a11y enabled in the client and in Cypress tests +// no accessibility event is automatically emitted until some input event occurs. +// So we use the following workaround to notify the content of the focused paragraph, +// without waiting for an input event. // Here we update the paragraph info related to the focused paragraph, // later when afterCallbackRegistered is executed we notify the paragraph content. sal_Int64 nChildCount = xContext->getAccessibleChildCount(); if (nChildCount > 0) { -uno::Reference< accessibility::XAccessible > xChild( xContext->getAccessibleChild( 0 ) ); -if( xChild.is() ) +for (sal_Int64 n = 0; n < nChildCount; ++n) { -uno::Reference xAccText(xChild, uno::UNO_QUERY); -if (xAccText.is()) +uno::Reference< accessibility::XAccessible > xChild(xContext->getAccessibleChild(n)); +if (xChild.is()) { -sal_Int32 nPos = xAccText->getCaretPosition(); -if (nPos >= 0) +uno::Reference xAccText(xChild, uno::UNO_QUERY); +if (xAccText.is()) { -attachRecursive(xChild); -updateParagraphInfo(xAccText, false, "LOKDocumentFocusListener::attachRecursive(3)"); +sal_Int32 nPos = xAccText->getCaretPosition(); +if (nPos >= 0) +{ +attachRecursive(xChild); +updateParagraphInfo(xAccText, false, "LOKDocumentFocusListener::attachRecursive(3)"); +break; +} } } } @@ -1060,18 +1068,20 @@ void LOKDocumentFocusListener::attachRecursive( } void LOKDocumentFocusListener::detachRecursive( -const uno::Reference< accessibility::XAccessible >& xAccessible +const uno::Reference< accessibility::XAccessible >& xAccessible, +bool bForce ) { uno::Reference< accessibility::XAccessibleContext > xContext =
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/dialog/dinfdlg.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 1b7d41abd0f281651dca1c8c7b7b62f952e8022b Author: Ashod Nakashian AuthorDate: Tue Jul 4 02:13:28 2023 -0400 Commit: Ashod Nakashian CommitDate: Thu Jul 6 11:26:26 2023 +0200 sfx2: disable setting password on text documents Since we can't preserve the password in a plain-text file, we should disable the ability to set/change it. Otherwise, it's misleading to users. Signed-off-by: Ashod Nakashian Change-Id: I3176243ddd2826eb07def1ff5ab251e33cb7125e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153941 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jaume Pujantell diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 85b9e50fc941..52416c1f55d0 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1025,6 +1025,16 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) { m_xFileValEd->set_label(aName); m_xFileValEd->set_uri(aName); + +// Disable setting/changing password on text files. +// Perhaps this needs to be done for both Online and Desktop. +OUString sExtension(INetURLObject(rMainURL).getExtension()); +if (!sExtension.isEmpty()) +{ +sExtension = sExtension.toAsciiLowerCase(); +if (sExtension.equalsAscii("txt") || sExtension.equalsAscii("csv")) +m_xChangePassBtn->set_sensitive(false); +} } else {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/iframe.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit 28338b9bab0bde32374fb408dba5100cc99a20d2 Author: Caolán McNamara AuthorDate: Tue Jun 20 10:20:36 2023 +0100 Commit: Andras Timar CommitDate: Thu Jun 29 13:54:58 2023 +0200 Resolves: tdf#155750 allow private:factory urls in floating frames they create a new document so there isn't an associated location which would trigger the prompt to allow it so just allow factory urls Change-Id: I7b693bcfe5ac04aaed06905637ab3c1eba43c51f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153330 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 4f3b414d5d69..150218b436e9 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -174,14 +174,18 @@ sal_Bool SAL_CALL IFrameObject::load( uno::Reference xParentFrame = xFrame->getCreator(); SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); -bool bUpdateAllowed(true); -if (pDoc) +const bool bIsFactoryURL = aTargetURL.Complete.startsWith("private:factory/"); +if (!bIsFactoryURL) { -comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer(); -bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate(); +bool bUpdateAllowed(true); +if (pDoc) +{ +comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer(); +bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate(); +} +if (!bUpdateAllowed) +return false; } -if (!bUpdateAllowed) -return false; OUString sReferer; if (pDoc && pDoc->HasName())
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 80a8c48e3114f269a15cb6c65df8534e29ecfd6b Author: Marco Cecchetti AuthorDate: Wed Jun 14 21:41:19 2023 +0200 Commit: Marco Cecchetti CommitDate: Wed Jun 14 21:43:51 2023 +0200 fix: unused parameter nColorType Change-Id: I3caf608f9f89668bed5bcbfa5e445c4a2e89d65c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153095 Tested-by: Marco Cecchetti Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5b4f1e44b152..ca6e1d30cf3b 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2553,7 +2553,7 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const return pEditWin; } -::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry nColorType) const +::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry /*nColorType*/) const { SAL_WARN("sfx.view", "SfxViewShell::GetColorConfigColor not overriden!"); return {};
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/objstor.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 770df258bc0a66ee7551a59807d79cebcdcbb85e Author: Caolán McNamara AuthorDate: Thu Jun 8 20:53:16 2023 +0100 Commit: Michael Meeks CommitDate: Fri Jun 9 09:11:54 2023 +0200 restore, not clear, existing interaction handler after save put things back the way they were found. In this case I want it back to the original state, because a) lok sets its own interaction handler on load b) at framework/source/loadenv/loadenv.cxx:1137 Because that handler supports XInitialization we show the window early c) that happens to be before the menubar is set d) so the menubar changes the size of the window after it is shown e) so Window::ImplPosSizeWindow calls ImplInvalidateFrameRegion(nullptr, InvalidateFlags::Children) f) which sets ImplPaintFlags::PaintAllChildren on the PaintFlags of the workwindow g) which means that when a SwEditWin calls PaintImmediately vcl sees that flag on its WorkWindow grandparent and calls ImplCallPaint with the grandparent, not the SwEditWin. It happens that the grandparent has no LokId so that does nothing. if we clear this interaction on save, then the next joiner instead has no interaction so gets the default one which does not support XInitialization, so the window is not shown before menubar is added, so when it is shown it is already at the final size, so there is no ImplInvalidateFrameRegion and so no ImplPaintFlags::PaintAllChildren bits on the WorkWindow, so PaintImmediately on SwEditWin calls that Invalidate, which is special cased to broadcast the invalidation as a real thing Change-Id: Ie3fde4c53476aada2b1fdabb1dc70b08485074b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152772 Tested-by: Jenkins Reviewed-by: Michael Meeks (cherry picked from commit 2768d6042539e628216d72423c7972da8b42d621) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152764 Tested-by: Michael Meeks diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 9ef664d1cb2f..7f8401cc2ee8 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2609,10 +2609,15 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) // 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()) @@ -2625,7 +2630,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) if( pMediumTmp->GetItemSet() ) { -pMediumTmp->GetItemSet()->ClearItem( SID_INTERACTIONHANDLER ); +if (aOriginalInteract.hasValue()) + pMediumTmp->GetItemSet()->Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, aOriginalInteract)); +else +pMediumTmp->GetItemSet()->ClearItem(SID_INTERACTIONHANDLER); pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL ); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/control/unoctitm.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit f86c951441270aaf75431369eabcfe26c35e4c63 Author: Henry Castro AuthorDate: Thu Jun 1 11:04:13 2023 -0400 Commit: Henry Castro CommitDate: Mon Jun 5 21:15:20 2023 +0200 lok: sfx2: fix change state "SheetRightToLeft" The UNO command "SheetRightToLeft" can be disabled Signed-off-by: Henry Castro Change-Id: I54742c9d52eb52e36154e0aac2cdf440771eb177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152502 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit fc8270f06eca5ba2ba25673a424b36d9e352f62a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152546 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 5d1cb00db3cf..fa131fe09ff6 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -954,8 +954,14 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "SpacePara2") { bool bTemp = false; -aEvent.State >>= bTemp; -aBuffer.append(bTemp); + +if (aEvent.IsEnabled) +{ +aEvent.State >>= bTemp; +aBuffer.append(bTemp); +} +else +aBuffer.append("disabled"); } else if (aEvent.FeatureURL.Path == "CharFontName") {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/dialog/backingwindow.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 15316b18a681d2bb7c3e9f03483eb760f5925f58 Author: Andras Timar AuthorDate: Mon Jun 5 14:02:50 2023 +0200 Commit: Andras Timar CommitDate: Mon Jun 5 14:15:44 2023 +0200 [cp] Let's use our ReleaseNotesURL here, too Change-Id: Iad11921bc11d59a9f47122a3deb75cebe3aa90b6 diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index d7889dd87913..4665e6dae23b 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -124,8 +124,8 @@ public: { if (rMEvt.IsLeft()) { -OUString sURL = officecfg::Office::Common::Menus::VolunteerURL::get(); -localizeWebserviceURI(sURL); +OUString sURL = officecfg::Office::Common::Menus::ReleaseNotesURL::get(); +// localizeWebserviceURI(sURL); Reference const xSystemShellExecute( css::system::SystemShellExecute::create(
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 914f7c73320183d5b526c6555663ec7c9539c4cc Author: Caolán McNamara AuthorDate: Wed May 31 19:56:24 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Jun 1 10:06:40 2023 +0200 WaE: fix more warnings I see with gcc-13.1.1 Change-Id: I8f1087cb98991363ec78a21a90a55724ba3628ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152466 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index c663198bd796..27ffb93d4683 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -408,7 +408,7 @@ void aboutTextFormatting(std::string msg, const uno::Reference>= fValue; sValue = OUString::number(fValue); } @@ -420,7 +420,7 @@ void aboutTextFormatting(std::string msg, const uno::Reference>= nValue; sValue = OUString::number(nValue); } @@ -430,7 +430,7 @@ void aboutTextFormatting(std::string msg, const uno::Reference>= nValue; sValue = OUString::number(nValue); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 19c786bb99d61f7309019a7cccf7e3e2cb179ea9 Author: Andras Timar AuthorDate: Wed May 31 18:57:35 2023 +0200 Commit: Andras Timar CommitDate: Wed May 31 18:57:35 2023 +0200 fix unused exception parameter 'e' Change-Id: I5eb599aced398fbd5390fe156b3e09fc2c928f22 diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 061a8efc09da..c663198bd796 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -354,7 +354,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv } } } -catch( const lang::IndexOutOfBoundsException& e ) +catch( const lang::IndexOutOfBoundsException& ) { SAL_WARN("lok.a11y", "Focused object has invalid index in parent"); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7b0259573fb3c16e43fb47cf5f2548c81f162383 Author: Andras Timar AuthorDate: Mon May 15 22:06:10 2023 +0200 Commit: Andras Timar CommitDate: Mon May 15 22:06:10 2023 +0200 fix unused exception parameter 'e' Change-Id: Ibfee099e4e9b724648d7500b9ebb4e8ab84989b8 diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 132497876eb7..b19da3d1ee23 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -723,7 +723,7 @@ void LOKDocumentFocusListener::notifyEvent( const accessibility::AccessibleEvent break; } } -catch( const lang::IndexOutOfBoundsException& e ) +catch( const lang::IndexOutOfBoundsException& ) { SAL_WARN("lok.a11y", "Focused object has invalid index in parent"); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewfrm.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 5b29a2b363196b9811fa73be552d8ba22566226a Author: Szymon Kłos AuthorDate: Tue May 9 13:05:06 2023 +0200 Commit: Szymon Kłos CommitDate: Tue May 9 13:09:31 2023 +0200 navigator: use toggle available for all apps Change-Id: I3136071ee943b120ebb2ad6491c91d8ebbcd6244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151573 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index e082d651073e..7472cd37c905 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3340,8 +3340,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest ) if (comphelper::LibreOfficeKit::isActive()) { ShowChildWindow(SID_SIDEBAR); -OUString panelId = "SdNavigatorPanel"; -::sfx2::sidebar::Sidebar::TogglePanel(panelId, GetFrame().GetFrameInterface()); +::sfx2::sidebar::Sidebar::ToggleDeck(u"NavigatorDeck", this); rReq.Done(); return; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/lokhelper.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit eb8e723225f3c63ff644ba840189874f295a1a62 Author: Szymon Kłos AuthorDate: Mon Feb 13 13:05:26 2023 +0100 Commit: Szymon Kłos CommitDate: Wed Apr 12 07:32:36 2023 +0200 lok: escape notifyWindow message File properties dialog contains problematic characters. In lok case and nl language it was constructing incorrect message so boost JSON parser was throwing an exception and dialog was not created correctly. Change-Id: I7e81c9407fcbf57355c0890c9540ce1f828904e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146900 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150042 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index bc33ad942382..b66ad6d05b83 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -587,8 +587,10 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView, { if (!rItem.first.isEmpty() && !rItem.second.isEmpty()) { -aPayload.append(", \"" + rItem.first + "\": \"" + -rItem.second).append('"'); +auto aFirst = rItem.first.replaceAll("\"", "\\\""); +auto aSecond = rItem.second.replaceAll("\"", "\\\""); +aPayload.append(", \"" + aFirst + "\": \"" + +aSecond).append('"'); } } aPayload.append('}');
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/doc/guisaveas.cxx|7 +++ sfx2/source/doc/sfxbasemodel.cxx |6 ++ 2 files changed, 13 insertions(+) New commits: commit e32e1f34a4f2c3ed16584eb58d81931654e889ba Author: Szymon Kłos AuthorDate: Mon Jan 23 14:32:15 2023 +0100 Commit: Szymon Kłos CommitDate: Mon Feb 6 16:31:30 2023 + lok: send status for file export dialogs Change-Id: I21530abc89808beb4c794f912e9453d8552c3b01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146006 Reviewed-by: Ashod Nakashian Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146576 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c0f951d62206..1e525301d03a 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -674,12 +674,19 @@ IMPL_LINK( ModelData_Impl, OptionsDialogClosedHdl, css::ui::dialogs::DialogClose { if (pEvt->DialogResult == RET_OK && m_xFilterProperties) { +if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) +SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "PENDING" ); + const uno::Sequence< beans::PropertyValue > aPropsFromDialog = m_xFilterProperties->getPropertyValues(); for ( const auto& rProp : aPropsFromDialog ) GetMediaDescr()[rProp.Name] = rProp.Value; m_pOwner->CallFinishGUIStoreModel(); } +else if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) +{ +SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ABORT" ); +} } sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 9948aadf0d37..8a539f660409 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -63,6 +63,7 @@ #include #include +#include #include #include #include @@ -132,6 +133,8 @@ #include #include +#include + // namespaces @@ -3208,6 +3211,9 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDocFailed : SfxEventHintId::SaveAsDocFailed, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOCFAILED : GlobalEventId::SAVEASDOCFAILED), m_pData->m_pObjectShell.get() ) ); +if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) +SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ERROR" ); + std::stringstream aErrCode; aErrCode << nErrCode; throw task::ErrorCodeIOException(
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit ede43e54ed7f89a20906ae84d9447eeb3412bc7f Author: Aron Budea AuthorDate: Thu Jan 26 03:31:24 2023 +0100 Commit: Andras Timar CommitDate: Fri Feb 3 21:55:40 2023 +0100 sfx2: fix crash in SfxLokHelper::notifyAllViews(...) Crashreport signature: program/libmergedlo.so SfxLokHelper::notifyAllViews(int, rtl::OString const&) sfx2/source/view/lokhelper.cxx:682 program/libmergedlo.so SfxClipboardChangeListener::ChangedContents() include/rtl/string.hxx:413 program/libmergedlo.so SfxClipboardChangeListener::LinkStubAsyncExecuteHdl_Impl(void*, void*) include/rtl/ref.hxx:128 program/libmergedlo.so ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) include/rtl/ref.hxx:128 program/libmergedlo.so SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) Change-Id: Ibf70f42292d67a3d6cc68f579ee02f671da85acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146150 Reviewed-by: Miklos Vajna Tested-by: Jenkins CollaboraOffice (cherry picked from commit dc17158c99c8a15fbca57a9a0b0ea7178dcc5a34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146400 Tested-by: Jenkins Reviewed-by: Aron Budea diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 53c2abace8b5..29f64adbb74b 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -676,6 +676,8 @@ void SfxLokHelper::notifyAllViews(int nType, const OString& rPayload) const auto payload = rPayload.getStr(); const SfxViewShell* const pCurrentViewShell = SfxViewShell::Current(); +if (!pCurrentViewShell) +return; SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) {