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_INC_GUISAVEAS_HXX
21 #define INCLUDED_SFX2_INC_GUISAVEAS_HXX
23 #include <sal/config.h>
25 #include <string_view>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <com/sun/star/beans/PropertyValue.hpp>
29 #include <com/sun/star/container/XNameAccess.hpp>
30 #include <com/sun/star/container/XContainerQuery.hpp>
31 #include <com/sun/star/frame/XModel.hpp>
32 #include <com/sun/star/frame/XModuleManager2.hpp>
34 #include <comphelper/sequenceashashmap.hxx>
36 #include <sfx2/bindings.hxx>
37 #include <sfx2/signaturestate.hxx>
39 #include <svtools/dialogclosedlistener.hxx>
41 #include <tools/urlobj.hxx>
44 namespace com::sun::star::document
{ class XDocumentProperties
; }
46 namespace weld
{ class Window
; }
49 class SfxStoringHelper
51 friend class ModelData_Impl
;
54 css::uno::Reference
< css::container::XNameAccess
> m_xFilterCFG
;
55 css::uno::Reference
< css::container::XContainerQuery
> m_xFilterQuery
;
56 css::uno::Reference
< css::frame::XModuleManager2
> m_xModuleManager
;
58 std::shared_ptr
<ModelData_Impl
> m_xModelData
;
59 css::uno::Sequence
< css::beans::PropertyValue
> m_aArgsSequence
;
61 css::uno::Reference
< css::container::XNameAccess
> const & GetFilterConfiguration();
62 css::uno::Reference
< css::container::XContainerQuery
> const & GetFilterQuery();
63 css::uno::Reference
< css::frame::XModuleManager2
> const & GetModuleManager();
66 bool m_bPreselectPassword
;
68 bool m_bSetStandardName
;
69 sal_Int16 m_nStoreMode
;
71 static bool FinishGUIStoreModel(::comphelper::SequenceAsHashMap::const_iterator
& aFileNameIter
,
72 ModelData_Impl
& aModelData
, bool bRemote
, sal_Int16 nStoreMode
,
73 css::uno::Sequence
< css::beans::PropertyValue
>& aFilterProps
,
74 bool bSetStandardName
, bool bPreselectPassword
, bool bDialogUsed
,
75 std::u16string_view aFilterFromMediaDescr
, std::u16string_view aOldFilterName
,
76 css::uno::Sequence
< css::beans::PropertyValue
>& aArgsSequence
,
77 OUString aFilterName
);
79 void CallFinishGUIStoreModel();
85 const css::uno::Reference
< css::frame::XModel
>& xModel
,
86 std::u16string_view aSlotName
,
87 css::uno::Sequence
< css::beans::PropertyValue
>& aArgsSequence
,
88 bool bPreselectPassword
,
89 SignatureState nDocumentSignatureState
,
92 static bool CheckFilterOptionsAppearance(
93 const css::uno::Reference
< css::container::XNameAccess
>& xFilterCFG
,
94 const OUString
& aFilterName
);
97 static void SetDocInfoState(
98 const css::uno::Reference
< css::frame::XModel
>& xModel
,
99 const css::uno::Reference
< css::document::XDocumentProperties
>& i_xOldDocInfo
);
101 static bool WarnUnacceptableFormat(
102 const css::uno::Reference
< css::frame::XModel
>& xModel
,
103 std::u16string_view aOldUIName
,
104 const OUString
& aDefExtension
,
105 bool rDefaultIsAlien
);
107 static css::uno::Reference
<css::awt::XWindow
> GetModelXWindow(const css::uno::Reference
<css::frame::XModel
>& rModel
);
108 static weld::Window
* GetModelWindow( const css::uno::Reference
< css::frame::XModel
>& xModel
);
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */