summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-09-09 12:42:55 +0300
committerJustin Luth <justin_luth@sil.org>2016-09-09 12:54:23 +0000
commitbdd4a238a1d8a0cbbebbd759011050659668f92b (patch)
treedcf2a125482a84bd416c197a64d492407b1bf699
parent20c14c812ccc00692d42d294d3b8dea1774e3511 (diff)
tdf#86926 writerfilter allow fallback if exceptions
The multiset routine was put in to increase the speed of applying properties. However, if one property causes an exception, the remaining properties are never applied. There is already a fallback routine (if the multiset can't be created), so use that instead of returning in a failed state. Change-Id: Iac53edd5fca8e8543d536609113a7b1109befd82 Reviewed-on: https://gerrit.libreoffice.org/28765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf86926_A3.docxbin0 -> 5465 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx7
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
3 files changed, 8 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx b/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx
new file mode 100644
index 000000000000..a4392dcf2802
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 5da3ee29e625..03b77a776788 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -978,6 +978,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf96750_landscapeFollow, "tdf96750_landscapeFollow
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf86926_A3, "tdf86926_A3.docx")
+{
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(42000), getProperty<sal_Int32>(xStyle, "Height"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(29700), getProperty<sal_Int32>(xStyle, "Width"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf64372_continuousBreaks,"tdf64372_continuousBreaks.docx")
{
//There are no page breaks, so everything should be on the first page.
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index c0e646cc595c..2631fbc887ae 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1485,12 +1485,12 @@ void SectionPropertyMap::ApplyProperties_(
try
{
xMultiSet->setPropertyValues(comphelper::containerToSequence(vNames), comphelper::containerToSequence(vValues));
+ return;
}
catch( const uno::Exception& )
{
OSL_FAIL( "Exception in SectionPropertyMap::ApplyProperties_");
}
- return;
}
for (size_t i = 0; i < vNames.size(); ++i)
{