winaccessibility/inc/AccObjectManagerAgent.hxx                |    2 -
 winaccessibility/inc/AccObjectWinManager.hxx                  |    2 -
 winaccessibility/source/service/AccEventListener.cxx          |    1 
 winaccessibility/source/service/AccObjectManagerAgent.cxx     |   18 ----------
 winaccessibility/source/service/AccObjectWinManager.cxx       |   15 --------
 winaccessibility/source/service/AccParagraphEventListener.cxx |    1 
 6 files changed, 39 deletions(-)

New commits:
commit 0c3a159807965fa7db548a943a8d67d8bad5b208
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 5 11:02:40 2022 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 5 16:36:17 2022 +0200

    wina11y: Drop AccObjectManagerAgent::UpdateLocation
    
    That static method doesn't do anything.
    
    `_IMPL_WIN` is not defined, so the
    
        #ifdef _IMPL_WIN
           if( pWinManager )
               pWinManager->SetLocation( pXAcc, top, left, width, height );
        #endif
    
    in the method is unused.
    
    Since `CMAccessible::accLocation` already retrieves the
    current location from the underlying `XAccessible` on demand,
    I don't see a need to update the location manually
    in the first place, so there should be no need to enable that,
    code, just drop it.
    
    Also drop `AccObjectWinManager::SetLocation` which was
    unused since `AccObjectManagerAgent::UpdateLocation`
    (s. above) would have been the only call site.
    
    Change-Id: I04d0230d3599466aaa92082caba54da22a3b1a28
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137857
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index e8848c398c25..a83650141cd9 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -67,8 +67,6 @@ public:
     void  IncreaseState( css::accessibility::XAccessible* pXAcc, sal_Int64 
pState );
     void  UpdateState( css::accessibility::XAccessible* pXAcc );
 
-    static void UpdateLocation( css::accessibility::XAccessible* pXAcc,
-                          long Top = 0,long left = 0,long width = 0,long 
height = 0 );
     void  UpdateAction( css::accessibility::XAccessible* pXAcc );
 
     void  UpdateValue( css::accessibility::XAccessible* pXAcc );
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index 342d2278d42d..f1adfb0dc9d0 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -114,8 +114,6 @@ public:
     void  DecreaseState( css::accessibility::XAccessible* pXAcc,unsigned short 
pState );
     void  IncreaseState( css::accessibility::XAccessible* pXAcc,unsigned short 
pState );
     void  UpdateState( css::accessibility::XAccessible* pXAcc );
-    void  SetLocation( css::accessibility::XAccessible* pXAcc,
-                       long Top = 0,long left = 0,long width = 0,long height = 
0);
 
     void  SetValue( css::accessibility::XAccessible* pXAcc, css::uno::Any pAny 
);
     void  UpdateValue( css::accessibility::XAccessible* pXAcc );
diff --git a/winaccessibility/source/service/AccEventListener.cxx 
b/winaccessibility/source/service/AccEventListener.cxx
index 9121974c221e..b6b4e71f3aaa 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -106,7 +106,6 @@ void AccEventListener::HandleDescriptionChangedEvent()
  */
 void AccEventListener::HandleBoundrectChangedEvent()
 {
-    AccObjectManagerAgent::UpdateLocation(m_xAccessible.get());
     pAgent->NotifyAccEvent(UnoMSAAEvent::BOUNDRECT_CHANGED, 
m_xAccessible.get());
 }
 
diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx 
b/winaccessibility/source/service/AccObjectManagerAgent.cxx
index 5c9cd633d308..e60b3a56992c 100644
--- a/winaccessibility/source/service/AccObjectManagerAgent.cxx
+++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx
@@ -104,24 +104,6 @@ void  AccObjectManagerAgent::UpdateAccName( XAccessible* 
pXAcc, Any newName)
         pWinManager->SetAccName( pXAcc, newName );
 }
 
-
-/**
-   * Interface of updating MSAA location when UNO location_changed event 
occurs.
-   * @param pXAcc Uno XAccessible interface of control.
-   * @param pXAcc Uno The top position of new location.
-   * @param pXAcc Uno The left position of new location.
-   * @param pXAcc Uno The width of new location.
-   * @param pXAcc Uno The width of new location.
-   * @return
-   */
-void  AccObjectManagerAgent::UpdateLocation( XAccessible* /* pXAcc */, long 
/*top*/, long /*left*/, long /*width*/, long /*height*/ )
-{
-#ifdef _IMPL_WIN
-    if( pWinManager )
-        pWinManager->SetLocation( pXAcc, top, left, width, height );
-#endif
-}
-
 /**
    * When a new UNO XAccessible object is found by listener, we create a 
corresponding
    * com object and insert it to our manager list.
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 3a8b1eb06d8a..8349d5c863cd 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -918,21 +918,6 @@ void  AccObjectWinManager::UpdateAction( XAccessible* 
pXAcc )
         pAccObj->UpdateAction();
 }
 
-/**
-   * Set corresponding com object's accessible location via XAccessible 
interface and new
-   * location.
-   * @param pXAcc XAccessible interface.
-   * @return
-   */
-void  AccObjectWinManager::SetLocation( XAccessible* pXAcc, long /*top*/, long 
/*left*/, long /*width*/, long /*height*/ )
-{
-    AccObject* pObj = GetAccObjByXAcc( pXAcc );
-    //get the location from XComponent.
-    Reference< XAccessibleContext > pRContext = pXAcc->getAccessibleContext();
-    if( pObj )
-        pObj->UpdateLocation();
-}
-
 /**
    * Set corresponding com object's value  via XAccessible interface and new 
value.
    * @param pXAcc XAccessible interface.
diff --git a/winaccessibility/source/service/AccParagraphEventListener.cxx 
b/winaccessibility/source/service/AccParagraphEventListener.cxx
index f4c24c3bb0ec..7d6b25a8f248 100644
--- a/winaccessibility/source/service/AccParagraphEventListener.cxx
+++ b/winaccessibility/source/service/AccParagraphEventListener.cxx
@@ -94,7 +94,6 @@ void  AccParagraphEventListener::notifyEvent( const 
css::accessibility::Accessib
  */
 void AccParagraphEventListener::HandleCaretChangedEvent(Any, Any)
 {
-    AccObjectManagerAgent::UpdateLocation(m_xAccessible.get());
     pAgent->NotifyAccEvent(UnoMSAAEvent::OBJECT_CARETCHANGE, 
m_xAccessible.get());
 }
 

Reply via email to