LibreOffice Module sc (master)  1
xmlexternaltabi.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLEXTERNALTABI_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLEXTERNALTABI_HXX
22 
23 #include <rtl/ustrbuf.hxx>
24 #include "importcontext.hxx"
25 
26 namespace sax_fastparser { class FastAttributeList; }
27 
28 class ScXMLImport;
30 
32 {
33 public:
36  ScXMLExternalTabData& rRefInfo );
37 
38  virtual ~ScXMLExternalRefTabSourceContext() override;
39 
40  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
41 
42 private:
44 
45  OUString maRelativeUrl;
46  OUString maFilterName;
47  OUString maFilterOptions;
48 };
49 
51 {
52 public:
54  ScXMLExternalTabData& rRefInfo );
55 
56  virtual ~ScXMLExternalRefRowsContext() override;
57 
58  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
59  sal_Int32 nElement,
60  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
61 
62 private:
64 };
65 
67 {
68 public:
71  ScXMLExternalTabData& rRefInfo );
72 
73  virtual ~ScXMLExternalRefRowContext() override;
74 
75  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
76 
77  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
78  sal_Int32 nElement,
79  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
80 
81 private:
84  sal_Int32 mnRepeatRowCount;
85 };
86 
88 {
89 public:
92  ScXMLExternalTabData& rRefInfo );
93 
94  virtual ~ScXMLExternalRefCellContext() override;
95 
96  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
97 
98  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
99  sal_Int32 nElement,
100  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
101 
102  void SetCellString(const OUString& rStr);
103 
104 private:
107  OUString maCellString;
108  double mfCellValue;
109  sal_Int32 mnRepeatCount;
110  sal_Int32 mnNumberFormat;
111  sal_Int16 mnCellType; // TODO: import to document core
113  bool mbIsEmpty;
114 };
115 
117 {
118 public:
120  ScXMLExternalRefCellContext& rParent );
121 
122  virtual ~ScXMLExternalRefCellTextContext() override;
123 
124  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
125  virtual void SAL_CALL characters( const OUString& rChars ) override;
126 
127 private:
129 
130  OUStringBuffer maCellStrBuf;
131 };
132 
133 #endif
134 
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~ScXMLExternalRefRowsContext() override
ScXMLExternalRefCellContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLExternalTabData &rRefInfo)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLExternalRefTabSourceContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLExternalTabData &rRefInfo)
ScXMLExternalRefCellContext & mrParent
ScXMLExternalRefCellTextContext(ScXMLImport &rImport, ScXMLExternalRefCellContext &rParent)
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLExternalTabData & mrExternalRefInfo
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL characters(const OUString &rChars) override
ScXMLExternalRefRowContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLExternalTabData &rRefInfo)
virtual ~ScXMLExternalRefTabSourceContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
This class exists only to provide GetScImport() to its derived classes.
ScXMLExternalTabData & mrExternalRefInfo
virtual ~ScXMLExternalRefCellTextContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual ~ScXMLExternalRefCellContext() override
void SetCellString(const OUString &rStr)
ScXMLExternalRefRowsContext(ScXMLImport &rImport, ScXMLExternalTabData &rRefInfo)
ScXMLExternalTabData & mrExternalRefInfo
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLExternalTabData & mrExternalRefInfo
virtual ~ScXMLExternalRefRowContext() override