diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/docshell/servobj.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 1 |
3 files changed, 16 insertions, 2 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(); diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index dabe38fb8c1d..a30e60607b49 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -41,6 +41,8 @@ #include "rangenam.hxx" #include "sc.hrc" // SC_HINT_AREAS_CHANGED +using namespace formula; + // ----------------------------------------------------------------------- BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName ) @@ -97,11 +99,13 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) : SCTAB nTab = pDocSh->GetCurTab(); aRange.aStart.SetTab( nTab ); - if ( aRange.Parse( rItem, pDoc ) & SCA_VALID ) + // For DDE link, we always must parse references using OOO A1 convention. + + if ( aRange.Parse( rItem, pDoc, FormulaGrammar::CONV_OOO ) & SCA_VALID ) { // area reference } - else if ( aRange.aStart.Parse( rItem, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID ) + else if ( aRange.aStart.Parse( rItem, pDoc, FormulaGrammar::CONV_OOO ) & SCA_VALID ) { // cell reference aRange.aEnd = aRange.aStart; diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 5c3d33ccb374..057e2af4d676 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -320,6 +320,7 @@ public: ScDBData* GetOldAutoDBRange(); // has to be deleted by caller! void CancelAutoDBRange(); // called when dialog is cancelled + virtual void ReconnectDdeLink(SfxObjectShell& rServer); void UpdateLinks(); // Link-Eintraege aktuallisieren BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren) |