diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-25 19:23:12 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-25 22:45:52 +0200 |
commit | 1d2244ecac353c227c6001d9a2e326d42b1116b0 (patch) | |
tree | 79de64fbc770f837f57d905194e4b89040f306de /sw | |
parent | 8c7928b647c49e7bb4a6d0ee46a1d5bc90f168b5 (diff) |
sw: remove SwAccessibleDocument XEventListener buggy dead code
This was added with IA2, but evidently it's dead - the listener is never
registered at the broadcaster. Also the first of the events it is
listening for does not exist, and the others are actually called
"OnLoadFinished" and "OnLayoutFinished".
Also remove the "isIfAsynLoad" [sic] member.
Change-Id: Ib261c193289e415af91b3097c525e90ef051f824
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/acccontext.cxx | 19 | ||||
-rw-r--r-- | sw/source/core/access/acccontext.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/access/accdoc.cxx | 45 | ||||
-rw-r--r-- | sw/source/core/access/accdoc.hxx | 6 |
4 files changed, 8 insertions, 64 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index aca8c3568b5b..4e3b92f4086e 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -521,9 +521,7 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *const pMap, , m_nRole(nRole) , m_isDisposing( false ) , m_isRegisteredAtAccessibleMap( true ) - //Initialize the begin document load and IfAsynLoad to true , m_isBeginDocumentLoad( true ) - , isIfAsynLoad( true ) , m_isSelectedInDoc(false) { InitStates(); @@ -589,16 +587,13 @@ uno::Reference< XAccessible> SAL_CALL FireStateChangedEvent( AccessibleStateType::FOCUSABLE,true ); FireStateChangedEvent( AccessibleStateType::BUSY,true ); - if( !isIfAsynLoad ) - { - FireStateChangedEvent( AccessibleStateType::FOCUSED,true ); - // OFFSCREEN == !SHOWING, should stay consistent - // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,true ); - FireStateChangedEvent( AccessibleStateType::SHOWING,true ); - FireStateChangedEvent( AccessibleStateType::BUSY,false ); - // OFFSCREEN again? - // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,false ); - } + FireStateChangedEvent( AccessibleStateType::FOCUSED,true ); + // OFFSCREEN == !SHOWING, should stay consistent + // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,true ); + FireStateChangedEvent( AccessibleStateType::SHOWING,true ); + FireStateChangedEvent( AccessibleStateType::BUSY,false ); + // OFFSCREEN again? + // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,false ); m_isBeginDocumentLoad = false; } if( xChildImpl.is() ) diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index 43ec362d8a6b..873e9b2c18ab 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -98,8 +98,6 @@ protected: { return m_nRole; } - //Add a member to identify if the document is Asyn load. - bool isIfAsynLoad; //This flag is used to mark the object's selected state. bool m_isSelectedInDoc; void SetParent( SwAccessibleContext *pParent ); diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 0e334716c7cb..765ce5fb654d 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -465,12 +465,6 @@ uno::Any SwAccessibleDocument::queryInterface( uno::Reference<XAccessibleSelection> aSelect = this; aRet <<= aSelect; } - //Add XEventListener interface support. - else if ( (rType == cppu::UnoType<com::sun::star::document::XEventListener>::get()) ) - { - uno::Reference<com::sun::star::document::XEventListener> aSelect = this; - aRet <<= aSelect; - } else if ( rType == cppu::UnoType<XAccessibleExtendedAttributes>::get()) { uno::Reference<XAccessibleExtendedAttributes> aAttribute = this; @@ -494,13 +488,10 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes() sal_Int32 nIndex = aTypes.getLength(); //Reset types memory alloc - //aTypes.realloc( nIndex + 1 ); - aTypes.realloc( nIndex + 2 ); + aTypes.realloc( nIndex + 1 ); uno::Type* pTypes = aTypes.getArray(); pTypes[nIndex] = cppu::UnoType<XAccessibleSelection>::get(); - //Add XEventListener interface support. - pTypes[nIndex + 1 ] = cppu::UnoType<com::sun::star::document::XEventListener>::get(); return aTypes; } @@ -562,40 +553,6 @@ void SwAccessibleDocument::deselectAccessibleChild( maSelectionHelper.deselectAccessibleChild( nChildIndex ); } -//Implement XEventListener interfaces -void SAL_CALL SwAccessibleDocument::notifyEvent( const ::com::sun::star::document::EventObject& Event ) - throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - SolarMutexGuard g; - - if ( Event.EventName == "FirstPageShows" ) - { - FireStateChangedEvent( AccessibleStateType::FOCUSED,true ); - } - else if ( Event.EventName == "LoadFinished" ) - { - // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent - // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,true ); - // MT: LoadFinished => Why not SHOWING == TRUE? - FireStateChangedEvent( AccessibleStateType::SHOWING,false ); - } - else if ( Event.EventName == "FormatFinished" ) - { - FireStateChangedEvent( AccessibleStateType::BUSY,false ); - // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,false ); - FireStateChangedEvent( AccessibleStateType::SHOWING,true ); - } - else - { - isIfAsynLoad = false; - } -} - -void SAL_CALL SwAccessibleDocument::disposing( const ::com::sun::star::lang::EventObject& ) - throw (::com::sun::star::uno::RuntimeException, std::exception) -{ -} - uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx index 953c8a1ae542..1fae89e7db8e 100644 --- a/sw/source/core/access/accdoc.hxx +++ b/sw/source/core/access/accdoc.hxx @@ -107,7 +107,6 @@ public: */ class SwAccessibleDocument : public SwAccessibleDocumentBase, public com::sun::star::accessibility::XAccessibleSelection, - public com::sun::star::document::XEventListener, public com::sun::star::accessibility::XAccessibleExtendedAttributes, public com::sun::star::accessibility::XAccessibleGetAccFlowTo { @@ -125,11 +124,6 @@ public: SwAccessibleDocument( SwAccessibleMap* pInitMap ); DECL_LINK( WindowChildEventListener, VclSimpleEvent* ); - // XEventListener - virtual void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& Event ) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Event ) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo |