summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/script/vba/VBAEventId.idl
blob: af0527a1634b37f0e0f7e6db03a6c4ad04ffc49d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
 
#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
    <member>XVBAEventProcessor::processVbaEvent</member>.</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