1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lnkbase.hxx,v $
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 ************************************************************************/
33 #ifndef _SOT_EXCHANGE_HXX //autogen
34 #include <sot/exchange.hxx>
36 #ifndef _TOOLS_REF_HXX
37 #include <tools/ref.hxx>
39 #ifndef _LINKSOURCE_HXX
40 #include <bf_so3/linksrc.hxx>
43 #ifndef INCLUDED_SO3DLLAPI_H
44 #include "bf_so3/so3dllapi.h"
47 namespace com
{ namespace sun
{ namespace star
{ namespace uno
56 struct ImplBaseLinkData
;
60 #ifndef OBJECT_DDE_EXTERN
61 #define OBJECT_INTERN 0x00
62 //#define OBJECT_SO_EXTERN 0x01
63 #define OBJECT_DDE_EXTERN 0x02
66 #define OBJECT_CLIENT_SO 0x80 // ein Link
67 #define OBJECT_CLIENT_DDE 0x81
68 //#define OBJECT_CLIENT_OLE 0x82 // ein Ole-Link
69 //#define OBJECT_CLIENT_OLE_CACHE 0x83 // ein Ole-Link mit SvEmbeddedObject
70 #define OBJECT_CLIENT_FILE 0x90
71 #define OBJECT_CLIENT_GRF 0x91
74 // Ole2 compatibel und persistent
75 LINKUPDATE_ALWAYS
= 1,
76 LINKUPDATE_ONCALL
= 3,
78 LINKUPDATE_END
// dummy!
81 class SO3_DLLPUBLIC SvBaseLink
: public SvRefBase
83 friend class SvLinkManager
;
84 friend class SvLinkSource
;
88 SvLinkManager
* pLinkMgr
;
92 BOOL bUseCache
: 1; // fuer GrafikLinks!
95 void SetObjType( USHORT
);
97 // setzen des LinkSourceName ohne aktion
98 SO3_DLLPRIVATE
void SetName( const String
& rLn
);
100 ImplBaseLinkData
* pImplData
;
102 SvBaseLink( USHORT nLinkType
, ULONG nContentType
= FORMAT_STRING
);
103 virtual ~SvBaseLink();
105 void _GetRealObject( BOOL bConnect
= TRUE
);
107 SO3_DLLPRIVATE SvLinkSource
* GetRealObject()
117 virtual void Closed();
119 USHORT
GetObjType() const { return nObjType
; }
121 SvLinkSource
* GetObj() const { return xObj
; }
123 void SetLinkSourceName( const String
& rName
);
124 String
GetLinkSourceName() const;
126 virtual void DataChanged( const String
& rMimeType
,
127 const ::com::sun::star::uno::Any
& rValue
);
129 void SetUpdateMode( USHORT
);
130 USHORT
GetUpdateMode() const;
131 ULONG
GetContentType() const;
132 BOOL
SetContentType( ULONG nType
);
134 SvLinkManager
* GetLinkManager() { return pLinkMgr
; }
135 const SvLinkManager
* GetLinkManager() const { return pLinkMgr
; }
140 virtual BOOL
Edit( Window
* );
142 // soll der Link im Dialog angezeigt werden ? (Links im Link im ...)
143 BOOL
IsVisible() const { return bVisible
; }
144 void SetVisible( BOOL bFlag
) { bVisible
= bFlag
; }
145 // soll der Link synchron oder asynchron geladen werden?
146 BOOL
IsSynchron() const { return bSynchron
; }
147 void SetSynchron( BOOL bFlag
) { bSynchron
= bFlag
; }
149 BOOL
IsUseCache() const { return bUseCache
; }
150 void SetUseCache( BOOL bFlag
) { bUseCache
= bFlag
; }
153 SV_DECL_IMPL_REF(SvBaseLink
);