tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / sfx2 / source / appl / fileobj.hxx
blob7362f6b1a4d65d234afb2f0844fb17048dd05220
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 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>
26 class Graphic;
27 struct ImplSVEvent;
28 namespace sfx2 { class FileDialogHelper; }
30 enum class SvFileObjectType;
32 class SvFileObject : public sfx2::SvLinkSource
34 OUString sFileNm;
35 OUString sFilter;
36 OUString sReferer;
37 Link<const OUString&, void> aEndEditLink;
38 tools::SvRef<SfxMedium> xMed;
39 ImplSVEvent* nPostUserEventId;
40 tools::SvRef<SfxMedium> mxDelMed;
42 SvFileObjectType nType;
44 bool bLoadAgain : 1;
45 bool bSynchron : 1;
46 bool bLoadError : 1;
47 bool bWaitForData : 1;
48 bool bDataReady : 1;
49 bool bClearMedium : 1;
50 bool bStateChangeCalled : 1;
52 bool LoadFile_Impl();
53 void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
55 DECL_LINK( DelMedium_Impl, void*, void );
56 DECL_LINK( LoadGrfReady_Impl, void*, void );
57 DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper*, void );
59 protected:
60 virtual ~SvFileObject() override;
62 public:
63 SvFileObject();
65 virtual bool GetData( css::uno::Any & rData /*out param*/,
66 const OUString & rMimeType,
67 bool bSynchron = false ) override;
69 virtual bool Connect( sfx2::SvBaseLink* ) override;
70 virtual void Edit(weld::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl) override;
72 // Ask whether you can access data directly or whether it has to be triggered
73 virtual bool IsPending() const override;
74 virtual bool IsDataComplete() const override;
76 void CancelTransfers();
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */