LibreOffice Module sfx2 (master) 1
docinsert.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
20#ifndef INCLUDED_SFX2_DOCINSERT_HXX
21#define INCLUDED_SFX2_DOCINSERT_HXX
22
23#include <rtl/ustring.hxx>
24#include <sfx2/dllapi.h>
26#include <tools/link.hxx>
27#include <memory>
28#include <vector>
29
30namespace sfx2 { class FileDialogHelper; }
31namespace weld { class Window; }
32class SfxItemSet;
33class SfxMedium;
34enum class FileDialogFlags;
35
36typedef ::std::vector< std::unique_ptr<SfxMedium> > SfxMediumList;
37
38namespace sfx2 {
39
41{
42private:
44 OUString m_sDocFactory;
45 OUString m_sFilter;
47
50
51 std::unique_ptr<sfx2::FileDialogHelper>
53 std::shared_ptr<SfxItemSet> m_xItemSet;
54 std::vector<OUString> m_pURLList;
55
57
58public:
59 enum class Mode {
60 Insert,
61 InsertMulti,
62 Compare,
63 Merge
64 };
65 DocumentInserter(weld::Window* pParent, OUString aFactory, const Mode mode = Mode::Insert);
67
68 void StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink );
69 std::unique_ptr<SfxMedium> CreateMedium(char const* pFallbackHack = nullptr);
70 SfxMediumList CreateMediumList();
71};
72
73} // namespace sfx2
74
75#endif // INCLUDED_SFX2_DOCINSERT_HXX
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FileDialogFlags const m_nDlgFlags
Definition: docinsert.hxx:48
std::shared_ptr< SfxItemSet > m_xItemSet
Definition: docinsert.hxx:53
Link< sfx2::FileDialogHelper *, void > m_aDialogClosedLink
Definition: docinsert.hxx:46
std::vector< OUString > m_pURLList
Definition: docinsert.hxx:54
DECL_DLLPRIVATE_LINK(DialogClosedHdl, sfx2::FileDialogHelper *, void)
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
Definition: docinsert.hxx:52
weld::Window * m_pParent
Definition: docinsert.hxx:43
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
::std::vector< std::unique_ptr< SfxMedium > > SfxMediumList
Definition: docinsert.hxx:34
FileDialogFlags
Mode