summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 07f4967a7247..02085761e3e9 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2866,9 +2866,9 @@ void AttributeOutputBase::TextField( const SwFormatField& rField )
if (pDocInfoField != nullptr)
{
OUString sFieldname = pDocInfoField->GetFieldName();
- sal_Int32 nIndex = sFieldname.indexOf(':');
- if (nIndex != sFieldname.getLength())
+ const sal_Int32 nIndex = sFieldname.indexOf(':');
+ if (nIndex >= 0)
sFieldname = sFieldname.copy(nIndex + 1);
sStr = "\"" + sFieldname + "\"";