LibreOffice Module sc (master) 1
celltextparacontext.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
10#pragma once
11
12#include "importcontext.hxx"
13
14class ScXMLImport;
16
21{
23 OUString maContent;
24public:
26
27 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
28 virtual void SAL_CALL characters( const OUString& aChars ) override;
29 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
30 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
31
32 void PushSpan(std::u16string_view aSpan, const OUString& rStyleName);
33 void PushFieldSheetName(const OUString& rStyleName);
34 void PushFieldDate(const OUString& rStyleName);
35 void PushFieldTitle(const OUString& rStyleName);
36 void PushFieldURL(const OUString& rURL, const OUString& rRep, const OUString& rStyleName, const OUString& rTargetFrame);
37};
38
43{
45 OUString maStyleName;
46 OUString maContent;
47public:
49
50 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
51 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
52 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
53 virtual void SAL_CALL characters( const OUString& aChars ) override;
54 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
55 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
57};
58
63{
65 OUString maStyleName;
66public:
68
69 void SetStyleName(const OUString& rStyleName);
70
71 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
72};
73
78{
80 OUString maStyleName;
81public:
83
84 void SetStyleName(const OUString& rStyleName);
85
86 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
87};
88
93{
95 OUString maStyleName;
96public:
98
99 void SetStyleName(const OUString& rStyleName);
100
101 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
102};
103
108{
110 OUString maStyleName;
111 OUString maURL;
112 OUString maRep;
114public:
116
117 void SetStyleName(const OUString& rStyleName);
118
119 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
120 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
121 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
122 virtual void SAL_CALL characters( const OUString& aChars ) override;
123};
124
129{
131 OUString maStyleName;
132 sal_Int32 mnCount;
133
134 void PushSpaces();
135public:
137
138 void SetStyleName(const OUString& rStyleName);
139
140 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
141 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
142 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
143 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
144 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
145};
146
151{
154 OUString maRubyText;
155public:
157
158 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
159 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
160 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
161 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
162};
163
168{
170public:
172 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
173 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
174};
175
180{
181 OUString& mrRubyText;
183public:
184 ScXMLCellRubyTextContext(ScXMLImport& rImport, OUString& rRubyText, OUString& rRubyTextStyle);
185
186 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
187 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
188 virtual void SAL_CALL characters( const OUString& aChars ) override;
189};
190
191/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This context handles <text:date> element inside <text:p>.
void SetStyleName(const OUString &rStyleName)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLCellFieldDateContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
ScXMLCellTextParaContext & mrParentCxt
This context handles <text:s> element inside <text:p> or <text:span>.
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLCellFieldSContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void SetStyleName(const OUString &rStyleName)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLCellTextParaContext & mrParentCxt
This context handles <text:sheet-name> element inside <text:p>.
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLCellFieldSheetNameContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
ScXMLCellTextParaContext & mrParentCxt
void SetStyleName(const OUString &rStyleName)
This context handles <text:title> element inside <text:p>.
ScXMLCellTextParaContext & mrParentCxt
void SetStyleName(const OUString &rStyleName)
ScXMLCellFieldTitleContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
This context handles <text:a> element inside <text:p> or <text:span>.
virtual void SAL_CALL characters(const OUString &aChars) override
ScXMLCellFieldURLContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLCellTextParaContext & mrParentCxt
void SetStyleName(const OUString &rStyleName)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
This context handles <text:ruby-base> element inside <text:ruby>.
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLCellTextParaContext & mrParentCxt
ScXMLCellRubyBaseContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
This context handles <text:ruby-text> element inside <text:ruby>.
ScXMLCellRubyTextContext(ScXMLImport &rImport, OUString &rRubyText, OUString &rRubyTextStyle)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL characters(const OUString &aChars) override
This context handles <text:p> element inside <table:table-cell>.
void PushFieldTitle(const OUString &rStyleName)
void PushFieldURL(const OUString &rURL, const OUString &rRep, const OUString &rStyleName, const OUString &rTargetFrame)
void PushFieldSheetName(const OUString &rStyleName)
virtual void SAL_CALL characters(const OUString &aChars) 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 PushSpan(std::u16string_view aSpan, const OUString &rStyleName)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
void PushFieldDate(const OUString &rStyleName)
ScXMLCellTextParaContext(ScXMLImport &rImport, ScXMLTableRowCellContext &rParent)
ScXMLTableRowCellContext & mrParentCxt
This context handles <text:ruby> element inside <text:p>.
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLCellTextRubyContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLCellTextParaContext & mrParentCxt
This context handles <text:span> element inside <text:p>.
ScXMLCellTextParaContext & mrParentCxt
ScXMLCellTextSpanContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
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 void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL characters(const OUString &aChars) override
This class exists only to provide GetScImport() to its derived classes.