[Libreoffice-commits] core.git: sw/qa writerfilter/source

Justin Luth justin_luth at sil.org
Fri Sep 9 12:58:31 UTC 2016


 sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx      |    7 +++++++
 writerfilter/source/dmapper/PropertyMap.cxx    |    2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit bdd4a238a1d8a0cbbebbd759011050659668f92b
Author: Justin Luth <justin_luth at sil.org>
Date:   Fri Sep 9 12:42:55 2016 +0300

    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 at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

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 0000000..a4392dc
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 5da3ee2..03b77a7 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 c0e646c..2631fbc 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)
     {


More information about the Libreoffice-commits mailing list