summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-09-08 14:42:01 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-09-08 14:42:01 -0400
commit7d307d9c8bde7da89683bab9566e681e55e8bf36 (patch)
treeaa836c6f068abd246d1dc8c51fa22e8052e6328e /sc
parenta90ab2d8a2fc3e8c0b2ae1d1d657305ad9ceaca5 (diff)
Bring the default row height back to the 3.4 level.
Until we find a better solution, let's at least bring the values back to the 3.4 level. In 3.4 I have nDefFontHeight = 225 and nStdRowHeight = 256. This change make those values the minimum values.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/global.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index a48431eec840..26046dee4f9b 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -139,8 +139,8 @@ SvNumberFormatter* ScGlobal::pEnglishFormatter = NULL;
double ScGlobal::nScreenPPTX = 96.0;
double ScGlobal::nScreenPPTY = 96.0;
-sal_uInt16 ScGlobal::nDefFontHeight = 240;
-sal_uInt16 ScGlobal::nStdRowHeight = 257;
+sal_uInt16 ScGlobal::nDefFontHeight = 225;
+sal_uInt16 ScGlobal::nStdRowHeight = 256;
long ScGlobal::nLastRowHeightExtra = 0;
long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
@@ -624,14 +624,19 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
Font aDefFont;
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
aVirtWindow.SetFont(aDefFont);
- nDefFontHeight = (sal_uInt16) aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()),
- MAP_TWIP).Height();
+ sal_uInt16 nTest = static_cast<sal_uInt16>(
+ aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()), MAP_TWIP).Height());
+
+ if (nTest > nDefFontHeight)
+ nDefFontHeight = nTest;
const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
- nStdRowHeight = (sal_uInt16) ( nDefFontHeight +
- pMargin->GetTopMargin() + pMargin->GetBottomMargin()
- - STD_ROWHEIGHT_DIFF );
+ nTest = static_cast<sal_uInt16>(
+ nDefFontHeight + pMargin->GetTopMargin() + pMargin->GetBottomMargin() - STD_ROWHEIGHT_DIFF);
+
+ if (nTest > nStdRowHeight)
+ nStdRowHeight = nTest;
}
void ScGlobal::Clear()