From 2904c469fc84fe7fb973e499d9d8b34c4919b3b3 Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Mon, 11 Aug 2014 21:22:59 +0200 Subject: Move variable definition closer to point of use. Previously it was in a very unlogical location. Change-Id: I6a09244eb1aa3bf413ae98e215c2667adcc96907 --- sc/source/ui/view/hdrcont.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 2c84e5017ed7..16df024f654e 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -319,7 +319,6 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) OUString aString; sal_uInt16 nBarSize; Point aScrPos; - Size aTextSize; Size aLogicSize = PixelToLogic( GetSizePixel(), maPaintMapMode ); @@ -622,9 +621,10 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) bBoldSet = bMark; } aString = GetEntryText( nEntryNo ); - aTextSize.Width() = GetTextWidth( aString ); - aTextSize.Height() = GetTextHeight(); - aTextSize = PixelToLogic( aTextSize, maPaintMapMode ); + Size aTextSize = PixelToLogic( Size( + GetTextWidth( aString ), + GetTextHeight() ), + maPaintMapMode ); Point aTxtPos(aScrPos); if (bVertical) -- cgit