Kaydet (Commit) 26fb5883 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 171efcb7
......@@ -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();
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment