21#include <com/sun/star/script/vba/VBAEventId.hpp>
26 static const char* aEventNames[] =
36 return OUString::createFromAscii(aEventNames[
static_cast<int>(nEvent)]);
41 using namespace ::com::sun::star::script::vba::VBAEventId;
43 static const sal_Int32 nVbaEventIds[] =
47 WORKSHEET_SELECTIONCHANGE,
48 WORKSHEET_BEFOREDOUBLECLICK,
49 WORKSHEET_BEFORERIGHTCLICK,
53 return nVbaEventIds[
static_cast<int>(nEvent)];
60 using namespace ::com::sun::star::script::vba::VBAEventId;
62 return (nSheetEventId != NO_EVENT) ? (nSheetEventId + USERDEFINED_START) : NO_EVENT;
92 for (sal_Int32 nEvent=0; nEvent<
COUNT; ++nEvent)
103 std::optional<OUString>
const & r =
mpScriptNames[
static_cast<int>(nEvent)];
112 int nEvent =
static_cast<int>(eEvent);
const OUString * GetScript(ScSheetEventId nEvent) const
static sal_Int32 GetVbaDocumentEventId(ScSheetEventId nEvent)
std::unique_ptr< std::optional< OUString >[]> mpScriptNames
static sal_Int32 GetVbaSheetEventId(ScSheetEventId nEvent)
ScSheetEvents & operator=(const ScSheetEvents &rOther)
static OUString GetEventName(ScSheetEventId nEvent)
void SetScript(ScSheetEventId nEvent, const OUString *pNew)
@ COUNT
all values, including non-numerical values, are counted.