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 #pragma once
21 
22 #include <rtl/ustrbuf.hxx>
23 #include "importcontext.hxx"
24 
25 namespace sax_fastparser { class FastAttributeList; }
26 
27 class ScXMLImport;
29 
31 {
32 public:
35  ScXMLExternalTabData& rRefInfo );
36 
37  virtual ~ScXMLExternalRefTabSourceContext() override;
38 
39  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
40 
41 private:
43 
44  OUString maRelativeUrl;
45  OUString maFilterName;
46  OUString maFilterOptions;
47 };
48 
50 {
51 public:
53  ScXMLExternalTabData& rRefInfo );
54 
55  virtual ~ScXMLExternalRefRowsContext() override;
56 
57  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
58  sal_Int32 nElement,
59  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
60 
61 private:
63 };
64 
66 {
67 public:
70  ScXMLExternalTabData& rRefInfo );
71 
72  virtual ~ScXMLExternalRefRowContext() override;
73 
74  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
75 
76  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
77  sal_Int32 nElement,
78  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
79 
80 private:
83  sal_Int32 mnRepeatRowCount;
84 };
85 
87 {
88 public:
91  ScXMLExternalTabData& rRefInfo );
92 
93  virtual ~ScXMLExternalRefCellContext() override;
94 
95  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
96 
97  virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
98  sal_Int32 nElement,
99  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
100 
101  void SetCellString(const OUString& rStr);
102 
103 private:
106  OUString maCellString;
107  double mfCellValue;
108  sal_Int32 mnRepeatCount;
109  sal_Int32 mnNumberFormat;
110  sal_Int16 mnCellType; // TODO: import to document core
112  bool mbIsEmpty;
113 };
114 
116 {
117 public:
119  ScXMLExternalRefCellContext& rParent );
120 
121  virtual ~ScXMLExternalRefCellTextContext() override;
122 
123  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
124  virtual void SAL_CALL characters( const OUString& rChars ) override;
125 
126 private:
128 
129  OUStringBuffer maCellStrBuf;
130 };
131 
132 /* 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