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#pragma once
21
22#include "importcontext.hxx"
23#include <vector>
24
25namespace sax_fastparser { class FastAttributeList; }
26
28{
29public:
31
32 virtual ~ScXMLDDELinksContext() override;
33
34 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
35 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
36};
37
39{
40 OUString sValue;
41 double fValue;
42 bool bString;
43 bool bEmpty;
44};
45
46typedef std::vector<ScDDELinkCell> ScDDELinkCells;
47
49{
52 OUString sApplication;
53 OUString sTopic;
54 OUString sItem;
55 sal_Int32 nPosition;
56 sal_Int32 nColumns;
57 sal_Int32 nRows;
59
60public:
62
63 virtual ~ScXMLDDELinkContext() override;
64
65 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
66 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
67
68 void SetApplication(const OUString& sValue) { sApplication = sValue; }
69 void SetTopic(const OUString& sValue) { sTopic = sValue; }
70 void SetItem(const OUString& sValue) { sItem = sValue; }
71 void SetMode(const sal_uInt8 nValue) { nMode = nValue; }
72 void CreateDDELink();
73 void AddColumns(const sal_Int32 nValue) { nColumns += nValue; }
74 void AddRows(const sal_Int32 nValue) { nRows += nValue; }
75 void AddCellToRow(const ScDDELinkCell& aCell);
76 void AddRowsToTable(const sal_Int32 nRows);
77
78 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
79};
80
82{
84
85public:
89
90 virtual ~ScXMLDDESourceContext() override;
91
92 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
93};
94
96{
98
99public:
102
103 virtual ~ScXMLDDETableContext() override;
104
105 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
106 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
107};
108
110{
111public:
114 ScXMLDDELinkContext* pDDELink);
115
116 virtual ~ScXMLDDEColumnContext() override;
117};
118
120{
122 sal_Int32 nRows;
123
124public:
128
129 virtual ~ScXMLDDERowContext() override;
130
131 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
132 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
133
134 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
135};
136
138{
139 OUString sValue;
140 double fValue;
141 sal_Int32 nCells;
144 bool bEmpty;
145
147
148public:
152
153 virtual ~ScXMLDDECellContext() override;
154
155 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
156};
157
158/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< ScDDELinkCell > ScDDELinkCells
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDECellContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLDDECellContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
ScXMLDDEColumnContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual ~ScXMLDDEColumnContext() override
void SetApplication(const OUString &sValue)
void AddRowsToTable(const sal_Int32 nRows)
void SetTopic(const OUString &sValue)
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 SetItem(const OUString &sValue)
ScDDELinkCells aDDELinkTable
void AddCellToRow(const ScDDELinkCell &aCell)
void AddColumns(const sal_Int32 nValue)
ScDDELinkCells aDDELinkRow
virtual ~ScXMLDDELinkContext() override
void AddRows(const sal_Int32 nValue)
ScXMLDDELinkContext(ScXMLImport &rImport)
void SetMode(const sal_uInt8 nValue)
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
virtual ~ScXMLDDELinksContext() override
ScXMLDDELinksContext(ScXMLImport &rImport)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual ~ScXMLDDERowContext() 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
ScXMLDDERowContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual ~ScXMLDDESourceContext() override
ScXMLDDESourceContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
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
ScXMLDDETableContext(ScXMLImport &rImport, ScXMLDDELinkContext *pDDELink)
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDETableContext() override
This class exists only to provide GetScImport() to its derived classes.
sal_Int16 nValue
unsigned char sal_uInt8