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 <vcl/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 enum class ImportFlags
{
52 All
= Styles
| Content
| Metadata
| Settings
56 template<> struct typed_flags
<ImportFlags
> : is_typed_flags
<ImportFlags
, 0x0f> {};
60 class ScXMLImportWrapper
62 sc::ImportPostProcessData maPostProcessData
;
64 ScDocShell
& mrDocShell
;
67 css::uno::Reference
< css::embed::XStorage
> xStorage
;
69 css::uno::Reference
< css::task::XStatusIndicator
> GetStatusIndicator();
71 ErrCode
ImportFromComponent(const css::uno::Reference
<css::uno::XComponentContext
>& xContext
,
72 const css::uno::Reference
<css::frame::XModel
>& xModel
,
73 const css::uno::Reference
<css::xml::sax::XParser
>& xParser
,
74 css::xml::sax::InputSource
& aParserInput
,
75 const OUString
& sComponentName
, const OUString
& sDocName
, const OUString
& sOldDocName
,
76 const css::uno::Sequence
<css::uno::Any
>& aArgs
,
77 bool bMustBeSuccessfull
);
79 bool ExportToComponent(const css::uno::Reference
<css::uno::XComponentContext
>& xContext
,
80 const css::uno::Reference
<css::frame::XModel
>& xModel
,
81 const css::uno::Reference
<css::xml::sax::XWriter
>& xWriter
,
82 const css::uno::Sequence
<css::beans::PropertyValue
>& aDescriptor
,
83 const OUString
& sName
, const OUString
& sMediaType
, const OUString
& sComponentName
,
84 const css::uno::Sequence
<css::uno::Any
>& aArgs
,
85 ScMySharedData
*& pSharedData
);
90 ScDocShell
& rDocSh
, SfxMedium
* pM
, const css::uno::Reference
<css::embed::XStorage
>& xStor
);
92 bool Import( ImportFlags nMode
, ErrCode
& rError
);
93 bool Export(bool bStylesOnly
);
95 const sc::ImportPostProcessData
& GetImportPostProcessData() const { return maPostProcessData
;}
98 class ScXMLChartExportWrapper
101 ScXMLChartExportWrapper( css::uno::Reference
< css::frame::XModel
> const & xModel
, SfxMedium
& rMed
);
105 css::uno::Reference
< css::frame::XModel
> mxModel
;
106 css::uno::Reference
< css::embed::XStorage
> mxStorage
;
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */