summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-03-08 20:00:07 +0000
committerjp <jp@openoffice.org>2001-03-08 20:00:07 +0000
commit136cbbf6a56ef0501ec58e04bea4feab15efd852 (patch)
tree322e1e088184d61c5a4cc17f33ad2c6ba79a4230 /sc/source/ui
parentf7a26cd2501087ac0a358059040acaa4492e2bea (diff)
change: old data transfer API to the new
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/arealink.cxx15
-rw-r--r--sc/source/ui/docshell/docsh4.cxx81
-rw-r--r--sc/source/ui/docshell/docsh6.cxx8
-rw-r--r--sc/source/ui/docshell/impex.cxx28
-rw-r--r--sc/source/ui/docshell/servobj.cxx44
-rw-r--r--sc/source/ui/docshell/tablink.cxx15
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx6
-rw-r--r--sc/source/ui/inc/docsh.hxx12
-rw-r--r--sc/source/ui/inc/impex.hxx15
-rw-r--r--sc/source/ui/inc/servobj.hxx17
-rw-r--r--sc/source/ui/navipi/content.cxx12
-rw-r--r--sc/source/ui/undo/areasave.cxx16
-rw-r--r--sc/source/ui/undo/undoblk3.cxx12
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx5
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx14
-rw-r--r--sc/source/ui/view/tabvwshb.cxx6
-rw-r--r--sc/source/ui/view/viewfun7.cxx5
18 files changed, 180 insertions, 137 deletions
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;
}