1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_CELLTEXTPARACONTEXT_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_XML_CELLTEXTPARACONTEXT_HXX
13 #include "importcontext.hxx"
16 class ScXMLTableRowCellContext
;
19 * This context handles <text:p> element inside <table:table-cell>.
21 class ScXMLCellTextParaContext
: public ScXMLImportContext
23 ScXMLTableRowCellContext
& mrParentCxt
;
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
);
41 * This context handles <text:span> element inside <text:p>.
43 class ScXMLCellTextSpanContext
: public ScXMLImportContext
45 ScXMLCellTextParaContext
& mrParentCxt
;
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
;
60 * This context handles <text:sheet-name> element inside <text:p>.
62 class ScXMLCellFieldSheetNameContext
: public ScXMLImportContext
64 ScXMLCellTextParaContext
& mrParentCxt
;
67 ScXMLCellFieldSheetNameContext(ScXMLImport
& rImport
, ScXMLCellTextParaContext
& rParent
);
69 void SetStyleName(const OUString
& rStyleName
);
71 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
72 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
73 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
77 * This context handles <text:date> element inside <text:p>.
79 class ScXMLCellFieldDateContext
: public ScXMLImportContext
81 ScXMLCellTextParaContext
& mrParentCxt
;
84 ScXMLCellFieldDateContext(ScXMLImport
& rImport
, ScXMLCellTextParaContext
& rParent
);
86 void SetStyleName(const OUString
& rStyleName
);
88 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
92 * This context handles <text:title> element inside <text:p>.
94 class ScXMLCellFieldTitleContext
: public ScXMLImportContext
96 ScXMLCellTextParaContext
& mrParentCxt
;
99 ScXMLCellFieldTitleContext(ScXMLImport
& rImport
, ScXMLCellTextParaContext
& rParent
);
101 void SetStyleName(const OUString
& rStyleName
);
103 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
107 * This context handles <text:a> element inside <text:p> or <text:span>.
109 class ScXMLCellFieldURLContext
: public ScXMLImportContext
111 ScXMLCellTextParaContext
& mrParentCxt
;
112 OUString maStyleName
;
115 OUString maTargetFrame
;
117 ScXMLCellFieldURLContext(ScXMLImport
& rImport
, ScXMLCellTextParaContext
& rParent
);
119 void SetStyleName(const OUString
& rStyleName
);
121 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
122 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
123 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
124 virtual void SAL_CALL
characters( const OUString
& aChars
) override
;
128 * This context handles <text:s> element inside <text:p> or <text:span>.
130 class ScXMLCellFieldSContext
: public ScXMLImportContext
132 ScXMLCellTextParaContext
& mrParentCxt
;
133 OUString maStyleName
;
138 ScXMLCellFieldSContext(ScXMLImport
& rImport
, ScXMLCellTextParaContext
& rParent
);
140 void SetStyleName(const OUString
& rStyleName
);
142 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
143 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
144 virtual void SAL_CALL
endFastElement( sal_Int32 nElement
) override
;
145 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
146 sal_Int32 nElement
, const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */