summaryrefslogtreecommitdiff
path: root/starmath/source/cursor.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-07-14 15:53:15 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-07-15 07:56:39 +0000
commit1eb533a0456f508972b3af16b8b867672d09ac49 (patch)
tree40ba4f72683f778c5c218d5eaecb3c53b488057b /starmath/source/cursor.cxx
parente6d2827fc385353f07d1703714f715718576c130 (diff)
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 <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r--starmath/source/cursor.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index f27dbcd3a0d1..bef900af6ed4 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);