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 <marco.cecche...@collabora.com>
AuthorDate: Sat Nov 4 22:36:05 2023 +0100
Commit:     Marco Cecchetti <marco.cecche...@collabora.com>
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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

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: "
+                    SAL_INFO("lok.a11y", 
"LOKDocumentFocusListener::notifyEvent: CARET_CHANGED: "
                                          << "new pos: " << nNewPos << ", 
nOldPos: " << nOldPos);
 
                     uno::Reference<XAccessibleText> 
xAccText(getAccessible(aEvent), uno::UNO_QUERY);
@@ -1509,12 +1509,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);
@@ -1582,7 +1582,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);
@@ -1639,7 +1639,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:
@@ -1648,7 +1648,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");
     }
 }
@@ -1678,7 +1678,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 >();
@@ -1688,7 +1688,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();
@@ -1702,7 +1702,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()
@@ -1726,7 +1726,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 +1740,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()))
@@ -1830,7 +1830,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());
@@ -3285,7 +3285,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();
@@ -3376,7 +3376,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled)
         }
         catch (const uno::Exception&)
         {
-            LOK_WARN("SetLOKAccessibilityState", "Exception caught processing 
LOKDocumentFocusListener::attachRecursive");
+            SAL_WARN("SetLOKAccessibilityState", "Exception caught processing 
LOKDocumentFocusListener::attachRecursive");
         }
     }
     else
@@ -3387,7 +3387,7 @@ void SfxViewShell::SetLOKAccessibilityState(bool bEnabled)
         }
         catch (const uno::Exception&)
         {
-            LOK_WARN("SetLOKAccessibilityState", "Exception caught processing 
LOKDocumentFocusListener::detachRecursive");
+            SAL_WARN("SetLOKAccessibilityState", "Exception caught processing 
LOKDocumentFocusListener::detachRecursive");
         }
     }
 }

Reply via email to