[Libreoffice-commits] core.git: sw/qa writerfilter/source
Justin Luth
justin_luth at sil.org
Tue Jul 12 06:44:17 UTC 2016
sw/qa/extras/ooxmlimport/data/tdf75573_page1frame.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 7 +++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ++++
3 files changed, 11 insertions(+)
New commits:
commit ecea3431ca761369d8180a74eba2877533050516
Author: Justin Luth <justin_luth at sil.org>
Date: Wed Jul 6 10:04:04 2016 +0300
tdf75573 docx - complete frames before starting alternate streams
An unused odd header was set to be discarded. The handling of
unregistered frames occurred at the same time, and thus ended up
being discarded as well.
Since a frame shouldn't encompass both the alternate stream
and the current stream, finalize any unfinished frames first.
Change-Id: Ie9123769724da461dd265936aa6b97de7f4dfbbc
Reviewed-on: https://gerrit.libreoffice.org/26972
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/qa/extras/ooxmlimport/data/tdf75573_page1frame.docx b/sw/qa/extras/ooxmlimport/data/tdf75573_page1frame.docx
new file mode 100644
index 0000000..d6bc29d
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf75573_page1frame.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4826c61..a1cefb0 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1732,6 +1732,13 @@ DECLARE_OOXMLIMPORT_TEST(testfdo76583, "fdo76583.docx")
lcl_countTextFrames( mxComponent, 1 );
}
+DECLARE_OOXMLIMPORT_TEST(testTdf75573, "tdf75573_page1frame.docx")
+{
+ // the problem was that an odd header was defined but not used, flagged as
+ // discardable, and then the unrelated frame was also discarded.
+ lcl_countTextFrames( mxComponent, 1 );
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo43093, "fdo43093.docx")
{
// The problem was that the direction and alignment are not correct for RTL paragraphs.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index be55591..0bb5062 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5246,6 +5246,10 @@ void DomainMapper_Impl::substream(Id rName,
appendTableHandler();
getTableManager().startLevel();
+ //finalize any waiting frames before starting alternate streams
+ CheckUnregisteredFrameConversion();
+ ExecuteFrameConversion();
+
//import of page header/footer
switch( rName )
More information about the Libreoffice-commits
mailing list