sfx2/source/dialog/dinfdlg.cxx | 7 +++++-- sfx2/source/view/viewsh.cxx | 35 +++++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 16 deletions(-)
New commits: commit a355522bc282f1c55be36e6949b97ef0ad93175b Author: Gökay Şatır <gokaysa...@collabora.com> AuthorDate: Tue Oct 31 16:57:52 2023 +0300 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Nov 12 13:02:29 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 <gokaysa...@collabora.com> Change-Id: Ib3e285dc86cd3918b631b6993e9afb221994bfab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158727 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 6c7fd1dc50cbc3f8e61c741367223a4b4aefc98b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159337 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 044757c6cdd2..26f34882ec42 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -907,8 +907,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.finishAndGetAsOString()); + + SfxViewShell *pViewShell = SfxViewShell::Current(); + if (pViewShell) + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, payloadJson.finishAndGetAsOString()); + pShell->SetModified(); } m_xPasswordDialog->disposeOnce(); commit 807c3aafef4d23cef13aafc2280c399db0864971 Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Sun Nov 5 21:08:26 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Nov 12 13:02:24 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com> (cherry picked from commit 4e6848628cbff418896b7653eadac80c57ceaf25) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159336 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5e725e18c1c2..03ec646389d7 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1704,21 +1704,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( @@ -1728,7 +1735,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() @@ -1741,12 +1748,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()))