bump product version to 4.1.6.2
[LibreOffice.git] / sc / inc / xmlwrap.hxx
blobfb7b15681137fadafacc4b55db64a2d910a39218
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 SC_XMLWRAP_HXX
21 #define SC_XMLWRAP_HXX
23 #include <tools/solar.h>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <com/sun/star/uno/Sequence.hxx>
26 #include <com/sun/star/frame/XModel.hpp>
28 class ScDocument;
29 class SfxMedium;
30 class ScMySharedData;
32 #include <tools/errcode.hxx>
34 namespace com { namespace sun { namespace star {
35 namespace beans { struct PropertyValue; }
36 namespace frame { class XModel; }
37 namespace task { class XStatusIndicator; }
38 namespace lang { class XMultiServiceFactory; }
39 namespace uno { class XInterface; }
40 namespace embed { class XStorage; }
41 namespace xml {
42 namespace sax { struct InputSource; class XParser; class XWriter; } }
43 } } }
45 class ScXMLImportWrapper
47 ScDocument& rDoc;
48 SfxMedium* pMedium;
49 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
51 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
53 sal_uInt32 ImportFromComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
54 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
55 com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser>& xParser,
56 com::sun::star::xml::sax::InputSource& aParserInput,
57 const OUString& sComponentName, const OUString& sDocName, const OUString& sOldDocName,
58 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
59 sal_Bool bMustBeSuccessfull);
61 sal_Bool ExportToComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
62 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
63 com::sun::star::uno::Reference<com::sun::star::xml::sax::XWriter>& xWriter,
64 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
65 const OUString& sName, const OUString& sMediaType, const OUString& sComponentName,
66 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
67 ScMySharedData*& pSharedData);
69 public:
70 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&);
71 sal_Bool Import(sal_Bool bStylesOnly, ErrCode& );
72 sal_Bool Export(sal_Bool bStylesOnly);
75 class ScXMLChartExportWrapper
77 public:
78 ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
79 bool Export();
81 private:
82 com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
83 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > mxStorage;
84 SfxMedium& mrMedium;
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */