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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user