[Libreoffice-commits] core.git: starmath/source

Jan Iversen jani at documentfoundation.org
Mon May 16 06:15:00 UTC 2016


 starmath/source/node.cxx |   28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

New commits:
commit e265ea36df02310881e959a031b74578b323bfa5
Author: Jan Iversen <jani at documentfoundation.org>
Date:   Wed May 11 20:18:07 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Regina Henschel <rb.henschel at t-online.de>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 7767b70..c5ae413 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);
 }
 
 


More information about the Libreoffice-commits mailing list