xref: /AOO41X/main/sc/inc/sheetevents.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2008 by Sun Microsystems, Inc.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * $RCSfile: sheetdata.hxx,v $
10  * $Revision: 1.16.32.2 $
11  *
12  * This file is part of OpenOffice.org.
13  *
14  * OpenOffice.org is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU Lesser General Public License version 3
16  * only, as published by the Free Software Foundation.
17  *
18  * OpenOffice.org is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU Lesser General Public License version 3 for more details
22  * (a copy is included in the LICENSE file that accompanied this code).
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * version 3 along with OpenOffice.org.  If not, see
26  * <http://www.openoffice.org/license.html>
27  * for a copy of the LGPLv3 License.
28  *
29  ************************************************************************/
30 
31 #ifndef SC_SHEETEVENTS_HXX
32 #define SC_SHEETEVENTS_HXX
33 
34 #include <rtl/ustring.hxx>
35 
36 #define SC_SHEETEVENT_FOCUS         0
37 #define SC_SHEETEVENT_UNFOCUS       1
38 #define SC_SHEETEVENT_SELECT        2
39 #define SC_SHEETEVENT_DOUBLECLICK   3
40 #define SC_SHEETEVENT_RIGHTCLICK    4
41 #define SC_SHEETEVENT_CHANGE        5
42 #define SC_SHEETEVENT_CALCULATE     6
43 #define SC_SHEETEVENT_COUNT         7
44 
45 class ScSheetEvents
46 {
47     rtl::OUString** mpScriptNames;
48 
49     void        Clear();
50 
51 public:
52                 ScSheetEvents();
53                 ScSheetEvents(const ScSheetEvents& rOther);
54                 ~ScSheetEvents();
55 
56     const ScSheetEvents&	operator= (const ScSheetEvents& rOther);
57 
58     const rtl::OUString*    GetScript(sal_Int32 nEvent) const;
59     void                    SetScript(sal_Int32 nEvent, const rtl::OUString* pNew);
60 
61     static rtl::OUString    GetEventName(sal_Int32 nEvent);
62     static sal_Int32        GetVbaSheetEventId(sal_Int32 nEvent);
63     static sal_Int32        GetVbaDocumentEventId(sal_Int32 nEvent);
64 };
65 
66 #endif
67 
68