1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include <tools/errcode.hxx>
31 namespace com
{ namespace sun
{ namespace star
{
32 namespace beans
{ struct PropertyValue
; }
33 namespace frame
{ class XModel
; }
34 namespace task
{ class XStatusIndicator
; }
35 namespace lang
{ class XMultiServiceFactory
; }
36 namespace uno
{ class XInterface
; }
37 namespace embed
{ class XStorage
; }
39 namespace sax
{ struct InputSource
; class XParser
; class XWriter
; } }
47 class ScXMLImportWrapper
49 sc::ImportPostProcessData maPostProcessData
;
51 ScDocShell
& mrDocShell
;
54 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> xStorage
;
56 com::sun::star::uno::Reference
< com::sun::star::task::XStatusIndicator
> GetStatusIndicator();
58 sal_uInt32
ImportFromComponent(const com::sun::star::uno::Reference
<com::sun::star::uno::XComponentContext
>& xContext
,
59 com::sun::star::uno::Reference
<com::sun::star::frame::XModel
>& xModel
,
60 com::sun::star::uno::Reference
<com::sun::star::xml::sax::XParser
>& xParser
,
61 com::sun::star::xml::sax::InputSource
& aParserInput
,
62 const OUString
& sComponentName
, const OUString
& sDocName
, const OUString
& sOldDocName
,
63 com::sun::star::uno::Sequence
<com::sun::star::uno::Any
>& aArgs
,
64 bool bMustBeSuccessfull
);
66 bool ExportToComponent(const com::sun::star::uno::Reference
<com::sun::star::uno::XComponentContext
>& xContext
,
67 com::sun::star::uno::Reference
<com::sun::star::frame::XModel
>& xModel
,
68 com::sun::star::uno::Reference
<com::sun::star::xml::sax::XWriter
>& xWriter
,
69 com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& aDescriptor
,
70 const OUString
& sName
, const OUString
& sMediaType
, const OUString
& sComponentName
,
71 com::sun::star::uno::Sequence
<com::sun::star::uno::Any
>& aArgs
,
72 ScMySharedData
*& pSharedData
);
76 static const sal_uInt8 STYLES
= 0x01;
77 static const sal_uInt8 CONTENT
= 0x02;
78 static const sal_uInt8 METADATA
= 0x04;
79 static const sal_uInt8 SETTINGS
= 0x08;
80 static const sal_uInt8 ALL
= STYLES
| CONTENT
| METADATA
| SETTINGS
;
83 ScDocShell
& rDocSh
, SfxMedium
* pM
, const css::uno::Reference
<css::embed::XStorage
>& xStor
);
85 bool Import( sal_uInt8 nMode
, ErrCode
& rError
);
86 bool Export(bool bStylesOnly
);
88 const sc::ImportPostProcessData
& GetImportPostProcessData() const { return maPostProcessData
;}
91 class ScXMLChartExportWrapper
94 ScXMLChartExportWrapper( com::sun::star::uno::Reference
< com::sun::star::frame::XModel
> xModel
, SfxMedium
& rMed
);
98 com::sun::star::uno::Reference
< com::sun::star::frame::XModel
> mxModel
;
99 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> mxStorage
;
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */