diff options
Diffstat (limited to 'offapi/com/sun/star/script/vba/VBAEventId.idl')
-rw-r--r-- | offapi/com/sun/star/script/vba/VBAEventId.idl | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl b/offapi/com/sun/star/script/vba/VBAEventId.idl new file mode 100644 index 000000000..f01cf84ad --- /dev/null +++ b/offapi/com/sun/star/script/vba/VBAEventId.idl @@ -0,0 +1,123 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_script_vba_VBAEventId_idl__ +#define __com_sun_star_script_vba_VBAEventId_idl__ + + +module com { module sun { module star { module script { module vba { + + +/** Constants used to identify VBA document events. + + <p>If one of these events is fired, a specific VBA macro in a specific + document code module will be executed.</p> + + <p>Each event expects some specific arguments to be passed to + XVBAEventProcessor::processVbaEvent().</p> + + @see XVBAEventProcessor + */ +constants VBAEventId +{ + + /** An identifier not corresponding to any VBA document event. */ + const long NO_EVENT = -1; + + // Global events (identifiers from 1 to 999) + + /** New document opened from template. No arguments. */ + const long AUTO_NEW = 1; + /** Document opened (loaded). No arguments. */ + const long AUTO_OPEN = 2; + /** Document about to be closed. No arguments. */ + const long AUTO_CLOSE = 3; + /** Application start. No arguments. */ + const long AUTO_EXEC = 4; + /** Application exit. No arguments. */ + const long AUTO_EXIT = 5; + + // MS Word (identifiers from 1001 to 1999) + + /** New text document opened from template. No arguments. */ + const long DOCUMENT_NEW = 1001; + /** Text document opened (loaded). No arguments. */ + const long DOCUMENT_OPEN = 1002; + /** Document about to be closed. No arguments. */ + const long DOCUMENT_CLOSE = 1003; + + // MS Excel (identifiers from 2001 to 2999) + + // document events (2001-2099) + + /** Document activated. No arguments. */ + const long WORKBOOK_ACTIVATE = 2001; + /** Document deactivated. No arguments. */ + const long WORKBOOK_DEACTIVATE = 2002; + /** Document opened (loaded). No arguments. */ + const long WORKBOOK_OPEN = 2003; + /** Document about to be closed. Arguments: [out] boolean bCancel. */ + const long WORKBOOK_BEFORECLOSE = 2004; + /** Document about to be printed. Arguments: [out] boolean bCancel. */ + const long WORKBOOK_BEFOREPRINT = 2005; + /** Document about to be saved. Arguments: boolean bSaveAs, [out] boolean bCancel. */ + const long WORKBOOK_BEFORESAVE = 2006; + /** Document has been saved. Arguments: boolean bSuccess. */ + const long WORKBOOK_AFTERSAVE = 2007; + /** New sheet inserted. Arguments: short nSheet. */ + const long WORKBOOK_NEWSHEET = 2008; + /** Document window has been activated. Arguments: XController aController. */ + const long WORKBOOK_WINDOWACTIVATE = 2009; + /** Document window has been deactivated. Arguments: XController aController. */ + const long WORKBOOK_WINDOWDEACTIVATE = 2010; + /** Document window has been resized. Arguments: XController aController. */ + const long WORKBOOK_WINDOWRESIZE = 2011; + + // sheet events (2101-2199) + + /** Worksheet has been activated (made visible). Arguments: short nSheet. */ + const long WORKSHEET_ACTIVATE = 2101; + /** Worksheet has been activated (made visible). Arguments: short nSheet. */ + const long WORKSHEET_DEACTIVATE = 2102; + /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ + const long WORKSHEET_BEFOREDOUBLECLICK = 2103; + /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ + const long WORKSHEET_BEFORERIGHTCLICK = 2104; + /** Cells in sheet have been recalculated. Arguments: short nSheet. */ + const long WORKSHEET_CALCULATE = 2105; + /** Cells in sheet have been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_CHANGE = 2106; + /** Selection in sheet has been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_SELECTIONCHANGE = 2107; + /** Hyperlink has been clicked. Arguments: XCell aCell. */ + const long WORKSHEET_FOLLOWHYPERLINK = 2108; + + + /** Implementations are allowed to use identifiers above this value for any + internal purpose. */ + const long USERDEFINED_START = 1000000; +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |