Kaydet (Commit) cbf0cad8 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Import date fields.

Change-Id: If37f5253e4e201aab30c54ce503b6c8b6d967d92
üst 180819d4
...@@ -78,8 +78,9 @@ void ScXMLCellTextParaContext::PushFieldSheetName() ...@@ -78,8 +78,9 @@ void ScXMLCellTextParaContext::PushFieldSheetName()
mrParentCxt.PushParagraphFieldSheetName(); mrParentCxt.PushParagraphFieldSheetName();
} }
void ScXMLCellTextParaContext::PushFieldDate(const OUString& rOutput) void ScXMLCellTextParaContext::PushFieldDate()
{ {
mrParentCxt.PushParagraphFieldDate();
} }
void ScXMLCellTextParaContext::PushFieldTitle() void ScXMLCellTextParaContext::PushFieldTitle()
...@@ -180,11 +181,11 @@ void ScXMLCellFieldDateContext::StartElement(const uno::Reference<xml::sax::XAtt ...@@ -180,11 +181,11 @@ void ScXMLCellFieldDateContext::StartElement(const uno::Reference<xml::sax::XAtt
void ScXMLCellFieldDateContext::EndElement() void ScXMLCellFieldDateContext::EndElement()
{ {
mrParentCxt.PushFieldDate();
} }
void ScXMLCellFieldDateContext::Characters(const OUString& rChars) void ScXMLCellFieldDateContext::Characters(const OUString& /*rChars*/)
{ {
maDate = rChars;
} }
SvXMLImportContext* ScXMLCellFieldDateContext::CreateChildContext( SvXMLImportContext* ScXMLCellFieldDateContext::CreateChildContext(
...@@ -209,9 +210,8 @@ void ScXMLCellFieldTitleContext::EndElement() ...@@ -209,9 +210,8 @@ void ScXMLCellFieldTitleContext::EndElement()
mrParentCxt.PushFieldTitle(); mrParentCxt.PushFieldTitle();
} }
void ScXMLCellFieldTitleContext::Characters(const OUString& rChars) void ScXMLCellFieldTitleContext::Characters(const OUString& /*rChars*/)
{ {
maTitle = rChars;
} }
SvXMLImportContext* ScXMLCellFieldTitleContext::CreateChildContext( SvXMLImportContext* ScXMLCellFieldTitleContext::CreateChildContext(
......
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
void PushSpan(const OUString& rSpan, const OUString& rStyleName); void PushSpan(const OUString& rSpan, const OUString& rStyleName);
void PushFieldSheetName(); void PushFieldSheetName();
void PushFieldDate(const OUString& rOutput); void PushFieldDate();
void PushFieldTitle(); void PushFieldTitle();
}; };
...@@ -79,7 +79,6 @@ public: ...@@ -79,7 +79,6 @@ public:
class ScXMLCellFieldDateContext : public ScXMLImportContext class ScXMLCellFieldDateContext : public ScXMLImportContext
{ {
ScXMLCellTextParaContext& mrParentCxt; ScXMLCellTextParaContext& mrParentCxt;
OUString maDate;
public: public:
ScXMLCellFieldDateContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); ScXMLCellFieldDateContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
...@@ -97,7 +96,6 @@ public: ...@@ -97,7 +96,6 @@ public:
class ScXMLCellFieldTitleContext : public ScXMLImportContext class ScXMLCellFieldTitleContext : public ScXMLImportContext
{ {
ScXMLCellTextParaContext& mrParentCxt; ScXMLCellTextParaContext& mrParentCxt;
OUString maTitle;
public: public:
ScXMLCellFieldTitleContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); ScXMLCellFieldTitleContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
......
...@@ -570,6 +570,11 @@ void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData) ...@@ -570,6 +570,11 @@ void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData)
rField.maSelection.nEndPos = nPos+1; rField.maSelection.nEndPos = nPos+1;
} }
void ScXMLTableRowCellContext::PushParagraphFieldDate()
{
PushParagraphField(new SvxDateField);
}
void ScXMLTableRowCellContext::PushParagraphFieldSheetName() void ScXMLTableRowCellContext::PushParagraphFieldSheetName()
{ {
SCTAB nTab = GetScImport().GetTables().GetCurrentCellPos().Tab(); SCTAB nTab = GetScImport().GetTables().GetCurrentCellPos().Tab();
......
...@@ -136,6 +136,7 @@ public: ...@@ -136,6 +136,7 @@ public:
::com::sun::star::xml::sax::XAttributeList>& xAttrList ); ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
void PushParagraphSpan(const OUString& rSpan, const OUString& rStyleName); void PushParagraphSpan(const OUString& rSpan, const OUString& rStyleName);
void PushParagraphFieldDate();
void PushParagraphFieldSheetName(); void PushParagraphFieldSheetName();
void PushParagraphFieldDocTitle(); void PushParagraphFieldDocTitle();
void PushParagraphEnd(); void PushParagraphEnd();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment