summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlfldw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html/htmlfldw.cxx')
-rw-r--r--sw/source/filter/html/htmlfldw.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index adc4aa9b0155..36e5b4215200 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -375,6 +375,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
SwHTMLWriter::GetCSS1ScriptForScriptType( nScriptType );
xub_StrLen nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript(
sExpand, nPos, nScriptType );
+ xub_StrLen nChunkLen = nEndPos - nPos;
if( nScript != CSS1_OUTMODE_ANY_SCRIPT &&
/* #108791# */ nScript != rHTMLWrt.nCSS1Script )
{
@@ -404,7 +405,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
}
- HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nEndPos ),
+ HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nChunkLen ),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
rHTMLWrt.bTagOn = sal_False;
@@ -414,7 +415,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
else
{
- HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nEndPos ),
+ HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nChunkLen ),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
}
nPos = nEndPos;