Kaydet (Commit) aab440c7 authored tarafından László Németh's avatar László Németh

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 d477ff4a)

Change-Id: I78ab02cc8cf98d665e7f9ddc740879c203f2f7e4
Reviewed-on: https://gerrit.libreoffice.org/51228Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst b203e78a
......@@ -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;
}
......
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