Import date fields.

Change-Id: If37f5253e4e201aab30c54ce503b6c8b6d967d92
This commit is contained in:
Kohei Yoshida
2013-02-11 13:31:26 -05:00
parent 180819d4fe
commit cbf0cad821
4 changed files with 12 additions and 8 deletions

View File

@@ -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(

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();