diff options
Diffstat (limited to 'starmath/source/document.cxx')
-rw-r--r-- | starmath/source/document.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 720c5d1ede59..d15bb0d034c5 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -38,6 +38,8 @@ #include <comphelper/storagehelper.hxx> #include <rtl/logfile.hxx> #include <rtl/ustring.hxx> +#include <unotools/eventcfg.hxx> +#include <sfx2/event.hxx> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/docfile.hxx> @@ -181,7 +183,14 @@ void SmDocShell::SetText(const String& rBuffer) { pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT); if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() ) + { + // have SwOleClient::FormatChanged() to align the modified formula properly + // even if the vis area does not change (e.g. when formula text changes from + // "{a over b + c} over d" to "d over {a over b + c}" + SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this)); + Repaint(); + } else pViewSh->GetGraphicWindow().Invalidate(); } |