Fraction->double in FrPair

Change-Id: Ibfee97e8b778bae6d93be852c78ab518285ca27c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201745
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2026-03-21 12:44:23 +01:00
parent 82be8bfaa2
commit cff0defd2c
10 changed files with 53 additions and 74 deletions
+18 -35
View File
@@ -3164,7 +3164,7 @@ void SvxMSDffManager::Scale( sal_Int32& rVal ) const
return;
}
rVal = BigMulDiv( rVal, nMapMul, nMapDiv );
rVal = rVal * mfMap;
}
}
@@ -3174,8 +3174,8 @@ void SvxMSDffManager::Scale( Point& rPos ) const
rPos.AdjustY(nMapYOfs );
if ( bNeedMap )
{
rPos.setX( BigMulDiv( rPos.X(), nMapMul, nMapDiv ) );
rPos.setY( BigMulDiv( rPos.Y(), nMapMul, nMapDiv ) );
rPos.setX( rPos.X() * mfMap );
rPos.setY( rPos.Y() * mfMap );
}
}
@@ -3183,14 +3183,14 @@ void SvxMSDffManager::Scale( Size& rSiz ) const
{
if ( bNeedMap )
{
rSiz.setWidth( BigMulDiv( rSiz.Width(), nMapMul, nMapDiv ) );
rSiz.setHeight( BigMulDiv( rSiz.Height(), nMapMul, nMapDiv ) );
rSiz.setWidth( rSiz.Width() * mfMap );
rSiz.setHeight( rSiz.Height() * mfMap );
}
}
void SvxMSDffManager::ScaleEmu( sal_Int32& rVal ) const
{
rVal = BigMulDiv( rVal, nEmuMul, nEmuDiv );
rVal = rVal * mfEmu;
}
sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const
@@ -3205,7 +3205,7 @@ sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const
sal_Int32 SvxMSDffManager::ScalePoint( sal_Int32 nVal ) const
{
return BigMulDiv( nVal, nPntMul, nPntDiv );
return nVal * mfPnt;
};
void SvxMSDffManager::SetModel(SdrModel* pModel, tools::Long nApplicationScale)
@@ -3216,52 +3216,35 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, tools::Long nApplicationScale)
// PPT works in units of 576DPI
// WW on the other side uses twips, i.e. 1440DPI.
MapUnit eMap = pSdrModel->GetScaleUnit();
Fraction aFact( GetMapFactor(MapUnit::MapInch, eMap).X() );
tools::Long nMul=aFact.GetNumerator();
tools::Long nDiv=aFact.GetDenominator()*nApplicationScale;
aFact=Fraction(nMul,nDiv); // try again to shorten it
// For 100TH_MM -> 2540/576=635/144
// For Twip -> 1440/576=5/2
nMapMul = aFact.GetNumerator();
nMapDiv = aFact.GetDenominator();
bNeedMap = nMapMul!=nMapDiv;
mfMap = GetMapFactor(MapUnit::MapInch, eMap).X() / nApplicationScale;
bNeedMap = mfMap != 1.0;
// MS-DFF-Properties are mostly given in EMU (English Metric Units)
// 1mm=36000emu, 1twip=635emu
aFact=GetMapFactor(MapUnit::Map100thMM,eMap).X();
nMul=aFact.GetNumerator();
nDiv=aFact.GetDenominator()*360;
aFact=Fraction(nMul,nDiv); // try again to shorten it
// For 100TH_MM -> 1/360
// For Twip -> 14,40/(25,4*360)=144/91440=1/635
nEmuMul=aFact.GetNumerator();
nEmuDiv=aFact.GetDenominator();
mfEmu = GetMapFactor(MapUnit::Map100thMM,eMap).X() / 360;
// And something for typographic Points
aFact=GetMapFactor(MapUnit::MapPoint,eMap).X();
nPntMul=aFact.GetNumerator();
nPntDiv=aFact.GetDenominator();
mfPnt = GetMapFactor(MapUnit::MapPoint,eMap).X();
}
else
{
pModel = nullptr;
nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0;
mfMap = 0;
mfEmu = 0;
mfPnt = 0;
nMapXOfs = nMapYOfs = 0;
bNeedMap = false;
}
if (bNeedMap)
{
assert(nMapMul > nMapDiv);
BigInt aMinVal(SAL_MIN_INT32);
aMinVal /= nMapMul;
aMinVal *= nMapDiv;
nMinAllowedVal = aMinVal;
BigInt aMaxVal(SAL_MAX_INT32);
aMaxVal /= nMapMul;
aMaxVal *= nMapDiv;
nMaxAllowedVal = aMaxVal;
assert(mfMap > 1.0);
nMinAllowedVal = SAL_MIN_INT32 / mfMap;
nMaxAllowedVal = SAL_MAX_INT32 / mfMap;
}
else
{
+1 -1
View File
@@ -2531,7 +2531,7 @@ Size SdrPowerPointImport::GetPageSize() const
Scale( aRet );
// PPT works with units of 576 dpi in any case. To avoid inaccuracies
// I do round the last decimal digit away.
if ( nMapMul > 2 * nMapDiv )
if ( mfMap > 2.0 )
{
MapUnit eMap = pSdrModel->GetScaleUnit();
bool bInch = IsInch( eMap );
+3 -6
View File
@@ -446,14 +446,11 @@ protected:
SvStream* pStData2;
SdrModel* pSdrModel;
tools::Long nMapMul;
tools::Long nMapDiv;
double mfMap;
tools::Long nMapXOfs;
tools::Long nMapYOfs;
tools::Long nEmuMul;
tools::Long nEmuDiv;
tools::Long nPntMul;
tools::Long nPntDiv;
double mfEmu;
double mfPnt;
bool bNeedMap;
sal_Int32 nMinAllowedVal;
sal_Int32 nMaxAllowedVal;
+10 -10
View File
@@ -224,17 +224,17 @@ void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho);
SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv);
class FrPair {
Fraction m_aX;
Fraction m_aY;
double m_aX;
double m_aY;
public:
FrPair(const Fraction& rBoth) : m_aX(rBoth),m_aY(rBoth) {}
FrPair(const Fraction& rX, const Fraction& rY) : m_aX(rX),m_aY(rY) {}
FrPair(tools::Long nMul, tools::Long nDiv) : m_aX(nMul,nDiv),m_aY(nMul,nDiv) {}
FrPair(tools::Long xMul, tools::Long xDiv, tools::Long yMul, tools::Long yDiv): m_aX(xMul,xDiv),m_aY(yMul,yDiv) {}
const Fraction& X() const { return m_aX; }
const Fraction& Y() const { return m_aY; }
Fraction& X() { return m_aX; }
Fraction& Y() { return m_aY; }
FrPair(const double& rBoth) : m_aX(rBoth),m_aY(rBoth) {}
FrPair(const double& rX, const double& rY) : m_aX(rX),m_aY(rY) {}
FrPair(tools::Long nMul, tools::Long nDiv) = delete;
FrPair(tools::Long xMul, tools::Long xDiv, tools::Long yMul, tools::Long yDiv): m_aX(double(xMul)/xDiv),m_aY(double(yMul)/yDiv) {}
double X() const { return m_aX; }
double Y() const { return m_aY; }
double& X() { return m_aX; }
double& Y() { return m_aY; }
};
// To convert units of measurement
+5 -5
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
<XShape positionX="1397" positionY="838" sizeX="25197" sizeY="3506" type="com.sun.star.presentation.TitleTextShape" fontHeight="44.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="3506" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<XShape positionX="1397" positionY="837" sizeX="25198" sizeY="3506" type="com.sun.star.presentation.TitleTextShape" fontHeight="44.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="3506" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,12 +9,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
<Line1 column1="25198.000000" column2="0.000000" column3="1397.000000"/>
<Line2 column1="0.000000" column2="3507.000000" column3="838.000000"/>
<Line1 column1="25199.000000" column2="0.000000" column3="1397.000000"/>
<Line2 column1="0.000000" column2="3507.000000" column3="837.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
<XShape positionX="1397" positionY="4912" sizeX="25197" sizeY="12180" type="com.sun.star.presentation.SubtitleShape" text="Blah" fontHeight="32.000000" fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="78" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="12103" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<XShape positionX="1397" positionY="4912" sizeX="25198" sizeY="12180" type="com.sun.star.presentation.SubtitleShape" text="Blah" fontHeight="32.000000" fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="78" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="12103" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -23,7 +23,7 @@
<LineStart/>
<LineEnd/>
<Transformation>
<Line1 column1="25198.000000" column2="0.000000" column3="1397.000000"/>
<Line1 column1="25199.000000" column2="0.000000" column3="1397.000000"/>
<Line2 column1="0.000000" column2="12181.000000" column3="4912.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
+3 -3
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
<XShape positionX="12042" positionY="1904" sizeX="12087" sizeY="9521" type="com.sun.star.presentation.TitleTextShape" fontHeight="60.000000" fontColor="004990" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="9261" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<XShape positionX="12042" positionY="1905" sizeX="12088" sizeY="9520" type="com.sun.star.presentation.TitleTextShape" fontHeight="60.000000" fontColor="004990" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="9260" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,8 +9,8 @@
<LineStart/>
<LineEnd/>
<Transformation>
<Line1 column1="12088.000000" column2="0.000000" column3="12042.000000"/>
<Line2 column1="0.000000" column2="9522.000000" column3="1904.000000"/>
<Line1 column1="12089.000000" column2="0.000000" column3="12042.000000"/>
<Line2 column1="0.000000" column2="9521.000000" column3="1905.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
+5 -5
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
<XShape positionX="1485" positionY="610" sizeX="18411" sizeY="1954" type="com.sun.star.presentation.TitleTextShape" fontHeight="40.000000" fontColor="ff0000" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1645" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<XShape positionX="1486" positionY="610" sizeX="18410" sizeY="1954" type="com.sun.star.presentation.TitleTextShape" fontHeight="40.000000" fontColor="ff0000" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1645" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,12 +9,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
<Line1 column1="18412.000000" column2="0.000000" column3="1485.000000"/>
<Line1 column1="18411.000000" column2="0.000000" column3="1486.000000"/>
<Line2 column1="0.000000" column2="1955.000000" column3="610.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
<XShape positionX="1692" positionY="4444" sizeX="22217" sizeY="12061" type="com.sun.star.presentation.OutlinerShape" fontHeight="24.000000" fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="AUTOFIT" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="11811" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<XShape positionX="1693" positionY="4445" sizeX="22216" sizeY="12060" type="com.sun.star.presentation.OutlinerShape" fontHeight="24.000000" fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="AUTOFIT" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="130" textLowerDistance="130" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="11810" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -23,8 +23,8 @@
<LineStart/>
<LineEnd/>
<Transformation>
<Line1 column1="22218.000000" column2="0.000000" column3="1692.000000"/>
<Line2 column1="0.000000" column2="12062.000000" column3="4444.000000"/>
<Line1 column1="22217.000000" column2="0.000000" column3="1693.000000"/>
<Line2 column1="0.000000" column2="12061.000000" column3="4445.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
+4 -4
View File
@@ -558,7 +558,7 @@ tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv)
static FrPair toPair(o3tl::Length eFrom, o3tl::Length eTo)
{
const auto [nNum, nDen] = o3tl::getConversionMulDiv(eFrom, eTo);
return FrPair(nNum, nDen);
return FrPair(nNum, nDen, nNum, nDen);
}
// How many eU units fit into a mm, respectively an inch?
@@ -593,7 +593,7 @@ static FrPair GetInchOrMM(MapUnit eU)
}
default: break;
}
return Fraction(1,1);
return 1.0;
}
// Calculate the factor that we need to convert units from eS to eD.
@@ -611,8 +611,8 @@ FrPair GetMapFactor(MapUnit eS, MapUnit eD)
bool bSInch=IsInch(eS);
bool bDInch=IsInch(eD);
FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y());
if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); }
if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); }
if (bSInch && !bDInch) { aRet.X() *= 127.0/5; aRet.Y() *= 127.0/5; }
if (!bSInch && bDInch) { aRet.X() *= 5.0/127; aRet.Y() *= 5.0/127; }
return aRet;
};
+2 -2
View File
@@ -97,7 +97,7 @@ private:
protected:
WW8Export& mrWrt;
SvStream* mpEscherStrm;
tools::Long mnEmuMul, mnEmuDiv;
double mfEmu;
virtual sal_Int32 WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
@@ -109,7 +109,7 @@ protected:
static void WriteGrfAttr(const SwNoTextNode& rNd, const SwFrameFormat& rFormat, EscherPropertyContainer& rPropOpt);
sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
{ return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); }
{ return nVal * mfEmu; }
static sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax);
+2 -3
View File
@@ -2127,10 +2127,9 @@ void SwBasicEscherEx::Init()
}
// MS-DFF-Properties mostly are in EMU (English Metric Units)
Fraction aFact = conversionFract(o3tl::Length::mm100, o3tl::Length::emu);
double aFact(conversionFract(o3tl::Length::mm100, o3tl::Length::emu));
aFact /= GetMapFactor(MapUnit::Map100thMM, eMap).X();
mnEmuMul = aFact.GetNumerator();
mnEmuDiv = aFact.GetDenominator();
mfEmu = aFact;
SetHellLayerId(mrWrt.m_rDoc.getIDocumentDrawModelAccess().GetHellId());
SetHeaderFooterHellLayerId(mrWrt.m_rDoc.getIDocumentDrawModelAccess().GetHeaderFooterHellId());