sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 --------- sw/source/filter/ww8/docxattributeoutput.cxx | 12 +++--------- 2 files changed, 3 insertions(+), 18 deletions(-)
New commits: commit ec221b7339f8fe5520926ef85b450daa94392780 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Apr 1 09:48:59 2014 +0200 DocxAttributeOutput: port to FillAttributes Now that fill attributes are available in the item set of the shared exporter, just had to adjust the WhichId of fill style / gradient fill, and it's working again. Change-Id: Iec7048ef77aea534a567799bfd385fcc029586b3 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 77e8370..2d96eb2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -538,8 +538,6 @@ DECLARE_OOXMLEXPORT_TEST(testTextFrameBorders, "textframe-borders.docx") } #endif -#if 0 -// FIXME port to FillAttributes DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx") { uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -565,7 +563,6 @@ DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xFrame, "LeftMargin")); CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xFrame, "RightMargin")); } -#endif DECLARE_OOXMLEXPORT_TEST(testCellBtlr, "cell-btlr.docx") { @@ -1717,8 +1714,6 @@ DECLARE_OOXMLEXPORT_TEST(testHyperlineIsEnd, "hyperlink.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink",1); } -#if 0 -// FIXME port to FillAttributes DECLARE_OOXMLEXPORT_TEST(testTextBoxGradientAngle, "fdo65295.docx") { uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -1773,7 +1768,6 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxGradientAngle, "fdo65295.docx") awt::Gradient aGradient8 = getProperty<awt::Gradient>(xFrame8, "FillGradient"); CPPUNIT_ASSERT_EQUAL(sal_Int16( 45 * 10), aGradient8.Angle); } -#endif DECLARE_OOXMLEXPORT_TEST(testCellGridSpan, "cell-grid-span.docx") { @@ -2126,15 +2120,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx") assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[21]/w:hyperlink/w:r[5]/w:t", "15"); } -#if 0 -// FIXME port to FillAttributes DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, "textbox_picturefill.docx") { uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xFrame, "FillStyle")); CPPUNIT_ASSERT(!(getProperty<OUString>(xFrame,"BackGraphicURL")).isEmpty()); } -#endif DECLARE_OOXMLEXPORT_TEST(testFDO73034, "FDO73034.docx") { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 15874e3..6e71a6d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6497,9 +6497,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { bool bImageBackground = false; -#if 0 - // FIXME port to FillAttributes - const SfxPoolItem* pItem = GetExport().HasItem(RES_FILL_STYLE); + const SfxPoolItem* pItem = GetExport().HasItem(XATTR_FILLSTYLE); if (pItem) { const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem); @@ -6508,7 +6506,6 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) bImageBackground = true; } } -#endif if (!bImageBackground) { m_pSerializer->startElementNS(XML_a, XML_solidFill, FSEND); @@ -6614,9 +6611,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { // <a:gradFill> should be before <a:ln>. -#if 0 - // FIXME port to FillAttributes - const SfxPoolItem* pItem = GetExport().HasItem(RES_FILL_STYLE); + const SfxPoolItem* pItem = GetExport().HasItem(XATTR_FILLSTYLE); if (pItem) { const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem); @@ -6634,13 +6629,12 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) } } - pItem = GetExport().HasItem(RES_FILL_GRADIENT); + pItem = GetExport().HasItem(XATTR_FILLGRADIENT); if (pItem) { const XFillGradientItem* pFillGradient = static_cast<const XFillGradientItem*>(pItem); FormatFillGradient(*pFillGradient); } -#endif m_bIgnoreNextFill = true; } if (m_rExport.SdrExporter().getTextFrameSyntax() || m_rExport.SdrExporter().getDMLTextFrameSyntax()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits