summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/wsfrm.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-30 09:35:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 10:46:58 +0200
commitc7f484eb774fc90cf8e1540a703c5c3856312ef2 (patch)
tree46f4b98c8ab60fe95a5cadc910823362c3d3c235 /sw/source/core/layout/wsfrm.cxx
parent8371ae143ef31c332bdcf753ca1dff722a531229 (diff)
no need to allocate this separately
std: :vector is only 3 words big in it's empty state Change-Id: I5d7630f0ded1ace284c0a4441230bf672f4639be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116398 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/wsfrm.cxx')
-rw-r--r--sw/source/core/layout/wsfrm.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 27c9c6f5049d..4e8fb2e1fa1f 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4240,14 +4240,11 @@ static void AddRemoveFlysForNode(
if (pSkipped)
{
// if a fly has been added by AppendObjsOfNode, it must be skipped; if not, then it doesn't matter if it's skipped or not because it has no frames and because of that it would be skipped anyway
- if (auto const pFlys = pNode->GetAnchoredFlys())
+ for (auto const pFly : pNode->GetAnchoredFlys())
{
- for (auto const pFly : *pFlys)
+ if (pFly->Which() != RES_DRAWFRMFMT)
{
- if (pFly->Which() != RES_DRAWFRMFMT)
- {
- pSkipped->insert(pFly->GetContent().GetContentIdx()->GetIndex());
- }
+ pSkipped->insert(pFly->GetContent().GetContentIdx()->GetIndex());
}
}
}
@@ -4418,12 +4415,9 @@ static void UnHideRedlines(SwRootFrame & rLayout,
{
sw::RemoveFootnotesForNode(rLayout, *pNode->GetTextNode(), nullptr);
// similarly, remove the anchored flys
- if (auto const pFlys = pNode->GetAnchoredFlys())
+ for (SwFrameFormat * pFormat : pNode->GetAnchoredFlys())
{
- for (SwFrameFormat * pFormat : *pFlys)
- {
- pFormat->DelFrames(/*&rLayout*/);
- }
+ pFormat->DelFrames(/*&rLayout*/);
}
}
}