svx/source/accessibility/AccessibleControlShape.cxx | 31 ++++++++++---------- sw/source/core/unocore/unostyle.cxx | 2 - 2 files changed, 17 insertions(+), 16 deletions(-)
New commits: commit c1258abe50f1508ea0f628ff963bc1914ab86b67 Author: Bjoern Michaelsen <[email protected]> Date: Sat Jan 2 02:02:21 2016 +0100 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 diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 03e6a2c..ab768d7 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -42,6 +42,7 @@ #include <svx/svdview.hxx> #include <svx/svdpagv.hxx> #include "svx/svdstr.hrc" +#include <vcl/svapp.hxx> #include <algorithm> using namespace ::accessibility; @@ -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!)? - OSL_TRACE ("AccessibleControlShape::modeChanged"); - Reference< XControl > xSource( _rSource.Source, UNO_QUERY ); // for faster compare - if ( xSource.get() == m_xUnoControl.get() ) - { - // If our "pseudo-aggregated" inner context does not live anymore, - // we don't want to live, too. This is accomplished by asking our - // 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 ) ); + SAL_INFO("sw.uno", "AccessibleControlShape::modeChanged"); + Reference<XControl> xSource(rSource.Source, UNO_QUERY); // for faster compare + if(xSource.get() != m_xUnoControl.get()) + { + SAL_WARN("sw.uno", "AccessibleControlShape::modeChanged: where did this come from?"); + return; } -#if OSL_DEBUG_LEVEL > 0 - else - OSL_FAIL( "AccessibleControlShape::modeChanged: where did this come from?" ); -#endif + SolarMutexGuard g; + // If our "pseudo-aggregated" inner context does not live anymore, + // we don't want to live, too. This is accomplished by asking our + // 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) commit 3ae3af4a989758a0772881b1a2a6c1a68ee67dda Author: Bjoern Michaelsen <[email protected]> Date: Sat Jan 2 01:35:53 2016 +0100 fix indent Change-Id: I79623024b008b60a33935942986e8a98fccc3d8d diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 8caa0dd..0bfb6b8 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -937,7 +937,7 @@ static const std::vector<StyleFamilyEntry>* lcl_GetStyleFamilyEntries() { SFX_STYLE_FAMILY_PARA, PROPERTY_MAP_PARA_STYLE, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, "ParagraphStyles", STR_STYLE_FAMILY_PARAGRAPH, &lcl_GetCountOrName<SFX_STYLE_FAMILY_PARA>, &lcl_CreateStyle<SFX_STYLE_FAMILY_PARA>, &lcl_TranslateIndex<SFX_STYLE_FAMILY_PARA> }, { SFX_STYLE_FAMILY_PAGE, PROPERTY_MAP_PAGE_STYLE, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, "PageStyles", STR_STYLE_FAMILY_PAGE, &lcl_GetCountOrName<SFX_STYLE_FAMILY_PAGE>, &lcl_CreateStyle<SFX_STYLE_FAMILY_PAGE>, &lcl_TranslateIndexRange<RES_POOLPAGE_BEGIN, nPoolPageRange> }, { SFX_STYLE_FAMILY_FRAME, PROPERTY_MAP_FRAME_STYLE, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, "FrameStyles", STR_STYLE_FAMILY_FRAME, &lcl_GetCountOrName<SFX_STYLE_FAMILY_FRAME>, &lcl_CreateStyle<SFX_STYLE_FAMILY_FRAME>, &lcl_TranslateIndexRange<RES_POOLFRM_BEGIN, nPoolFrameRange> }, - { SFX_STYLE_FAMILY_PSEUDO, PROPERTY_MAP_NUM_STYLE, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, "NumberingStyles", STR_STYLE_FAMILY_NUMBERING, &lcl_GetCountOrName<SFX_STYLE_FAMILY_PSEUDO>, &lcl_CreateStyle<SFX_STYLE_FAMILY_PSEUDO>, &lcl_TranslateIndexRange<RES_POOLNUMRULE_BEGIN, nPoolNumRange> } + { SFX_STYLE_FAMILY_PSEUDO, PROPERTY_MAP_NUM_STYLE, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, "NumberingStyles", STR_STYLE_FAMILY_NUMBERING, &lcl_GetCountOrName<SFX_STYLE_FAMILY_PSEUDO>, &lcl_CreateStyle<SFX_STYLE_FAMILY_PSEUDO>, &lcl_TranslateIndexRange<RES_POOLNUMRULE_BEGIN, nPoolNumRange> } }; } return our_pStyleFamilyEntries; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
