diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-08 16:34:01 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-08 19:25:37 -0400 |
commit | 40af04cea332e5311edab8d9c395299c15b7d4ec (patch) | |
tree | f957081bb02ca96217b4a1839908988a1feb53d4 /sc/source/filter/xml/celltextparacontext.hxx | |
parent | 665cd87e5b594a21b4a2f578564efca7b3f653b8 (diff) |
fdo#62116: Handle field objects with formats correctly.
Field objects can have formats applied to them, and when they do, they
appear inside a <text:span> element.
Change-Id: I7b4346389f393a4ddf708670b2c524a6594128b5
Diffstat (limited to 'sc/source/filter/xml/celltextparacontext.hxx')
-rw-r--r-- | sc/source/filter/xml/celltextparacontext.hxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sc/source/filter/xml/celltextparacontext.hxx b/sc/source/filter/xml/celltextparacontext.hxx index 9390a3eec275..10e5a23f8d8f 100644 --- a/sc/source/filter/xml/celltextparacontext.hxx +++ b/sc/source/filter/xml/celltextparacontext.hxx @@ -32,10 +32,10 @@ public: sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); void PushSpan(const OUString& rSpan, const OUString& rStyleName); - void PushFieldSheetName(); - void PushFieldDate(); - void PushFieldTitle(); - void PushFieldURL(const OUString& rURL, const OUString& rRep); + void PushFieldSheetName(const OUString& rStyleName); + void PushFieldDate(const OUString& rStyleName); + void PushFieldTitle(const OUString& rStyleName); + void PushFieldURL(const OUString& rURL, const OUString& rRep, const OUString& rStyleName); }; /** @@ -62,9 +62,12 @@ public: class ScXMLCellFieldSheetNameContext : public ScXMLImportContext { ScXMLCellTextParaContext& mrParentCxt; + OUString maStyleName; public: ScXMLCellFieldSheetNameContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); + void SetStyleName(const OUString& rStyleName); + virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual void EndElement(); virtual void Characters(const OUString& rChars); @@ -78,9 +81,12 @@ public: class ScXMLCellFieldDateContext : public ScXMLImportContext { ScXMLCellTextParaContext& mrParentCxt; + OUString maStyleName; public: ScXMLCellFieldDateContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); + void SetStyleName(const OUString& rStyleName); + virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual void EndElement(); virtual void Characters(const OUString& rChars); @@ -94,9 +100,12 @@ public: class ScXMLCellFieldTitleContext : public ScXMLImportContext { ScXMLCellTextParaContext& mrParentCxt; + OUString maStyleName; public: ScXMLCellFieldTitleContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); + void SetStyleName(const OUString& rStyleName); + virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual void EndElement(); virtual void Characters(const OUString& rChars); @@ -105,16 +114,19 @@ public: }; /** - * This context handles <text:a> element inside <text:p>. + * This context handles <text:a> element inside <text:p> or <text:span>. */ class ScXMLCellFieldURLContext : public ScXMLImportContext { ScXMLCellTextParaContext& mrParentCxt; + OUString maStyleName; OUString maURL; OUString maRep; public: ScXMLCellFieldURLContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); + void SetStyleName(const OUString& rStyleName); + virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual void EndElement(); virtual void Characters(const OUString& rChars); |