diff options
author | Rosemary Sebastian <rosemaryseb8@gmail.com> | 2017-03-18 08:46:27 +0000 |
---|---|---|
committer | Rosemary Sebastian <rosemaryseb8@gmail.com> | 2017-03-18 11:54:54 +0000 |
commit | 109210e5b71a4e0b6fcaae72be7ef8d7667f3708 (patch) | |
tree | 50fe7d607d490cc4065821d94f40f8f0db259c33 /xmloff/source/text | |
parent | 198b6c16e78b3462217c9d8a0429459abe885392 (diff) |
Revert "Revert "Implement export and import of author field in fixed format""
This reverts commit cae16645e17df6a1f87443c00b6abfd26dabd27f.
Change-Id: If5b85beb53a0925909d537023879a7d86fa011cf
Reviewed-on: https://gerrit.libreoffice.org/35391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Rosemary Sebastian <rosemaryseb8@gmail.com>
Tested-by: Rosemary Sebastian <rosemaryseb8@gmail.com>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 4692856b96e2..91dba974616d 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1055,8 +1055,11 @@ void XMLTextFieldExport::ExportFieldHelper( switch (nToken) { case FIELD_ID_AUTHOR: // author field: fixed, field (sub-)type - ProcessBoolean(XML_FIXED, - GetBoolProperty(sPropertyIsFixed, rPropSet), true); + if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed)) + { + GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FIXED, + (GetBoolProperty(sPropertyIsFixed, rPropSet) ? XML_TRUE : XML_FALSE) ); + } ExportElement(MapAuthorFieldName(rPropSet), sPresentation); break; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 4c2bcbf7a20f..e521e19eb982 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -680,6 +680,16 @@ void XMLAuthorFieldImportContext::StartElement( XMLTextFieldImportContext::StartElement(xAttrList); } +void XMLAuthorFieldImportContext::ProcessAttribute(sal_uInt16 nAttrToken, const OUString& sAttrValue) +{ + if(nAttrToken == XML_TOK_TEXTFIELD_FIXED) + { + bool bTmp(false); + if (::sax::Converter::convertBool(bTmp, sAttrValue)) + bFixed = bTmp; + } +} + void XMLAuthorFieldImportContext::PrepareField( const Reference<XPropertySet> & rPropSet) { |