sd/source/ui/dlg/animobjs.cxx | 10 +++++----- sd/source/ui/inc/animobjs.hxx | 2 +- vcl/source/filter/ipict/ipict.cxx | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit d36ff48a7986067f68b1f69c9f2834294114561b Author: Noel Grandin <[email protected]> AuthorDate: Tue Mar 24 15:18:36 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Mar 24 18:39:51 2026 +0100 Fraction->double in AnimationWindow Change-Id: If9bf3c0acbfc51e913c5f471859a2734dbed7f17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202599 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 7f468b4ca7e1..006ca386da69 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -636,9 +636,9 @@ void AnimationWindow::WaitInEffect( sal_Int64 nMilliSeconds, sal_Int64 nTime, } } -Fraction AnimationWindow::GetScale() +double AnimationWindow::GetScale() { - Fraction aFrac; + double fFrac = 0.0; size_t const nCount = m_FrameList.size(); if (nCount > 0) { @@ -656,10 +656,10 @@ Fraction AnimationWindow::GetScale() Size aDisplaySize(m_xCtlDisplay->GetOutputSizePixel()); - aFrac = Fraction( std::min( static_cast<double>(aDisplaySize.Width()) / static_cast<double>(aBmpSize.Width()), - static_cast<double>(aDisplaySize.Height()) / static_cast<double>(aBmpSize.Height()) ) ); + fFrac = std::min( static_cast<double>(aDisplaySize.Width()) / static_cast<double>(aBmpSize.Width()), + static_cast<double>(aDisplaySize.Height()) / static_cast<double>(aBmpSize.Height()) ); } - return aFrac; + return fFrac; } void AnimationWindow::Resize() diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 12f95191fda5..023a9f986808 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -142,7 +142,7 @@ private: void ResetAttrs(); void WaitInEffect( sal_Int64 nMilliSeconds, sal_Int64 nTime, SfxProgress* pStbMgr ) const; - Fraction GetScale(); + double GetScale(); }; /** commit 5772d9843048d6e32e28a8de66a320d0f41aefc6 Author: Noel Grandin <[email protected]> AuthorDate: Tue Mar 24 15:07:00 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Mar 24 18:39:41 2026 +0100 Fraction->double in PictReader Change-Id: I9cb7e5fbd36616afc7fd1dab101baa9c9e5d78e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202598 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Noel Grandin <[email protected]> diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx index 5cbf379867f5..790b541fa0c8 100644 --- a/vcl/source/filter/ipict/ipict.cxx +++ b/vcl/source/filter/ipict/ipict.cxx @@ -175,8 +175,8 @@ private: Size aActOvalSize; vcl::Font aActFont; - Fraction aHRes; - Fraction aVRes; + double mfHRes; + double mfVRes; Point ReadPoint(); @@ -1259,8 +1259,8 @@ void PictReader::ReadHeader() fHRes /= 65536; double fVRes = nVResFixed; fVRes /= 65536; - aHRes /= fHRes; - aVRes /= fVRes; + fHRes /= fHRes; + fVRes /= fVRes; aBoundingRect=tools::Rectangle( x1,y1, x2, y2 ); pPict->SeekRel( 4 ); // 4 bytes reserved return; @@ -1947,7 +1947,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) aActFont.SetFontSize(Size(0,12)); aActFont.SetAlignment(ALIGN_BASELINE); - aHRes = aVRes = Fraction( 1, 1 ); + mfHRes = mfVRes = 1.0; pVirDev = VclPtr<VirtualDevice>::Create(); pVirDev->EnableOutput(false); @@ -2007,7 +2007,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) rGDIMetaFile.Stop(); pVirDev.disposeAndClear(); - rGDIMetaFile.SetPrefMapMode( MapMode( MapUnit::MapInch, Point(), aHRes, aVRes ) ); + rGDIMetaFile.SetPrefMapMode( MapMode( MapUnit::MapInch, Point(), Fraction(mfHRes), Fraction(mfVRes) ) ); rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() ); pPict->SetEndian(nOrigNumberFormat);
