diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-19 12:48:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-06-19 12:48:40 +0100 |
commit | 8b1bc1a3f55d4b79b46ef91f1ac51a5f610d46d6 (patch) | |
tree | 758f0999124a2e973da9acc0df779d390a616537 /lotuswordpro | |
parent | 3b998365f447b33f3e3932e0d20f6f4c9657a915 (diff) |
ofz: loop in layout
Change-Id: I7c776d3b02bd8d35f160e82916213e402e9c88ab
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 373c6f34f9b5..8d157ddfb291 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -367,19 +367,25 @@ bool LwpVirtualLayout::IsStyleLayout() LwpVirtualLayout* LwpVirtualLayout::FindChildByType(LWP_LAYOUT_TYPE eType) { LwpObjectID& rID = GetChildHead(); + LwpVirtualLayout* pPrevLayout = nullptr; while(!rID.IsNull()) { LwpVirtualLayout * pLayout = dynamic_cast<LwpVirtualLayout *>(rID.obj().get()); if (!pLayout) + break; + + if (pPrevLayout && pLayout == pPrevLayout) { + SAL_WARN("lwp", "loop in layout"); break; } + pPrevLayout = pLayout; + if (pLayout->GetLayoutType() == eType) - { return pLayout; - } + rID = pLayout->GetNext(); } |