diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 4954786faa71..4d18337edca2 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -270,7 +270,7 @@ private: tools::Rectangle& rTextRect, tools::Rectangle& rAnchorRect, tools::Rectangle& rPaintRect, - Fraction& aFitXCorrection ) const; + double& aFitXCorrection ) const; void setupAutoFitText( SdrOutliner& rOutliner ) const; void setupAutoFitText(SdrOutliner& rOutliner, const Size& rShapeSize) const; @@ -291,7 +291,7 @@ protected: rtl::Reference ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const; rtl::Reference ImpConvertAddText(const rtl::Reference & pObj, bool bBezier) const; void ImpSetTextStyleSheetListeners(); - static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection); + static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, double& rFitXCorrection); static void ImpJustifyRect(tools::Rectangle& rRect); void ImpCheckShear(); tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 2659eb352a78..bf379b0ebbd6 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -832,7 +832,7 @@ std::optional SdrTextObj::CreateEditOutlinerParaObject() con return pPara; } -void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection) +void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, double& rFitXCorrection) { OutputDevice* pOut = rOutliner.GetRefDevice(); bool bNoStretching(false); @@ -955,7 +955,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS nLoopCount++; Size aSiz(rOutliner.CalcTextSize()); tools::Long nXDiff = aSiz.Width() - nWantWdt; - rFitXCorrection=Fraction(nWantWdt,aSiz.Width()); + rFitXCorrection = double(nWantWdt) / aSiz.Width(); if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0) { bNoMoreLoop = true; } else { @@ -1169,7 +1169,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, tools::Rectangle& rTextRect, tools::Rectangle& rAnchorRect, tools::Rectangle& rPaintRect, - Fraction& rFitXCorrection ) const + double& rFitXCorrection ) const { if (!bContourFrame) { @@ -1259,7 +1259,7 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& { tools::Rectangle aTextRect; tools::Rectangle aAnchorRect; - Fraction aFitXCorrection(1,1); + double aFitXCorrection(1.0); const bool bContourFrame(IsContourTextFrame()); const MapMode aMapMode(getSdrModelFromSdrObject().GetScaleUnit()); @@ -1754,7 +1754,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( tools::Rectangle aTextRect; tools::Rectangle aAnchorRect; tools::Rectangle aPaintRect; - Fraction aFitXCorrection(1,1); + double aFitXCorrection(1.0); bool bContourFrame(IsContourTextFrame()); // get outliner set up. To avoid getting a somehow rotated MetaFile, diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index f8cb7c8f125a..b3fac1d95bb1 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -105,7 +105,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) tools::Rectangle aTextRect; TakeTextRect(rOutl, aTextRect, false, &aAnchorRect); - Fraction aFitXCorrection(1,1); + double aFitXCorrection(1.0); ImpSetCharStretching(rOutl,aTextRect.GetSize(),aAnchorRect.GetSize(),aFitXCorrection); } else if (IsAutoFit())