summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-23 18:23:14 -0500
committerLionel Elie Mamane <lionel@mamane.lu>2011-11-24 11:12:18 +0100
commit0bde24644b5457aa193ecc84ba37169a967de1c6 (patch)
tree919c954639f18321813f30f30da1ad0496c077b6
parenta1582914e1150efe1664204b53fdcbaf9b713652 (diff)
fdo#39589: Avoid using ulimit_cast between signed and unsigned.
If you do, things go very very wrong. These *limit_cast try to be clever and check ranges of various types before casting, but they fail to do the right thing when casting a signed integer into unsigned. Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
-rw-r--r--sc/source/filter/excel/xeview.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 437a95367..5a02c3f5e 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -368,8 +368,8 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
else
{
// split window: position is in twips
- maData.mnSplitX = ulimit_cast< sal_uInt16 >( rTabSett.maSplitPos.X() );
- maData.mnSplitY = ulimit_cast< sal_uInt32 >( rTabSett.maSplitPos.Y() );
+ maData.mnSplitX = static_cast<sal_uInt16>(rTabSett.maSplitPos.X());
+ maData.mnSplitY = static_cast<sal_uInt32>(rTabSett.maSplitPos.Y());
}
// selection