Kaydet (Commit) 84c40768 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst e764b46e
......@@ -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")
{
......
......@@ -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")
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment