Kaydet (Commit) 9ccee147 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS fwk21 (1.25.198); FILE MERGED

2005/08/15 15:58:03 mba 1.25.198.1: i49676: inherit UpdateDocMode from document containing the link
üst 772862bc
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: linkmgr.cxx,v $ * $RCSfile: linkmgr.cxx,v $
* *
* $Revision: 1.26 $ * $Revision: 1.27 $
* *
* last change: $Author: rt $ $Date: 2005-09-09 00:45:03 $ * last change: $Author: hr $ $Date: 2005-09-30 10:08:52 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#pragma hdrstop #pragma hdrstop
#ifndef _COM_SUN_STAR_DOCUMENT_UPDATEDOCMODE_HPP_
#include <com/sun/star/document/UpdateDocMode.hpp>
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_ #ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
#include <com/sun/star/uno/Sequence.h> #include <com/sun/star/uno/Sequence.h>
#endif #endif
...@@ -308,6 +311,7 @@ String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL ) ...@@ -308,6 +311,7 @@ String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
{ {
SfxObjectShell* pFndShell = 0; SfxObjectShell* pFndShell = 0;
USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
String sTopic, sItem, sReferer; String sTopic, sItem, sReferer;
if( pLink->GetLinkManager() && if( pLink->GetLinkManager() &&
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem ) pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem )
...@@ -325,7 +329,12 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) ...@@ -325,7 +329,12 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
BOOL bFirst = TRUE; BOOL bFirst = TRUE;
SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist(); SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
if( pShell && pShell->GetMedium() ) if( pShell && pShell->GetMedium() )
{
sReferer = pShell->GetMedium()->GetBaseURL(); sReferer = pShell->GetMedium()->GetBaseURL();
SFX_ITEMSET_ARG( pShell->GetMedium()->GetItemSet(), pItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False );
if ( pItem )
nUpdateMode = pItem->GetValue();
}
String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) ); String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) );
aCC.toLower( sNmURL ); aCC.toLower( sNmURL );
...@@ -381,6 +390,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) ...@@ -381,6 +390,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
SfxBoolItem aMinimized(SID_MINIMIZED, TRUE); SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") ); SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer( SID_REFERER, sReferer ); SfxStringItem aReferer( SID_REFERER, sReferer );
SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
// #i14200# (DDE-link crashes wordprocessor) // #i14200# (DDE-link crashes wordprocessor)
SfxAllItemSet aArgs( SFX_APP()->GetPool() ); SfxAllItemSet aArgs( SFX_APP()->GetPool() );
...@@ -388,6 +398,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) ...@@ -388,6 +398,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
aArgs.Put(aTarget); aArgs.Put(aTarget);
aArgs.Put(aMinimized); aArgs.Put(aMinimized);
aArgs.Put(aName); aArgs.Put(aName);
aArgs.Put(aUpdate);
pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs ); pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment