tdf#69416 don't remove field content in proofreading,

only the requested footnote numbers, allowing grammar
checking of automatic references with affixes, articles etc.

Expanded fields get also a starting ZWSP character
for more precise grammar checking.

(Partial revert of commit d477ff4a81)

Change-Id: I78ab02cc8cf98d665e7f9ddc740879c203f2f7e4
Reviewed-on: https://gerrit.libreoffice.org/51228
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
László Németh
2018-03-13 16:03:01 +01:00
parent b203e78a69
commit aab440c768

View File

@@ -147,9 +147,10 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode)
case RES_TXTATR_ANNOTATION:
if (eMode & ExpandMode::ExpandFields)
{
aFieldResult.m_sExpand = (eMode & ExpandMode::ReplaceMode)
? OUString(CHAR_ZWSP)
: static_txtattr_cast<SwTextField const*>(pAttr)->
// add a ZWSP before the expanded field in replace mode
aFieldResult.m_sExpand = ((eMode & ExpandMode::ReplaceMode)
? OUString(CHAR_ZWSP) : OUString("")) +
static_txtattr_cast<SwTextField const*>(pAttr)->
GetFormatField().GetField()->ExpandField(true);
aFieldResult.m_eType = FieldResult::FIELD;
}