mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix: constructor calls a virtual function
docx, pptx
This commit is contained in:
@ -36,23 +36,23 @@
|
||||
|
||||
namespace SimpleTypes
|
||||
{
|
||||
#define SimpleTypes_DefaultString(Class) \
|
||||
Class(const std::wstring &sValue) { FromString(sValue); } \
|
||||
#define SimpleTypes_DefaultString(Class) \
|
||||
Class(const std::wstring &sValue) { FromString(sValue); } \
|
||||
Class& operator=(const std::wstring& sValue) { FromString(sValue); return *this; }
|
||||
|
||||
#define SimpleTypes_Default(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_eValue == oOther.m_eValue) ? true : false; } \
|
||||
#define SimpleTypes_Default(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_eValue == oOther.m_eValue) ? true : false; } \
|
||||
SimpleTypes_DefaultString(Class)
|
||||
|
||||
#define SimpleTypes_DefaultD(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_dValue == oOther.m_dValue) ? true : false; } \
|
||||
#define SimpleTypes_DefaultD(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_dValue == oOther.m_dValue) ? true : false; } \
|
||||
SimpleTypes_DefaultString(Class)
|
||||
|
||||
#define SimpleTypes_DefaultS(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_sValue == oOther.m_sValue) ? true : false; } \
|
||||
#define SimpleTypes_DefaultS(Class) \
|
||||
bool operator==(const Class& oOther) const { return (this->m_sValue == oOther.m_sValue) ? true : false; } \
|
||||
SimpleTypes_DefaultString(Class)
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_BASE(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_BASE(Class, Type, Default) \
|
||||
class Class \
|
||||
{ \
|
||||
public: \
|
||||
@ -69,33 +69,33 @@ namespace SimpleTypes
|
||||
public: \
|
||||
Type m_eValue;
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_START(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_START(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_BASE(Class, Type, Default) \
|
||||
public: \
|
||||
Class() { m_eValue = Default; } \
|
||||
void SetValue(const Type& value) { m_eValue = value; }
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_START_NSV(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_START_NSV(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_BASE(Class, Type, Default) \
|
||||
public: \
|
||||
Class() { m_eValue = Default; } \
|
||||
void SetValue(const Type value);
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_START_NC(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_START_NC(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_BASE(Class, Type, Default) \
|
||||
public: \
|
||||
void SetValue(const Type& value) { m_eValue = value; }
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_START(Class, Type, Default) \
|
||||
};
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_NSV(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_NSV(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_START_NSV(Class, Type, Default) \
|
||||
};
|
||||
|
||||
#define DEFINE_SIMPLE_TYPE_NC(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_START_NC(Class, Type, Default) \
|
||||
#define DEFINE_SIMPLE_TYPE_NC(Class, Type, Default) \
|
||||
DEFINE_SIMPLE_TYPE_START_NC(Class, Type, Default) \
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user