summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/tdf123163-1.docxbin0 -> 341105 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx6
-rw-r--r--sw/source/core/layout/fly.cxx4
3 files changed, 9 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/tdf123163-1.docx b/sw/qa/extras/layout/data/tdf123163-1.docx
new file mode 100644
index 000000000000..3f8865cb49b1
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf123163-1.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 4122d3725b88..66ea7c193c39 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3064,6 +3064,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116501)
createSwDoc(DATA_DIRECTORY, "tdf116501.odt");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf123163)
+{
+ //just care it doesn't assert
+ createSwDoc(DATA_DIRECTORY, "tdf123163-1.docx");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testAbi11870)
{
//just care it doesn't assert
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 1a0a93e5fc01..e54f88c274a2 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1528,11 +1528,13 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
{
bool bAgain = false;
bool bRestartLayoutProcess = false;
- SwPageFrame* pPageFrame = pFrame->FindPageFrame();
size_t nCnt = pFrame->GetDrawObjs()->size();
size_t i = 0;
while ( i < nCnt )
{
+ // pFrame can move to a different page in FormatObj()
+ SwPageFrame *const pPageFrame = pFrame->FindPageFrame();
+
// #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
assert(pAnchoredObj);