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 
14 class ScXMLImport;
16 
21 {
23  OUString maContent;
24 public:
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(const OUString& rSpan, 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;
47 public:
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;
56  void submitContentAndClear();
57 };
58 
63 {
65  OUString maStyleName;
66 public:
68 
69  void SetStyleName(const OUString& rStyleName);
70 
71  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
72 };
73 
78 {
80  OUString maStyleName;
81 public:
83 
84  void SetStyleName(const OUString& rStyleName);
85 
86  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
87 };
88 
93 {
95  OUString maStyleName;
96 public:
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;
113  OUString maTargetFrame;
114 public:
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();
135 public:
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 {
153  OUString maRubyTextStyle;
154  OUString maRubyText;
155 public:
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 {
170 public:
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;
182  OUString& mrRubyTextStyle;
183 public:
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: */
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
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 void SAL_CALL endFastElement(sal_Int32 nElement) override
void PushFieldURL(const OUString &rURL, const OUString &rRep, const OUString &rStyleName, const OUString &rTargetFrame)
ScXMLCellTextParaContext & mrParentCxt
ScXMLCellRubyBaseContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
ScXMLCellFieldTitleContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
ScXMLCellFieldDateContext(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
void SetStyleName(const OUString &rStyleName)
void PushFieldSheetName(const OUString &rStyleName)
ScXMLCellFieldSheetNameContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) 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 PushFieldTitle(const OUString &rStyleName)
virtual void SAL_CALL characters(const OUString &aChars) override
ScXMLCellTextParaContext & mrParentCxt
ScXMLCellTextParaContext & mrParentCxt
This context handles element inside or .
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLCellRubyTextContext(ScXMLImport &rImport, OUString &rRubyText, OUString &rRubyTextStyle)
virtual void SAL_CALL characters(const OUString &aChars) override
ScXMLCellFieldURLContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
This class exists only to provide GetScImport() to its derived classes.
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLCellTextParaContext & mrParentCxt
This context handles element inside .
ScXMLCellFieldSContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
This context handles element inside .
ScXMLCellTextParaContext & mrParentCxt
virtual void SAL_CALL characters(const OUString &aChars) 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
ScXMLCellTextSpanContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
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
This context handles element inside .
ScXMLCellTextParaContext & mrParentCxt
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
This context handles element inside .
ScXMLCellTextParaContext & mrParentCxt
void SetStyleName(const OUString &rStyleName)
ScXMLTableRowCellContext & mrParentCxt
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
void SetStyleName(const OUString &rStyleName)
void SetStyleName(const OUString &rStyleName)
void PushFieldDate(const OUString &rStyleName)
This context handles element inside .
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
This context handles element inside .
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void PushSpan(const OUString &rSpan, const OUString &rStyleName)
ScXMLCellTextParaContext(ScXMLImport &rImport, ScXMLTableRowCellContext &rParent)
ScXMLCellTextRubyContext(ScXMLImport &rImport, ScXMLCellTextParaContext &rParent)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
This context handles element inside or .
This context handles element inside .
This context handles element inside .