diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-11 15:18:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-11 15:21:33 +0100 |
commit | 9b03a3688ff9c55293eccbb77dd24845c7fed6bf (patch) | |
tree | 3c9d4aab585c66810bcd57e8902e762b404fbeac /sw | |
parent | 221643376f1bd5bd6be1738c0ea1b62fb646aaca (diff) |
fix mail merge launch
Change-Id: I6604d1e626f83e6ac2203b7c80cd5b5b7d80181a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dbui/mailmergehelper.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index 50a033e80528..39265ac49aea 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); } |