xref: /AOO41X/main/svtools/inc/svtools/ttprops.hxx (revision 01aa44aa134af97080e2cf8e8bf3a0a4cd1cffe0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVTOOLS_TTPROPS_HXX
25 #define _SVTOOLS_TTPROPS_HXX
26 
27 #include "svtools/svtdllapi.h"
28 #include <tools/rtti.hxx>
29 #include <vcl/apptypes.hxx>
30 #include <svtools/svtdata.hxx>
31 
32 class SfxPoolItem;
33 class Bitmap;
34 
35 // Defines zur Steuerung der Ausf�hrung von Slots
36 #define EXECUTE_NO                  0
37 #define EXECUTE_POSSIBLE            1
38 #define EXECUTE_YES                 2
39 #define EXECUTEMODE_ASYNCHRON       1
40 #define EXECUTEMODE_DIALOGASYNCHRON 2
41 
42 #define SFX_USE_BINDINGS        0x8000
43 
44 // Property Requests(PR)
45 #define TT_PR_ONCE      0x100
46 
47 #define TT_PR_SLOTS     ( 0x001 | TT_PR_ONCE )
48 #define TT_PR_DISPATCHER (0x002 )
49 #define TT_PR_IMG       ( 0x004 )
50 
51 #define TT_PR_ERR_NODISPATCHER  01
52 #define TT_PR_ERR_NOEXECUTE     02
53 
54 /// To detect inconsistencies
55 #define TT_PROPERTIES_VERSION   1
56 
57 class SVT_DLLPUBLIC TTProperties : public ApplicationProperty
58 {
59     sal_uInt16 nDonePRs;                    // Verwaltung f�r die Properties, die nur einmal gerufen werden mussen.
60     SVT_DLLPRIVATE sal_Bool RequestProperty( sal_uInt16 nRequest );
61 
HasSlots()62     sal_Bool HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
63 
64 public:
65     TYPEINFO();
66 
TTProperties()67     TTProperties()
68             : nDonePRs( 0 )
69             , mppArgs( NULL )
70             , mpBmp( NULL )
71             , nPropertyVersion( 0 )
72                     {}
73 
74     sal_Bool GetSlots();
75 
76     /// ExecuteFunction
77     sal_uInt16 mnSID;
78     SfxPoolItem** mppArgs;
79     sal_uInt16 mnMode;
80     sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = NULL, sal_uInt16 nMode = 0 );
81 
82     /// Img
83     Bitmap *mpBmp;
84     sal_Bool Img( Bitmap *pBmp );
85 
86     static SvtResId GetSvtResId( sal_uInt16 nId );
87 
88     sal_uLong nSidOpenUrl;
89     sal_uLong nSidFileName;
90     sal_uLong nSidNewDocDirect;
91     sal_uLong nSidCopy;
92     sal_uLong nSidPaste;
93     sal_uLong nSidSourceView;
94     sal_uLong nSidSelectAll;
95     sal_uLong nSidReferer;
96 
97     sal_uInt16 nActualPR;
98     sal_uInt16 nPropertyVersion;        // Wird bei jedem call gesetzt.
99 };
100 
101 #endif // _SVTOOLS_TTPROPS_HXX
102 
103