diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-11 12:04:57 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-11 12:04:57 +0000 |
commit | c9ef531479c8e2847cccce97cda92735bb4a11d3 (patch) | |
tree | eb0f3a6a6248354b5d6b95074b360532c2110f89 /svx/source/svxlink | |
parent | 0e53a4572b10760b506af82b10f7b5b21361b4cc (diff) |
INTEGRATION: CWS sb19 (1.20.88); FILE MERGED
2004/12/22 07:54:15 sb 1.20.88.3: #i10000# Cleaned up merge conflict.
2004/11/23 08:36:38 mba 1.20.88.2: #i37428#: wrong usage of BaseURL
2004/10/27 07:30:45 mba 1.20.88.1: #110407#: remove static BaseURL
Diffstat (limited to 'svx/source/svxlink')
-rw-r--r-- | svx/source/svxlink/linkmgr.cxx | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/svx/source/svxlink/linkmgr.cxx b/svx/source/svxlink/linkmgr.cxx index 41f5c7ef0d..8e504fe011 100644 --- a/svx/source/svxlink/linkmgr.cxx +++ b/svx/source/svxlink/linkmgr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: linkmgr.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: hr $ $Date: 2004-12-13 12:20:02 $ + * last change: $Author: rt $ $Date: 2005-01-11 13:04:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,7 +132,7 @@ public: virtual BOOL Connect( sfx2::SvBaseLink* ); }; -SvxLinkManager::SvxLinkManager( SfxObjectShell * pPersist ) +SvxLinkManager::SvxLinkManager( SfxObjectShell* pPersist ) { SvLinkManager::SetPersist( pPersist ); } @@ -316,14 +316,14 @@ BOOL SvxLinkManager::GetGraphicFromAny( const String& rMimeType, // ---------------------------------------------------------------------- -String lcl_DDE_RelToAbs( const String& rTopic, const String& rReferer ) +String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL ) { String sRet; INetURLObject aURL( rTopic ); if( INET_PROT_NOT_VALID == aURL.GetProtocol() ) - utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rReferer.Len() ? rtl::OUString(rReferer) : INetURLObject::GetBaseURL(), sRet ); + utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet ); if( !sRet.Len() ) - sRet = URIHelper::SmartRelToAbs( rTopic ); + sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true ); return sRet; } @@ -346,17 +346,8 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) BOOL bFirst = TRUE; SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist(); - if( pShell ) - { - // sch... SFX: das gerade gelesen Doc hat noch keinen Namen und - // steht noch nicht in der Doc. Liste - if( pShell->GetMedium() ) - { - sReferer = pShell->GetMedium()->GetName(); - if( !pShell->HasName() ) - sTmp = sReferer; - } - } + if( pShell && pShell->GetMedium() ) + sReferer = pShell->GetMedium()->GetBaseURL(); String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) ); aCC.toLower( sNmURL ); @@ -372,7 +363,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) if( !sTmp.Len() ) { sTmp = pShell->GetTitle( SFX_TITLE_FULLNAME ); - sTmp = lcl_DDE_RelToAbs(sTmp, sReferer); + sTmp = lcl_DDE_RelToAbs(sTmp, sReferer ); } |