summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authormelikeyurtoglu <aysemelikeyurtoglu@gmail.com>2016-01-15 04:16:56 +0200
committerjan iversen <jani@documentfoundation.org>2016-02-10 07:17:14 +0000
commit746633bd0315939fd5e0b50c90692d356d2ed678 (patch)
treef2991159af564a886ee62cc31c896aa3af9c281b /starmath
parent68df4d20d169bfb82d260f7f355790ccad194b19 (diff)
tdf#53472 Integral Symbols too small for some integrands
Change-Id: I1ab550821f0b254a7414246fd72f3882b7140c90 Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/21482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index a518df4455d5..2ee43f9f314c 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1864,23 +1864,19 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
OSL_ENSURE(pOper, "Sm: missing subnode");
OSL_ENSURE(pBody, "Sm: missing subnode");
+ pBody->Arrange(rDev,rFormat);
+ long nHeight = pBody->GetHeight();
SmNode *pSymbol = GetSymbol();
- pSymbol->SetSize(Fraction(CalcSymbolHeight(*pSymbol, rFormat),
- pSymbol->GetFont().GetFontSize().Height()));
-
- pBody->Arrange(rDev, rFormat);
pOper->Arrange(rDev, rFormat);
- long nOrigHeight = GetFont().GetFontSize().Height(),
- nDist = nOrigHeight
- * rFormat.GetDistance(DIS_OPERATORSPACE) / 100L;
-
- Point aPos = pOper->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, /*RectVerAlign::CenterY*/RectVerAlign::Mid);
- aPos.X() -= nDist;
- pOper->MoveTo(aPos);
+ pSymbol->AdaptToY(rDev,nHeight);
+ pSymbol->Arrange(rDev, rFormat);
+ Point aPos= pSymbol->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, RectVerAlign::Mid);
+ aPos.Y() = pSymbol->GetTop()+pBody->GetBottom() - pSymbol->GetBottom();
+ pSymbol->MoveTo(aPos);
SmRect::operator = (*pBody);
- ExtendBy(*pOper, RCP_THIS);
+ ExtendBy(*pSymbol, RCP_THIS);
}