sw/qa/extras/ooxmlimport/data/tdf92157.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx    |    5 +++++
 sw/source/core/layout/atrfrm.cxx            |    5 +----
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 7fff48a80fc2374ac4916e3d907b47759985c77c
Author: Mike Kaganski <mike.kagan...@collabora.com>
Date:   Sat Jan 9 18:39:26 2016 +1000

    tdf#92157: allow both dimensions of a graphic to be 0
    
    Commit ca80f73 made it possible for one of dimensions to be zero.
    This commit goes further, allowing opening real-life documents
    with graphics having both width and height equal to 0.
    Thanks to libreoff...@arbruijn.dds.nl for debugging and initial
    patch!
    
    Reviewed-on: https://gerrit.libreoffice.org/21287
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com>
    (cherry picked from commit 654f6ff28d7a148950b48ed8905d8f13a015a5b5)
    
    Change-Id: I96a13b776adfd9fe46fc2c7691eb7904400c20a1

diff --git a/sw/qa/extras/ooxmlimport/data/tdf92157.docx 
b/sw/qa/extras/ooxmlimport/data/tdf92157.docx
new file mode 100644
index 0000000..ba5bc2a
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf92157.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4a362c3..caf4a55 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2885,6 +2885,11 @@ DECLARE_OOXMLIMPORT_TEST(testTdf78902, "tdf78902.docx")
     CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf92157, "tdf92157.docx")
+{
+    // A graphic with dimensions 0,0 should not fail on load
+}
+
 DECLARE_OOXMLIMPORT_TEST(testTdf96674, "tdf96674.docx")
 {
     uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index d000571..50e5b86 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -286,10 +286,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
                     aTmp.Height() = convertMm100ToTwip(aTmp.Height());
                     aTmp.Width() = convertMm100ToTwip(aTmp.Width());
                 }
-                if(aTmp.Height() && aTmp.Width())
-                    m_aSize = aTmp;
-                else
-                    bRet = false;
+                m_aSize = aTmp;
             }
         }
         break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to