summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/swcli.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview/swcli.cxx')
-rw-r--r--sw/source/ui/uiview/swcli.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index 6da603c893b3..4265f3cf8cd0 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -27,16 +27,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <wrtsh.hxx>
+#include <doc.hxx>
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <edtwin.hxx>
#include <swcli.hxx>
+#include <cmdid.h>
+#include <cfgitems.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -169,3 +170,18 @@ void SwOleClient::MakeVisible()
const SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell();
rSh.MakeObjVisible( GetObject() );
}
+
+// --> #i972#
+void SwOleClient::FormatChanged()
+{
+ const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() );
+ SwView * pView = dynamic_cast< SwView * >( GetViewShell() );
+ if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) )
+ {
+ SwWrtShell & rWrtSh = pView->GetWrtShell();
+ if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ))
+ rWrtSh.AlignFormulaToBaseline( xObj );
+ }
+}
+// <--
+