xref: /aoo41x/main/sfx2/source/appl/impldde.hxx (revision 353d8f4d)
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 #ifndef _IMPLDDE_HXX
24 #define _IMPLDDE_HXX
25 
26 #include <sfx2/linksrc.hxx>
27 #include <tools/string.hxx>
28 
29 class DdeConnection;
30 class DdeData;
31 class DdeLink;
32 class DdeRequest;
33 class DdeTransaction;
34 
35 namespace sfx2
36 {
37 
38 class SvDDEObject : public SvLinkSource
39 {
40 	String sItem;
41 
42 	DdeConnection* pConnection;
43 	DdeLink* pLink;
44 	DdeRequest* pRequest;
45 	::com::sun::star::uno::Any * pGetData;
46 
47 	sal_uInt8 bWaitForData : 1; 					// wird auf Daten gewartet?
48 	sal_uInt8 nError		: 7;					// Error Code fuer den Dialog
49 
50 
51 	sal_Bool ImplHasOtherFormat( DdeTransaction& );
52 	DECL_LINK( ImplGetDDEData, DdeData* );
53 	DECL_LINK( ImplDoneDDEData, void* );
54 
55 protected:
56 	virtual ~SvDDEObject();
57 
58 public:
59 	SvDDEObject();
60 
61 	virtual sal_Bool	GetData( ::com::sun::star::uno::Any & rData /*out param*/,
62 								const String & aMimeType,
63 								sal_Bool bSynchron = sal_False );
64 
65 	virtual sal_Bool	Connect( SvBaseLink * );
66     virtual void    Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
67 
68 	virtual sal_Bool	IsPending() const;
69 	virtual sal_Bool	IsDataComplete() const;
70 };
71 
72 }
73 
74 #endif
75