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 .
20 #ifndef INCLUDED_SFX2_DOCINSERT_HXX
21 #define INCLUDED_SFX2_DOCINSERT_HXX
23 #include <rtl/ustring.hxx>
24 #include <sfx2/dllapi.h>
25 #include <vcl/errcode.hxx>
26 #include <tools/link.hxx>
30 namespace sfx2
{ class FileDialogHelper
; }
31 namespace weld
{ class Window
; }
34 enum class FileDialogFlags
;
36 typedef ::std::vector
< std::unique_ptr
<SfxMedium
> > SfxMediumList
;
40 class SFX2_DLLPUBLIC DocumentInserter
43 weld::Window
* const m_pParent
;
44 OUString
const m_sDocFactory
;
46 Link
<sfx2::FileDialogHelper
*,void> m_aDialogClosedLink
;
48 FileDialogFlags
const m_nDlgFlags
;
51 std::unique_ptr
<sfx2::FileDialogHelper
>
53 std::shared_ptr
<SfxItemSet
> m_xItemSet
;
54 std::vector
<OUString
> m_pURLList
;
56 DECL_LINK(DialogClosedHdl
, sfx2::FileDialogHelper
*, void);
65 DocumentInserter(weld::Window
* pParent
, const OUString
& rFactory
, const Mode mode
= Mode::Insert
);
68 void StartExecuteModal( const Link
<sfx2::FileDialogHelper
*,void>& _rDialogClosedLink
);
69 std::unique_ptr
<SfxMedium
> CreateMedium(char const* pFallbackHack
= nullptr);
70 SfxMediumList
CreateMediumList();
75 #endif // INCLUDED_SFX2_DOCINSERT_HXX
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */