summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-11 13:31:26 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-11 22:33:35 -0500
commitcbf0cad82100308d6094eabf2440e53961b3329e (patch)
tree00c6414252caeb8566c20f0ece3443931be65366 /sc/source/filter/xml
parent180819d4feb2a2e889acad910d6d5241bea95d55 (diff)
Import date fields.
Change-Id: If37f5253e4e201aab30c54ce503b6c8b6d967d92
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/celltextparacontext.cxx10
-rw-r--r--sc/source/filter/xml/celltextparacontext.hxx4
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx5
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx1
4 files changed, 12 insertions, 8 deletions
diff --git a/sc/source/filter/xml/celltextparacontext.cxx b/sc/source/filter/xml/celltextparacontext.cxx
index a4ce72dec9cd..abca9d8edaa0 100644
--- a/sc/source/filter/xml/celltextparacontext.cxx
+++ b/sc/source/filter/xml/celltextparacontext.cxx
@@ -78,8 +78,9 @@ void ScXMLCellTextParaContext::PushFieldSheetName()
mrParentCxt.PushParagraphFieldSheetName();
}
-void ScXMLCellTextParaContext::PushFieldDate(const OUString& rOutput)
+void ScXMLCellTextParaContext::PushFieldDate()
{
+ mrParentCxt.PushParagraphFieldDate();
}
void ScXMLCellTextParaContext::PushFieldTitle()
@@ -180,11 +181,11 @@ void ScXMLCellFieldDateContext::StartElement(const uno::Reference<xml::sax::XAtt
void ScXMLCellFieldDateContext::EndElement()
{
+ mrParentCxt.PushFieldDate();
}
-void ScXMLCellFieldDateContext::Characters(const OUString& rChars)
+void ScXMLCellFieldDateContext::Characters(const OUString& /*rChars*/)
{
- maDate = rChars;
}
SvXMLImportContext* ScXMLCellFieldDateContext::CreateChildContext(
@@ -209,9 +210,8 @@ void ScXMLCellFieldTitleContext::EndElement()
mrParentCxt.PushFieldTitle();
}
-void ScXMLCellFieldTitleContext::Characters(const OUString& rChars)
+void ScXMLCellFieldTitleContext::Characters(const OUString& /*rChars*/)
{
- maTitle = rChars;
}
SvXMLImportContext* ScXMLCellFieldTitleContext::CreateChildContext(
diff --git a/sc/source/filter/xml/celltextparacontext.hxx b/sc/source/filter/xml/celltextparacontext.hxx
index 55ea8efdbb2f..e9d11aa3ad30 100644
--- a/sc/source/filter/xml/celltextparacontext.hxx
+++ b/sc/source/filter/xml/celltextparacontext.hxx
@@ -33,7 +33,7 @@ public:
void PushSpan(const OUString& rSpan, const OUString& rStyleName);
void PushFieldSheetName();
- void PushFieldDate(const OUString& rOutput);
+ void PushFieldDate();
void PushFieldTitle();
};
@@ -79,7 +79,6 @@ public:
class ScXMLCellFieldDateContext : public ScXMLImportContext
{
ScXMLCellTextParaContext& mrParentCxt;
- OUString maDate;
public:
ScXMLCellFieldDateContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
@@ -97,7 +96,6 @@ public:
class ScXMLCellFieldTitleContext : public ScXMLImportContext
{
ScXMLCellTextParaContext& mrParentCxt;
- OUString maTitle;
public:
ScXMLCellFieldTitleContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 255d5ae77b27..86a6f0451227 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -570,6 +570,11 @@ void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData)
rField.maSelection.nEndPos = nPos+1;
}
+void ScXMLTableRowCellContext::PushParagraphFieldDate()
+{
+ PushParagraphField(new SvxDateField);
+}
+
void ScXMLTableRowCellContext::PushParagraphFieldSheetName()
{
SCTAB nTab = GetScImport().GetTables().GetCurrentCellPos().Tab();
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 022d5a2fab11..9fef82bbfe7f 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -136,6 +136,7 @@ public:
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
void PushParagraphSpan(const OUString& rSpan, const OUString& rStyleName);
+ void PushParagraphFieldDate();
void PushParagraphFieldSheetName();
void PushParagraphFieldDocTitle();
void PushParagraphEnd();