diff options
24 files changed, 264 insertions, 216 deletions
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx index 4c02701cf32a..5a2f5e89d641 100644 --- a/sc/inc/arealink.hxx +++ b/sc/inc/arealink.hxx @@ -2,9 +2,9 @@ * * $RCSfile: arealink.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:47 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:45:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,7 @@ class ScDocShell; class SfxObjectShell; -class ScAreaLink : public SvBaseLink +class ScAreaLink : public ::so3::SvBaseLink { private: ScDocShell* pDocShell; // Container @@ -94,7 +94,8 @@ public: virtual ~ScAreaLink(); virtual void Closed(); - virtual void DataChanged(SvData& rData); + virtual void DataChanged( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ); virtual BOOL Edit(Window* pParent); diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx index 957776c43460..b5a579585635 100644 --- a/sc/inc/tablink.hxx +++ b/sc/inc/tablink.hxx @@ -2,9 +2,9 @@ * * $RCSfile: tablink.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2001-03-07 15:57:57 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:45:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,7 +74,7 @@ SO2_DECL_REF(SvEmbeddedObject) class ScDocShell; class SfxObjectShell; -class ScTableLink : public SvBaseLink +class ScTableLink : public ::so3::SvBaseLink { private: ScDocShell* pDocShell; // Container @@ -93,7 +93,8 @@ public: const String& rFilter, const String& rOpt); virtual ~ScTableLink(); virtual void Closed(); - virtual void DataChanged(SvData& rData); + virtual void DataChanged( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ); virtual BOOL Edit(Window* pParent); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index d41598c09a71..2233c19c0055 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -2,9 +2,9 @@ * * $RCSfile: documen8.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: os $ $Date: 2001-03-02 15:56:25 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:46:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -883,11 +883,11 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche { BOOL bAnyLeft = FALSE; - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pDdeLink = (ScDdeLink*)pBase; @@ -908,7 +908,7 @@ void ScDocument::SaveDdeLinks(SvStream& rStream) const // bei 4.0-Export alle mit Modus != DEFAULT weglassen BOOL bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 ); - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); // erstmal zaehlen... @@ -917,7 +917,7 @@ void ScDocument::SaveDdeLinks(SvStream& rStream) const USHORT i; for (i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) if ( !bExport40 || ((ScDdeLink*)pBase)->GetMode() == SC_DDE_DEFAULT ) ++nDdeCount; @@ -932,7 +932,7 @@ void ScDocument::SaveDdeLinks(SvStream& rStream) const for (i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pLink = (ScDdeLink*)pBase; @@ -951,7 +951,7 @@ void ScDocument::LoadDdeLinks(SvStream& rStream) for (USHORT i=0; i<nCount; i++) { ScDdeLink* pLink = new ScDdeLink( this, rStream, aHdr ); - pLinkManager->InsertDDELink( *pLink, + pLinkManager->InsertDDELink( pLink, pLink->GetAppl(), pLink->GetTopic(), pLink->GetItem() ); } } @@ -960,7 +960,7 @@ BOOL ScDocument::HasDdeLinks() const { if (pLinkManager) // Clipboard z.B. hat keinen LinkManager { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScDdeLink)) @@ -986,7 +986,7 @@ BOOL ScDocument::IsInLinkUpdate() const void ScDocument::UpdateDdeLinks() { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); USHORT i; @@ -995,7 +995,7 @@ void ScDocument::UpdateDdeLinks() BOOL bAny = FALSE; for (i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ((ScDdeLink*)pBase)->ResetValue(); @@ -1016,7 +1016,7 @@ void ScDocument::UpdateDdeLinks() // nun wirklich updaten... for (i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) ((ScDdeLink*)pBase)->TryUpdate(); // bei DDE-Links TryUpdate statt Update } @@ -1029,11 +1029,11 @@ BOOL ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const //! wenn's mal alles asynchron wird, aber auch hier BOOL bFound = FALSE; - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pDdeLink = (ScDdeLink*)pBase; @@ -1053,11 +1053,11 @@ void ScDocument::DisconnectDdeLinks() { if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) pBase->Disconnect(); // bleibt im LinkManager eingetragen } @@ -1076,16 +1076,16 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const } else // Links direkt kopieren { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pNew = new ScDdeLink( pDestDoc, *(ScDdeLink*)pBase ); - pDestDoc->pLinkManager->InsertDDELink( *pNew, + pDestDoc->pLinkManager->InsertDDELink( pNew, pNew->GetAppl(), pNew->GetTopic(), pNew->GetItem() ); } } @@ -1101,11 +1101,11 @@ void ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const // zuerst suchen, ob schon vorhanden //! Dde-Links (zusaetzlich) effizienter am Dokument speichern? - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pLink = (ScDdeLink*)pBase; @@ -1119,7 +1119,7 @@ void ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const // neu anlegen, aber kein TryUpdate ScDdeLink* pNew = new ScDdeLink( this, rAppl, rTopic, rItem, nMode ); - pLinkManager->InsertDDELink( *pNew, rAppl, rTopic, rItem ); + pLinkManager->InsertDDELink( pNew, rAppl, rTopic, rItem ); } USHORT ScDocument::GetDdeLinkCount() const @@ -1127,7 +1127,7 @@ USHORT ScDocument::GetDdeLinkCount() const USHORT nDdeCount = 0; if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScDdeLink)) @@ -1141,11 +1141,11 @@ BOOL ScDocument::GetDdeLinkData( USHORT nPos, String& rAppl, String& rTopic, Str USHORT nDdeCount = 0; if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { if ( nDdeCount == nPos ) @@ -1168,11 +1168,11 @@ BOOL ScDocument::GetDdeLinkMode(USHORT nPos, USHORT& nMode) USHORT nDdeCount = 0; if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { if ( nDdeCount == nPos ) @@ -1193,11 +1193,11 @@ BOOL ScDocument::GetDdeLinkResultDimension( USHORT nPos, USHORT& nCol, USHORT& n USHORT nDdeCount = 0; if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { if ( nDdeCount == nPos ) @@ -1238,11 +1238,11 @@ void ScDocument::CreateDdeLink(const String& rAppl, const String& rTopic, const // damit nicht ohne Nachfrage Verbindungen aufgebaut werden) // zuerst suchen, ob schon vorhanden //! Dde-Links (zusaetzlich) effizienter am Dokument speichern? - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pLink = (ScDdeLink*)pBase; @@ -1256,16 +1256,16 @@ void ScDocument::CreateDdeLink(const String& rAppl, const String& rTopic, const // neu anlegen, aber kein TryUpdate ScDdeLink* pNew = new ScDdeLink( this, rAppl, rTopic, rItem, nMode ); - pLinkManager->InsertDDELink( *pNew, rAppl, rTopic, rItem ); + pLinkManager->InsertDDELink( pNew, rAppl, rTopic, rItem ); } BOOL ScDocument::FindDdeLink(const String& rAppl, const String& rTopic, const String& rItem, const BYTE nMode, USHORT& nPos ) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pLink = (ScDdeLink*)pBase; @@ -1287,11 +1287,11 @@ BOOL ScDocument::CreateDdeLinkResultDimension(USHORT nPos, USHORT nCols, USHORT USHORT nDdeCount = 0; if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScDdeLink)) { if ( nDdeCount == nPos ) @@ -1334,7 +1334,7 @@ BOOL ScDocument::HasAreaLinks() const { if (pLinkManager) // Clipboard z.B. hat keinen LinkManager { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScAreaLink)) @@ -1346,11 +1346,11 @@ BOOL ScDocument::HasAreaLinks() const void ScDocument::UpdateAreaLinks() { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) pBase->Update(); } @@ -1359,11 +1359,11 @@ void ScDocument::UpdateAreaLinks() void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, const ScRange& rRange, short nDx, short nDy, short nDz ) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { ScAreaLink* pLink = (ScAreaLink*) pBase; @@ -1389,7 +1389,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, void ScDocument::SaveAreaLinks(SvStream& rStream) const { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); // erstmal zaehlen... @@ -1409,7 +1409,7 @@ void ScDocument::SaveAreaLinks(SvStream& rStream) const for (i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { ScAreaLink* pLink = (ScAreaLink*)pBase; diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx index 4a5bc8f5b9e0..0001a8372711 100644 --- a/sc/source/core/inc/ddelink.hxx +++ b/sc/source/core/inc/ddelink.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ddelink.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2000-11-21 16:22:28 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:46:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,7 +74,7 @@ class ScMatrix; class ScMultipleReadHeader; class ScMultipleWriteHeader; -class ScDdeLink : public SvBaseLink, public SfxBroadcaster +class ScDdeLink : public ::so3::SvBaseLink, public SfxBroadcaster { private: static BOOL bIsInUpdate; @@ -103,8 +103,8 @@ public: void Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const; // von SvBaseLink ueberladen: - virtual void Closed(); - virtual void DataChanged( SvData& ); + virtual void DataChanged( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ); void NewData(USHORT nCols, USHORT nRows); // von SfxBroadcaster ueberladen: diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 6a7c347737c2..56a418a9ad5d 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ddelink.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2000-11-21 16:24:12 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:47:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,13 @@ #include "sc.hrc" #include "hints.hxx" -TYPEINIT2(ScDdeLink,SvBaseLink,SfxBroadcaster); +TYPEINIT2(ScDdeLink,::so3::SvBaseLink,SfxBroadcaster); + +#ifdef PM2 +#define DDE_TXT_ENCODING RTL_TEXTENCODING_IBM_850 +#else +#define DDE_TXT_ENCODING RTL_TEXTENCODING_MS_1252 +#endif BOOL ScDdeLink::bIsInUpdate = FALSE; @@ -91,7 +97,7 @@ BOOL ScDdeLink::bIsInUpdate = FALSE; ScDdeLink::ScDdeLink( ScDocument* pD, const String& rA, const String& rT, const String& rI, BYTE nM ) : - SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), + ::so3::SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), pDoc( pD ), aAppl( rA ), aTopic( rT ), @@ -110,7 +116,7 @@ __EXPORT ScDdeLink::~ScDdeLink() } ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : - SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), + ::so3::SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), pDoc ( pD ), aAppl ( rOther.aAppl ), aTopic ( rOther.aTopic ), @@ -124,7 +130,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : } ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr ) : - SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), + ::so3::SvBaseLink(LINKUPDATE_ALWAYS,FORMAT_STRING), pDoc( pD ), pResult( NULL ), bNeedUpdate( FALSE ) @@ -172,15 +178,17 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const rHdr.EndEntry(); } -void __EXPORT ScDdeLink::DataChanged(SvData& rData) +void __EXPORT ScDdeLink::DataChanged( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ) { // wir koennen nur Strings... - - if ( rData.GetFormat() != FORMAT_STRING ) + if ( FORMAT_STRING != SotExchange::GetFormatIdFromMimeType( rMimeType )) return; - String aLinkStr; - rData.GetData( aLinkStr ); + ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; + rValue >>= aSeq; + String aLinkStr( (sal_Char*)aSeq.getConstArray(), aSeq.getLength(), + DDE_TXT_ENCODING ); aLinkStr.ConvertLineEnd(LINEEND_LF); // wenn String mit Zeilenende aufhoert, streichen: @@ -282,11 +290,6 @@ void ScDdeLink::ResetValue() Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress( 0 ), NULL ) ); } -void __EXPORT ScDdeLink::Closed() -{ - SvBaseLink::Closed(); -} - void __EXPORT ScDdeLink::ListenersGone() { BOOL bWas = bIsInUpdate; @@ -295,7 +298,7 @@ void __EXPORT ScDdeLink::ListenersGone() ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link SvxLinkManager* pLinkMgr = pDoc->GetLinkManager(); - pLinkMgr->Remove(*this); // deletes this + pLinkMgr->Remove( this); // deletes this if ( !pLinkMgr->GetLinks().Count() ) // letzten geloescht ? { diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index d731029ad1c2..75d93ebf3ef1 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: interpr2.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dr $ $Date: 2001-03-05 14:53:14 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:47:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1713,13 +1713,13 @@ void ScInterpreter::ScStyle() SetIllegalParameter(); } -ScDdeLink* lcl_GetDdeLink( SvLinkManager* pLinkMgr, +ScDdeLink* lcl_GetDdeLink( SvxLinkManager* pLinkMgr, const String& rA, const String& rT, const String& rI, BYTE nM ) { USHORT nCount = pLinkMgr->GetLinks().Count(); for (USHORT i=0; i<nCount; i++ ) { - SvBaseLink* pBase = *pLinkMgr->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkMgr->GetLinks()[i]; if (pBase->ISA(ScDdeLink)) { ScDdeLink* pLink = (ScDdeLink*)pBase; @@ -1755,7 +1755,7 @@ void ScInterpreter::ScDde() // temporary documents (ScFunctionAccess) have no DocShell // and no LinkManager -> abort - SvLinkManager* pLinkMgr = pDok->GetLinkManager(); + SvxLinkManager* pLinkMgr = pDok->GetLinkManager(); if (!pLinkMgr) { SetNoValue(); @@ -1785,7 +1785,7 @@ void ScInterpreter::ScDde() if (!pLink) { pLink = new ScDdeLink( pDok, aAppl, aTopic, aItem, nMode ); - pLinkMgr->InsertDDELink( *pLink, aAppl, aTopic, aItem ); + pLinkMgr->InsertDDELink( pLink, aAppl, aTopic, aItem ); if ( pLinkMgr->GetLinks().Count() == 1 ) // erster ? { SfxBindings* pBindings = pDok->GetViewBindings(); diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index c0db4e209186..47f358a14b06 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -2,9 +2,9 @@ * * $RCSfile: arealink.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: nn $ $Date: 2001-03-07 15:59:10 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,14 +89,14 @@ #include "patattr.hxx" // raus, wenn ResetAttrib am Dokument #include "docpool.hxx" // raus, wenn ResetAttrib am Dokument -TYPEINIT1(ScAreaLink,SvBaseLink); +TYPEINIT1(ScAreaLink,::so3::SvBaseLink); //------------------------------------------------------------------------ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile, const String& rFilter, const String& rOpt, const String& rArea, const ScRange& rDest ) : - SvBaseLink (LINKUPDATE_ONCALL,FORMAT_FILE), + ::so3::SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE), pDocShell ((ScDocShell*)pShell), aFileName (rFile), aFilterName (rFilter), @@ -131,7 +131,8 @@ BOOL __EXPORT ScAreaLink::Edit(Window* pParent) return bRet; } -void __EXPORT ScAreaLink::DataChanged(SvData& rData) +void __EXPORT ScAreaLink::DataChanged( const String&, + const ::com::sun::star::uno::Any& ) { // bei bInCreate nichts tun, damit Update gerufen werden kann, um den Status im // LinkManager zu setzen, ohne die Daten im Dokument zu aendern @@ -145,7 +146,7 @@ void __EXPORT ScAreaLink::DataChanged(SvData& rData) String aFile; String aFilter; String aArea; - pLinkManager->GetDisplayNames(*this,0,&aFile,&aArea,&aFilter); + pLinkManager->GetDisplayNames( this,0,&aFile,&aArea,&aFilter); // the file dialog returns the filter name with the application prefix // -> remove prefix @@ -159,7 +160,7 @@ void __EXPORT ScAreaLink::DataChanged(SvData& rData) // adjust in dialog: String aLinkName; MakeLnkName( aLinkName, NULL, aFile, aArea, &aFilter ); - SetName( new SvLinkName( aLinkName ) ); + SetName( aLinkName ); } Refresh(aFile,aFilter,aArea); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 338d89865833..46af5efcde35 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docsh4.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: nn $ $Date: 2001-02-26 19:03:18 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1825,14 +1825,18 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, rbFooter = ((const SfxBoolItem&)pSet->Get(ATTR_PAGE_ON)).GetValue(); } -long __EXPORT ScDocShell::DdeGetData( const String& rItem, SvData& rData ) +long __EXPORT ScDocShell::DdeGetData( const String& rItem, + const String& rMimeType, + ::com::sun::star::uno::Any & rValue ) { - if( rData.GetFormat() == FORMAT_STRING ) + if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType ) ) { if( rItem.EqualsIgnoreCaseAscii( "Format" ) ) { ByteString aFmtByte( aDdeTextFmt, gsl_getSystemTextEncoding() ); - rData.SetData( (void*) aFmtByte.GetBuffer(), aFmtByte.Len() + 1 ); + rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( + (sal_Int8*)aFmtByte.GetBuffer(), + aFmtByte.Len() + 1 ); return 1; } ScImportExport aObj( &aDocument, rItem ); @@ -1841,62 +1845,79 @@ long __EXPORT ScDocShell::DdeGetData( const String& rItem, SvData& rData ) if( aDdeTextFmt.GetChar(0) == 'F' ) aObj.SetFormulas( TRUE ); - if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) + if( aDdeTextFmt.EqualsAscii( "SYLK" ) || + aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { ByteString aData; - if( aObj.ExportByteString( aData, gsl_getSystemTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) + if( aObj.ExportByteString( aData, gsl_getSystemTextEncoding(), + SOT_FORMATSTR_ID_SYLK ) ) { - rData.SetData( (void*) aData.GetBuffer(), aData.Len() + 1 ); + rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( + (sal_Int8*)aData.GetBuffer(), + aData.Len() + 1 ); return 1; } else return 0; } - if( aDdeTextFmt.EqualsAscii( "CSV" ) || aDdeTextFmt.EqualsAscii( "FCSV" ) ) + if( aDdeTextFmt.EqualsAscii( "CSV" ) || + aDdeTextFmt.EqualsAscii( "FCSV" ) ) aObj.SetSeparator( ',' ); - return aObj.ExportData( rData ) ? 1 : 0; + return aObj.ExportData( rMimeType, rValue ) ? 1 : 0; } ScImportExport aObj( &aDocument, rItem ); if( aObj.IsRef() ) - return aObj.ExportData( rData ) ? 1 : 0; - else - return 0; + return aObj.ExportData( rMimeType, rValue ) ? 1 : 0; + return 0; } -long __EXPORT ScDocShell::DdeSetData( const String& rItem, const SvData& rData ) +long __EXPORT ScDocShell::DdeSetData( const String& rItem, + const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ) { - SvData* p = (SvData*) &rData; - - if( rData.GetFormat() == FORMAT_STRING ) + if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) { if( rItem.EqualsIgnoreCaseAscii( "Format" ) ) { - p->GetData( aDdeTextFmt ); - aDdeTextFmt.ToUpperAscii(); - return 1; + ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; + if( rValue >>= aSeq ) + { + aDdeTextFmt = String( (const sal_Char*)aSeq.getConstArray(), + aSeq.getLength(), + gsl_getSystemTextEncoding() ); + aDdeTextFmt.ToUpperAscii(); + return 1; + } + return 0; } ScImportExport aObj( &aDocument, rItem ); if( aDdeTextFmt.GetChar(0) == 'F' ) aObj.SetFormulas( TRUE ); - if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) + if( aDdeTextFmt.EqualsAscii( "SYLK" ) || + aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { - String aData; - p->GetData( aData ); - return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 0; + ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; + if( rValue >>= aSeq ) + { + String aData( (const sal_Char*)aSeq.getConstArray(), + aSeq.getLength(), gsl_getSystemTextEncoding() ); + return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 0; + } + return 0; } - if( aDdeTextFmt.EqualsAscii( "CSV" ) || aDdeTextFmt.EqualsAscii( "FCSV" ) ) + if( aDdeTextFmt.EqualsAscii( "CSV" ) || + aDdeTextFmt.EqualsAscii( "FCSV" ) ) aObj.SetSeparator( ',' ); - return aObj.ImportData( *p ) ? 1 : 0; + return aObj.ImportData( rMimeType, rValue ) ? 1 : 0; } ScImportExport aObj( &aDocument, rItem ); if( aObj.IsRef() ) - return aObj.ImportData( *p ) ? 1 : 0; - else - return 0; + return aObj.ImportData( rMimeType, rValue ) ? 1 : 0; + return 0; } -SvPseudoObject* __EXPORT ScDocShell::DdeCreateHotLink( const String& rItem ) +::so3::SvLinkSource* __EXPORT ScDocShell::DdeCreateLinkSource( const String& rItem ) { // only check for valid item string - range is parsed again in ScServerObject ctor diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 7bdd9a449384..a69fc60cf3de 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docsh6.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: nn $ $Date: 2001-02-22 17:35:16 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -487,7 +487,7 @@ void ScDocShell::UpdateLinks() for (i=nCount; i>0; ) { --i; - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; @@ -551,7 +551,7 @@ BOOL ScDocShell::ReloadTabLinks() USHORT nCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nCount; i++ ) { - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index e213b2c395a5..d527e80e0582 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: impex.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2001-02-14 15:31:48 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -358,7 +358,6 @@ BOOL ScImportExport::ImportData( SvData& rData ) } } - BOOL ScImportExport::ExportData( SvData& rData ) { SvMemoryStream aStrm; @@ -371,6 +370,29 @@ BOOL ScImportExport::ExportData( SvData& rData ) return FALSE; } +BOOL ScImportExport::ImportData( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ) +{ + DBG_ASSERT( !this, "Implementation is missing" ); + return FALSE; +} + +BOOL ScImportExport::ExportData( const String& rMimeType, + ::com::sun::star::uno::Any & rValue ) +{ + SvMemoryStream aStrm; + if( ExportStream( aStrm, + SotExchange::GetFormatIdFromMimeType( rMimeType ) )) + { + aStrm << (BYTE) 0; + rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( + (sal_Int8*)aStrm.GetData(), + aStrm.Seek( STREAM_SEEK_TO_END ) ); + return TRUE; + } + return FALSE; +} + // static inline void ScImportExport::SetNoEndianSwap( SvStream& rStrm ) diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index f2a8912caaba..bcaa3af5811d 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -2,9 +2,9 @@ * * $RCSfile: servobj.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:55 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -157,7 +157,9 @@ void ScServerObject::Clear() } } -BOOL __EXPORT ScServerObject::GetData( SvData* pData ) // wie ScDocShell::DdeGetData +BOOL __EXPORT ScServerObject::GetData( + ::com::sun::star::uno::Any & rData /*out param*/, + const String & rMimeType, BOOL bSynchron ) { if (!pDocSh) return FALSE; @@ -187,38 +189,35 @@ BOOL __EXPORT ScServerObject::GetData( SvData* pData ) // wie ScDocShell::D String aDdeTextFmt = pDocSh->GetDdeTextFmt(); ScDocument* pDoc = pDocSh->GetDocument(); - if( pData->GetFormat() == FORMAT_STRING ) + if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) { ScImportExport aObj( pDoc, aRange ); if( aDdeTextFmt.GetChar(0) == 'F' ) aObj.SetFormulas( TRUE ); - if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) + if( aDdeTextFmt.EqualsAscii( "SYLK" ) || + aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { String aData; if( aObj.ExportString( aData, SOT_FORMATSTR_ID_SYLK ) ) { ByteString aByteData( aData, gsl_getSystemTextEncoding() ); - pData->SetData( (void*) aByteData.GetBuffer(), aByteData.Len() + 1 ); + rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >( + (sal_Int8*)aByteData.GetBuffer(), + aByteData.Len() + 1 ); return 1; } - else - return 0; + return 0; } - if( aDdeTextFmt.EqualsAscii( "CSV" ) || aDdeTextFmt.EqualsAscii( "FCSV" ) ) + if( aDdeTextFmt.EqualsAscii( "CSV" ) || + aDdeTextFmt.EqualsAscii( "FCSV" ) ) aObj.SetSeparator( ',' ); - return aObj.ExportData( *pData ) ? 1 : 0; + return aObj.ExportData( rMimeType, rData ) ? 1 : 0; } + ScImportExport aObj( pDoc, aRange ); if( aObj.IsRef() ) - return aObj.ExportData( *pData ) ? 1 : 0; - else - return 0; -} - -BOOL __EXPORT ScServerObject::SetData( SvData& ) -{ - // erstmal nicht - return FALSE; + return aObj.ExportData( rMimeType, rData ) ? 1 : 0; + return 0; } void __EXPORT ScServerObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, @@ -272,11 +271,8 @@ void __EXPORT ScServerObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBC } } - if ( bDataChanged && GetSelectorCount() ) - { - SvData aSvData; - DataChanged( aSvData ); - } + if ( bDataChanged && HasDataLinks() ) + SvLinkSource::NotifyDataChanged(); } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 5bc3e52002c1..34cea6a5b15f 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tablink.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: nn $ $Date: 2001-03-07 15:59:10 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,13 +94,13 @@ #include "global.hxx" #include "hints.hxx" -TYPEINIT1(ScTableLink,SvBaseLink); +TYPEINIT1(ScTableLink, ::so3::SvBaseLink); //------------------------------------------------------------------------ ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile, const String& rFilter, const String& rOpt): - SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE), + ::so3::SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE), pDocShell(pDocSh), aFileName(rFile), aFilterName(rFilter), @@ -113,7 +113,7 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile, ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile, const String& rFilter, const String& rOpt): - SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE), + ::so3::SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE), pDocShell((ScDocShell*)pShell), aFileName(rFile), aFilterName(rFilter), @@ -152,14 +152,15 @@ BOOL __EXPORT ScTableLink::Edit(Window* pParent) return bRet; } -void __EXPORT ScTableLink::DataChanged(SvData& rData) +void __EXPORT ScTableLink::DataChanged( const String&, + const ::com::sun::star::uno::Any& ) { SvxLinkManager* pLinkManager=pDocShell->GetDocument()->GetLinkManager(); if (pLinkManager!=NULL) { String aFile; String aFilter; - pLinkManager->GetDisplayNames(*this,0,&aFile,NULL,&aFilter); + pLinkManager->GetDisplayNames( this,0,&aFile,NULL,&aFilter); // the file dialog returns the filter name with the application prefix // -> remove prefix diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 6bfe5d7186e8..b4192f122be4 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuins2.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2001-02-14 15:33:37 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:50:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -367,7 +367,6 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, SdrView* pView, SdrPageView* pPV = pView->GetPageViewPvNum(0); pView->InsertObject(pObj, *pPV); - pObj->SetOleLink(pInfoObj); // #73279# Math objects change their object size during InsertObject. // New size must be set in SdrObject, or a wrong scale will be set at @@ -615,7 +614,6 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, SdrView* pVi SdrPageView* pPV = pView->GetPageViewPvNum(0); pView->InsertObject(pObj, *pPV); - pObj->SetOleLink(pInfoObj); // Dies veranlaesst Chart zum sofortigen Update SvData aEmpty; diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 99dad245cbc8..6cb4a86942ec 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -2,9 +2,9 @@ * * $RCSfile: docsh.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: nn $ $Date: 2001-02-22 17:23:25 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:50:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -352,9 +352,11 @@ public: BOOL& rbHeader, BOOL& rbFooter ); - virtual long DdeGetData( const String& rItem, SvData& rData ); - virtual long DdeSetData( const String& rItem, const SvData& rData ); - virtual SvPseudoObject* DdeCreateHotLink( const String& rItem ); + virtual long DdeGetData( const String& rItem, const String& rMimeType, + ::com::sun::star::uno::Any & rValue ); + virtual long DdeSetData( const String& rItem, const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ); + virtual ::so3::SvLinkSource* DdeCreateLinkSource( const String& rItem ); const String& GetDdeTextFmt() const { return aDdeTextFmt; } diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index 040c5ee7b7f2..c3be4bfc7db7 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -2,9 +2,9 @@ * * $RCSfile: impex.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:59 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:50:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,9 +75,9 @@ class SvDataTypeList; class ScDocShell; class ScDocument; class SvStream; -class SvData; class SfxMedium; class ScAsciiOptions; +class SvData; class ScImportExport { @@ -161,8 +161,13 @@ public: BOOL ImportStream( SvStream&, ULONG=FORMAT_STRING ); BOOL ExportStream( SvStream&, ULONG=FORMAT_STRING ); - BOOL ImportData( SvData& ); - BOOL ExportData( SvData& ); + BOOL ImportData( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ); + BOOL ExportData( const String& rMimeType, + ::com::sun::star::uno::Any & rValue ); + + BOOL ImportData( SvData& rData ); + BOOL ExportData( SvData& rData ); BOOL IsOverflow() const { return bOverflow; } // nach dem Importieren }; diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx index 3414444fc1a5..23206f117c0a 100644 --- a/sc/source/ui/inc/servobj.hxx +++ b/sc/source/ui/inc/servobj.hxx @@ -2,9 +2,9 @@ * * $RCSfile: servobj.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:45:00 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:50:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,15 +65,15 @@ #ifndef _SFXLSTNER_HXX //autogen #include <svtools/lstner.hxx> #endif -#ifndef _PSEUDO_HXX //autogen -#include <so3/pseudo.hxx> +#ifndef _LINKSRC_HXX //autogen +#include <so3/linksrc.hxx> #endif #include "global.hxx" class ScDocShell; -class ScServerObject : public SvPseudoObject, public SfxListener +class ScServerObject : public ::so3::SvLinkSource, public SfxListener { private: ScDocShell* pDocSh; @@ -87,10 +87,9 @@ public: ScServerObject( ScDocShell* pShell, const String& rItem ); virtual ~ScServerObject(); - virtual BOOL GetData( SvData* ); - virtual BOOL SetData( SvData& ); - - ULONG GetSelectorCount() const { return SvPseudoObject::GetSelectorCount(); } + virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/, + const String & rMimeType, + BOOL bSynchron = FALSE ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 72cee15cb769..77c08dad7fc6 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -2,9 +2,9 @@ * * $RCSfile: content.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-09-22 18:55:47 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:51:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1084,11 +1084,11 @@ void ScContentTree::GetLinkNames() SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?") - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) InsertContent( SC_CONTENT_AREALINK, ((ScAreaLink*)pBase)->GetSource() ); @@ -1105,11 +1105,11 @@ const ScAreaLink* ScContentTree::GetLink( ULONG nIndex ) ULONG nFound = 0; SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?") - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { if (nFound == nIndex) diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx index b3fa06ec5245..16bcb707c76b 100644 --- a/sc/source/ui/undo/areasave.cxx +++ b/sc/source/ui/undo/areasave.cxx @@ -2,9 +2,9 @@ * * $RCSfile: areasave.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: nn $ $Date: 2000-10-30 11:35:45 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:51:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -150,11 +150,11 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const if (pLinkManager) { USHORT nPos = 0; - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nLinkCount = rLinks.Count(); for (USHORT i=0; i<nLinkCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { if ( nPos >= GetCount() || !(*this)[nPos]->IsEqual( *(ScAreaLink*)pBase ) ) @@ -175,11 +175,11 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const if (pLinkManager) { USHORT nPos = 0; - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nLinkCount = rLinks.Count(); for (USHORT i=0; i<nLinkCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { ScAreaLink* pLink = (ScAreaLink*)pBase; @@ -209,11 +209,11 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum SvxLinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); if (pLinkManager) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nLinkCount = rLinks.Count(); for (USHORT i=0; i<nLinkCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { if (!pColl) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 3c8d6dde7177..3bc51000470e 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: undoblk3.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: nn $ $Date: 2000-11-10 10:03:56 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:51:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1704,11 +1704,11 @@ ScAreaLink* lcl_FindAreaLink( SvxLinkManager* pLinkManager, const String& rDoc, const String& rFlt, const String& rOpt, const String& rSrc, const ScRange& rDest ) { - const SvBaseLinks& rLinks = pLinkManager->GetLinks(); + const ::so3::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *rLinks[i]; + ::so3::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) if ( ((ScAreaLink*)pBase)->IsEqual( rDoc, rFlt, rOpt, rSrc, rDest ) ) return (ScAreaLink*)pBase; @@ -1767,7 +1767,7 @@ void __EXPORT ScUndoInsertAreaLink::Undo() ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aDocName, aFltName, aOptions, aAreaName, aRange ); if (pLink) - pLinkManager->Remove(*pLink); + pLinkManager->Remove( pLink ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } @@ -1874,7 +1874,7 @@ void __EXPORT ScUndoRemoveAreaLink::Redo() ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aDocName, aFltName, aOptions, aAreaName, aRange ); if (pLink) - pLinkManager->Remove(*pLink); + pLinkManager->Remove( pLink ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 8e4cdf877b38..d5a8f9f4bfa7 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cellsuno.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: nn $ $Date: 2001-03-07 16:00:31 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:52:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -6295,7 +6295,7 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr USHORT nCount = pLinkManager->GetLinks().Count(); for ( USHORT i=0; i<nCount; i++ ) { - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 77ccbec69c13..688bcca651c1 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: chartuno.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: nn $ $Date: 2001-02-28 19:44:57 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:52:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -294,7 +294,6 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, pChartListener->StartListeningTo(); SdrOle2Obj* pObj = new SdrOle2Obj( aIPObj, aObjName, aInsRect ); - pObj->SetOleLink(pInfoObj); //! erst nach Insert? pPage->InsertObject( pObj ); pModel->AddUndo( new SdrUndoInsertObj( *pObj ) ); //! Undo-Kommentar? diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 6a2a66ffafd9..57b09350aebb 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: linkuno.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: nn $ $Date: 2000-12-21 13:59:04 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:52:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -150,7 +150,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const USHORT nCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nCount; i++) { - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; @@ -588,7 +588,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) USHORT nAreaCount = 0; for (USHORT i=0; i<nTotalCount; i++) { - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) { if ( nAreaCount == nPos ) @@ -656,7 +656,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr //! Undo zusammenfassen SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - pLinkManager->Remove(*pLink); + pLinkManager->Remove( pLink ); pLink = NULL; // bei Remove geloescht BOOL bFitBlock = TRUE; // verschieben, wenn durch Update Groesse geaendert @@ -943,7 +943,7 @@ void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Runti //! SetAddUndo oder so SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - pLinkManager->Remove(*pLink); + pLinkManager->Remove( pLink ); } } @@ -968,7 +968,7 @@ sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException) USHORT nTotalCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nTotalCount; i++) { - SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; + ::so3::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) ++nAreaCount; } diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 754ff18b08ef..8c74b5212221 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tabvwshb.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: nn $ $Date: 2001-01-05 19:11:08 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:53:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -392,7 +392,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) case SID_LINKS: { - SvBaseLinksDialog( pWin, pDoc->GetLinkManager() ).Execute(); + ::so3::SvBaseLinksDialog( pWin, pDoc->GetLinkManager() ).Execute(); rBindings.Invalidate( nSlot ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator rReq.Done(); diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 4435c58b71d9..50c78190c837 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfun7.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: nn $ $Date: 2001-02-14 19:24:34 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:53:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -584,7 +584,6 @@ BOOL ScViewFunc::PasteObject( const Point& rPos, SvInPlaceObject* pObj, SdrOle2Obj* pSdrObj = new SdrOle2Obj( pObj, aName, aRect ); SdrPageView* pPV = pDrView->GetPageViewPvNum(0); pDrView->InsertObjectSafe( pSdrObj, *pPV ); // nicht markieren wenn Ole - pSdrObj->SetOleLink(pInfoObj); GetViewData()->GetViewShell()->SetDrawShell( TRUE ); return TRUE; } |