diff options
Diffstat (limited to 'sc/source/ui/docshell/docsh3.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 74ed3063c01e..f59c068bb0e6 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -338,14 +338,14 @@ void ScDocShell::CalcOutputFactor() { if (bIsInplace) { - nPrtToScreenFactor = 1.0; // passt sonst nicht zur inaktiven Darstellung + nPrtToScreenFactor = Fraction( 1, 1 ); // passt sonst nicht zur inaktiven Darstellung return; } bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if (bTextWysiwyg) { - nPrtToScreenFactor = 1.0; + nPrtToScreenFactor = Fraction( 1, 1 ); return; } @@ -376,11 +376,13 @@ void ScDocShell::CalcOutputFactor() nWindowWidth = (long) ( nWindowWidth / ScGlobal::nScreenPPTX * HMM_PER_TWIPS ); if (nPrinterWidth && nWindowWidth) - nPrtToScreenFactor = nPrinterWidth / (double) nWindowWidth; + { + nPrtToScreenFactor = Fraction( nPrinterWidth, nWindowWidth ); + } else { OSL_FAIL("GetTextSize gibt 0 ??"); - nPrtToScreenFactor = 1.0; + nPrtToScreenFactor = Fraction( 1, 1 ); } } |