xref: /aoo4110/main/sc/source/filter/xml/xmltabi.hxx (revision b1cdbd2c)
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 #ifndef SC_XMLTABI_HXX
24 #define SC_XMLTABI_HXX
25 
26 #include "externalrefmgr.hxx"
27 
28 #include <xmloff/xmlictxt.hxx>
29 #include <memory>
30 
31 class ScXMLImport;
32 
33 struct ScXMLExternalTabData
34 {
35     String maFileUrl;
36     ScExternalRefCache::TableTypeRef mpCacheTable;
37     sal_Int32 mnRow;
38     sal_Int32 mnCol;
39     sal_uInt16 mnFileId;
40 
41     ScXMLExternalTabData();
42 };
43 
44 class ScXMLTableContext : public SvXMLImportContext
45 {
46 	rtl::OUString	sPrintRanges;
47     ::std::auto_ptr<ScXMLExternalTabData> pExternalRefInfo;
48     sal_Int32       nStartOffset;
49 	sal_Bool		bStartFormPage;
50     sal_Bool        bPrintEntireSheet;
51 
GetScImport() const52 	const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
GetScImport()53 	ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
54 
55 public:
56 
57 	ScXMLTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
58 						const ::rtl::OUString& rLName,
59 						const ::com::sun::star::uno::Reference<
60 										::com::sun::star::xml::sax::XAttributeList>& xAttrList,
61 						const sal_Bool bTempIsSubTable = sal_False,
62 						const sal_Int32 nSpannedCols = 0);
63 
64 	virtual ~ScXMLTableContext();
65 
66 	virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
67 									 const ::rtl::OUString& rLocalName,
68 									 const ::com::sun::star::uno::Reference<
69 									  	::com::sun::star::xml::sax::XAttributeList>& xAttrList );
70 
71 	virtual void EndElement();
72 };
73 
74 #endif
75