xref: /AOO41X/main/sc/inc/xmlwrap.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_XMLWRAP_HXX
25 #define SC_XMLWRAP_HXX
26 
27 #include <tools/solar.h>
28 #include <com/sun/star/uno/Reference.hxx>
29 #include <com/sun/star/uno/Sequence.hxx>
30 
31 class ScDocument;
32 class SfxMedium;
33 class ScMySharedData;
34 
35 #include <tools/errcode.hxx>
36 
37 namespace com { namespace sun { namespace star {
38     namespace beans { struct PropertyValue; }
39     namespace frame { class XModel; }
40     namespace task { class XStatusIndicator; }
41     namespace lang { class XMultiServiceFactory; }
42     namespace uno { class XInterface; }
43     namespace embed { class XStorage; }
44     namespace xml {
45         namespace sax { struct InputSource; } }
46 } } }
47 
48 class ScXMLImportWrapper
49 {
50     ScDocument&     rDoc;
51     SfxMedium*      pMedium;
52     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xStorage;
53 
54 //UNUSED2008-05  com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator(
55 //UNUSED2008-05      com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel);
56     com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator();
57 
58     sal_uInt32 ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
59         com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
60         com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xXMLParser,
61         com::sun::star::xml::sax::InputSource& aParserInput,
62         const rtl::OUString& sComponentName, const rtl::OUString& sDocName, const rtl::OUString& sOldDocName,
63         com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
64         sal_Bool bMustBeSuccessfull);
65 
66     sal_Bool ExportToComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory,
67         com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel,
68         com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xWriter,
69         com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aDescriptor,
70         const rtl::OUString& sName, const rtl::OUString& sMediaType, const rtl::OUString& sComponentName,
71         const sal_Bool bPlainText, com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs,
72         ScMySharedData*& pSharedData);
73 
74 public:
75     ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&);
76     sal_Bool Import(sal_Bool bStylesOnly, ErrCode& );
77     sal_Bool Export(sal_Bool bStylesOnly);
78 };
79 
80 #endif
81 
82