sc/source/core/data/drwlayer.cxx | 7 +++++ sc/source/ui/Accessibility/AccessibleDocument.cxx | 13 ++------- svx/source/svdraw/svdedxv.cxx | 30 +++++++++++----------- 3 files changed, 27 insertions(+), 23 deletions(-)
New commits: commit 0c565095983b0cc8b96a78012c611b7a03962204 Author: Eike Rathke <[email protected]> Date: Fri Dec 16 00:36:00 2016 +0100 remove superfluous this->Init() call Init() does exactly the same, just that it didn't because it was already done ... Went in with IAccessible2 integration. Change-Id: Ib29bd000e283bbb500689914f1ceb692dd0ab380 diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index cbdc599b..e34f666 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1555,17 +1555,12 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) mpAccessibleSpreadsheet.is()) { FreeAccessibleSpreadsheet(); + + // Shapes / form controls after reload not accessible, rebuild the + // mpChildrenShapes variable. if (mpChildrenShapes) DELETEZ(mpChildrenShapes); - - // Accessibility: Shapes / form controls after reload not accessible - if ( !mpChildrenShapes ) - { - mpChildrenShapes = new ScChildrenShapes( this, mpViewShell, meSplitPos ); - } - - //Invoke Init() to rebuild the mpChildrenShapes variable - this->Init(); + mpChildrenShapes = new ScChildrenShapes( this, mpViewShell, meSplitPos ); AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::INVALIDATE_ALL_CHILDREN; commit 6a334757082be4915e7e731ce4c1b0bd4641050d Author: Eike Rathke <[email protected]> Date: Fri Dec 16 00:18:52 2016 +0100 Resolves: tdf#103543 disable mass broadcasts from drawing objects' changes Specifically the a11y listeners are nasty bottle necks. A11y will get updated on paint/view. We're touching all objects on that drawing page to reposition so interdependencies that need to be broadcasted should not happen. Change-Id: Ic80446e22422a3097281ba20eecf0a078ac6a7cb diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 1deb958..3689aab 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -587,6 +587,9 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) ); + // Disable mass broadcasts from drawing objects' position changes. + bool bWasLocked = isLocked(); + setLock(true); const size_t nCount = pPage->GetObjCount(); for ( size_t i = 0; i < nCount; ++i ) { @@ -595,6 +598,7 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda if( pData ) RecalcPos( pObj, *pData, bNegativePage, bUpdateNoteCaptionPos ); } + setLock(bWasLocked); } } commit b954f1427a9549d89d8b0800259af9374b4767df Author: Eike Rathke <[email protected]> Date: Thu Dec 15 21:34:17 2016 +0100 prevent mutiple broadcasts during the series of changes on one drawing object Change-Id: I3a26d3589cbbcb8359242f7e1709fa7c34bd2900 diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index f2e93dd..1deb958 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -821,6 +821,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati } else { + // Prevent mutiple broadcasts during the series of changes. + SdrDelayBroadcastObjectChange aDelayBroadcastObjectChange(*pObj); + bool bCanResize = bValid2 && !pObj->IsResizeProtect(); //First time positioning, must be able to at least move it commit ba53b2d28274ad4e36ef57084b48c4ed73d15e63 Author: Eike Rathke <[email protected]> Date: Thu Dec 15 19:54:15 2016 +0100 avoid dynamic_cast Change-Id: I9f64eac95b39adc649b2e63cd5abdd6e7a448ee6 diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 512bc34..1fe56c8 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -216,21 +216,23 @@ void SdrObjEditView::TakeActionRect(Rectangle& rRect) const void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SdrGlueEditView::Notify(rBC,rHint); - // change of printer while editing - const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint); - if (pSdrHint!=nullptr && pTextEditOutliner!=nullptr) { - SdrHintKind eKind=pSdrHint->GetKind(); - if (eKind==SdrHintKind::RefDeviceChange) { - pTextEditOutliner->SetRefDevice(mpModel->GetRefDevice()); - } - if (eKind==SdrHintKind::DefaultTabChange) { - pTextEditOutliner->SetDefTab(mpModel->GetDefaultTabulator()); - } - if (eKind==SdrHintKind::DefaultFontHeightChange) { + if (pTextEditOutliner!=nullptr) { + // change of printer while editing + const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint); + if (pSdrHint!=nullptr) { + SdrHintKind eKind=pSdrHint->GetKind(); + if (eKind==SdrHintKind::RefDeviceChange) { + pTextEditOutliner->SetRefDevice(mpModel->GetRefDevice()); + } + if (eKind==SdrHintKind::DefaultTabChange) { + pTextEditOutliner->SetDefTab(mpModel->GetDefaultTabulator()); + } + if (eKind==SdrHintKind::DefaultFontHeightChange) { - } - if (eKind==SdrHintKind::ModelSaved) { - pTextEditOutliner->ClearModifyFlag(); + } + if (eKind==SdrHintKind::ModelSaved) { + pTextEditOutliner->ClearModifyFlag(); + } } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
