summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-06-10 12:41:14 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-06-10 17:50:22 +0200
commited5bac73c8e09c606b271f385431c5a57b84bbb5 (patch)
tree276edb4888785408de6d5f80071272d0a8899778 /sd
parent976b16b1c6ad6e6eaded7a9fb24388c4512e21e2 (diff)
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
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/odp/tdf161430.odpbin0 -> 109149 bytes
-rw-r--r--sd/qa/unit/import-tests2.cxx23
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf161430.odp b/sd/qa/unit/data/odp/tdf161430.odp
new file mode 100644
index 000000000000..1ac9acac85b6
--- /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 182c66ce1e82..ab66d016b665 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: */