summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTushar Bende <tushar.bende@synerzip.com>2014-05-30 11:12:54 +0530
committerMichael Stahl <mstahl@redhat.com>2014-05-30 21:13:00 +0200
commitd9b607664f25c206c37dc3e9a68e94e55bd272c1 (patch)
tree9219d13383bf1251a17fb7b3440dfa3182a40a23 /sw
parent16e299afa4051affc357fe7990d7632b37c6aea7 (diff)
fdo#78883: Writer getting Hang while opening document
Description: Writer getting Hang while opening document because of loop in layout. Root cause: For Documents containing table with direct formatting for Para line spacing along with style w:type="table" in style.xml LO was erasing PROP_PARA_LINE_SPACING Prop from pAllCellProps in DomainMapperTableHandler::endTableGetCellProperties(). But for Documents without direct formatting for Para line spacing this deletion was causing problem, as after deletion there is no formatting available to apply. To fix this checking whether there is a Direct formatting available for table, if Yes then proceed with this deletion logic. Change-Id: Ibaf51ebd1aca93eff44a9edfbe8fa13832ab2b70 Signed-off-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 489611732319dec36ec630f6bfffd0c6ff03b9bf)
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/fdo78883.docxbin0 -> 18303 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo78883.docx b/sw/qa/extras/ooxmlimport/data/fdo78883.docx
new file mode 100644
index 000000000000..a72ff9436e0c
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo78883.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 0089c4a42cdc..a24c3ab51aa7 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2126,6 +2126,17 @@ DECLARE_OOXMLIMPORT_TEST(testInlineGroupshape, "inline-groupshape.docx")
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
}
+DECLARE_OOXMLIMPORT_TEST(testFdo78883, "fdo78883.docx")
+{
+ // fdo#78883 : LO was getting hang while opening document
+ // Checking there is a single page after loading a doc in LO.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+ xCursor->jumpToLastPage();
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
+}
+
DECLARE_OOXMLIMPORT_TEST(testBnc875718, "bnc875718.docx")
{
// The frame in the footer must not accidentally end up in the document body.