Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / sfx2 / inc / guisaveas.hxx
blob17d996619cdf292d6827b0fab9e9bc1b59e7f8df
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _SFX_GUISAVEAS_HXX_
30 #define _SFX_GUISAVEAS_HXX_
32 #include <com/sun/star/uno/Sequence.hxx>
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <com/sun/star/beans/PropertyValue.hpp>
35 #include <com/sun/star/beans/NamedValue.hpp>
36 #include <com/sun/star/container/XNameAccess.hpp>
37 #include <com/sun/star/container/XContainerQuery.hpp>
38 #include <com/sun/star/frame/XModel.hpp>
39 #include <com/sun/star/frame/XModuleManager.hpp>
41 #include <comphelper/sequenceashashmap.hxx>
42 #include <sfx2/signaturestate.hxx>
45 namespace com { namespace sun { namespace star {
46 namespace document {
47 class XDocumentInfo;
49 } } }
51 class Window;
52 class ModelData_Impl;
54 class SfxStoringHelper
56 friend class ModelData_Impl;
58 private:
59 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
60 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
61 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
62 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
63 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNamedModManager;
65 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
66 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
67 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
68 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > GetModuleManager();
69 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetNamedModuleManager();
72 public:
73 SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
75 sal_Bool GUIStoreModel(
76 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
77 const ::rtl::OUString& aSlotName,
78 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
79 sal_Bool bPreselectPassword,
80 ::rtl::OUString aUserSelectedName,
81 sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
83 static sal_Bool CheckFilterOptionsAppearence(
84 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
85 const ::rtl::OUString& aFilterName );
88 static void SetDocInfoState(
89 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
90 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo>& i_xOldDocInfo,
91 sal_Bool bNoModify );
93 static sal_Bool WarnUnacceptableFormat(
94 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
95 ::rtl::OUString aOldUIName,
96 ::rtl::OUString aDefUIName,
97 sal_Bool bCanProceedFurther );
99 static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
103 #endif
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */