sw/source/core/txtnode/ndtxt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 282af14d3c021ad6927bc909161c0ff7b31fa1c9 Author: Michael Stahl <mst...@redhat.com> Date: Mon Feb 25 22:06:18 2013 +0100 fdo#61428: SwTxtNode::ReplaceText: brown paperbag fix Fix the optimization to return only if both replacement and replaced strings are empty. (regression from b6d45f26ea5bcc848737921b59a16253eb1d8587) Change-Id: I984fb151a5ac3e6eb8d03f854ad6a3df88f96000 (cherry picked from commit 3e6a0b6d04722d43a1fc8d3745b5e79b7ced90eb) Reviewed-on: https://gerrit.libreoffice.org/2407 Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> (cherry picked from commit 3f5361a9402cd6df4da7fb98108ae1906b41edd3) Reviewed-on: https://gerrit.libreoffice.org/2408 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Reviewed-by: Miklos Vajna <vmik...@suse.cz> Tested-by: Miklos Vajna <vmik...@suse.cz> diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index ee1dd01..2cc28ae 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3337,9 +3337,9 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen, "SwTxtNode::ReplaceText: node text with insertion > TXTNODE_MAX."); OUString const sInserted( (nOverflow > 0) ? rStr.Copy(0, rStr.Len() - nOverflow) : rStr); - if (sInserted.isEmpty()) + if (sInserted.isEmpty() && 0 == nDelLen) { - return; + return; // nothing to do } const xub_StrLen nStartPos = rStart.GetIndex();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits