diff options
Diffstat (limited to 'sw/source/core/access/accfrmobjmap.cxx')
-rw-r--r-- | sw/source/core/access/accfrmobjmap.cxx | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index 4fc284ae9fb2..c76df1453d1f 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -162,3 +162,97 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, ( rFrm.IsTxtFrm() && rFrm.GetDrawObjs() ); } + +/* MT: The two insert methods had been introduced in the IA2 CWS (OOO310m11), but meanwhile we also have some in DEV300m80 (above) + Not sure if they have something which needs to be update in above methods. + Also, since there is no SwFrmOrObjMap CTOR anymore, the updated code in DEV300 might need some of the changes flagged with //IAccessibility2 Implementation 2009----- + +//IAccessibility2 Implementation 2009----- +::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert( + sal_uInt32 nOrd, Point nPos, const SwFrmOrObj& rLower ) +{ + SwFrmOrObjMapKey aKey( SwFrmOrObjMapKey::TEXT, nOrd, nPos ); + value_type aEntry( aKey, rLower ); + return _SwFrmOrObjMap::insert( aEntry ); +} + +::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert( + const SdrObject *pObj, const SwFrmOrObj& rLower, const SwDoc *pDoc , Point nPos) +{ + if( !bLayerIdsValid ) + { + nHellId = pDoc->GetHellId(); + nControlsId = pDoc->GetControlsId(); + bLayerIdsValid = sal_True; + } + + SdrLayerID nLayer = pObj->GetLayer(); + SwFrmOrObjMapKey::LayerId eLayerId = (nHellId == nLayer) + ? SwFrmOrObjMapKey::HELL + : ((nControlsId == nLayer) ? SwFrmOrObjMapKey::CONTROLS + : SwFrmOrObjMapKey::HEAVEN); + SwFrmOrObjMapKey aKey( eLayerId, pObj->GetOrdNum(), nPos ); + value_type aEntry( aKey, rLower ); + return _SwFrmOrObjMap::insert( aEntry ); +} +//-----IAccessibility2 Implementation 2009 + +SwFrmOrObjMap::SwFrmOrObjMap( + const SwRect& rVisArea, const SwFrm *pFrm ) : + bLayerIdsValid( sal_False ) +{ + SwFrmOrObj aFrm( pFrm ); + sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); + + sal_uInt32 nPos = 0; + SwFrmOrObj aLower( pFrm->GetLower() ); + while( aLower.GetSwFrm() ) + { + //IAccessibility2 Implementation 2009----- + if( !bVisibleOnly || aLower.GetBox().IsOver( rVisArea ) ) + insert( nPos++, aLower.GetBounds().Pos(), aLower ); + //-----IAccessibility2 Implementation 2009 + aLower = aLower.GetSwFrm()->GetNext(); + } + + if( pFrm->IsPageFrm() ) + { + ASSERT( bVisibleOnly, "page frame within tab frame???" ); + const SwPageFrm *pPgFrm = + static_cast< const SwPageFrm * >( pFrm ); + const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); + if( pObjs ) + { + const SwDoc *pDoc = pPgFrm->GetFmt()->GetDoc(); + for( sal_uInt16 i=0; i<pObjs->Count(); i++ ) + { + aLower = (*pObjs)[i]->GetDrawObj(); + //IAccessibility2 Implementation 2009----- + if( aLower.GetBox().IsOver( rVisArea ) ) + insert( aLower.GetSdrObject(), aLower, pDoc , aLower.GetBounds().Pos() ); + //-----IAccessibility2 Implementation 2009 + } + } + } + else if( pFrm->IsTxtFrm() ) + { + const SwDoc *pDoc = static_cast< const SwTxtFrm * >( pFrm )->GetNode() + ->GetDoc(); + const SwSortedObjs *pObjs = pFrm->GetDrawObjs(); + if( pObjs ) + { + for( sal_uInt16 i=0; i<pObjs->Count(); i++ ) + { + aLower = (*pObjs)[i]->GetDrawObj(); + //IAccessibility2 Implementation 2009----- + if( aLower.IsBoundAsChar() && + (!bVisibleOnly || aLower.GetBox().IsOver( rVisArea )) ) + insert( aLower.GetSdrObject(), aLower, pDoc , Point(aLower.GetAnchorPosition(),0) ); + //-----IAccessibility2 Implementation 2009 + } + } + } +} + +*/ + |