LibreOffice Module sfx2 (master) 1
fileobj.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SFX2_SOURCE_APPL_FILEOBJ_HXX
20#define INCLUDED_SFX2_SOURCE_APPL_FILEOBJ_HXX
21
22#include <sfx2/linksrc.hxx>
23#include <sfx2/docfile.hxx>
24#include <sfx2/linkmgr.hxx>
25
26class Graphic;
27struct ImplSVEvent;
28namespace sfx2 { class FileDialogHelper; }
29
30enum class SvFileObjectType;
31
33{
34 OUString sFileNm;
35 OUString sFilter;
36 OUString sReferer;
41
43
44 bool bLoadAgain : 1;
45 bool bSynchron : 1;
46 bool bLoadError : 1;
47 bool bWaitForData : 1;
48 bool bDataReady : 1;
49 bool bClearMedium : 1;
51
52 bool LoadFile_Impl();
54
55 DECL_LINK( DelMedium_Impl, void*, void );
56 DECL_LINK( LoadGrfReady_Impl, void*, void );
57 DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper*, void );
58
59protected:
60 virtual ~SvFileObject() override;
61
62public:
64
65 virtual bool GetData( css::uno::Any & rData /*out param*/,
66 const OUString & rMimeType,
67 bool bSynchron = false ) override;
68
69 virtual bool Connect( sfx2::SvBaseLink* ) override;
70 virtual void Edit(weld::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl) override;
71
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;
75
76 void CancelTransfers();
77};
78
79
80#endif
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bClearMedium
Definition: fileobj.hxx:49
bool bSynchron
Definition: fileobj.hxx:45
Link< const OUString &, void > aEndEditLink
Definition: fileobj.hxx:37
DECL_LINK(LoadGrfReady_Impl, void *, void)
virtual ~SvFileObject() override
Definition: fileobj.cxx:61
OUString sFileNm
Definition: fileobj.hxx:34
bool bLoadError
Definition: fileobj.hxx:46
virtual void Edit(weld::Window *, sfx2::SvBaseLink *, const Link< const OUString &, void > &rEndEditHdl) override
Definition: fileobj.cxx:254
SvFileObjectType nType
Definition: fileobj.hxx:42
virtual bool IsDataComplete() const override
Definition: fileobj.cxx:388
void SendStateChg_Impl(sfx2::LinkManager::LinkState nState)
Definition: fileobj.cxx:424
ImplSVEvent * nPostUserEventId
Definition: fileobj.hxx:39
DECL_LINK(DelMedium_Impl, void *, void)
OUString sFilter
Definition: fileobj.hxx:35
bool bLoadAgain
Definition: fileobj.hxx:44
bool bWaitForData
Definition: fileobj.hxx:47
tools::SvRef< SfxMedium > xMed
Definition: fileobj.hxx:38
virtual bool GetData(css::uno::Any &rData, const OUString &rMimeType, bool bSynchron=false) override
Definition: fileobj.cxx:72
bool bDataReady
Definition: fileobj.hxx:48
bool bStateChangeCalled
Definition: fileobj.hxx:50
tools::SvRef< SfxMedium > mxDelMed
Definition: fileobj.hxx:40
virtual bool IsPending() const override
Definition: fileobj.cxx:383
DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper *, void)
bool LoadFile_Impl()
Definition: fileobj.cxx:153
OUString sReferer
Definition: fileobj.hxx:36
virtual bool Connect(sfx2::SvBaseLink *) override
Definition: fileobj.cxx:105
void CancelTransfers()
Definition: fileobj.cxx:411
SvFileObjectType
Definition: fileobj.cxx:44