fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / xml / celltextparacontext.hxx
blobd45ece194b3deaefccbc1779e581b61464e1192d
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, sal_uInt16 nPrefix, const OUString& rLName, ScXMLTableRowCellContext& rParent);
28 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
29 virtual void EndElement() SAL_OVERRIDE;
30 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
31 virtual SvXMLImportContext* CreateChildContext(
32 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
34 void PushSpan(const OUString& rSpan, const OUString& rStyleName);
35 void PushFieldSheetName(const OUString& rStyleName);
36 void PushFieldDate(const OUString& rStyleName);
37 void PushFieldTitle(const OUString& rStyleName);
38 void PushFieldURL(const OUString& rURL, const OUString& rRep, const OUString& rStyleName);
41 /**
42 * This context handles <text:span> element inside <text:p>.
44 class ScXMLCellTextSpanContext : public ScXMLImportContext
46 ScXMLCellTextParaContext& mrParentCxt;
47 OUString maStyleName;
48 OUString maContent;
49 public:
50 ScXMLCellTextSpanContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
52 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
53 virtual void EndElement() SAL_OVERRIDE;
54 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
55 virtual SvXMLImportContext* CreateChildContext(
56 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
59 /**
60 * This context handles <text:sheet-name> element inside <text:p>.
62 class ScXMLCellFieldSheetNameContext : public ScXMLImportContext
64 ScXMLCellTextParaContext& mrParentCxt;
65 OUString maStyleName;
66 public:
67 ScXMLCellFieldSheetNameContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
69 void SetStyleName(const OUString& rStyleName);
71 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
72 virtual void EndElement() SAL_OVERRIDE;
73 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
74 virtual SvXMLImportContext* CreateChildContext(
75 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
78 /**
79 * This context handles <text:date> element inside <text:p>.
81 class ScXMLCellFieldDateContext : public ScXMLImportContext
83 ScXMLCellTextParaContext& mrParentCxt;
84 OUString maStyleName;
85 public:
86 ScXMLCellFieldDateContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
88 void SetStyleName(const OUString& rStyleName);
90 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
91 virtual void EndElement() SAL_OVERRIDE;
92 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
93 virtual SvXMLImportContext* CreateChildContext(
94 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
97 /**
98 * This context handles <text:title> element inside <text:p>.
100 class ScXMLCellFieldTitleContext : public ScXMLImportContext
102 ScXMLCellTextParaContext& mrParentCxt;
103 OUString maStyleName;
104 public:
105 ScXMLCellFieldTitleContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
107 void SetStyleName(const OUString& rStyleName);
109 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
110 virtual void EndElement() SAL_OVERRIDE;
111 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
112 virtual SvXMLImportContext* CreateChildContext(
113 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
117 * This context handles <text:a> element inside <text:p> or <text:span>.
119 class ScXMLCellFieldURLContext : public ScXMLImportContext
121 ScXMLCellTextParaContext& mrParentCxt;
122 OUString maStyleName;
123 OUString maURL;
124 OUString maRep;
125 public:
126 ScXMLCellFieldURLContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
128 void SetStyleName(const OUString& rStyleName);
130 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
131 virtual void EndElement() SAL_OVERRIDE;
132 virtual void Characters(const OUString& rChars) SAL_OVERRIDE;
133 virtual SvXMLImportContext* CreateChildContext(
134 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
138 * This context handles <text:s> element inside <text:p> or <text:span>.
140 class ScXMLCellFieldSContext : public ScXMLImportContext
142 ScXMLCellTextParaContext& mrParentCxt;
143 OUString maStyleName;
144 sal_Int32 mnCount;
146 void PushSpaces();
147 public:
148 ScXMLCellFieldSContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
150 void SetStyleName(const OUString& rStyleName);
152 virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
153 virtual void EndElement() SAL_OVERRIDE;
154 virtual SvXMLImportContext* CreateChildContext(
155 sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList) SAL_OVERRIDE;
158 #endif
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */