[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Oct 11 07:21:54 PDT 2013


 sw/source/ui/dbui/mailmergehelper.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9b03a3688ff9c55293eccbb77dd24845c7fed6bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 11 15:18:42 2013 +0100

    fix mail merge launch
    
    Change-Id: I6604d1e626f83e6ac2203b7c80cd5b5b7d80181a

diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 50a033e..39265ac 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -601,13 +601,16 @@ SwMergeAddressItem   SwAddressIterator::Next()
             }
             else if(-1 == nOpen && -1 == nReturn)
             {
-                nOpen = sAddress.getLength();
                 aRet.sText = sAddress;
                 sAddress = "";
             }
             else
             {
-                xub_StrLen nTarget = ::std::min(nOpen, nReturn);
+                if (nOpen == -1)
+                    nOpen = sAddress.getLength();
+                if (nReturn == -1)
+                    nReturn = sAddress.getLength();
+                sal_Int32 nTarget = ::std::min(nOpen, nReturn);
                 aRet.sText = sAddress.copy(0, nTarget);
                 sAddress = sAddress.copy(nTarget);
             }


More information about the Libreoffice-commits mailing list