Kaydet (Commit) f61af646 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Noel Grandin

tdf#119321: fix appendCopy in searchAndReplace (printing)

Regression from:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=cd66852f6dd08631a25d15a1527a647e69ab8ce3

Change-Id: Iea4b21647dd01406271f9b3e13fea3cc73e1c801
Reviewed-on: https://gerrit.libreoffice.org/59303
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6c89f41b
...@@ -1343,7 +1343,7 @@ static OUString searchAndReplace( const OUString& i_rOrig, const char* i_pRepl, ...@@ -1343,7 +1343,7 @@ static OUString searchAndReplace( const OUString& i_rOrig, const char* i_pRepl,
if( nPos != -1 ) if( nPos != -1 )
{ {
OUStringBuffer aBuf( i_rOrig.getLength() ); OUStringBuffer aBuf( i_rOrig.getLength() );
aBuf.appendCopy( i_rOrig, nPos ); aBuf.appendCopy( i_rOrig, 0, nPos );
aBuf.append( i_rRepl ); aBuf.append( i_rRepl );
if( nPos + i_nReplLen < i_rOrig.getLength() ) if( nPos + i_nReplLen < i_rOrig.getLength() )
aBuf.appendCopy( i_rOrig, nPos + i_nReplLen ); aBuf.appendCopy( i_rOrig, nPos + i_nReplLen );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment