diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2023-11-04 22:36:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-11-12 13:01:23 +0100 |
commit | edddd58940aef6dcdf06a1a3a3109a50ee9bfa94 (patch) | |
tree | f25d926303cae9e4f8980a66f05b5d3317815533 /sfx2 | |
parent | 64ccc089c1e6bf82ef10a0dd4768fdff83af55b5 (diff) |
lok: a11y: corelog: removing log from LOKDocumentFocusListener
Change-Id: I0194cd4548dbb44f9efce4c53c790c3eec938524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158940
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
(cherry picked from commit e6caece707a7d6f3a3e397e6213be9af6054f148)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159332
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 50 |
2 files changed, 26 insertions, 26 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 31981159ca02..fa2a05c81cae 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -324,7 +324,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 6c5377a3bed2..f3ba1de53052 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -480,7 +480,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() @@ -491,13 +491,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; @@ -510,7 +510,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv if (xContext.is()) { SAL_INFO("lok.a11y", msg << ": " - "\n xOldValue: " << xOldValue.get() + "\n xOldValue: " << xOldValue.get() << "\n role: " << xContext->getAccessibleRole() << "\n name: " << xContext->getAccessibleName() << "\n index in parent: " << xContext->getAccessibleIndexInParent() @@ -528,7 +528,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() @@ -541,7 +541,7 @@ void aboutEvent(std::string msg, const accessibility::AccessibleEventObject& aEv } catch( const lang::IndexOutOfBoundsException& /*e*/ ) { - LOK_WARN("lok.a11y", "Focused object has invalid index in parent"); + SAL_WARN("lok.a11y", "Focused object has invalid index in parent"); } } @@ -940,7 +940,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()); } } @@ -1352,7 +1352,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)); @@ -1476,8 +1476,8 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO if (nNewPos >= 0) { - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: CARET_CHANGED: " - "new pos: " << nNewPos << ", nOldPos: " << nOldPos); + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: CARET_CHANGED: " + "new pos: " << nNewPos << ", nOldPos: " << nOldPos); uno::Reference<XAccessibleText> xAccText(getAccessible(aEvent), uno::UNO_QUERY); if (xAccText.is()) @@ -1511,12 +1511,12 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO if (aEvent.OldValue >>= aDeletedText) { - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: TEXT_CHANGED: " + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: TEXT_CHANGED: " "deleted text: >" << aDeletedText.SegmentText << "<"); } if (aEvent.NewValue >>= aInsertedText) { - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: TEXT_CHANGED: " + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: TEXT_CHANGED: " "inserted text: >" << aInsertedText.SegmentText << "<"); } uno::Reference<XAccessibleText> xAccText(getAccessible(aEvent), uno::UNO_QUERY); @@ -1584,7 +1584,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO return; // selecting the same object; note: on editing selected object is cleared else m_xSelectedObject = xSelectedObject; - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: SELECTION_CHANGED: " + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: SELECTION_CHANGED: " "m_xSelectedObject.is(): " << m_xSelectedObject.is()); OUString sAction = selectionEventTypeToString(aEvent.EventId); @@ -1641,7 +1641,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO } case AccessibleEventId::INVALIDATE_ALL_CHILDREN: { - LOK_INFO("lok.a11y", "Invalidate all children called"); + SAL_INFO("lok.a11y", "Invalidate all children called"); break; } default: @@ -1650,7 +1650,7 @@ void LOKDocumentFocusListener::notifyEvent(const accessibility::AccessibleEventO } catch( const lang::IndexOutOfBoundsException& ) { - LOK_WARN("lok.a11y", + SAL_WARN("lok.a11y", "LOKDocumentFocusListener::notifyEvent:Focused object has invalid index in parent"); } } @@ -1680,7 +1680,7 @@ uno::Reference< accessibility::XAccessible > LOKDocumentFocusListener::getAccess } } - LOK_WARN("lok.a11y", + SAL_WARN("lok.a11y", "LOKDocumentFocusListener::getAccessible: Can't get any accessible object from event source."); return uno::Reference< accessibility::XAccessible >(); @@ -1690,7 +1690,7 @@ void LOKDocumentFocusListener::attachRecursive( const uno::Reference< accessibility::XAccessible >& xAccessible ) { - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(1): xAccessible: " << xAccessible.get()); + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(1): xAccessible: " << xAccessible.get()); uno::Reference< accessibility::XAccessibleContext > xContext = xAccessible->getAccessibleContext(); @@ -1704,7 +1704,7 @@ void LOKDocumentFocusListener::attachRecursive( const uno::Reference< accessibility::XAccessibleContext >& xContext ) { - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " << xAccessible.get() + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): xAccessible: " << xAccessible.get() << ", role: " << xContext->getAccessibleRole() << ", name: " << xContext->getAccessibleName() << ", parent: " << xContext->getAccessibleParent().get() @@ -1728,7 +1728,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 +1741,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())) @@ -1831,7 +1831,7 @@ void LOKDocumentFocusListener::detachRecursive( aboutView("LOKDocumentFocusListener::detachRecursive (2)", this, m_pViewShell); sal_Int64 nStateSet = xContext->getAccessibleStateSet(); - LOK_INFO("lok.a11y", "LOKDocumentFocusListener::detachRecursive(2): this: " << this + SAL_INFO("lok.a11y", "LOKDocumentFocusListener::detachRecursive(2): this: " << this << ", name: " << xContext->getAccessibleName() << ", parent: " << xContext->getAccessibleParent().get() << ", child count: " << xContext->getAccessibleChildCount()); @@ -3283,7 +3283,7 @@ void SfxViewShell::libreOfficeKitViewAddPendingInvalidateTiles() void SfxViewShell::afterCallbackRegistered() { - LOK_INFO("sfx.view", "SfxViewShell::afterCallbackRegistered invoked"); + SAL_INFO("sfx.view", "SfxViewShell::afterCallbackRegistered invoked"); if (GetLOKAccessibilityState()) { LOKDocumentFocusListener& rDocFocusListener = GetLOKDocumentFocusListener(); @@ -3374,7 +3374,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled) } catch (const uno::Exception&) { - LOK_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::attachRecursive"); + SAL_WARN("lok.a11y", "SetLOKAccessibilityState: Exception caught processing LOKDocumentFocusListener::attachRecursive"); } } else @@ -3385,7 +3385,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled) } catch (const uno::Exception&) { - LOK_WARN("SetLOKAccessibilityState", "Exception caught processing LOKDocumentFocusListener::detachRecursive"); + SAL_WARN("lok.a11y", "SetLOKAccessibilityState: Exception caught processing LOKDocumentFocusListener::detachRecursive"); } } } |