summaryrefslogtreecommitdiff
path: root/starmath/source/edit.cxx
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2021-02-13 16:43:01 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-02-15 08:58:34 +0100
commit737112d7c37300661972778a63a4e93fa196a395 (patch)
tree21190f7cf9662d16c7beb82fefcd9353d1f37ac3 /starmath/source/edit.cxx
parent1c02784889a5b4104878e2c767dff723b2173275 (diff)
Resolves tdf#140221 auto-adjust Formula Editor width
Currently the formula editor uses a fixed width that corresponds to about half the size of the display. This patch makes the formula editor auto adjust. Change-Id: I0cd6a6385b698fced96132a636df2d24c6c62cf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110852 Tested-by: Jenkins Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'starmath/source/edit.cxx')
-rw-r--r--starmath/source/edit.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 9b4cd02fb876..e49945acb840 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -293,6 +293,10 @@ void SmEditWindow::Resize()
if (pEditView)
{
+ // Resizes the edit engine to adjust to the size of the output area
+ const Size aSize( pEditView->GetOutputArea().GetSize() );
+ pEditView->GetEditEngine()->SetPaperSize(aSize);
+
pEditView->SetOutputArea(AdjustScrollBars());
pEditView->ShowCursor();