[Libreoffice-commits] core.git: sw/inc sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Jun 23 02:49:26 PDT 2014


 sw/inc/fesh.hxx                    |    4 ++--
 sw/source/core/frmedt/feshview.cxx |    8 ++++----
 sw/source/uibase/utlui/content.cxx |    8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 26fb5883bbc663eceb7c53bd17c1b0ca01abb016
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 23 11:34:21 2014 +0200

    SwContentType::FillMemberList: ignore TextFrames which are used as TextBoxes
    
    SwDoc could already filter them out, but not SwFEShell. This makes them
    not shown in the Navigator window.
    
    Change-Id: I343ab005513198c30970bfdec4e871fbccdebc01

diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 5d23fde..9c2e89d 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -370,8 +370,8 @@ public:
                                 { return GotoObj( false, eType); }
 
    /// Iterate over flys  - for Basic-collections.
-    sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
-    const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
+    sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false ) const;
+    const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false) const;
 
     /// If a fly is selected, it draws cursor into the first CntntFrm.
     const SwFrmFmt* SelFlyGrabCrsr();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 904f901..e1655e8 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2221,14 +2221,14 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm )
     return bRet;
 }
 
-sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType ) const
+sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes ) const
 {
-    return GetDoc()->GetFlyCount(eType);
+    return GetDoc()->GetFlyCount(eType, bIgnoreTextBoxes);
 }
 
-const SwFrmFmt*  SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType ) const
+const SwFrmFmt*  SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType, bool bIgnoreTextBoxes ) const
 {
-    return GetDoc()->GetFlyNum(nIdx, eType );
+    return GetDoc()->GetFlyNum(nIdx, eType, bIgnoreTextBoxes);
 }
 
 // show the current selected object
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 57634f0..faf3371 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -251,7 +251,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
                 eType = FLYCNTTYPE_GRF;
                 sTypeToken = "graphic";
             }
-            nMemberCount = pWrtShell->GetFlyCount(eType);
+            nMemberCount = pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true);
             bEdit = true;
         }
         break;
@@ -548,13 +548,13 @@ void    SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
                 eType = FLYCNTTYPE_OLE;
             else if(nContentType == CONTENT_TYPE_GRAPHIC)
                 eType = FLYCNTTYPE_GRF;
-            OSL_ENSURE(nMemberCount ==  pWrtShell->GetFlyCount(eType),
+            OSL_ENSURE(nMemberCount ==  pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true),
                     "MemberCount differs");
             Point aNullPt;
-            nMemberCount = pWrtShell->GetFlyCount(eType);
+            nMemberCount = pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true);
             for(sal_uInt16 i = 0; i < nMemberCount; i++)
             {
-                const SwFrmFmt* pFrmFmt = pWrtShell->GetFlyNum(i,eType);
+                const SwFrmFmt* pFrmFmt = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true);
                 const OUString sFrmName = pFrmFmt->GetName();
 
                 SwContent* pCnt;


More information about the Libreoffice-commits mailing list