[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - filter/source sw/qa
Patrick Jaap (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 11 16:18:12 UTC 2020
filter/source/msfilter/dffpropset.cxx | 11 +++++++++++
sw/qa/extras/ww8import/data/tdf130262.doc |binary
sw/qa/extras/ww8import/ww8import.cxx | 5 +++++
3 files changed, 16 insertions(+)
New commits:
commit 82288db9bbc69892408ebccb96091d03b2d0dabb
Author: Patrick Jaap <patrick.jaap at tu-dresden.de>
AuthorDate: Thu Feb 6 18:33:19 2020 +0100
Commit: Patrick Jaap <patrick.jaap at tu-dresden.de>
CommitDate: Tue Feb 11 17:17:41 2020 +0100
tdf#130262 ignore negative wrap distance values in doc prop import
Change-Id: I2c06b12c958dfde09adcc2ae4c59532ffde6b6fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88127
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit 8cbd7f59bb99282c4bcb60639da1263c8eb3a5e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88399
Reviewed-by: Patrick Jaap <patrick.jaap at tu-dresden.de>
diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx
index 73c0e45d64db..f0a5aae5cc29 100644
--- a/filter/source/msfilter/dffpropset.cxx
+++ b/filter/source/msfilter/dffpropset.cxx
@@ -1208,6 +1208,17 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
}
if ( bSetProperty )
{
+ // tdf#130262: ignore negative values for distances (maybe this list needs to be extended)
+ // LO does not allow negative values but [MS-ODRAW] does not forbid them
+ if ( nRecType == DFF_Prop_dxWrapDistLeft || nRecType == DFF_Prop_dxWrapDistRight
+ || nRecType == DFF_Prop_dyWrapDistTop || nRecType == DFF_Prop_dyWrapDistBottom )
+ {
+ if ( static_cast<sal_Int32>(nContent) < 0 )
+ {
+ break;
+ }
+ }
+
mpPropSetEntries[ nRecType ].nContent = nContent;
mpPropSetEntries[ nRecType ].aFlags = aPropFlag;
}
diff --git a/sw/qa/extras/ww8import/data/tdf130262.doc b/sw/qa/extras/ww8import/data/tdf130262.doc
new file mode 100644
index 000000000000..fb60beacd79d
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf130262.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index c67f2c9385b0..468cacfd0967 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -365,6 +365,11 @@ DECLARE_WW8IMPORT_TEST(testTdf110987, "tdf110987")
CPPUNIT_ASSERT(sFilterName != "MS Word 97 Vorlage");
}
+DECLARE_WW8IMPORT_TEST(testTdf130262, "tdf130262.doc")
+{
+ // We had an infinite layout loop
+}
+
// tests should only be added to ww8IMPORT *if* they fail round-tripping in ww8EXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list