summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-23 17:22:06 +0200
committerJan Holesovsky <kendy@collabora.com>2014-10-23 18:34:34 +0200
commit858c2a2977d5e4671959724ecd2a453837dadddf (patch)
treea61e303e6e27cef015c50b38b23fc574ce64fcef /starmath/source/node.cxx
parentff502f409fd73249a6a94c579d19905144aa5ba8 (diff)
Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index a2cd19d0fe32..dd1c51c4b4b9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -165,14 +165,14 @@ void SmNode::SetFont(const SmFace &rFace)
}
-void SmNode::SetFontSize(const boost::rational<sal_Int64>& rSize, sal_uInt16 nType)
+void SmNode::SetFontSize(const boost::rational<long>& rSize, sal_uInt16 nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
if (!(Flags() & FLG_SIZE))
{
- boost::rational<sal_Int64> aVal (SmPtsTo100th_mm(rSize.numerator()),
+ boost::rational<long> aVal (SmPtsTo100th_mm(rSize.numerator()),
rSize.denominator());
long nHeight = boost::rational_cast<long>(aVal);
@@ -197,7 +197,7 @@ void SmNode::SetFontSize(const boost::rational<sal_Int64>& rSize, sal_uInt16 nTy
break;
case FNTSIZ_DIVIDE:
- if (rSize != boost::rational<sal_Int64>(0L))
+ if (rSize != boost::rational<long>(0L))
aFntSize.Height() = boost::rational_cast<long>(aFntSize.Height() / rSize);
break;
default:
@@ -220,7 +220,7 @@ void SmNode::SetFontSize(const boost::rational<sal_Int64>& rSize, sal_uInt16 nTy
}
-void SmNode::SetSize(const boost::rational<sal_Int64>& rSize)
+void SmNode::SetSize(const boost::rational<long>& rSize)
{
GetFont() *= rSize;
@@ -906,7 +906,7 @@ void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
OSL_ENSURE(pOper, "Sm: NULL pointer");
OSL_ENSURE(pBody, "Sm: NULL pointer");
- pOper->SetSize(boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_OPERATOR), 100));
+ pOper->SetSize(boost::rational<long> (rFormat.GetRelSize(SIZ_OPERATOR), 100));
pOper->Arrange(rDev, rFormat);
pBody->Arrange(rDev, rFormat);
@@ -1003,7 +1003,7 @@ void SmRootNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pRootSym->MoveTo(aPos);
if (pExtra)
- { pExtra->SetSize(boost::rational<sal_Int64>(rFormat.GetRelSize(SIZ_INDEX), 100));
+ { pExtra->SetSize(boost::rational<long>(rFormat.GetRelSize(SIZ_INDEX), 100));
pExtra->Arrange(rDev, rFormat);
aPos = GetExtraPos(*pRootSym, *pExtra);
@@ -1097,7 +1097,7 @@ void SmBinHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
OSL_ENSURE(pOper != NULL, "Sm: NULL pointer");
OSL_ENSURE(pRight != NULL, "Sm: NULL pointer");
- pOper->SetSize(boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_OPERATOR), 100));
+ pOper->SetSize(boost::rational<long> (rFormat.GetRelSize(SIZ_OPERATOR), 100));
pLeft ->Arrange(rDev, rFormat);
pOper ->Arrange(rDev, rFormat);
@@ -1139,7 +1139,7 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
bool bIsTextmode = rFormat.IsTextmode();
if (bIsTextmode)
{
- boost::rational<sal_Int64> aFraction(rFormat.GetRelSize(SIZ_INDEX), 100);
+ boost::rational<long> aFraction(rFormat.GetRelSize(SIZ_INDEX), 100);
pNum ->SetSize(aFraction);
pLine ->SetSize(aFraction);
pDenom->SetSize(aFraction);
@@ -1502,7 +1502,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
SIZ_LIMITS : SIZ_INDEX;
- boost::rational<sal_Int64> aFraction ( rFormat.GetRelSize(nIndex), 100 );
+ boost::rational<long> aFraction ( rFormat.GetRelSize(nIndex), 100 );
pSubSup->SetSize(aFraction);
}
@@ -1833,9 +1833,9 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
pBody->Arrange(aTmpDev, rFormat);
// size is the same as for limits for this part
- pScript->SetSize( boost::rational<sal_Int64>( rFormat.GetRelSize(SIZ_LIMITS), 100 ) );
+ pScript->SetSize( boost::rational<long>( rFormat.GetRelSize(SIZ_LIMITS), 100 ) );
// braces are a bit taller than usually
- pBrace ->SetSize( boost::rational<sal_Int64>(3, 2) );
+ pBrace ->SetSize( boost::rational<long>(3, 2) );
long nItalicWidth = pBody->GetItalicWidth();
if (nItalicWidth > 0)
@@ -1929,7 +1929,7 @@ void SmOperNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
OSL_ENSURE(pBody, "Sm: missing subnode");
SmNode *pSymbol = GetSymbol();
- pSymbol->SetSize(boost::rational<sal_Int64>(CalcSymbolHeight(*pSymbol, rFormat),
+ pSymbol->SetSize(boost::rational<long>(CalcSymbolHeight(*pSymbol, rFormat),
pSymbol->GetFont().GetSize().Height()));
pBody->Arrange(rDev, rFormat);
@@ -2174,7 +2174,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const boost::rational<sal_Int64>& rValue, sal_uInt16 Type)
+void SmFontNode::SetSizeParameter(const boost::rational<long>& rValue, sal_uInt16 Type)
{
nSizeType = Type;
aFontSize = rValue;
@@ -2367,7 +2367,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
SIZ_FUNCTION : SIZ_TEXT;
- GetFont() *= boost::rational<sal_Int64> (rFormat.GetRelSize(nSizeDesc), 100);
+ GetFont() *= boost::rational<long> (rFormat.GetRelSize(nSizeDesc), 100);
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
@@ -2729,7 +2729,7 @@ void SmMathSymbolNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
PrepareAttributes();
- GetFont() *= boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_TEXT), 100);
+ GetFont() *= boost::rational<long> (rFormat.GetRelSize(SIZ_TEXT), 100);
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());