Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sc / xmlwrap.hxx
blob3e6dfc8aa8d5b839673f0216f74211291df242fd
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: xmlwrap.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 namespace com { namespace sun { namespace star {
31 namespace uno { template<class X> class Reference; }
32 namespace frame { class XModel; }
33 namespace task { class XStatusIndicator; }
34 namespace lang { class XMultiServiceFactory; }
35 namespace uno { class XInterface; }
36 namespace xml {
37 namespace sax { struct InputSource; } }
38 } } }
40 #ifndef SC_XMLWRAP_HXX
41 #define SC_XMLWRAP_HXX
42 namespace binfilter {
44 class SvStorage;
45 class ScDocument;
46 class SfxMedium;
47 class ScMySharedData;
49 //STRIP008 namespace com { namespace sun { namespace star {
50 //STRIP008 namespace uno { template<class X> class Reference; }
51 //STRIP008 namespace frame { class XModel; }
52 //STRIP008 namespace task { class XStatusIndicator; }
53 //STRIP008 namespace lang { class XMultiServiceFactory; }
54 //STRIP008 namespace uno { class XInterface; }
55 //STRIP008 namespace xml {
56 //STRIP008 namespace sax { struct InputSource; } }
57 //STRIP008 } } }
59 class ScXMLImportWrapper
61 ScDocument& rDoc;
62 SfxMedium* pMedium;
63 SvStorage* pStorage;
65 ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator> GetStatusIndicator(
66 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel);
67 ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator> GetStatusIndicator();
69 sal_uInt32 ImportFromComponent(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
70 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
71 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xXMLParser,
72 ::com::sun::star::xml::sax::InputSource& aParserInput,
73 const ::rtl::OUString& sComponentName, const ::rtl::OUString& sDocName, const ::rtl::OUString& sOldDocName,
74 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& aArgs,
75 sal_Bool bMustBeSuccessfull);
77 sal_Bool ExportToComponent(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
78 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
79 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xWriter,
80 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aDescriptor,
81 const ::rtl::OUString& sName, const ::rtl::OUString& sMediaType, const ::rtl::OUString& sComponentName,
82 const sal_Bool bPlainText, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& aArgs,
83 ScMySharedData*& pSharedData);
85 public:
86 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, SvStorage* pS);
87 BOOL Import(sal_Bool bStylesOnly);
88 BOOL Export(sal_Bool bStylesOnly);
91 } //namespace binfilter
92 #endif