diff options
Diffstat (limited to 'starmath/source/edit.cxx')
-rw-r--r-- | starmath/source/edit.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index a425e20f4b0e..152c269b1cc4 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -294,6 +294,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(); @@ -361,7 +365,10 @@ void SmEditWindow::Command(const CommandEvent& rCEvt) if (bForwardEvt) { if (pEditView) - pEditView->Command( rCEvt ); + { + pEditView->Command(rCEvt); + UserPossiblyChangedText(); + } else Window::Command (rCEvt); } @@ -472,13 +479,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) } else { - // have doc-shell modified only for formula input/change and not - // cursor travelling and such things... - SmDocShell *pDocShell = GetDoc(); - EditEngine *pEditEngine = GetEditEngine(); - if (pDocShell && pEditEngine) - pDocShell->SetModified(pEditEngine->IsModified()); - aModifyIdle.Start(); + UserPossiblyChangedText(); } // get the current char of the key event @@ -506,6 +507,17 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) } } +void SmEditWindow::UserPossiblyChangedText() +{ + // have doc-shell modified only for formula input/change and not + // cursor travelling and such things... + SmDocShell *pDocShell = GetDoc(); + EditEngine *pEditEngine = GetEditEngine(); + if (pDocShell && pEditEngine && pEditEngine->IsModified()) + pDocShell->SetModified(true); + aModifyIdle.Start(); +} + void SmEditWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pEditView) |