update dev300-m58
[ooovba.git] / sfx2 / inc / guisaveas.hxx
blob13ac7a2350b1cb295aa37e83000ec349bca92a7c
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>
46 namespace com { namespace sun { namespace star {
47 namespace document {
48 class XDocumentInfo;
50 } } }
52 class Window;
53 class ModelData_Impl;
55 class SfxStoringHelper
57 friend class ModelData_Impl;
59 private:
60 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
61 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterCFG;
62 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > m_xFilterQuery;
63 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
64 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNamedModManager;
66 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
67 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterConfiguration();
68 ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > GetFilterQuery();
69 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > GetModuleManager();
70 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetNamedModuleManager();
73 public:
74 SfxStoringHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
76 sal_Bool GUIStoreModel(
77 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
78 const ::rtl::OUString& aSlotName,
79 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsSequence,
80 sal_Bool bPreselectPassword,
81 ::rtl::OUString aUserSelectedName );
83 static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter(
84 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery,
85 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest,
86 sal_Int32 nMustFlags,
87 sal_Int32 nDontFlags );
89 static sal_Bool CheckFilterOptionsAppearence(
90 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
91 const ::rtl::OUString& aFilterName );
94 static void SetDocInfoState(
95 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
96 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo>& i_xOldDocInfo,
97 sal_Bool bNoModify );
99 static sal_Bool WarnUnacceptableFormat(
100 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel,
101 ::rtl::OUString aOldUIName,
102 ::rtl::OUString aDefUIName,
103 sal_Bool bCanProceedFurther );
105 static void ExecuteFilterDialog( SfxStoringHelper& _rStorageHelper
106 ,const ::rtl::OUString& sFilterName
107 ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel
108 ,/*OUT*/::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgsSequence
111 static Window* GetModelWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
115 #endif