oox/source/export/vmlexport.cxx | 2 +- sw/qa/extras/ooxmlexport/data/fdo60990.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 15 +++++++++++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 16 ++++++++++++++-- 4 files changed, 30 insertions(+), 3 deletions(-)
New commits: commit 94b3ec0597ee21b933d02496402ff0f3a416e6a3 Author: Miklos Vajna <[email protected]> Date: Wed Jul 24 18:00:58 2013 +0200 fdo#60990 testcase Change-Id: I35dcb21e55e262db274d7e811d79f9fafc6d6c25 diff --git a/sw/qa/extras/ooxmlexport/data/fdo60990.odt b/sw/qa/extras/ooxmlexport/data/fdo60990.odt new file mode 100644 index 0000000..c855f32 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo60990.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8c51f3a..6fb397f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -100,6 +100,7 @@ public: void testPageBorderSpacingExportCase2(); void testGrabBag(); void testFdo66781(); + void testFdo60990(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -178,6 +179,7 @@ void Test::run() {"page-borders-export-case-2.docx", &Test::testPageBorderSpacingExportCase2}, {"grabbag.docx", &Test::testGrabBag}, {"fdo66781.docx", &Test::testFdo66781}, + {"fdo60990.odt", &Test::testFdo60990}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -1048,6 +1050,19 @@ void Test::testFdo66781() CPPUNIT_FAIL("Did not find bullet with level 0"); } +void Test::testFdo60990() +{ + // The shape had no background, no paragraph adjust and no font color. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xShape(xDraws->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00CFE7F5), getProperty<sal_Int32>(xShape, "BackColor")); + uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY)->getText(); + uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText); + CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xParagraph, "ParaAdjust"))); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00FF00), getProperty<sal_Int32>(getRun(xParagraph, 1), "CharColor")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); commit 0ffed545adbb8a27a024d4d6a74dcaa8a87ba66a Author: Miklos Vajna <[email protected]> Date: Wed Jul 24 17:58:01 2013 +0200 Related: fdo#60990 w:textbox -> v:textbox By accident, Word accepted this, but not our importer. Change-Id: Ie6a7846f1cb594b85245af74053d680af9e77d0e diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4230383..d79897d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2848,7 +2848,7 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj) sal_Int32 nPara = rEditObj.GetParagraphCount(); - m_pSerializer->startElementNS( XML_w, XML_textbox, FSEND ); + m_pSerializer->startElementNS( XML_v, XML_textbox, FSEND ); m_pSerializer->startElementNS( XML_w, XML_txbxContent, FSEND ); for (sal_Int32 n = 0; n < nPara; ++n) { @@ -2894,7 +2894,7 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj) m_pSerializer->endElementNS( XML_w, XML_p ); } m_pSerializer->endElementNS( XML_w, XML_txbxContent ); - m_pSerializer->endElementNS( XML_w, XML_textbox ); + m_pSerializer->endElementNS( XML_v, XML_textbox ); } oox::drawingml::DrawingML& DocxAttributeOutput::GetDrawingML() commit 1753c4f9f1713ca4a9a1ac3a145269c850eef6fb Author: Miklos Vajna <[email protected]> Date: Wed Jul 24 16:15:51 2013 +0200 fdo#60990 VML export: handle paragraph/run properties of shape text Change-Id: Iaeb7f9826308ea94a036cb4bfa87bf65f0cfe22f diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c6fd45d..4230383 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2860,12 +2860,24 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj) xub_StrLen nEnd = aStr.Len(); m_pSerializer->startElementNS( XML_w, XML_p, FSEND ); + + // Write paragraph properties. + m_pSerializer->startElementNS(XML_w, XML_pPr, FSEND); + aAttrIter.OutParaAttr(false); + m_pSerializer->endElementNS(XML_w, XML_pPr); + do { xub_StrLen nNextAttr = aAttrIter.WhereNext(); if( nNextAttr > nEnd ) nNextAttr = nEnd; m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); + + // Write run properties. + m_pSerializer->startElementNS(XML_w, XML_rPr, FSEND); + aAttrIter.OutAttr(nAktPos); + m_pSerializer->endElementNS(XML_w, XML_rPr); + bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); if( !bTxtAtr ) { commit 4a186d7da652b281ea7919b7918006a252f72290 Author: Miklos Vajna <[email protected]> Date: Wed Jul 24 15:48:58 2013 +0200 fdo#60990 VML export: fix handling of v:fill's on attribute Change-Id: I8230a80b6a530b172e02a08a1a4dd201f533670a diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 5635158..cba9ea1 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -545,7 +545,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect if ( pFillType ) pAttrList->add( XML_type, pFillType ); } - else + else if (!rProps.GetOpt(ESCHER_Prop_fillColor, nValue)) pAttrList->add( XML_on, "false" ); if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
