Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / sc / inc / xmlwrap.hxx
blob8bb78af88f8c145e4cd7e24473558854555d8b04
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_INC_XMLWRAP_HXX
21 #define INCLUDED_SC_INC_XMLWRAP_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <com/sun/star/frame/XModel.hpp>
26 #include "importfilterdata.hxx"
27 #include <sal/types.h>
29 class ScDocument;
30 class SfxMedium;
31 class ScMySharedData;
33 #include <tools/errcode.hxx>
35 namespace com { namespace sun { namespace star {
36 namespace beans { struct PropertyValue; }
37 namespace frame { class XModel; }
38 namespace task { class XStatusIndicator; }
39 namespace lang { class XMultiServiceFactory; }
40 namespace uno { class XInterface; }
41 namespace embed { class XStorage; }
42 namespace xml {
43 namespace sax { struct InputSource; class XParser; class XWriter; } }
44 } } }
46 class ScXMLImportWrapper
48 sc::ImportPostProcessData maPostProcessData;
50 ScDocument& rDoc;
51 SfxMedium* pMedium;
52 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
54 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
56 sal_uInt32 ImportFromComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
57 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
58 com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser>& xParser,
59 com::sun::star::xml::sax::InputSource& aParserInput,
60 const OUString& sComponentName, const OUString& sDocName, const OUString& sOldDocName,
61 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
62 bool bMustBeSuccessfull);
64 bool ExportToComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
65 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
66 com::sun::star::uno::Reference<com::sun::star::xml::sax::XWriter>& xWriter,
67 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
68 const OUString& sName, const OUString& sMediaType, const OUString& sComponentName,
69 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
70 ScMySharedData*& pSharedData);
72 public:
73 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&);
74 bool Import(bool bStylesOnly, ErrCode& );
75 bool Export(bool bStylesOnly);
77 const sc::ImportPostProcessData& GetImportPostProcessData() const;
80 class ScXMLChartExportWrapper
82 public:
83 ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
84 bool Export();
86 private:
87 com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
88 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > mxStorage;
89 SfxMedium& mrMedium;
92 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */