fpspreadsheet: Fix automatic row height calculation in WorksheetGrid for rotated text.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4578 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-03-19 22:57:46 +00:00
parent 5b524a1262
commit b6a839a0f7

View File

@ -627,7 +627,10 @@ end;
function TsTextPainter.GetHeight: Integer;
begin
Result := FTotalHeight;
if FTextRotation = trHorizontal then
Result := FTotalHeight
else
Result := FMaxLineLen;
end;
function TsTextPainter.GetTextPt(x,y,ALineHeight: Integer): TPoint;
@ -656,7 +659,9 @@ end;
function TsTextPainter.GetWidth: Integer;
begin
Result := FMaxLineLen;
if FTextRotation = trHorizontal then
Result := FMaxLineLen else
Result := FTotalHeight;
end;
{ Called before analyzing and rendering of the text.