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

Luboš Luňák l.lunak at suse.cz
Mon Jul 15 08:59:53 PDT 2013


 oox/source/export/vmlexport.cxx             |    2 ++
 sw/qa/extras/ooxmlexport/data/bnc581614.doc |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   10 ++++++++++
 3 files changed, 12 insertions(+)

New commits:
commit ba8988a59716acc405ce5e5233e3f472e0066cbc
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Jul 15 17:41:36 2013 +0200

    explicitly export no fill to .docx when fillstyle is set to none (bnc#581614)
    
    The shapes have detectmouseclick="t" for some reason, leading to the v:fill
    tag being written, but the default is solid fill, so if there's otherwise
    actually no fill, explicitly say so.
    
    Change-Id: I2a8d24ce4d0da1082b4eefbad0db51e2e6fe1bc9

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 5381d2f..5635158 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -545,6 +545,8 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                         if ( pFillType )
                             pAttrList->add( XML_type, pFillType );
                     }
+                    else
+                        pAttrList->add( XML_on, "false" );
 
                     if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) )
                         impl_AddColor( m_pShapeAttrList, XML_fillcolor, nValue );
diff --git a/sw/qa/extras/ooxmlexport/data/bnc581614.doc b/sw/qa/extras/ooxmlexport/data/bnc581614.doc
new file mode 100644
index 0000000..f56525e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/bnc581614.doc differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 9535083..ff5dc8f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -94,6 +94,7 @@ public:
     void testFdo66688();
     void testFdo66773();
     void testFdo58577();
+    void testBnc581614();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -158,6 +159,7 @@ void Test::run()
         {"fdo66688.docx", &Test::testFdo66688},
         {"fdo66773.docx", &Test::testFdo66773},
         {"fdo58577.odt", &Test::testFdo58577},
+        {"bnc581614.doc", &Test::testBnc581614},
     };
     // Don't test the first import of these, for some reason those tests fail
     const char* aBlacklist[] = {
@@ -943,6 +945,14 @@ void Test::testFdo58577()
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
 }
 
+void Test::testBnc581614()
+{
+    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+    uno::Reference<beans::XPropertySet> xFrame(xDraws->getByIndex(0), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list