diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-04 11:23:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-04 13:17:14 +0200 |
commit | 891e41fac81fbd8d5cdb277b26639abfd25a7143 (patch) | |
tree | 0ac884b349c5c5e21dea26d1ca476736fe3c2673 /svx | |
parent | 1e0d5d0c98dd1128c4ab7a9dcc4e9ae2d2878390 (diff) |
dead code in AccessibleTextHelper_Impl::UpdateVisibleChildren
ever since
commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366
Date: Wed Nov 27 13:03:45 2013 +0000
Integrate branch of IAccessible2
Change-Id: Ie175277badc07cf79eadbeef5a75857b914876d9
Reviewed-on: https://gerrit.libreoffice.org/52370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleTextHelper.cxx | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 8f59f7ceee0d..9f1061bf0cac 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -757,58 +757,28 @@ namespace accessibility try { SvxTextForwarder& rCacheTF = GetTextForwarder(); - SvxViewForwarder& rCacheVF = GetViewForwarder(); - - tools::Rectangle aViewArea = rCacheVF.GetVisArea(); - - if( IsActive() ) - { - // maybe the edit view scrolls, adapt aViewArea - tools::Rectangle aEditViewArea = GetEditViewForwarder().GetVisArea(); - aViewArea += aEditViewArea.TopLeft(); - - // now determine intersection - aViewArea.Intersection( aEditViewArea ); - } - - tools::Rectangle aTmpBB, aParaBB; - bool bFirstChild = true; - sal_Int32 nCurrPara; sal_Int32 nParas=rCacheTF.GetParagraphCount(); - mnFirstVisibleChild = -1; + mnFirstVisibleChild = nParas ? 0 : -1; mnLastVisibleChild = -2; - for( nCurrPara=0; nCurrPara<nParas; ++nCurrPara ) + if (mxFrontEnd.is() && bBroadcastEvents) { - DBG_ASSERT(nCurrPara >= 0, - "AccessibleTextHelper_Impl::UpdateVisibleChildren: index value overflow"); - - aTmpBB = rCacheTF.GetParaBounds( nCurrPara ); - - // convert to screen coordinates - aParaBB = ::accessibility::AccessibleEditableTextPara::LogicToPixel( aTmpBB, rCacheTF.GetMapMode(), rCacheVF ); - // at least partially visible - if( bFirstChild ) + for( sal_Int32 nCurrPara=0; nCurrPara<nParas; ++nCurrPara ) { - bFirstChild = false; - mnFirstVisibleChild = nCurrPara; - } - - mnLastVisibleChild = nCurrPara; - - // child not yet created? - ::accessibility::AccessibleParaManager::WeakChild aChild( maParaManager.GetChild(nCurrPara) ); - if( aChild.second.Width == 0 && - aChild.second.Height == 0 && - mxFrontEnd.is() && - bBroadcastEvents ) - { - GotPropertyEvent( uno::makeAny( maParaManager.CreateChild( nCurrPara - mnFirstVisibleChild, - mxFrontEnd, GetEditSource(), nCurrPara ).first ), - AccessibleEventId::CHILD ); + // child not yet created? + ::accessibility::AccessibleParaManager::WeakChild aChild( maParaManager.GetChild(nCurrPara) ); + if( aChild.second.Width == 0 && + aChild.second.Height == 0 ) + { + GotPropertyEvent( uno::makeAny( maParaManager.CreateChild( nCurrPara - mnFirstVisibleChild, + mxFrontEnd, GetEditSource(), nCurrPara ).first ), + AccessibleEventId::CHILD ); + } } } + + mnLastVisibleChild = nParas - 1; } catch( const uno::Exception& ) { |