Update ooo320-m1
[ooovba.git] / sc / inc / xmlwrap.hxx
blobaffd0137acd2800290d034b19f50185afdd141ee
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.16.32.2 $
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 SC_XMLWRAP_HXX
32 #define SC_XMLWRAP_HXX
34 #include <tools/solar.h>
35 #include <com/sun/star/uno/Reference.hxx>
36 #include <com/sun/star/uno/Sequence.hxx>
38 class ScDocument;
39 class SfxMedium;
40 class ScMySharedData;
42 #include <tools/errcode.hxx>
44 namespace com { namespace sun { namespace star {
45 namespace beans { struct PropertyValue; }
46 namespace frame { class XModel; }
47 namespace task { class XStatusIndicator; }
48 namespace lang { class XMultiServiceFactory; }
49 namespace uno { class XInterface; }
50 namespace embed { class XStorage; }
51 namespace xml {
52 namespace sax { struct InputSource; } }
53 } } }
55 class ScXMLImportWrapper
57 ScDocument& rDoc;
58 SfxMedium* pMedium;
59 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
61 //UNUSED2008-05 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator(
62 //UNUSED2008-05 com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel);
63 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
65 sal_uInt32 ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
66 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
67 com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xXMLParser,
68 com::sun::star::xml::sax::InputSource& aParserInput,
69 const rtl::OUString& sComponentName, const rtl::OUString& sDocName, const rtl::OUString& sOldDocName,
70 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
71 sal_Bool bMustBeSuccessfull);
73 sal_Bool ExportToComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
74 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
75 com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xWriter,
76 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
77 const rtl::OUString& sName, const rtl::OUString& sMediaType, const rtl::OUString& sComponentName,
78 const sal_Bool bPlainText, com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
79 ScMySharedData*& pSharedData);
81 public:
82 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&);
83 BOOL Import(sal_Bool bStylesOnly, ErrCode& );
84 BOOL Export(sal_Bool bStylesOnly);
87 #endif