summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/authratr.hxx2
-rw-r--r--sw/source/core/doc/docdde.cxx2
-rw-r--r--sw/source/ui/app/swmodul1.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx4
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx17
5 files changed, 14 insertions, 13 deletions
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
index ab9abbb4756f..84fb0d6fbb5b 100644
--- a/sw/inc/authratr.hxx
+++ b/sw/inc/authratr.hxx
@@ -42,7 +42,7 @@ class SW_DLLPUBLIC AuthorCharAttr
public:
USHORT nItemId;
USHORT nAttr;
- ULONG nColor;
+ ColorData nColor;
AuthorCharAttr();
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index a7c042f51d88..f03ca5b5d352 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star;
namespace
{
- static ::sw::mark::DdeBookmark* const lcl_FindDdeBookmark(const IDocumentMarkAccess& rMarkAccess, const String& rName)
+ static ::sw::mark::DdeBookmark* lcl_FindDdeBookmark(const IDocumentMarkAccess& rMarkAccess, const String& rName)
{
//Iterating over all bookmarks, checking DdeBookmarks
const String sNameLc = GetAppCharClass().lower(rName);
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 8a63254f42c1..863ef3c22f76 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -437,7 +437,7 @@ sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
const AuthorCharAttr &rAttr )
{
- Color aCol( (ColorData)rAttr.nColor );
+ Color aCol( rAttr.nColor );
if( COL_TRANSPARENT == rAttr.nColor )
{
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 082269122539..a15f5cacdf53 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1945,7 +1945,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
AuthorCharAttr aOldDeletedAttr(pOpt->GetDeletedAuthorAttr());
AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
- ULONG nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
+ ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
USHORT nOldMarkMode = pOpt->GetMarkAlignMode();
USHORT nPos = aInsertLB.GetSelectEntryPos();
@@ -2105,7 +2105,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedColorLB.SetUpdateMode( TRUE );
aMarkColorLB.SetUpdateMode( TRUE );
- ULONG nColor = rInsertAttr.nColor;
+ ColorData nColor = rInsertAttr.nColor;
switch (nColor)
{
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() )