Line data Source code
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 _SFX_GUISAVEAS_HXX_
21 : #define _SFX_GUISAVEAS_HXX_
22 :
23 : #include <com/sun/star/uno/Sequence.hxx>
24 : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 : #include <com/sun/star/beans/PropertyValue.hpp>
26 : #include <com/sun/star/beans/NamedValue.hpp>
27 : #include <com/sun/star/container/XNameAccess.hpp>
28 : #include <com/sun/star/container/XContainerQuery.hpp>
29 : #include <com/sun/star/frame/XModel.hpp>
30 : #include <com/sun/star/frame/XModuleManager2.hpp>
31 :
32 : #include <comphelper/sequenceashashmap.hxx>
33 : #include <sfx2/signaturestate.hxx>
34 :
35 :
36 : namespace com { namespace sun { namespace star {
37 : namespace document {
38 : class XDocumentProperties;
39 : }
40 : } } }
41 :
42 : class Window;
43 : class ModelData_Impl;
44 :
45 0 : class SfxStoringHelper
46 : {
47 : friend class ModelData_Impl;
48 :
49 : private:
50 : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
51 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
52 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
53 : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > m_xModuleManager;
54 :
55 : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
56 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
57 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
58 : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > GetModuleManager();
59 :
60 : public:
61 : SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
62 :
63 : sal_Bool GUIStoreModel(
64 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
65 : const ::rtl::OUString& aSlotName,
66 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
67 : sal_Bool bPreselectPassword,
68 : ::rtl::OUString aUserSelectedName,
69 : sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
70 :
71 : static sal_Bool CheckFilterOptionsAppearence(
72 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
73 : const ::rtl::OUString& aFilterName );
74 :
75 :
76 : static void SetDocInfoState(
77 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
78 : const ::com::sun::star::uno::Reference<
79 : ::com::sun::star::document::XDocumentProperties>& i_xOldDocInfo,
80 : sal_Bool bNoModify );
81 :
82 : static sal_Bool WarnUnacceptableFormat(
83 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
84 : ::rtl::OUString aOldUIName,
85 : ::rtl::OUString aDefUIName,
86 : sal_Bool bCanProceedFurther );
87 :
88 : static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
89 :
90 : };
91 :
92 : #endif
93 :
94 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|