summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/ednumber.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit/ednumber.cxx')
-rw-r--r--sw/source/core/edit/ednumber.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 7d152920af9a..38582a4143e3 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -405,23 +405,23 @@ public:
MakeAllOutlineContentTemporarilyVisibile(SwWrtShell* pShell)
: pWrtShell(pShell)
{
- if (pWrtShell && pWrtShell->GetViewOptions() && pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
+ if (!(pWrtShell && pWrtShell->GetViewOptions() && pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton()))
+ return;
+
+ // make all outlines content visible and store outline nodes having
+ // content visible attribute value false
+ SwOutlineNodes rOutlineNds = pWrtShell->GetNodes().GetOutLineNds();
+ for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNds.size(); ++nPos)
{
- // make all outlines content visible and store outline nodes having
- // content visible attribute value false
- SwOutlineNodes rOutlineNds = pWrtShell->GetNodes().GetOutLineNds();
- for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNds.size(); ++nPos)
+ SwNode* pNd = rOutlineNds[nPos];
+ if (pNd->IsTextNode()) // should always be true
{
- SwNode* pNd = rOutlineNds[nPos];
- if (pNd->IsTextNode()) // should always be true
+ bool bOutlineContentVisibleAttr = true;
+ pNd->GetTextNode()->GetAttrOutlineContentVisible(bOutlineContentVisibleAttr);
+ if (!bOutlineContentVisibleAttr)
{
- bool bOutlineContentVisibleAttr = true;
- pNd->GetTextNode()->GetAttrOutlineContentVisible(bOutlineContentVisibleAttr);
- if (!bOutlineContentVisibleAttr)
- {
- aOutlineNdsArray.push_back(pNd);
- pWrtShell->ToggleOutlineContentVisibility(nPos);
- }
+ aOutlineNdsArray.push_back(pNd);
+ pWrtShell->ToggleOutlineContentVisibility(nPos);
}
}
}