diff options
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 0a0a7c394b0d..48bd2fc98b14 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -29,6 +29,7 @@ using namespace ::com::sun::star; #include "scitems.hxx" #include <sfx2/fcontnr.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/objface.hxx> #include <sfx2/docfile.hxx> #include <svtools/ehdl.hxx> @@ -42,6 +43,7 @@ using namespace ::com::sun::star; #include <svx/drawitem.hxx> #include <svx/fmshell.hxx> #include <svtools/xwindowitem.hxx> +#include <svx/svdoole2.hxx> #include <sfx2/passwd.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/dispatch.hxx> @@ -407,6 +409,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; case SID_UPDATETABLINKS: { + comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer(); + rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true); + ScDocument& rDoc = GetDocument(); ScLkUpdMode nSet = rDoc.GetLinkMode(); @@ -450,9 +455,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) ReloadTabLinks(); aDocument.UpdateExternalRefLinks(GetActiveDialogParent()); - bool bAny = aDocument.GetDocLinkManager().updateDdeLinks(GetActiveDialogParent()); + bool bAnyDde = aDocument.GetDocLinkManager().updateDdeOrOleLinks(GetActiveDialogParent()); - if (bAny) + if (bAnyDde) { // Formeln berechnen und painten wie im TrackTimeHdl aDocument.TrackFormulas(); @@ -468,7 +473,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.Done(); } else + { + rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false); rReq.Ignore(); + } } break; |