summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorRosemary Sebastian <rosemary.seb8@gmail.com>2017-01-25 12:56:47 +0530
committerRosemary Sebastian <rosemaryseb8@gmail.com>2017-03-10 04:47:48 +0000
commit5de40734af30a8b897c6c5b7f681759e36a25557 (patch)
treeca5510435b692fd5f35359bc17494000a7250502 /editeng
parentda3d56b077ce81f6f399a68f53895590dbb1357f (diff)
Implement export and import of author field in fixed format
Change-Id: I1975bfcdc8436f2b05e2fab2a4c9c09838330b30 Reviewed-on: https://gerrit.libreoffice.org/33520 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Rosemary Sebastian <rosemaryseb8@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/flditem.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 1d5ba3fa784e..690425594227 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -181,13 +181,16 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
SvxAuthorField* pData = new SvxAuthorField(
aFirstName, aLastName, OUString(), bIsFixed ? SVXAUTHORTYPE_FIX : SVXAUTHORTYPE_VAR);
- if (!bFullName)
+ if (!bIsFixed)
{
- pData->SetFormat(SVXAUTHORFORMAT_SHORTNAME);
- }
- else if (nFmt >= SVXAUTHORFORMAT_FULLNAME && nFmt <= SVXAUTHORFORMAT_SHORTNAME)
- {
- pData->SetFormat(static_cast<SvxAuthorFormat>(nFmt));
+ if (!bFullName)
+ {
+ pData->SetFormat(SVXAUTHORFORMAT_SHORTNAME);
+ }
+ else if (nFmt >= SVXAUTHORFORMAT_FULLNAME && nFmt <= SVXAUTHORFORMAT_SHORTNAME)
+ {
+ pData->SetFormat(static_cast<SvxAuthorFormat>(nFmt));
+ }
}
return pData;