1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SFX2_SOURCE_APPL_FILEOBJ_HXX
20 #define INCLUDED_SFX2_SOURCE_APPL_FILEOBJ_HXX
22 #include <sfx2/linksrc.hxx>
23 #include <sfx2/docfile.hxx>
24 #include <sfx2/linkmgr.hxx>
27 namespace sfx2
{ class FileDialogHelper
; }
29 class SvFileObject
: public sfx2::SvLinkSource
36 ImplSVEvent
* nPostUserEventId
;
37 SfxMediumRef
* pDelMed
;
38 VclPtr
<vcl::Window
> pOldParent
;
45 bool bWaitForData
: 1;
48 bool bNativFormat
: 1;
49 bool bClearMedium
: 1;
50 bool bStateChangeCalled
: 1;
51 bool bInCallDownload
: 1;
53 bool GetGraphic_Impl( Graphic
&, SvStream
* pStream
= 0 );
55 void SendStateChg_Impl( sfx2::LinkManager::LinkState nState
);
57 DECL_LINK( DelMedium_Impl
, SfxMediumRef
* );
58 DECL_LINK( LoadGrfReady_Impl
, void* );
59 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
* );
62 virtual ~SvFileObject();
67 virtual bool GetData( ::com::sun::star::uno::Any
& rData
/*out param*/,
68 const OUString
& rMimeType
,
69 bool bSynchron
= false ) SAL_OVERRIDE
;
71 virtual bool Connect( sfx2::SvBaseLink
* ) SAL_OVERRIDE
;
72 virtual void Edit( vcl::Window
*, sfx2::SvBaseLink
*, const Link
<>& rEndEditHdl
) SAL_OVERRIDE
;
74 // Ask whether you can access data directly or whether it has to be triggered
75 virtual bool IsPending() const SAL_OVERRIDE
;
76 virtual bool IsDataComplete() const SAL_OVERRIDE
;
78 void CancelTransfers();
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */