summaryrefslogtreecommitdiff
path: root/include/tools/bigint.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/tools/bigint.hxx')
-rw-r--r--include/tools/bigint.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 6683f07e3121..db8c3bcd1b1c 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -88,6 +88,9 @@ public:
operator sal_Int32() const;
operator sal_uInt32() const;
operator double() const;
+#if SAL_TYPES_SIZEOFPOINTER == 8
+ operator tools::Long() const;
+#endif
bool IsSet() const { return bIsSet; }
bool IsNeg() const;
@@ -153,6 +156,17 @@ inline BigInt::operator sal_uInt32() const
return 0;
}
+#if SAL_TYPES_SIZEOFPOINTER == 8
+inline BigInt::operator tools::Long() const
+{
+ // Clamp to int32 since long is int32 on Windows.
+ if (!bIsBig)
+ return nVal;
+ assert(false && "out of range");
+ return 0;
+}
+#endif
+
inline BigInt& BigInt::operator =( sal_Int32 nValue )
{
bIsSet = true;