nss: upgrade to release 3.73
[LibreOffice.git] / sc / source / filter / xml / celltextparacontext.hxx
blob3758bdba5bba9f4f5407f7235873082fa6478cf6
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/.
8 */
10 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_CELLTEXTPARACONTEXT_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_XML_CELLTEXTPARACONTEXT_HXX
13 #include "importcontext.hxx"
15 class ScXMLImport;
16 class ScXMLTableRowCellContext;
18 /**
19 * This context handles <text:p> element inside <table:table-cell>.
21 class ScXMLCellTextParaContext : public ScXMLImportContext
23 ScXMLTableRowCellContext& mrParentCxt;
24 OUString maContent;
25 public:
26 ScXMLCellTextParaContext(ScXMLImport& rImport, ScXMLTableRowCellContext& rParent);
28 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
29 virtual void SAL_CALL characters( const OUString& aChars ) override;
30 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
31 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
33 void PushSpan(const OUString& rSpan, const OUString& rStyleName);
34 void PushFieldSheetName(const OUString& rStyleName);
35 void PushFieldDate(const OUString& rStyleName);
36 void PushFieldTitle(const OUString& rStyleName);
37 void PushFieldURL(const OUString& rURL, const OUString& rRep, const OUString& rStyleName, const OUString& rTargetFrame);
40 /**
41 * This context handles <text:span> element inside <text:p>.
43 class ScXMLCellTextSpanContext : public ScXMLImportContext
45 ScXMLCellTextParaContext& mrParentCxt;
46 OUString maStyleName;
47 OUString maContent;
48 public:
49 ScXMLCellTextSpanContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
51 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
52 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
53 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
54 virtual void SAL_CALL characters( const OUString& aChars ) override;
55 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
56 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
57 void submitContentAndClear();
60 /**
61 * This context handles <text:sheet-name> element inside <text:p>.
63 class ScXMLCellFieldSheetNameContext : public ScXMLImportContext
65 ScXMLCellTextParaContext& mrParentCxt;
66 OUString maStyleName;
67 public:
68 ScXMLCellFieldSheetNameContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
70 void SetStyleName(const OUString& rStyleName);
72 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
75 /**
76 * This context handles <text:date> element inside <text:p>.
78 class ScXMLCellFieldDateContext : public ScXMLImportContext
80 ScXMLCellTextParaContext& mrParentCxt;
81 OUString maStyleName;
82 public:
83 ScXMLCellFieldDateContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
85 void SetStyleName(const OUString& rStyleName);
87 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
90 /**
91 * This context handles <text:title> element inside <text:p>.
93 class ScXMLCellFieldTitleContext : public ScXMLImportContext
95 ScXMLCellTextParaContext& mrParentCxt;
96 OUString maStyleName;
97 public:
98 ScXMLCellFieldTitleContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
100 void SetStyleName(const OUString& rStyleName);
102 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
106 * This context handles <text:a> element inside <text:p> or <text:span>.
108 class ScXMLCellFieldURLContext : public ScXMLImportContext
110 ScXMLCellTextParaContext& mrParentCxt;
111 OUString maStyleName;
112 OUString maURL;
113 OUString maRep;
114 OUString maTargetFrame;
115 public:
116 ScXMLCellFieldURLContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
118 void SetStyleName(const OUString& rStyleName);
120 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
121 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
122 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
123 virtual void SAL_CALL characters( const OUString& aChars ) override;
127 * This context handles <text:s> element inside <text:p> or <text:span>.
129 class ScXMLCellFieldSContext : public ScXMLImportContext
131 ScXMLCellTextParaContext& mrParentCxt;
132 OUString maStyleName;
133 sal_Int32 mnCount;
135 void PushSpaces();
136 public:
137 ScXMLCellFieldSContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
139 void SetStyleName(const OUString& rStyleName);
141 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
142 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
143 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
144 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
145 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
149 * This context handles <text:ruby> element inside <text:p>.
151 class ScXMLCellTextRubyContext : public ScXMLImportContext
153 ScXMLCellTextParaContext& mrParentCxt;
154 OUString maRubyStyleName;
155 OUString maRubyTextStyle;
156 OUString maRubyText;
157 public:
158 ScXMLCellTextRubyContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
160 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
161 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
162 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
163 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
167 * This context handles <text:ruby-base> element inside <text:ruby>.
169 class ScXMLCellRubyBaseContext : public ScXMLCellTextSpanContext
171 ScXMLCellTextParaContext& mrParentCxt;
172 public:
173 ScXMLCellRubyBaseContext(ScXMLImport& rImport, ScXMLCellTextParaContext& rParent);
174 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
175 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
179 * This context handles <text:ruby-text> element inside <text:ruby>.
181 class ScXMLCellRubyTextContext : public ScXMLImportContext
183 OUString& mrRubyText;
184 OUString& mrRubyTextStyle;
185 public:
186 ScXMLCellRubyTextContext(ScXMLImport& rImport, OUString& rRubyText, OUString& rRubyTextStyle);
188 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
189 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
190 virtual void SAL_CALL characters( const OUString& aChars ) override;
192 #endif
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */