merge the formfield patch from ooo-build
[ooovba.git] / sfx2 / inc / guisaveas.hxx
blobf1de3d8feabddc586d546e6c1715aa8a2fd9fb90
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: guisaveas.hxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SFX_GUISAVEAS_HXX_
32 #define _SFX_GUISAVEAS_HXX_
34 #include <com/sun/star/uno/Sequence.hxx>
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #include <com/sun/star/beans/PropertyValue.hpp>
37 #include <com/sun/star/beans/NamedValue.hpp>
38 #include <com/sun/star/container/XNameAccess.hpp>
39 #include <com/sun/star/container/XContainerQuery.hpp>
40 #include <com/sun/star/frame/XModel.hpp>
41 #include <com/sun/star/frame/XModuleManager.hpp>
43 #include <comphelper/sequenceashashmap.hxx>
44 #include <sfx2/signaturestate.hxx>
47 namespace com { namespace sun { namespace star {
48 namespace document {
49 class XDocumentInfo;
51 } } }
53 class Window;
54 class ModelData_Impl;
56 class SfxStoringHelper
58 friend class ModelData_Impl;
60 private:
61 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
62 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
63 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
64 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
65 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNamedModManager;
67 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
68 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
69 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
70 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > GetModuleManager();
71 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetNamedModuleManager();
74 public:
75 SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
77 sal_Bool GUIStoreModel(
78 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
79 const ::rtl::OUString& aSlotName,
80 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
81 sal_Bool bPreselectPassword,
82 ::rtl::OUString aUserSelectedName,
83 sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
85 static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter(
86 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery,
87 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest,
88 sal_Int32 nMustFlags,
89 sal_Int32 nDontFlags );
91 static sal_Bool CheckFilterOptionsAppearence(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
93 const ::rtl::OUString& aFilterName );
96 static void SetDocInfoState(
97 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
98 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo>& i_xOldDocInfo,
99 sal_Bool bNoModify );
101 static sal_Bool WarnUnacceptableFormat(
102 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
103 ::rtl::OUString aOldUIName,
104 ::rtl::OUString aDefUIName,
105 sal_Bool bCanProceedFurther );
107 static void ExecuteFilterDialog( SfxStoringHelper& _rStorageHelper
108 ,const ::rtl::OUString& sFilterName
109 ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel
110 ,/*OUT*/::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgsSequence
113 static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
117 #endif