diff options
-rw-r--r-- | sw/inc/frmfmt.hxx | 7 | ||||
-rw-r--r-- | sw/source/core/access/accmap.cxx | 58 | ||||
-rw-r--r-- | sw/source/core/access/accnotextframe.cxx | 27 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 17 | ||||
-rw-r--r-- | unusedcode.easy | 1 |
5 files changed, 4 insertions, 106 deletions
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 636f0cb1e869..22ddea9a8029 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -44,13 +44,11 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt ::com::sun::star::uno::XInterface> m_wXObject; protected: - SwFrmFmt* pCaptionFmt; SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT, const sal_uInt16* pWhichRange = 0 ) : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich ) - ,pCaptionFmt( NULL ) {} SwFrmFmt( SwAttrPool& rPool, const OUString &rFmtNm, @@ -58,7 +56,6 @@ protected: const sal_uInt16* pWhichRange = 0 ) : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich ) - ,pCaptionFmt( NULL ) {} virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); @@ -125,10 +122,6 @@ public: virtual OUString GetDescription() const; - sal_Bool HasCaption() const; - void SetCaptionFmt(SwFrmFmt* pFmt); - SwFrmFmt* GetCaptionFmt() const; - SAL_DLLPRIVATE ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface> const& GetXObject() const { return m_wXObject; } diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index a692a1e9d093..99a43f2f3843 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -3323,64 +3323,10 @@ sal_Bool SwAccessibleMap::ReplaceChild ( } ::com::sun::star::uno::Reference< XAccessible > - SwAccessibleMap::GetAccessibleCaption (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape) + SwAccessibleMap::GetAccessibleCaption (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&) throw (::com::sun::star::uno::RuntimeException) { - SdrObject* captionedObject = GetSdrObjectFromXShape(xShape); - - SwDrawContact *pContact = (SwDrawContact*)GetUserCall( captionedObject ); - OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFmt()->Which(), - "fail" ); - if( !pContact ) - return 0; - - SwDrawFrmFmt *pCaptionedFmt = (SwDrawFrmFmt *)pContact->GetFmt(); - if( !pCaptionedFmt ) - return 0; - - SwFlyFrm* pFrm = NULL; - if (pCaptionedFmt->HasCaption()) - { - const SwFrmFmt *pCaptionFrmFmt = pCaptionedFmt->GetCaptionFmt(); - SwClientIter aIter (*(SwModify*)pCaptionFrmFmt); - pFrm = (SwFlyFrm*)aIter.First( TYPE ( SwFlyFrm )); - } - if (!pFrm) - return 0; - //SwFrmFmt* pFrm = pCaptionedFmt->GetCaptionFmt(); - uno::Reference < XAccessible > xAcc( GetContext((SwFrm*)pFrm,sal_True) ); - //Reference < XAccessibleShape > xAccShape( xAcc, UNO_QUERY ); - - uno::Reference< XAccessibleContext > xAccContext = xAcc->getAccessibleContext(); - if( xAccContext.is() ) - { //get the parent of caption frame, which is paragaph - uno::Reference< XAccessible > xAccParent = xAccContext->getAccessibleParent(); - if(xAccParent.is()) - { - //get the great parent of caption frame which is text frame. - uno::Reference< XAccessibleContext > xAccParentContext = xAccParent->getAccessibleContext(); - uno::Reference< XAccessible > xAccGreatParent = xAccParentContext->getAccessibleParent(); - if(xAccGreatParent.is()) - { - AccessibleEventObject aEvent; - aEvent.EventId = AccessibleEventId::CHILD; - aEvent.NewValue <<= xAccParent; - ( static_cast< SwAccessibleContext * >(xAccGreatParent.get()) )->FireAccessibleEvent( aEvent ); - - } - - AccessibleEventObject aEvent; - aEvent.EventId = AccessibleEventId::CHILD; - aEvent.NewValue <<= xAcc; - ( static_cast< SwAccessibleContext * >(xAccParent.get()) )->FireAccessibleEvent( aEvent ); - } - } - - if(xAcc.get()) - return xAcc; - else - return NULL; - + return NULL; } Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 378c521af232..45f340a2a69f 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -346,11 +346,8 @@ sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { SolarMutexGuard aGuard; - CHECK_FOR_DEFUNC( XAccessibleHypertext ); - - sal_Int32 nRet = 0; - return nRet; + return 0; } AccessibleRelation SwAccessibleNoTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm ) @@ -367,28 +364,8 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleNoTextFrame::getAcce throw ( uno::RuntimeException ) { SolarMutexGuard aGuard; - CHECK_FOR_DEFUNC( XAccessibleContext ); - - // get the caption frame, and insert label relations into helper - - AccessibleRelationSetHelper* pHelper = new AccessibleRelationSetHelper(); - - SwFlyFrm* pFlyFrm = getFlyFrm(); - DBG_ASSERT( pFlyFrm != NULL, "fly frame expected" ); - - SwFlyFrm* pCaptionFrm = NULL; - const SwFrmFmt* pFrm = pFlyFrm ->GetFmt()->GetCaptionFmt(); - if (pFrm) - { - SwClientIter aIter (*(SwModify*)pFrm); - pCaptionFrm = (SwFlyFrm*)aIter.First( TYPE ( SwFlyFrm )); - } - if(pCaptionFrm!=NULL) - { - pHelper->AddRelation( makeRelation( AccessibleRelationType::DESCRIBED_BY, pCaptionFrm ) ); - } - return pHelper; + return new AccessibleRelationSetHelper(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index e8cbaadcd27d..71cfacdf7ae0 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -3224,21 +3224,4 @@ IMapObject* SwFrmFmt::GetIMapObject( const Point& rPoint, return 0; } -sal_Bool SwFrmFmt::HasCaption() const -{ - if(pCaptionFmt != NULL && pCaptionFmt->GetDepends()) - return sal_True; - return sal_False; -} - -void SwFrmFmt::SetCaptionFmt(SwFrmFmt * pFmt) -{ - pCaptionFmt = pFmt; -} - -SwFrmFmt* SwFrmFmt::GetCaptionFmt() const -{ - return pCaptionFmt; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index 5b015d1bb32a..186d43994a92 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -155,7 +155,6 @@ SwAccessibleTable::SetTableData(SwAccessibleTableData_Impl*) SwCntntFrm::DelFrms(SwCntntNode const&) SwExtraRedlineTbl::Contains(SwExtraRedline const*) const SwExtraRedlineTbl::Remove(SwExtraRedline const*) -SwFrmFmt::SetCaptionFmt(SwFrmFmt*) SwPostItField::GetByName(SwDoc*, rtl::OUString const&) SwTableRowRedline::SwTableRowRedline(SwRedlineData const&, SwTableLine&) SwViewImp::FireColumnChangeEvent(unsigned short, unsigned short) |