summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-23 11:34:21 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-23 11:48:49 +0200
commit26fb5883bbc663eceb7c53bd17c1b0ca01abb016 (patch)
treee2d637810a08cc8e1ec639cd82112ffb64e6b78c
parent171efcb7acf367e8db53694489815452d2a9894a (diff)
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
-rw-r--r--sw/inc/fesh.hxx4
-rw-r--r--sw/source/core/frmedt/feshview.cxx8
-rw-r--r--sw/source/uibase/utlui/content.cxx8
3 files changed, 10 insertions, 10 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 5d23fdecfc69..9c2e89d1d9c7 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 904f901f0a21..e1655e84112d 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 57634f048e62..faf33712b038 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;