[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/inc sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Thu Apr 7 09:29:55 PDT 2011


 sw/inc/doc.hxx                     |    3 ++-
 sw/source/core/doc/doclay.cxx      |    6 ++++--
 sw/source/core/unocore/unoobj2.cxx |   16 +---------------
 3 files changed, 7 insertions(+), 18 deletions(-)

New commits:
commit e248db713ad4edf73a9ba5d9307bc70413536fc5
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Thu Apr 7 13:04:58 2011 +0200

    i#112564: Fixed a misbehaviour of createContextEnumeration on SwXTextRange

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 19468b2..4ff6238 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 26e0b05..a90b3a7 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 ea9f4ce..7a89db3 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);
     }


More information about the Libreoffice-commits mailing list