summaryrefslogtreecommitdiff
path: root/sw/source/core/text/txtfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/txtfrm.cxx')
-rw-r--r--sw/source/core/text/txtfrm.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index c3b4f76e8a5f..4ce78faf1e4f 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1484,6 +1484,9 @@ bool SwTextFrame::IsHiddenNow() const
return true;
}
+ if (SwContentFrame::IsHiddenNow())
+ return true;
+
bool bHiddenCharsHidePara(false);
bool bHiddenParaField(false);
if (m_pMergedPara)
@@ -1553,22 +1556,14 @@ bool SwTextFrame::IsHiddenNow() const
// be visible - check this for the 1st body paragraph
if (IsInDocBody() && FindPrevCnt() == nullptr)
{
- bool isAllHidden(true);
for (SwContentFrame const* pNext = FindNextCnt(true);
pNext != nullptr; pNext = pNext->FindNextCnt(true))
{
- if (!pNext->IsTextFrame()
- || !static_cast<SwTextFrame const*>(pNext)->IsHiddenNow())
- {
- isAllHidden = false;
- break;
- }
- }
- if (isAllHidden)
- {
- SAL_INFO("sw.core", "unhiding one body paragraph");
- return false;
+ if (!pNext->IsHiddenNow())
+ return true;
}
+ SAL_INFO("sw.core", "unhiding one body paragraph");
+ return false;
}
return true;
}