summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-07-27 17:18:56 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-07-27 17:18:56 +0000
commitc97520547af89c9501d4a3424cb20dbb35ffda38 (patch)
treec127c8dc73181c9f9bec47da68dafe2d5a7fcb8c /sw/source/ui/envelp
parent4919ecf425ef2645f01fb644b6759b9eadee85d5 (diff)
CWS-TOOLING: integrate CWS cmcfixes60
2009-07-03 21:56:04 +0200 cmc r273718 : #i103313# org.openoffice.System not org.openoffice.Setup for looking up default locale 2009-07-01 17:15:31 +0200 cmc r273606 : #i102636# extra rounding precision 2009-07-01 11:04:47 +0200 cmc r273556 : #i100000# workaround build issue 2009-06-30 17:27:41 +0200 cmc r273525 : #i102636# extra rounding precision 2009-06-30 09:42:46 +0200 cmc r273491 : #i102634# numbers got mixed up somehow 2009-06-30 09:19:56 +0200 cmc r273490 : CWS-TOOLING: rebase CWS cmcfixes60 to trunk@273468 (milestone: DEV300:m51) 2009-06-22 12:54:45 +0200 cmc r273217 : #i103000# micro-optimization to remove unused symbols from fpicker etc. 2009-06-19 10:06:21 +0200 cmc r273148 : #i102932# put same type into an Any as we take out of that Any, affect 64bit 2009-06-13 17:38:42 +0200 cmc r272957 : #i102742# gcc44 warnings, return of const primitive type doesn't mean anything 2009-06-13 16:22:40 +0200 cmc r272955 : #i102737# keep existing logic and silence new gcc44 warnings 2009-06-13 16:06:25 +0200 cmc r272954 : #i102736# confirm existing logic to be gcc44 warnings free 2009-06-10 19:40:24 +0200 cmc r272837 : #i87461# 64bit color lossage 2009-06-10 19:23:38 +0200 cmc r272836 : #i102636# tidy up UI rounding errors
Diffstat (limited to 'sw/source/ui/envelp')
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 768ba451d885..fd9caec98c24 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -76,6 +76,8 @@
#include <unomid.h>
+#include <algorithm>
+
using namespace rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::container;
@@ -387,6 +389,8 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aLk = LINK(this, SwMailMergeDlg, ModifyHdl);
aFromNF.SetModifyHdl(aLk);
aToNF.SetModifyHdl(aLk);
+ aFromNF.SetMax(SAL_MAX_INT32);
+ aToNF.SetMax(SAL_MAX_INT32);
SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr();
if(_xConnection.is())
@@ -768,19 +772,16 @@ bool SwMailMergeDlg::ExecQryShell()
if (aFromRB.IsChecked()) // Liste Einfuegen
{
- ULONG nStart = static_cast< ULONG >(aFromNF.GetValue());
- ULONG nEnd = static_cast< ULONG >(aToNF.GetValue());
+ // Safe: the maximal value of the fields is limited
+ sal_Int32 nStart = sal::static_int_cast<sal_Int32>(aFromNF.GetValue());
+ sal_Int32 nEnd = sal::static_int_cast<sal_Int32>(aToNF.GetValue());
if (nEnd < nStart)
- {
- ULONG nZw = nEnd;
- nEnd = nStart;
- nStart = nZw;
- }
+ std::swap(nEnd, nStart);
m_aSelection.realloc(nEnd - nStart + 1);
Any* pSelection = m_aSelection.getArray();
- for (ULONG i = nStart; i <= nEnd; ++i, ++pSelection)
+ for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection)
*pSelection <<= i;
}
else if (aAllRB.IsChecked() )