Related: tdf#161430 add test case to guard against its return

Change-Id: Ia2b12ab696632a4f08fd4c20472646dcfd9058c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168634
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
diff --git a/sd/qa/unit/data/odp/tdf161430.odp b/sd/qa/unit/data/odp/tdf161430.odp
new file mode 100644
index 0000000..1ac9aca
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf161430.odp
Binary files differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 182c66c..ab66d01 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -59,6 +59,9 @@
#include <sfx2/linkmgr.hxx>
#include <vcl/BitmapReadAccess.hxx>
#include <vcl/dibtools.hxx>
#include <sdresid.hxx>
#include <stlpool.hxx>
#include <strings.hrc>

using namespace ::com::sun::star;

@@ -2062,6 +2065,26 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023)
    }
}

CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161430)
{
    // Without the bug fix this opens with the classic solid 'blue' background used in "Outline 1"
    // as seen in slide 3
    createSdImpressDoc("odp/tdf161430.odp");
    SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
    CPPUNIT_ASSERT(pXImpressDocument);
    SdDrawDocument* pDoc = pXImpressDocument->GetDoc();

    SdStyleSheetPool* const pPool(pDoc->GetSdStyleSheetPool());

    OUString aStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
    SfxStyleSheetBase* pStyleSheet = pPool->Find(aStyleName, SfxStyleFamily::Pseudo);
    CPPUNIT_ASSERT(pStyleSheet);

    const XFillStyleItem& rFillStyle = pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE);
    drawing::FillStyle eXFS = rFillStyle.GetValue();
    CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, eXFS);
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */