summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorJan Iversen <jani@documentfoundation.org>2016-05-11 20:18:07 +0200
committerjan iversen <jani@documentfoundation.org>2016-05-16 06:14:35 +0000
commite265ea36df02310881e959a031b74578b323bfa5 (patch)
tree4185d2a0e07a673b939b2a9b782fa5f8fb3587ab /starmath
parent75c10400a60c084c26269de1e6cebac8e2583619 (diff)
tdf#98238, tdf#99591 reverted old commit
Revert "tdf#53472 Integral Symbols too small for some integrands" This reverts commit 746633bd0315939fd5e0b50c90692d356d2ed678. Revert on request from regina, since this commit caused 2 new bugs. The code of the reverted patch is kept in the file for further investigation, once it has been confirmed that it works. The file had 3 commits later, these are not affected by this commit Change-Id: I5b24a9b88ac909c83115e8c8a430dc768c9effd4 Reviewed-on: https://gerrit.libreoffice.org/24898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx28
1 files changed, 20 insertions, 8 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 7767b7022e2b..c5ae4135357f 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1700,19 +1700,31 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
assert(pOper);
assert(pBody);
- pBody->Arrange(rDev,rFormat);
- long nHeight = pBody->GetHeight();
+ //patch pBody->Arrange(rDev,rFormat);
+ //patch 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);
- 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);
+ //patch pSymbol->AdaptToY(rDev,nHeight);
+ //patch pSymbol->Arrange(rDev, rFormat);
+ //patch Point aPos= pSymbol->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, RectVerAlign::Mid);
+ //patch aPos.Y() = pSymbol->GetTop()+pBody->GetBottom() - pSymbol->GetBottom();
+ //patch pSymbol->MoveTo(aPos);
+ 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);
SmRect::operator = (*pBody);
- ExtendBy(*pSymbol, RectCopyMBL::This);
+ //patch ExtendBy(*pSymbol, RectCopyMBL::This);
+ ExtendBy(*pOper, RectCopyMBL::This);
}