sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / ttprops.hxx
blobf6fe77751dcdbe8283f3b91676f6c00e241ad7bc
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ttprops.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
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.
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).
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.
29 ************************************************************************/
31 #ifndef _SVTOOLS_TTPROPS_HXX
32 #define _SVTOOLS_TTPROPS_HXX
34 #ifndef INCLUDED_SVTDLLAPI_H
35 #include "bf_svtools/svtdllapi.h"
36 #endif
38 #ifndef _RTTI_HXX // manual
39 #include <tools/rtti.hxx>
40 #endif
41 #ifndef _VCL_APPTYPES_HXX //autogen
42 #include <vcl/apptypes.hxx>
43 #endif
45 #ifndef _SVTOOLS_SVTDATA_HXX
46 #include <bf_svtools/svtdata.hxx>
47 #endif
49 class Bitmap;
51 namespace binfilter
54 class SfxPoolItem;
56 // Defines zur Steuerung der Ausführung von Slots
57 #define EXECUTE_NO 0
58 #define EXECUTE_POSSIBLE 1
59 #define EXECUTE_YES 2
60 #define EXECUTEMODE_ASYNCHRON 1
61 #define EXECUTEMODE_DIALOGASYNCHRON 2
63 #define SFX_USE_BINDINGS 0x8000
65 // Property Requests(PR)
66 #define TT_PR_ONCE 0x100
68 #define TT_PR_SLOTS ( 0x001 | TT_PR_ONCE )
69 #define TT_PR_DISPATCHER (0x002 )
70 #define TT_PR_IMG ( 0x004 )
72 #define TT_PR_ERR_NODISPATCHER 01
73 #define TT_PR_ERR_NOEXECUTE 02
75 /// To detect inconsistencies
76 #define TT_PROPERTIES_VERSION 1
78 class TTProperties : public ApplicationProperty
80 USHORT nDonePRs; // Verwaltung für die Properties, die nur einmal gerufen werden mussen.
81 BOOL RequestProperty( USHORT nRequest );
83 BOOL HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
85 public:
86 TYPEINFO();
88 TTProperties()
89 : nDonePRs( 0 )
90 , mppArgs( NULL )
91 , mpBmp( NULL )
92 , nPropertyVersion( 0 )
95 BOOL GetSlots();
97 /// ExecuteFunction
98 USHORT mnSID;
99 SfxPoolItem** mppArgs;
100 USHORT mnMode;
101 USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = NULL, USHORT nMode = 0 );
103 /// Img
104 Bitmap *mpBmp;
105 BOOL Img( Bitmap *pBmp );
107 static SvtResId GetSvtResId( USHORT nId );
109 ULONG nSidOpenUrl;
110 ULONG nSidFileName;
111 ULONG nSidNewDocDirect;
112 ULONG nSidCopy;
113 ULONG nSidPaste;
114 ULONG nSidSourceView;
115 ULONG nSidSelectAll;
116 ULONG nSidReferer;
118 USHORT nActualPR;
119 USHORT nPropertyVersion; // Wird bei jedem call gesetzt.
124 #endif // _SVTOOLS_TTPROPS_HXX