xref: /trunk/main/sfx2/source/appl/impldde.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _IMPLDDE_HXX
28 #define _IMPLDDE_HXX
29 
30 #include <sfx2/linksrc.hxx>
31 #include <tools/string.hxx>
32 
33 class DdeConnection;
34 class DdeData;
35 class DdeLink;
36 class DdeRequest;
37 class DdeTransaction;
38 
39 namespace sfx2
40 {
41 
42 class SvDDEObject : public SvLinkSource
43 {
44 	String sItem;
45 
46 	DdeConnection* pConnection;
47 	DdeLink* pLink;
48 	DdeRequest* pRequest;
49 	::com::sun::star::uno::Any * pGetData;
50 
51 	sal_uInt8 bWaitForData : 1; 					// wird auf Daten gewartet?
52 	sal_uInt8 nError		: 7;					// Error Code fuer den Dialog
53 
54 
55 	sal_Bool ImplHasOtherFormat( DdeTransaction& );
56 	DECL_LINK( ImplGetDDEData, DdeData* );
57 	DECL_LINK( ImplDoneDDEData, void* );
58 
59 protected:
60 	virtual ~SvDDEObject();
61 
62 public:
63 	SvDDEObject();
64 
65 	virtual sal_Bool	GetData( ::com::sun::star::uno::Any & rData /*out param*/,
66 								const String & aMimeType,
67 								sal_Bool bSynchron = sal_False );
68 
69 	virtual sal_Bool	Connect( SvBaseLink * );
70     virtual void    Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
71 
72 	virtual sal_Bool	IsPending() const;
73 	virtual sal_Bool	IsDataComplete() const;
74 };
75 
76 }
77 
78 #endif
79