Commits

Anonymous committed acd4048

cbosdo06: Fix for issue 111684

Comments (0)

Files changed (1)

sw/source/filter/ww8/ww8par5.cxx

         pStrm->Seek( nOldPos );
 
         //#124725# field codes which contain '/' or '.' are not displayed in WinWord
-        if (!aStr.EqualsAscii(" ADDIN", 0, 6) &&
-            (aStr.Search('.') != STRING_NOTFOUND ||
-             aStr.Search('/') != STRING_NOTFOUND))
+        xub_StrLen nSpacePos = aStr.Search( ' ', 1 );
+        if ( STRING_NOTFOUND == nSpacePos )
+            nSpacePos = aStr.Len( );
+        xub_StrLen nSearchPos = STRING_NOTFOUND;
+        if ( ( ( nSearchPos = aStr.Search('.') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) ||
+             ( ( nSearchPos = aStr.Search('/') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) )
             return aF.nLen;
         else
             return aF.nLen - aF.nLRes - 1;  // so viele ueberlesen, das Resultfeld