LibreOffice Module sc (master)  1
XMLDDELinksContext.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_XMLDDELINKSCONTEXT_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLDDELINKSCONTEXT_HXX
22 
23 #include "importcontext.hxx"
24 #include <vector>
25 
26 namespace sax_fastparser { class FastAttributeList; }
27 
29 {
30 public:
32 
33  virtual ~ScXMLDDELinksContext() override;
34 
35  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
36  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
37 };
38 
40 {
41  OUString sValue;
42  double fValue;
43  bool bString;
44  bool bEmpty;
45 };
46 
47 typedef std::vector<ScDDELinkCell> ScDDELinkCells;
48 
50 {
53  OUString sApplication;
54  OUString sTopic;
55  OUString sItem;
56  sal_Int32 nPosition;
57  sal_Int32 nColumns;
58  sal_Int32 nRows;
60 
61 public:
63 
64  virtual ~ScXMLDDELinkContext() override;
65 
66  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
67  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
68 
69  void SetApplication(const OUString& sValue) { sApplication = sValue; }
70  void SetTopic(const OUString& sValue) { sTopic = sValue; }
71  void SetItem(const OUString& sValue) { sItem = sValue; }
72  void SetMode(const sal_uInt8 nValue) { nMode = nValue; }
73  void CreateDDELink();
74  void AddColumns(const sal_Int32 nValue) { nColumns += nValue; }
75  void AddRows(const sal_Int32 nValue) { nRows += nValue; }
76  void AddCellToRow(const ScDDELinkCell& aCell);
77  void AddRowsToTable(const sal_Int32 nRows);
78 
79  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
80 };
81 
83 {
85 
86 public:
89  ScXMLDDELinkContext* pDDELink);
90 
91  virtual ~ScXMLDDESourceContext() override;
92 
93  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
94 };
95 
97 {
99 
100 public:
102  ScXMLDDELinkContext* pDDELink);
103 
104  virtual ~ScXMLDDETableContext() override;
105 
106  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
107  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
108 };
109 
111 {
112 public:
115  ScXMLDDELinkContext* pDDELink);
116 
117  virtual ~ScXMLDDEColumnContext() override;
118 };
119 
121 {
123  sal_Int32 nRows;
124 
125 public:
128  ScXMLDDELinkContext* pDDELink);
129 
130  virtual ~ScXMLDDERowContext() override;
131 
132  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
133  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
134 
135  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
136 };
137 
139 {
140  OUString sValue;
141  double fValue;
142  sal_Int32 nCells;
143  bool bString;
144  bool bString2;
145  bool bEmpty;
146 
148 
149 public:
152  ScXMLDDELinkContext* pDDELink);
153 
154  virtual ~ScXMLDDECellContext() override;
155 
156  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
157 };
158 
159 #endif
160 
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AddColumns(const sal_Int32 nValue)
ScXMLDDESourceContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
ScDDELinkCells aDDELinkTable
void SetTopic(const OUString &sValue)
virtual ~ScXMLDDESourceContext() override
ScXMLDDETableContext(ScXMLImport &rImport, ScXMLDDELinkContext *pDDELink)
ScXMLDDELinkContext(ScXMLImport &rImport)
virtual ~ScXMLDDELinksContext() override
ScXMLDDELinksContext(ScXMLImport &rImport)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLDDERowContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDEColumnContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLDDELinkContext * pDDELink
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLDDECellContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
void AddCellToRow(const ScDDELinkCell &aCell)
ScDDELinkCells aDDELinkRow
This class exists only to provide GetScImport() to its derived classes.
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDECellContext() override
virtual ~ScXMLDDELinkContext() override
void SetItem(const OUString &sValue)
ScXMLDDEColumnContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual ~ScXMLDDETableContext() override
unsigned char sal_uInt8
void SetMode(const sal_uInt8 nValue)
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDERowContext() override
void AddRowsToTable(const sal_Int32 nRows)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void SetApplication(const OUString &sValue)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
void AddRows(const sal_Int32 nValue)
std::vector< ScDDELinkCell > ScDDELinkCells