Kaydet (Commit) 15819181 authored tarafından Justin Luth's avatar Justin Luth

tdf#101826 ww8import: add XATTR_* to textbox attr set

Somewhat magically, just adding XATTR to the FlySet makes
background colors/gradients/images appear. This has been
broken since XATTR was introduced in LO 4.3.

Change-Id: I84554045f49618a5eb927edfebdf641c5a93b673
Reviewed-on: https://gerrit.libreoffice.org/66310
Tested-by: Jenkins
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 775dd70b
...@@ -1303,6 +1303,9 @@ DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, "tdf76349_textboxMargins.doc ...@@ -1303,6 +1303,9 @@ DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, "tdf76349_textboxMargins.doc
{ {
// textboxes without borders were losing their spacing items in round-tripping // textboxes without borders were losing their spacing items in round-tripping
CPPUNIT_ASSERT( 0 < parseDump("/root/page/body/txt/anchored/fly/infos/prtBounds", "left").toInt32() ); CPPUNIT_ASSERT( 0 < parseDump("/root/page/body/txt/anchored/fly/infos/prtBounds", "left").toInt32() );
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox background color", Color(0xD8, 0xD8, 0xD8), getProperty<Color>(xShape, "BackColor"));
} }
DECLARE_WW8EXPORT_TEST(testMoveRange, "fdo66304-1.odt") DECLARE_WW8EXPORT_TEST(testMoveRange, "fdo66304-1.odt")
......
...@@ -1149,7 +1149,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, ...@@ -1149,7 +1149,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
if( pFlyFormat && pRecord ) if( pFlyFormat && pRecord )
{ {
SfxItemSet aFlySet( m_rDoc.GetAttrPool(), SfxItemSet aFlySet( m_rDoc.GetAttrPool(),
svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1, XATTR_START, XATTR_END>{} );
tools::Rectangle aInnerDist( pRecord->nDxTextLeft, tools::Rectangle aInnerDist( pRecord->nDxTextLeft,
pRecord->nDyTextTop, pRecord->nDyTextTop,
...@@ -2552,7 +2552,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) ...@@ -2552,7 +2552,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// when in a header or footer word appears to treat all elements as wrap through // when in a header or footer word appears to treat all elements as wrap through
// determine wrapping mode // determine wrapping mode
SfxItemSet aFlySet(m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{}); SfxItemSet aFlySet(m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1, XATTR_START, XATTR_END>{});
Reader::ResetFrameFormatAttrs(aFlySet); // tdf#122425: Explicitly remove borders and spacing Reader::ResetFrameFormatAttrs(aFlySet); // tdf#122425: Explicitly remove borders and spacing
css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL; css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
bool bContour = false; bool bContour = false;
......
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