Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / xmlwrap.hxx
blob107ceb4cfdae2fb47cc4b4f1f97d77ea28b6bf53
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 #include <importfilterdata.hxx>
30 class ScDocument;
31 class SfxMedium;
32 class ScMySharedData;
34 #include <tools/errcode.hxx>
36 namespace com { namespace sun { namespace star {
37 namespace beans { struct PropertyValue; }
38 namespace frame { class XModel; }
39 namespace task { class XStatusIndicator; }
40 namespace lang { class XMultiServiceFactory; }
41 namespace uno { class XInterface; }
42 namespace embed { class XStorage; }
43 namespace xml {
44 namespace sax { struct InputSource; class XParser; class XWriter; } }
45 } } }
47 class ScXMLImportWrapper
49 sc::ImportPostProcessData maPostProcessData;
51 ScDocument& rDoc;
52 SfxMedium* pMedium;
53 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
55 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
57 sal_uInt32 ImportFromComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
58 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
59 com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser>& xParser,
60 com::sun::star::xml::sax::InputSource& aParserInput,
61 const OUString& sComponentName, const OUString& sDocName, const OUString& sOldDocName,
62 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
63 sal_Bool bMustBeSuccessfull);
65 sal_Bool ExportToComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext,
66 com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
67 com::sun::star::uno::Reference<com::sun::star::xml::sax::XWriter>& xWriter,
68 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
69 const OUString& sName, const OUString& sMediaType, const OUString& sComponentName,
70 com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
71 ScMySharedData*& pSharedData);
73 public:
74 ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&);
75 sal_Bool Import(sal_Bool bStylesOnly, ErrCode& );
76 sal_Bool Export(sal_Bool bStylesOnly);
78 const sc::ImportPostProcessData& GetImportPostProcessData() const;
81 class ScXMLChartExportWrapper
83 public:
84 ScXMLChartExportWrapper( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel, SfxMedium& rMed );
85 bool Export();
87 private:
88 com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
89 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > mxStorage;
90 SfxMedium& mrMedium;
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */