bump product version to 4.1.6.2
[LibreOffice.git] / sfx2 / source / appl / fileobj.hxx
blobc3e98e01a7d19d417c20f7b817ed399b82da2b1e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _FILEOBJ_HXX
20 #define _FILEOBJ_HXX
22 #include <tools/string.hxx>
23 #include <sfx2/linksrc.hxx>
24 #include <sfx2/docfile.hxx>
25 #include <sfx2/linkmgr.hxx>
27 class Graphic;
28 struct Impl_DownLoadData;
29 namespace sfx2 { class FileDialogHelper; }
31 class SvFileObject : public sfx2::SvLinkSource
33 String sFileNm;
34 String sFilter;
35 String sReferer;
36 Link aEndEditLink;
37 SfxMediumRef xMed;
38 Impl_DownLoadData* pDownLoadData;
39 Window* pOldParent;
41 sal_uInt8 nType;
43 sal_Bool bLoadAgain : 1;
44 sal_Bool bSynchron : 1;
45 sal_Bool bLoadError : 1;
46 sal_Bool bWaitForData : 1;
47 sal_Bool bInNewData : 1;
48 sal_Bool bDataReady : 1;
49 sal_Bool bNativFormat : 1;
50 sal_Bool bClearMedium : 1;
51 sal_Bool bStateChangeCalled : 1;
52 sal_Bool bInCallDownLoad : 1;
54 sal_Bool GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
55 sal_Bool LoadFile_Impl();
56 void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
58 DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
59 DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
60 DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
62 protected:
63 virtual ~SvFileObject();
65 public:
66 SvFileObject();
68 virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
69 const String & rMimeType,
70 sal_Bool bSynchron = sal_False );
72 virtual sal_Bool Connect( sfx2::SvBaseLink* );
73 virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
75 // Ask whether you can access data directly or whether it has to be triggered
76 virtual sal_Bool IsPending() const;
77 virtual sal_Bool IsDataComplete() const;
79 void CancelTransfers();
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */