diff options
Diffstat (limited to 'sc/source/core/data/drwlayer.cxx')
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index ca702d97de48..c6d58eff68c2 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -824,7 +824,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati double fXFrac = static_cast<double>(aNew.GetWidth()) / static_cast<double>(aOld.GetWidth()); double fYFrac = static_cast<double>(aNew.GetHeight()) / static_cast<double>(aOld.GetHeight()); - pObj->NbcResize(aNew.TopLeft(), Fraction(fXFrac), Fraction(fYFrac)); + pObj->NbcResize(aNew.TopLeft(), rational_FromDouble(fXFrac), rational_FromDouble(fYFrac)); } // order of these lines is important, modify rData.maLastRect carefully it is used as both // a value and a flag for initialisation @@ -1421,19 +1421,19 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const long nWidthDiff = nDestWidth - nSourceWidth; long nHeightDiff = nDestHeight - nSourceHeight; - Fraction aHorFract(1,1); - Fraction aVerFract(1,1); + boost::rational<long> aHorFract(1,1); + boost::rational<long> aVerFract(1,1); bool bResize = false; // sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes, // don't resize to empty size when pasting into hidden columns or rows if ( std::abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 ) { - aHorFract = Fraction( nDestWidth, nSourceWidth ); + aHorFract = boost::rational<long>( nDestWidth, nSourceWidth ); bResize = true; } if ( std::abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 ) { - aVerFract = Fraction( nDestHeight, nSourceHeight ); + aVerFract = boost::rational<long>( nDestHeight, nSourceHeight ); bResize = true; } Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving) |