diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-04-07 13:04:58 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-04-07 16:36:13 +0200 |
commit | e248db713ad4edf73a9ba5d9307bc70413536fc5 (patch) | |
tree | 58e745b5beff230df7e359c9491a2723d4e50bbd | |
parent | aa1ea70a8a2f7f11f93f333b719fe55a7f0f5bdb (diff) |
i#112564: Fixed a misbehaviour of createContextEnumeration on SwXTextRange
-rw-r--r-- | sw/inc/doc.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 16 |
3 files changed, 7 insertions, 18 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 19468b2716..4ff6238c1d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1023,7 +1023,8 @@ public: // ( Start < Pos < End ) !!! // (Required for Writers.) void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0, - sal_Bool bDrawAlso = sal_False ) const; + sal_Bool bDrawAlso = sal_False, + sal_Bool bAsCharAlso = sal_False ) const; // Because swrtf.cxx and define private public here now. SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 26e0b05153..a90b3a79e2 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1027,7 +1027,8 @@ sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos, } void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, - const SwPaM* pCmpRange, sal_Bool bDrawAlso ) const + const SwPaM* pCmpRange, sal_Bool bDrawAlso, + sal_Bool bAsCharAlso ) const { SwPosFlyFrm *pFPos = 0; SwFrmFmt *pFly; @@ -1045,7 +1046,8 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, if (pAPos && ((FLY_AT_PARA == rAnchor.GetAnchorId()) || (FLY_AT_FLY == rAnchor.GetAnchorId()) || - (FLY_AT_CHAR == rAnchor.GetAnchorId()))) + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && bAsCharAlso))) { if( pCmpRange && !TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() )) diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ea9f4ce57b..7a89db3f58 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1876,7 +1876,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration( { SwPosFlyFrms aFlyFrms; //get all frames that are bound at paragraph or at character - rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor()); + rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor(), sal_False, sal_True); for(sal_uInt16 i = 0; i < aFlyFrms.Count(); i++) { SwPosFlyFrm* pPosFly = aFlyFrms[i]; @@ -1888,20 +1888,6 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration( m_pImpl->m_Frames.push_back( ::boost::shared_ptr<SwDepend>(pNewDepend) ); } - //created from any text range - if (m_pImpl->GetCursor()->HasMark()) - { - m_pImpl->GetCursor()->Normalize(); - do - { - lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), - m_pImpl->m_Frames); - m_pImpl->GetCursor()->Right( - 1, CRSR_SKIP_CHARS, sal_False, sal_False); - } - while (*m_pImpl->GetCursor()->GetPoint() < - *m_pImpl->GetCursor()->GetMark()); - } } lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), m_pImpl->m_Frames); } |