summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavindra Vidhate <ravindra.vidhate@synerzip.com>2014-06-11 16:38:17 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-16 13:08:53 +0000
commitfe5b3c3357d9e613a0be53ec1e5546a59e21cea0 (patch)
tree68c4456e1885f4ebf5d77d9d86c70a6fa900c11d
parent3f4ea7a6477c9314fd4b407035b56e7669527bf4 (diff)
fdo#79915:Text Data Lost after exporting through LO
In the OutputTextNode, the text data is postponed when the in case of NOT_PROCESSED state of fly frame. This text data is never been processed later. When the text data is postponed we should write this before processing the next text node. Change-Id: Ib8d5fdcf8dcfb9ff394d32103502150e08bbd521 Reviewed-on: https://gerrit.libreoffice.org/9737 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79915.docxbin0 -> 20751 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx9
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx7
3 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79915.docx b/sw/qa/extras/ooxmlexport/data/fdo79915.docx
new file mode 100644
index 000000000000..351674df0714
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79915.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 27752df4a0e8..d97be6f9b21c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3617,6 +3617,15 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79822, "fdo79822.docx")
return;
}
+DECLARE_OOXMLEXPORT_TEST(testFDO79915, "fdo79915.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[8]/w:t", "How much buoyancy does the water provide?");
+}
+
DECLARE_OOXMLEXPORT_TEST(testfdo79817,"fdo79817.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 1bc795e400a8..d885948a1616 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2320,6 +2320,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
AttrOutput().RunText( aSavedSnippet, eChrSet );
AttrOutput().EndRun();
}
+ else if( bPostponeWritingText && FLY_NOT_PROCESSED == nStateOfFlyFrame )
+ {
+ //write the postponed text run
+ bPostponeWritingText = false ;
+ AttrOutput().RunText( aSavedSnippet, eChrSet );
+ AttrOutput().EndRun();
+ }
else
AttrOutput().EndRun();