summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2022-03-12 09:32:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-03-21 11:01:37 +0100
commita13faccd7e8c6503e96e9342a8615b4542b0601f (patch)
tree868cfaa4330800c1df5989bf2c65599f71f2a1c4 /sw
parent81eb293ff5c0879fa3d5f9be991c04f6bcd0fa96 (diff)
related tdf#147861: cleanup + a function provides the name
This is not quite a NonFunctionalChange because it avoids adding " (fixed)" to the name. But that is what I want anyway for bug 147861, so this is an all-around good simplification. Plus, the writerfilter loop doesn't need to run if an inside clause will never be true anyway. Putting this cleanup separately helps highlight the actual fix and not clutter the real patches. Change-Id: I12f345cc92627398ad00fe32b64b98b54e5ed14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131413 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 72a16ddcaaa4..4e0036e04f00 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2964,15 +2964,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField )
dynamic_cast<const SwDocInfoField *> (pField);
if (pDocInfoField != nullptr)
- {
- OUString sFieldname = pDocInfoField->GetFieldName();
-
- const sal_Int32 nIndex = sFieldname.indexOf(':');
- if (nIndex >= 0)
- sFieldname = sFieldname.copy(nIndex + 1);
-
- sStr = "\"" + sFieldname + "\"";
- }
+ sStr = "\"" + pDocInfoField->GetName() + "\"";
}
break;
default: