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: Justin Luth <justin_luth@sil.org>
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 48461ff..0a22a05f 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1303,6 +1303,9 @@ DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, "tdf76349_textboxMargins.doc
{
    // 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() );

    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")
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 25235fa..a0f0769 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1149,7 +1149,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
                if( pFlyFormat && pRecord )
                {
                    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,
                                             pRecord->nDyTextTop,
@@ -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

    // 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
    css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
    bool bContour = false;