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: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d8019f7..9c0666f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1343,7 +1343,7 @@ static OUString searchAndReplace( const OUString& i_rOrig, const char* i_pRepl, 
    if( nPos != -1 )
    {
        OUStringBuffer aBuf( i_rOrig.getLength() );
        aBuf.appendCopy( i_rOrig, nPos );
        aBuf.appendCopy( i_rOrig, 0, nPos );
        aBuf.append( i_rRepl );
        if( nPos + i_nReplLen < i_rOrig.getLength() )
            aBuf.appendCopy( i_rOrig, nPos + i_nReplLen );