summaryrefslogtreecommitdiff
path: root/sw/source/ui/app/docsh.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-14 07:32:42 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-14 07:32:42 +0000
commit4756d12dd27e314047593598bb5e73997b944f83 (patch)
treef7e7025d60fa05a15a7659e74ffa76d543dfd849 /sw/source/ui/app/docsh.cxx
parent583be4f8559fa396da9c7182c86bab6692670772 (diff)
INTEGRATION: CWS tl21 (1.57.60); FILE MERGED
2006/05/11 12:27:02 tl 1.57.60.1: #i65287# moving headers
Diffstat (limited to 'sw/source/ui/app/docsh.cxx')
-rw-r--r--sw/source/ui/app/docsh.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 1270ee3b09a8..3ec8490a42a5 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: docsh.cxx,v $
*
- * $Revision: 1.57 $
+ * $Revision: 1.58 $
*
- * last change: $Author: obo $ $Date: 2006-03-22 12:25:57 $
+ * last change: $Author: obo $ $Date: 2006-07-14 08:32:42 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -223,6 +223,9 @@
#ifndef _NDOLE_HXX
#include <ndole.hxx>
#endif
+#ifndef _SWCLI_HXX
+#include <swcli.hxx>
+#endif
#ifndef _TXTFTN_HXX
#include <txtftn.hxx>
#endif
@@ -1565,6 +1568,28 @@ void SwDocShell::CalcLayoutForOLEObjects()
}
}
+
+//
+// this function is needed to allow embedded Math objects to automatically
+// change their size when the formula content was modified via the API.
+void SwDocShell::CalcAndSetScaleOfOLEObj( SwOLEObj& rOLEObject )
+{
+ SwWrtShell *pSh = GetWrtShell();
+ if ( pSh )
+ {
+ SfxInPlaceClient* pClient = pSh->GetView().FindIPClient( rOLEObject.GetOleRef(), (Window *)&pSh->GetView().GetEditWin() );
+ if ( !pClient )
+ {
+ svt::EmbeddedObjectRef &rObject = rOLEObject.GetObject();
+ pClient = new SwOleClient( &pSh->GetView(),
+ &pSh->GetView().GetEditWin(),
+ rObject );
+ pSh->CalcAndSetScale( rObject );
+ }
+ }
+}
+
+
// --> FME 2005-02-25 #i42634# Overwrites SfxObjectShell::UpdateLinks
// This new function is necessary to trigger update of links in docs
// read by the binary filter: