Kaydet (Commit) c1258abe authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

tdf#96365: ensure holding SolarMutex before triggering core code

(likely a bad sign that this compilation unit, defines lots of UNO
interfaces without ever using a SolarMutexGuard)

Change-Id: I2cca810f8e4e1684c75d9185d701024f692403a4
üst 3ae3af4a
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <svx/svdview.hxx> #include <svx/svdview.hxx>
#include <svx/svdpagv.hxx> #include <svx/svdpagv.hxx>
#include "svx/svdstr.hrc" #include "svx/svdstr.hrc"
#include <vcl/svapp.hxx>
#include <algorithm> #include <algorithm>
using namespace ::accessibility; using namespace ::accessibility;
...@@ -466,24 +467,24 @@ void SAL_CALL AccessibleControlShape::notifyEvent( const AccessibleEventObject& ...@@ -466,24 +467,24 @@ void SAL_CALL AccessibleControlShape::notifyEvent( const AccessibleEventObject&
} }
} }
void SAL_CALL AccessibleControlShape::modeChanged( const ModeChangeEvent& _rSource ) throw (RuntimeException, std::exception) void SAL_CALL AccessibleControlShape::modeChanged(const ModeChangeEvent& rSource) throw (RuntimeException, std::exception)
{ {
// did it come from our inner context (the real one, not it's proxy!)? // did it come from our inner context (the real one, not it's proxy!)?
OSL_TRACE ("AccessibleControlShape::modeChanged"); SAL_INFO("sw.uno", "AccessibleControlShape::modeChanged");
Reference< XControl > xSource( _rSource.Source, UNO_QUERY ); // for faster compare Reference<XControl> xSource(rSource.Source, UNO_QUERY); // for faster compare
if ( xSource.get() == m_xUnoControl.get() ) if(xSource.get() != m_xUnoControl.get())
{ {
// If our "pseudo-aggregated" inner context does not live anymore, SAL_WARN("sw.uno", "AccessibleControlShape::modeChanged: where did this come from?");
// we don't want to live, too. This is accomplished by asking our return;
// parent to replace this object with a new one. Disposing this
// object and sending notifications about the replacement are in
// the responsibility of our parent.
OSL_VERIFY( mpParent->ReplaceChild ( this, mxShape, mnIndex, maShapeTreeInfo ) );
} }
#if OSL_DEBUG_LEVEL > 0 SolarMutexGuard g;
else // If our "pseudo-aggregated" inner context does not live anymore,
OSL_FAIL( "AccessibleControlShape::modeChanged: where did this come from?" ); // we don't want to live, too. This is accomplished by asking our
#endif // parent to replace this object with a new one. Disposing this
// object and sending notifications about the replacement are in
// the responsibility of our parent.
const bool bReplaced = mpParent->ReplaceChild(this, mxShape, mnIndex, maShapeTreeInfo);
SAL_WARN_IF(!bReplaced, "sw.uno", "AccessibleControlShape::modeChanged: replacing ourselves away did fail");
} }
void SAL_CALL AccessibleControlShape::disposing (const EventObject& _rSource) throw (RuntimeException, std::exception) void SAL_CALL AccessibleControlShape::disposing (const EventObject& _rSource) throw (RuntimeException, std::exception)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment