summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh6.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-05 15:42:37 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-05 15:42:37 -0400
commit383cb27aeb9d34a4f7c9b34f81f70ee287c0c9de (patch)
tree0c889fd5e23b14c6adafd143a592094e8b3504b7 /sc/source/ui/docshell/docsh6.cxx
parentcdb9a746270b77b95ef737478f1954e1cc894bfa (diff)
Ported dde-reconnect-on-load-*.diff from ooo-build.
Improve reliability of DDE connections between documents opened in LO. With this change, LO tries to reconnect to a DDE server document upon opening if that server document is being listened to by one of the open documents. Also, the old implementation would load a DDE server document invisible, and would never close it when the user updates the link. This had the consequence that when the user tries to open this document while it's loaded hidden, it causes some weird focus issues, and closing it and opening it again would disconnect the DDE connection. The new implementation closes the server document immediately after the DDE link update is complete. This change also fixes a bug in Calc where DDE link updates to cells would fail when the formula syntax is set to something other than Calc A1.
Diffstat (limited to 'sc/source/ui/docshell/docsh6.cxx')
-rw-r--r--sc/source/ui/docshell/docsh6.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 332811365814..d735a359f0a2 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -386,6 +386,15 @@ BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource,
return bRet;
}
+void ScDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
+{
+ ::sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager();
+ if (!pLinkManager)
+ return;
+
+ pLinkManager->ReconnectDdeLink(rServer);
+}
+
void ScDocShell::UpdateLinks()
{
sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager();