1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_script_vba_VBAEventId_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_script_vba_VBAEventId_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir//============================================================================= 32*cdf0e10cSrcweir 33*cdf0e10cSrcweirmodule com { module sun { module star { module script { module vba { 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir//============================================================================= 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir/** Constants used to identify VBA document events. 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir <p>If one of these events is fired, a specific VBA macro in a specific 40*cdf0e10cSrcweir document code module will be executed.</p> 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir <p>Each event expects some specific arguments to be passed to 43*cdf0e10cSrcweir <member>XVBAEventProcessor::processVbaEvent</member>.</p> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir @see XVBAEventProcessor 46*cdf0e10cSrcweir */ 47*cdf0e10cSrcweirconstants VBAEventId 48*cdf0e10cSrcweir{ 49*cdf0e10cSrcweir //========================================================================= 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir /** An identifier not corresponding to any VBA document event. */ 52*cdf0e10cSrcweir const long NO_EVENT = -1; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir //========================================================================= 55*cdf0e10cSrcweir // Global events (identifiers from 1 to 999) 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir /** New document opened from template. No arguments. */ 58*cdf0e10cSrcweir const long AUTO_NEW = 1; 59*cdf0e10cSrcweir /** Document opened (loaded). No arguments. */ 60*cdf0e10cSrcweir const long AUTO_OPEN = 2; 61*cdf0e10cSrcweir /** Document about to be closed. No arguments. */ 62*cdf0e10cSrcweir const long AUTO_CLOSE = 3; 63*cdf0e10cSrcweir /** Application start. No arguments. */ 64*cdf0e10cSrcweir const long AUTO_EXEC = 4; 65*cdf0e10cSrcweir /** Application exit. No arguments. */ 66*cdf0e10cSrcweir const long AUTO_EXIT = 5; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir //========================================================================= 69*cdf0e10cSrcweir // MS Word (identifiers from 1001 to 1999) 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir /** New text document opened from template. No arguments. */ 72*cdf0e10cSrcweir const long DOCUMENT_NEW = 1001; 73*cdf0e10cSrcweir /** Text document opened (loaded). No arguments. */ 74*cdf0e10cSrcweir const long DOCUMENT_OPEN = 1002; 75*cdf0e10cSrcweir /** Document about to be closed. No arguments. */ 76*cdf0e10cSrcweir const long DOCUMENT_CLOSE = 1003; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir //========================================================================= 79*cdf0e10cSrcweir // MS Excel (identifiers from 2001 to 2999) 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir //------------------------------------------------------------------------- 82*cdf0e10cSrcweir // document events (2001-2099) 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir /** Document activated. No arguments. */ 85*cdf0e10cSrcweir const long WORKBOOK_ACTIVATE = 2001; 86*cdf0e10cSrcweir /** Document deactivated. No arguments. */ 87*cdf0e10cSrcweir const long WORKBOOK_DEACTIVATE = 2002; 88*cdf0e10cSrcweir /** Document opened (loaded). No arguments. */ 89*cdf0e10cSrcweir const long WORKBOOK_OPEN = 2003; 90*cdf0e10cSrcweir /** Document about to be closed. Arguments: [out] boolean bCancel. */ 91*cdf0e10cSrcweir const long WORKBOOK_BEFORECLOSE = 2004; 92*cdf0e10cSrcweir /** Document about to be printed. Arguments: [out] boolean bCancel. */ 93*cdf0e10cSrcweir const long WORKBOOK_BEFOREPRINT = 2005; 94*cdf0e10cSrcweir /** Document about to be saved. Arguments: boolean bSaveAs, [out] boolean bCancel. */ 95*cdf0e10cSrcweir const long WORKBOOK_BEFORESAVE = 2006; 96*cdf0e10cSrcweir /** Document has been saved. Arguments: boolean bSuccess. */ 97*cdf0e10cSrcweir const long WORKBOOK_AFTERSAVE = 2007; 98*cdf0e10cSrcweir /** New sheet inserted. Arguments: short nSheet. */ 99*cdf0e10cSrcweir const long WORKBOOK_NEWSHEET = 2008; 100*cdf0e10cSrcweir /** Document window has been activated. Arguments: XController aController. */ 101*cdf0e10cSrcweir const long WORKBOOK_WINDOWACTIVATE = 2009; 102*cdf0e10cSrcweir /** Document window has been deactivated. Arguments: XController aController. */ 103*cdf0e10cSrcweir const long WORKBOOK_WINDOWDEACTIVATE = 2010; 104*cdf0e10cSrcweir /** Document window has been resized. Arguments: XController aController. */ 105*cdf0e10cSrcweir const long WORKBOOK_WINDOWRESIZE = 2011; 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir //------------------------------------------------------------------------- 108*cdf0e10cSrcweir // sheet events (2101-2199) 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir /** Worksheet has been activated (made visible). Arguments: short nSheet. */ 111*cdf0e10cSrcweir const long WORKSHEET_ACTIVATE = 2101; 112*cdf0e10cSrcweir /** Worksheet has been activated (made visible). Arguments: short nSheet. */ 113*cdf0e10cSrcweir const long WORKSHEET_DEACTIVATE = 2102; 114*cdf0e10cSrcweir /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ 115*cdf0e10cSrcweir const long WORKSHEET_BEFOREDOUBLECLICK = 2103; 116*cdf0e10cSrcweir /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ 117*cdf0e10cSrcweir const long WORKSHEET_BEFORERIGHTCLICK = 2104; 118*cdf0e10cSrcweir /** Cells in sheet have been recalculated. Arguments: short nSheet. */ 119*cdf0e10cSrcweir const long WORKSHEET_CALCULATE = 2105; 120*cdf0e10cSrcweir /** Cells in sheet have been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ 121*cdf0e10cSrcweir const long WORKSHEET_CHANGE = 2106; 122*cdf0e10cSrcweir /** Selection in sheet has been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ 123*cdf0e10cSrcweir const long WORKSHEET_SELECTIONCHANGE = 2107; 124*cdf0e10cSrcweir /** Hyperlink has been clicked. Arguments: XCell aCell. */ 125*cdf0e10cSrcweir const long WORKSHEET_FOLLOWHYPERLINK = 2108; 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir //========================================================================= 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir /** Implementations are allowed to use identifiers above this value for any 130*cdf0e10cSrcweir internal purpose. */ 131*cdf0e10cSrcweir const long USERDEFINED_START = 1000000; 132*cdf0e10cSrcweir}; 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir//============================================================================= 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir}; }; }; }; }; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir//============================================================================= 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir#endif 141