starmath/inc/node.hxx | 3 +++ starmath/source/cursor.cxx | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 1eb533a0456f508972b3af16b8b867672d09ac49 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Thu Jul 14 15:53:15 2016 +0900 starmath: Make AdjustFontDesc() precede Prepare() because what Prepare() does depends on both nFontDesc and token of the SmTextNode. Change-Id: Ib7f8c408eb8f95a10f27ccbd3d80cdd0d6ea6d56 Reviewed-on: https://gerrit.libreoffice.org/27210 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@fixedpoint.jp> diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index d03f0f2..a62f1cc 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -157,6 +157,9 @@ public: void SetFontSize(const Fraction &rRelSize, FontSizeType nType); void SetSize(const Fraction &rScale); + /** Prepare preliminary settings about font and text + * (e.g. maFace, meRectHorAlign, mnFlags, mnAttributes, etc.) + */ virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); void PrepareAttributes(); diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index f27dbcd..bef900a 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -988,10 +988,9 @@ void SmCursor::InsertText(const OUString& aString) token.aText = aString; SmTextNode* pText = new SmTextNode(token, FNT_VARIABLE); - - //Prepare the new node - pText->Prepare(mpDocShell->GetFormat(), *mpDocShell); + pText->SetText(aString); pText->AdjustFontDesc(); + pText->Prepare(mpDocShell->GetFormat(), *mpDocShell); SmNodeList* pList = new SmNodeList(); pList->push_front(pText); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits