diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-31 17:01:03 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-31 17:15:23 +0200 |
commit | 84c40768f8acb0342dcfa223133497f57620fc14 (patch) | |
tree | 482287a53484a1c29b7e3295344cb35883baabcd | |
parent | e764b46eea2aab37b7f62d6bf495d2b80080e3b2 (diff) |
MSWordExportBase::OutputItemSet: handle fill attributes as frame ones
Fill attributes with their original WhichId are only used for frames at
the moment, replacing RES_BACKGROUND. To keep export filters working,
handle those fill attributes as frame ones as well.
Change-Id: I1e59b483b706d9fd3f9b947e83244740e3293f9e
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 15 |
3 files changed, 8 insertions, 13 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 2b068ad82752..77e837002870 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -645,15 +645,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo64826, "fdo64826.docx") CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(mxComponent, "RecordChanges"))); } -#if 0 -// FIXME port to FillAttributes DECLARE_OOXMLEXPORT_TEST(testPageBackground, "page-background.docx") { // 'Document Background' wasn't exported. uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getProperty<sal_Int32>(xPageStyle, "BackColor")); } -#endif DECLARE_OOXMLEXPORT_TEST(testPageGraphicBackground, "page-graphic-background.odt") { diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 4b409adc55c4..0aba10b3bf02 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -476,8 +476,6 @@ DECLARE_RTFEXPORT_TEST(testTextFrameBorders, "textframe-borders.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), aShadowFormat.Color); } -#if 0 -// FIXME port to FillAttributes DECLARE_RTFEXPORT_TEST(testTextframeGradient, "textframe-gradient.rtf") { uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -498,7 +496,6 @@ DECLARE_RTFEXPORT_TEST(testTextframeGradient, "textframe-gradient.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(0x666666), aGradient.EndColor); CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style); } -#endif DECLARE_RTFEXPORT_TEST(testRecordChanges, "record-changes.rtf") { diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 2ae3c5d816d0..bf92692f64dc 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -296,7 +296,9 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool { pItem = aI->second; sal_uInt16 nWhich = pItem->Which(); - if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE) + // Handle fill attributes just like frame attributes for now. + if ( (nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE ) || + (nWhich >= XATTR_FILL_FIRST && nWhich < XATTR_FILL_LAST)) AttrOutput().OutputItem( *pItem ); } } @@ -811,7 +813,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF const SwFrmFmt &rFrmFmt = mpParentFrame->GetFrmFmt(); SfxItemSet aSet(pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END-1); + RES_FRMATR_END-1, + XATTR_FILL_FIRST, XATTR_FILL_LAST, + 0); aSet.Set(rFrmFmt.GetAttrSet()); // Fly als Zeichen werden bei uns zu Absatz-gebundenen @@ -5365,15 +5369,12 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) case RES_BACKGROUND: FormatBackground( static_cast< const SvxBrushItem& >( rHt ) ); break; -#if 0 - // FIXME port to FillAttributes - case RES_FILL_STYLE: + case XATTR_FILLSTYLE: FormatFillStyle( static_cast< const XFillStyleItem& >( rHt ) ); break; - case RES_FILL_GRADIENT: + case XATTR_FILLGRADIENT: FormatFillGradient( static_cast< const XFillGradientItem& >( rHt ) ); break; -#endif case RES_BOX: FormatBox( static_cast< const SvxBoxItem& >( rHt ) ); break; |