diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-16 15:30:32 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-16 17:44:44 +0200 |
commit | 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch) | |
tree | 80c42b34da7e7ee05843b572f7311b3c230de9dd /sc/source/ui/docshell | |
parent | ada4862afc3227b04c12960ded761db24f61257e (diff) |
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.
Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index b3085442ce17..c117a62f342c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -153,7 +153,7 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint ) SCROW nEndRow = rRange.aEnd.Row(); ScSizeDeviceProvider aProv( &rDocShell ); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice()); bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab); @@ -3358,7 +3358,7 @@ static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCT double nPPTY = aProv.GetPPTY(); ScDocument& rDoc = rDocShell.GetDocument(); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sal_uInt16 nTwips = rDoc.GetOptimalColWidth( nCol, nTab, pDev, nPPTX, nPPTY, aOne, aOne, bFormula, NULL ); @@ -3451,7 +3451,7 @@ bool ScDocFunc::SetWidthOrHeight( } ScSizeDeviceProvider aProv( &rDocShell ); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice()); aCxt.setForceAutoSize(bAll); rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 6b25a783e6fe..dd8f30091732 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1457,7 +1457,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) CalcOutputFactor(); if ( bRet && (bSetColWidths || bSetRowHeights) ) { // Adjust column width/row height; base 100% zoom - boost::rational<long> aZoom( 1, 1 ); + boost::rational<sal_Int64> aZoom( 1, 1 ); double nPPTX = ScGlobal::nScreenPPTX * boost::rational_cast<double>(aZoom) / GetOutputFactor(); // Factor is printer display ratio double nPPTY = ScGlobal::nScreenPPTY * boost::rational_cast<double>(aZoom); VirtualDevice aVirtDev; diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 88fc80417e9f..ff42c00eac26 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -368,7 +368,7 @@ void ScDocShell::CancelAutoDBRange() bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) { ScSizeDeviceProvider aProv(this); - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice()); bool bChange = aDocument.SetOptimalHeight(aCxt, nStartRow,nEndRow, nTab); @@ -383,7 +383,7 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark ) // update automatic row heights ScSizeDeviceProvider aProv(this); - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice()); aDocument.UpdateAllRowHeights(aCxt, pTabMark); } |