sw/source/core/txtnode/modeltoviewhelper.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit aab440c768b64b9d2ffa72223b6d843a84c2d061 Author: László Németh <nem...@numbertext.org> Date: Tue Mar 13 16:03:01 2018 +0100 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 d477ff4a81ecba8a77ead5ff1a33d3e3ceed622e) Change-Id: I78ab02cc8cf98d665e7f9ddc740879c203f2f7e4 Reviewed-on: https://gerrit.libreoffice.org/51228 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index 5018bf128474..e6f5b1885f56 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits