summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-09 16:29:43 +0200
committerNoel Grandin <noel@peralex.com>2015-01-12 12:57:04 +0200
commita5b5ad9f9306d868430ed9efd210b95c24a15161 (patch)
treed028638ef38e1e7a062944923b0db1fd6f03d3f5 /include/vcl
parent4b8f1dc1c8635c412b4669101e8871fa0cf26ff9 (diff)
fdo#84938: replace DATACHANGED_ constants with 'enum class'
and drop DATACHANGED_DATETIME because no-one is using it Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/event.hxx32
-rw-r--r--include/vcl/print.hxx2
2 files changed, 18 insertions, 16 deletions
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index a73c57138b5e..b04e0c470002 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -479,30 +479,32 @@ inline const CommandEvent* NotifyEvent::GetCommandEvent() const
// - DataChangedEvent -
-#define DATACHANGED_SETTINGS ((sal_uInt16)1)
-#define DATACHANGED_DISPLAY ((sal_uInt16)2)
-#define DATACHANGED_DATETIME ((sal_uInt16)3)
-#define DATACHANGED_FONTS ((sal_uInt16)4)
-#define DATACHANGED_PRINTER ((sal_uInt16)5)
-#define DATACHANGED_FONTSUBSTITUTION ((sal_uInt16)6)
-#define DATACHANGED_USER ((sal_uInt16)10000)
+enum class DataChangedEventType {
+ NONE = 0,
+ SETTINGS = 1,
+ DISPLAY = 2,
+ FONTS = 4,
+ PRINTER = 5,
+ FONTSUBSTITUTION = 6,
+ USER = 10000
+};
class VCL_DLLPUBLIC DataChangedEvent
{
private:
void* mpData;
- sal_uLong mnFlags;
- sal_uInt16 mnType;
+ sal_uLong mnFlags;
+ DataChangedEventType mnType;
public:
explicit DataChangedEvent();
- explicit DataChangedEvent( sal_uInt16 nType,
+ explicit DataChangedEvent( DataChangedEventType nType,
const void* pData = NULL,
sal_uLong nFlags = 0 );
- sal_uInt16 GetType() const { return mnType; }
+ DataChangedEventType GetType() const { return mnType; }
void* GetData() const { return mpData; }
- sal_uLong GetFlags() const { return mnFlags; }
+ sal_uLong GetFlags() const { return mnFlags; }
const AllSettings* GetOldSettings() const;
};
@@ -511,10 +513,10 @@ inline DataChangedEvent::DataChangedEvent()
{
mpData = NULL;
mnFlags = 0;
- mnType = 0;
+ mnType = DataChangedEventType::NONE;
}
-inline DataChangedEvent::DataChangedEvent( sal_uInt16 nType,
+inline DataChangedEvent::DataChangedEvent( DataChangedEventType nType,
const void* pData,
sal_uLong nChangeFlags )
{
@@ -525,7 +527,7 @@ inline DataChangedEvent::DataChangedEvent( sal_uInt16 nType,
inline const AllSettings* DataChangedEvent::GetOldSettings() const
{
- if ( mnType == DATACHANGED_SETTINGS )
+ if ( mnType == DataChangedEventType::SETTINGS )
return (const AllSettings*)mpData;
else
return NULL;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index f49a1638a6fe..00c05547bded 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -376,7 +376,7 @@ public:
/** checks the printer list and updates it necessary
*
- * sends a DataChanged event of type DATACHANGED_PRINTER
+ * sends a DataChanged event of type DataChangedEventType::PRINTER
* if the printer list changed
*/
static void updatePrinters();