summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>2013-01-16 11:11:52 +0100
committerPierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>2013-01-16 11:13:26 +0100
commit40411d73bb00f5bc1e65dc1d13727e55d0335fd6 (patch)
tree4d569357f228e5a2adf04b3b6b36368c42b727ec
parentcf9017ae189167962902e8ce28f5f36e89b30069 (diff)
sw unit test: force layout compute after loading document
Change-Id: I35173bbc2a4e33dfee555aa71f053e219ef01d1e
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 2bb2369cfb3c..d045780df12a 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -88,7 +88,6 @@ private:
// create the dump
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
- pDoc->GetCurrentViewShell()->CalcLayout();
SwRootFrm* pLayout = pDoc->GetCurrentLayout();
pLayout->dumpAsXml(pXmlWriter);
@@ -97,6 +96,13 @@ private:
xmlFreeTextWriter(pXmlWriter);
}
+ void calcLayout()
+ {
+ SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ pDoc->GetCurrentViewShell()->CalcLayout();
+ }
+
protected:
/// Get the length of the whole document.
@@ -238,6 +244,7 @@ protected:
fprintf(stderr, "%s,", pName);
m_nStartTime = osl_getGlobalTimer();
mxComponent = loadFromDesktop(getURLFromSrc(pDir) + OUString::createFromAscii(pName));
+ calcLayout();
}
void reload(OUString aFilter)
@@ -257,6 +264,7 @@ protected:
xmlBufferFree(mpXmlBuffer);
mpXmlBuffer = 0;
}
+ calcLayout();
}
void finish()