summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-18 13:03:28 +0200
committerNoel Grandin <noel@peralex.com>2015-03-19 08:25:03 +0200
commit48bb2913a7459edb17a5f62c2f6e6fbc4f1051e2 (patch)
tree7e2f09fc8998bc1016f4d2ba7fa09e3125663361 /sd/qa
parentbdad6d0fe492a2334cb27ef54fc5d1cba17d1970 (diff)
convert SFX_FILTER_ constants to enum class
Change-Id: I7e53cfc90cefd9da7d6ecd795b09214bd44b1613
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/filters-test.cxx6
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx20
2 files changed, 13 insertions, 13 deletions
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index 272f4a4a1ade..0115d5986c2e 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -42,7 +42,7 @@ public:
virtual bool load( const OUString &rFilter,
const OUString &rURL, const OUString &rUserData,
- unsigned int nFilterFlags, SotClipboardFormatId nClipboardID,
+ SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
unsigned int nFilterVersion) SAL_OVERRIDE;
virtual void setUp() SAL_OVERRIDE;
@@ -60,7 +60,7 @@ private:
};
bool SdFiltersTest::load(const OUString &rFilter, const OUString &rURL,
- const OUString &rUserData, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID,
+ const OUString &rUserData, SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
unsigned int nFilterVersion)
{
SfxFilter aFilter(
@@ -86,7 +86,7 @@ void SdFiltersTest::testCVEs()
testDir(OUString("Impress Office Open XML"),
getURLFromSrc("/sd/qa/unit/data/pptx/"),
- OUString(""), (SFX_FILTER_IMPORT | SFX_FILTER_ALIEN | SFX_FILTER_STARONEFILTER));
+ OUString(""), (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER));
testDir(OUString("impress8"),
getURLFromSrc("/sd/qa/unit/data/odp/"),
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 430d07df10f1..c0ad5afb2787 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -36,18 +36,18 @@ struct FileFormat
const char* pFilterName;
const char* pTypeName;
const char* pUserData;
- sal_uLong nFormatType;
+ SfxFilterFlags nFormatType;
};
// These values are taken from "Flags" in filter/source/config/fragments/filters/*
-// You need to turn value of oor:name="Flags" to SFX_FILTER_*, see
+// You need to turn value of oor:name="Flags" to SfxFilterFlags::*, see
// include/comphelper/documentconstants.hxx for the possible values.
-// Note: 3RDPARTYFILTER == SFX_FILTER_STARONEFILTER
-#define ODP_FORMAT_TYPE ( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_TEMPLATE | SFX_FILTER_OWN | SFX_FILTER_DEFAULT | SFX_FILTER_ENCRYPTION | SFX_FILTER_PREFERED )
-#define PPT_FORMAT_TYPE ( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_ALIEN )
-#define PPTX_FORMAT_TYPE ( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_ALIEN | SFX_FILTER_STARONEFILTER | SFX_FILTER_PREFERED )
-#define HTML_FORMAT_TYPE ( SFX_FILTER_EXPORT | SFX_FILTER_ALIEN )
-#define PDF_FORMAT_TYPE ( SFX_FILTER_STARONEFILTER | SFX_FILTER_ALIEN | SFX_FILTER_IMPORT | SFX_FILTER_PREFERED )
+// Note: 3RDPARTYFILTER == SfxFilterFlags::STARONEFILTER
+#define ODP_FORMAT_TYPE ( SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::TEMPLATE | SfxFilterFlags::OWN | SfxFilterFlags::DEFAULT | SfxFilterFlags::ENCRYPTION | SfxFilterFlags::PREFERED )
+#define PPT_FORMAT_TYPE ( SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN )
+#define PPTX_FORMAT_TYPE ( SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER | SfxFilterFlags::PREFERED )
+#define HTML_FORMAT_TYPE ( SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN )
+#define PDF_FORMAT_TYPE ( SfxFilterFlags::STARONEFILTER | SfxFilterFlags::ALIEN | SfxFilterFlags::IMPORT | SfxFilterFlags::PREFERED )
/** List of file formats we support in Impress unit tests.
@@ -64,7 +64,7 @@ FileFormat aFileFormats[] =
{ "pptx", "Impress Office Open XML", "Office Open XML Presentation", "", PPTX_FORMAT_TYPE },
{ "html", "graphic_HTML", "graphic_HTML", "", HTML_FORMAT_TYPE },
{ "pdf", "draw_pdf_import", "pdf_Portable_Document_Format", "", PDF_FORMAT_TYPE },
- { 0, 0, 0, 0, 0 }
+ { 0, 0, 0, 0, SfxFilterFlags::NONE }
};
#define ODP 0
@@ -107,7 +107,7 @@ protected:
CPPUNIT_ASSERT_MESSAGE( "missing filter info", pFmt->pName != NULL );
SotClipboardFormatId nOptions = SotClipboardFormatId::NONE;
- if (pFmt->nFormatType)
+ if (pFmt->nFormatType != SfxFilterFlags::NONE)
nOptions = SotClipboardFormatId::STARCALC_8;
SfxFilter* aFilter = new SfxFilter(
OUString::createFromAscii( pFmt->pFilterName ),