xref: /aoo42x/main/sfx2/inc/guisaveas.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SFX_GUISAVEAS_HXX_
25cdf0e10cSrcweir #define _SFX_GUISAVEAS_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
28cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
30cdf0e10cSrcweir #include <com/sun/star/beans/NamedValue.hpp>
31cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
32cdf0e10cSrcweir #include <com/sun/star/container/XContainerQuery.hpp>
33cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
34cdf0e10cSrcweir #include <com/sun/star/frame/XModuleManager.hpp>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <comphelper/sequenceashashmap.hxx>
37cdf0e10cSrcweir #include <sfx2/signaturestate.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir namespace com { namespace sun { namespace star {
41cdf0e10cSrcweir     namespace document {
42cdf0e10cSrcweir         class XDocumentInfo;
43cdf0e10cSrcweir     }
44cdf0e10cSrcweir } } }
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class Window;
47cdf0e10cSrcweir class ModelData_Impl;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SfxStoringHelper
50cdf0e10cSrcweir {
51cdf0e10cSrcweir 	friend class ModelData_Impl;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir private:
54cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
55cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
56cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
57cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
58cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNamedModManager;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
61cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
62cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
63cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > GetModuleManager();
64cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetNamedModuleManager();
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 
67cdf0e10cSrcweir public:
68cdf0e10cSrcweir 	SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
69cdf0e10cSrcweir 
70cdf0e10cSrcweir 	sal_Bool GUIStoreModel(
71cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
72cdf0e10cSrcweir 					const ::rtl::OUString& aSlotName,
73cdf0e10cSrcweir 					::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
74cdf0e10cSrcweir                     sal_Bool bPreselectPassword,
75cdf0e10cSrcweir                     ::rtl::OUString aUserSelectedName,
76cdf0e10cSrcweir                     sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES );
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	static sal_Bool CheckFilterOptionsAppearence(
79cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
80cdf0e10cSrcweir 					const ::rtl::OUString& aFilterName );
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	static void SetDocInfoState(
84cdf0e10cSrcweir         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
85cdf0e10cSrcweir         const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo>& i_xOldDocInfo,
86cdf0e10cSrcweir         sal_Bool bNoModify );
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 	static sal_Bool WarnUnacceptableFormat(
89cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
90cdf0e10cSrcweir 									::rtl::OUString aOldUIName,
91cdf0e10cSrcweir 									::rtl::OUString aDefUIName,
92cdf0e10cSrcweir 									sal_Bool bCanProceedFurther );
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 	static void ExecuteFilterDialog( SfxStoringHelper& _rStorageHelper
95cdf0e10cSrcweir 									,const ::rtl::OUString& sFilterName
96cdf0e10cSrcweir 									,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel
97cdf0e10cSrcweir 									,/*OUT*/::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgsSequence
98cdf0e10cSrcweir 								);
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 	static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
101cdf0e10cSrcweir 
102cdf0e10cSrcweir };
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #endif
105cdf0e10cSrcweir 
106