Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef SC_XMLWRAP_HXX
21 : #define SC_XMLWRAP_HXX
22 :
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>
27 :
28 : class ScDocument;
29 : class SfxMedium;
30 : class ScMySharedData;
31 :
32 : #include <tools/errcode.hxx>
33 :
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 : } } }
44 :
45 83 : class ScXMLImportWrapper
46 : {
47 : ScDocument& rDoc;
48 : SfxMedium* pMedium;
49 : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
50 :
51 : com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
52 :
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);
60 :
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);
68 :
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);
73 : };
74 :
75 0 : class ScXMLChartExportWrapper
76 : {
77 : public:
78 : ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
79 : bool Export();
80 :
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;
85 : };
86 :
87 : #endif
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|