tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / filter / xml / xmlexternaltabi.hxx
blob94fa055745bbb9a6a021141fa1e77257d0fbb39e
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 #pragma once
22 #include <rtl/ustrbuf.hxx>
23 #include "importcontext.hxx"
25 namespace sax_fastparser { class FastAttributeList; }
27 class ScXMLImport;
28 struct ScXMLExternalTabData;
30 class ScXMLExternalRefTabSourceContext : public ScXMLImportContext
32 public:
33 ScXMLExternalRefTabSourceContext( ScXMLImport& rImport,
34 const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
35 ScXMLExternalTabData& rRefInfo );
37 virtual ~ScXMLExternalRefTabSourceContext() override;
39 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
41 private:
42 ScXMLExternalTabData& mrExternalRefInfo;
44 OUString maRelativeUrl;
45 OUString maFilterName;
46 OUString maFilterOptions;
49 class ScXMLExternalRefRowsContext : public ScXMLImportContext
51 public:
52 ScXMLExternalRefRowsContext( ScXMLImport& rImport,
53 ScXMLExternalTabData& rRefInfo );
55 virtual ~ScXMLExternalRefRowsContext() override;
57 virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
58 sal_Int32 nElement,
59 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
61 private:
62 ScXMLExternalTabData& mrExternalRefInfo;
65 class ScXMLExternalRefRowContext : public ScXMLImportContext
67 public:
68 ScXMLExternalRefRowContext( ScXMLImport& rImport,
69 const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
70 ScXMLExternalTabData& rRefInfo );
72 virtual ~ScXMLExternalRefRowContext() override;
74 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
76 virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
77 sal_Int32 nElement,
78 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
80 private:
81 ScXMLImport& mrScImport;
82 ScXMLExternalTabData& mrExternalRefInfo;
83 sal_Int32 mnRepeatRowCount;
86 class ScXMLExternalRefCellContext : public ScXMLImportContext
88 public:
89 ScXMLExternalRefCellContext( ScXMLImport& rImport,
90 const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
91 ScXMLExternalTabData& rRefInfo );
93 virtual ~ScXMLExternalRefCellContext() override;
95 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
97 virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(
98 sal_Int32 nElement,
99 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
101 void SetCellString(const OUString& rStr);
103 private:
104 ScXMLImport& mrScImport;
105 ScXMLExternalTabData& mrExternalRefInfo;
106 OUString maCellString;
107 double mfCellValue;
108 sal_Int32 mnRepeatCount;
109 sal_Int32 mnNumberFormat;
110 sal_Int16 mnCellType; // TODO: import to document core
111 bool mbIsNumeric;
112 bool mbIsEmpty;
115 class ScXMLExternalRefCellTextContext : public ScXMLImportContext
117 public:
118 ScXMLExternalRefCellTextContext( ScXMLImport& rImport,
119 ScXMLExternalRefCellContext& rParent );
121 virtual ~ScXMLExternalRefCellTextContext() override;
123 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
124 virtual void SAL_CALL characters( const OUString& rChars ) override;
126 private:
127 ScXMLExternalRefCellContext& mrParent;
129 OUStringBuffer maCellStrBuf;
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */