summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-07 09:25:54 +0000
committerMichael Stahl <mstahl@redhat.com>2016-03-07 11:44:18 +0000
commit432a05e749660ebcfd11ebd2aedbde169ce03f0b (patch)
treea3246245047ac84d3debf7ca0dbf0ae8a010ad9b
parenta711a93f87671ad96b86432cc9d5fbc63857517f (diff)
lwp: fix infinite recurse
Change-Id: Ibd17c0f68a9bac92e591fd2c998de45a84b372aa (cherry picked from commit 0c9c5911b6df0226ef5c8d5465fd02a2bb581eb6) Reviewed-on: https://gerrit.libreoffice.org/22975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--lotuswordpro/qa/cppunit/data/pass/loop-1.lwpbin0 -> 24085 bytes
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.cxx3
2 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp b/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp
new file mode 100644
index 000000000000..d610a3ed6534
--- /dev/null
+++ b/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp
Binary files differ
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index e0baf1827247..c209cab8a69d 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -1100,7 +1100,8 @@ void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart
//add child frame into group
LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get());
- while(pLayout)
+
+ while (pLayout && pLayout != this)
{
pLayout->XFConvert(pXFFrame);
pLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetNext().obj().get());