tdf#145614: Convert #define to enum class
Change-Id: Ic1147219d09c064817e273309f106d9c091caee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202945 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
committed by
Ilmari Lauhakangas
parent
9b06135233
commit
4fec122182
@@ -949,18 +949,28 @@ void LockedEmbedDocument_Impl::ExecuteMethod( sal_Int16 nId )
|
||||
{
|
||||
if ( m_pEmbedDocument )
|
||||
{
|
||||
if ( nId == OLESERV_SAVEOBJECT )
|
||||
switch( static_cast<OLEServ>(nId) )
|
||||
{
|
||||
case OLEServ::SaveObject:
|
||||
m_pEmbedDocument->SaveObject();
|
||||
else if ( nId == OLESERV_CLOSE )
|
||||
break;
|
||||
case OLEServ::Close:
|
||||
m_pEmbedDocument->Close( 0 );
|
||||
else if ( nId == OLESERV_NOTIFY )
|
||||
break;
|
||||
case OLEServ::Notify:
|
||||
m_pEmbedDocument->notify();
|
||||
else if ( nId == OLESERV_NOTIFYCLOSING )
|
||||
break;
|
||||
case OLEServ::NotifyClosing:
|
||||
m_pEmbedDocument->OLENotifyClosing();
|
||||
else if ( nId == OLESERV_SHOWOBJECT )
|
||||
break;
|
||||
case OLEServ::ShowObject:
|
||||
m_pEmbedDocument->ShowObject();
|
||||
else if ( nId == OLESERV_DEACTIVATE )
|
||||
break;
|
||||
case OLEServ::Deactivate:
|
||||
m_pEmbedDocument->Deactivate();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define OLESERV_SAVEOBJECT 1
|
||||
#define OLESERV_CLOSE 2
|
||||
#define OLESERV_NOTIFY 3
|
||||
#define OLESERV_NOTIFYCLOSING 4
|
||||
#define OLESERV_SHOWOBJECT 5
|
||||
#define OLESERV_DEACTIVATE 6
|
||||
|
||||
#include <oleidl.h>
|
||||
#if defined __clang__
|
||||
#pragma clang diagnostic push
|
||||
@@ -39,6 +32,15 @@
|
||||
#endif
|
||||
#include <cppuhelper/weak.hxx>
|
||||
|
||||
enum class OLEServ : sal_Int16 {
|
||||
SaveObject = 1,
|
||||
Close = 2,
|
||||
Notify = 3,
|
||||
NotifyClosing = 4,
|
||||
ShowObject = 5,
|
||||
Deactivate = 6
|
||||
};
|
||||
|
||||
class EmbedDocument_Impl;
|
||||
struct LockedEmbedDocument_Impl
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user