TFD taskforce changes

This commit is contained in:
Niklas Nebel 2001-06-29 19:28:09 +00:00
parent 1f1c7b53d8
commit df456286cb
13 changed files with 85 additions and 126 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: tablink.hxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: nn $ $Date: 2001-05-04 12:07:44 $
* last change: $Author: nn $ $Date: 2001-06-29 20:20:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -66,6 +66,10 @@
#include "refreshtimer.hxx"
#endif
#ifndef _EMBOBJ_HXX
#include <so3/embobj.hxx>
#endif
#ifndef _LNKBASE_HXX //autogen
#include <so3/lnkbase.hxx>
#endif

View file

@ -2,9 +2,9 @@
*
* $RCSfile: htmlexp2.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: er $ $Date: 2001-05-08 16:31:41 $
* last change: $Author: nn $ $Date: 2001-06-29 20:20:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -80,6 +80,7 @@
#include <sot/exchange.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/transfer.hxx>
#ifndef SVTOOLS_URIHELPER_HXX
#include <svtools/urihelper.hxx>
#endif
@ -225,13 +226,11 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
case OBJ_OLE2:
{
const SvInPlaceObjectRef& rRef = ((SdrOle2Obj*)pObject)->GetObjRef();
GDIMetaFile* pPic = NULL;
SvData aData( FORMAT_GDIMETAFILE );
if( rRef->GetData( &aData ) )
aData.GetData( &pPic, TRANSFER_REFERENCE );
if( pPic )
TransferableDataHelper aOleData( rRef->CreateTransferableSnapshot() );
GDIMetaFile aMtf;
if( aOleData.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) )
{
Graphic aGraph( *pPic );
Graphic aGraph( aMtf );
String aLinkName;
WriteImage( aLinkName, aGraph, aOpt );
pE->bWritten = TRUE;

View file

@ -2,9 +2,9 @@
*
* $RCSfile: impex.cxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: er $ $Date: 2001-05-22 15:15:38 $
* last change: $Author: nn $ $Date: 2001-06-29 20:23:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -232,17 +232,6 @@ void ScImportExport::SetExtOptions( const ScAsciiOptions& rOpt )
}
BOOL ScImportExport::IsFormatSupported( SvDataObject* pObj )
{
return BOOL( pObj->HasFormat( FORMAT_STRING )
|| pObj->HasFormat( SOT_FORMATSTR_ID_SYLK )
|| pObj->HasFormat( SOT_FORMATSTR_ID_LINK )
|| pObj->HasFormat( SOT_FORMATSTR_ID_HTML )
|| pObj->HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE )
|| pObj->HasFormat( SOT_FORMATSTR_ID_DIF ) );
}
BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
{
return BOOL( nFormat == FORMAT_STRING
@ -254,15 +243,6 @@ BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
}
void ScImportExport::AddFormats( SvDataTypeList* pList )
{
pList->Insert( SvDataType( SOT_FORMATSTR_ID_HTML, MEDIUM_MEMORY ), LIST_APPEND );
pList->Insert( SvDataType( SOT_FORMATSTR_ID_SYLK, MEDIUM_MEMORY ), LIST_APPEND );
pList->Insert( SvDataType( SOT_FORMATSTR_ID_LINK, MEDIUM_MEMORY ), LIST_APPEND );
pList->Insert( SvDataType( SOT_FORMATSTR_ID_DIF, MEDIUM_MEMORY ), LIST_APPEND );
pList->Insert( SvDataType( FORMAT_STRING, MEDIUM_MEMORY ), LIST_APPEND );
}
//////////////////////////////////////////////////////////////////////////////
// Vorbereitung fuer Undo: Undo-Dokument erzeugen
@ -325,6 +305,7 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
#if 0
BOOL ScImportExport::ImportData( SvData& rData )
{
ULONG nFmt = rData.GetFormat();
@ -366,17 +347,7 @@ BOOL ScImportExport::ImportData( SvData& rData )
}
}
BOOL ScImportExport::ExportData( SvData& rData )
{
SvMemoryStream aStrm;
if( ExportStream( aStrm, rData.GetFormat() ) )
{
aStrm << (BYTE) 0;
rData.SetData( (void*)aStrm.GetData(), aStrm.Tell() );
return TRUE;
}
return FALSE;
}
#endif
BOOL ScImportExport::ImportData( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue )

View file

@ -2,9 +2,9 @@
*
* $RCSfile: tablink.cxx,v $
*
* $Revision: 1.10 $
* $Revision: 1.11 $
*
* last change: $Author: nn $ $Date: 2001-05-04 12:08:24 $
* last change: $Author: nn $ $Date: 2001-06-29 20:23:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -102,7 +102,7 @@ TYPEINIT1(ScTableLink, ::so3::SvBaseLink);
ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile,
const String& rFilter, const String& rOpt,
ULONG nRefresh ):
::so3::SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE),
::so3::SvBaseLink(so3::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pDocShell(pDocSh),
aFileName(rFile),
@ -117,7 +117,7 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile,
ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile,
const String& rFilter, const String& rOpt,
ULONG nRefresh ):
::so3::SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE),
::so3::SvBaseLink(so3::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pDocShell((ScDocShell*)pShell),
aFileName(rFile),

View file

@ -2,9 +2,9 @@
*
* $RCSfile: fuins2.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: jp $ $Date: 2001-03-08 20:50:17 $
* last change: $Author: nn $ $Date: 2001-06-29 20:24:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -616,9 +616,9 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, SdrView* pVi
pView->InsertObject(pObj, *pPV);
// Dies veranlaesst Chart zum sofortigen Update
SvData aEmpty;
//SvData aEmpty;
aIPObj->SendDataChanged( aEmpty );
//aIPObj->SendDataChanged( aEmpty );
aIPObj->SendViewChanged();
if (!rReq.IsAPI())

View file

@ -2,9 +2,9 @@
*
* $RCSfile: impex.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: jp $ $Date: 2001-03-08 20:50:39 $
* last change: $Author: nn $ $Date: 2001-06-29 20:24:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -70,14 +70,11 @@
#include "global.hxx"
#endif
class SvDataObject;
class SvDataTypeList;
class ScDocShell;
class ScDocument;
class SvStream;
class SfxMedium;
class ScAsciiOptions;
class SvData;
class ScImportExport
{
@ -133,8 +130,6 @@ public:
BOOL IsUndo() const { return bUndo; }
void SetUndo( BOOL b ) { bUndo = b; }
static void AddFormats( SvDataTypeList* );
static BOOL IsFormatSupported( SvDataObject* );
static BOOL IsFormatSupported( ULONG nFormat );
static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p,
String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, BOOL bMergeSeps );
@ -166,9 +161,6 @@ public:
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
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: navipi.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: mba $ $Date: 2001-06-11 08:29:22 $
* last change: $Author: nn $ $Date: 2001-06-29 20:24:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -364,9 +364,6 @@ protected:
virtual void Paint( const Rectangle& rRec );
virtual void Resizing( Size& rSize );
virtual BOOL Drop( const DropEvent& rEvt );
virtual BOOL QueryDrop( DropEvent& rEvt );
public:
ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Window* pParent );
~ScNavigatorDlg();
@ -394,9 +391,6 @@ public:
virtual void Resizing( Size& rSize );
virtual BOOL Drop( const DropEvent& rEvt );
virtual BOOL QueryDrop( DropEvent& rEvt );
private:
ScNavigatorDlg* pNavigator;
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: content.cxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: nn $ $Date: 2001-05-14 08:42:47 $
* last change: $Author: nn $ $Date: 2001-06-29 20:26:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -76,7 +76,6 @@
#include <svx/linkmgr.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/drag.hxx>
#include <vcl/help.hxx>
#include <vcl/sound.hxx>
#include <tools/urlobj.hxx>

View file

@ -2,9 +2,9 @@
*
* $RCSfile: navipi.cxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: mba $ $Date: 2001-06-11 08:29:22 $
* last change: $Author: nn $ $Date: 2001-06-29 20:26:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -78,7 +78,6 @@
#include <sfx2/navigat.hxx>
#include <svtools/stritem.hxx>
#include <svtools/urlbmk.hxx>
#include <vcl/drag.hxx>
#include <vcl/sound.hxx>
#include <unotools/charclass.hxx>
#include <stdlib.h>
@ -369,7 +368,7 @@ USHORT ColumnEdit::NumStrToAlpha( String& rStr )
USHORT nColumn = 0;
if ( CharClass::isAsciiNumeric(rStr) )
nColumn = NumToAlpha( rStr.ToInt32(), rStr );
nColumn = NumToAlpha( (USHORT)rStr.ToInt32(), rStr );
else
rStr.Erase();
@ -724,16 +723,6 @@ void __EXPORT ScNavigatorDialogWrapper::Resizing( Size& rSize )
((ScNavigatorDlg*)GetWindow())->Resizing(rSize);
}
BOOL __EXPORT ScNavigatorDialogWrapper::Drop( const DropEvent& rEvt )
{
return GetWindow()->Drop(rEvt);
}
BOOL __EXPORT ScNavigatorDialogWrapper::QueryDrop( DropEvent& rEvt )
{
return GetWindow()->QueryDrop(rEvt);
}
//========================================================================
// class ScNavigatorPI
//========================================================================
@ -1616,6 +1605,7 @@ SfxChildAlignment __EXPORT ScNavigatorDlg::CheckAlignment(
//
//------------------------------------------------------------------------
#if 0
BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt )
{
BOOL bReturn = FALSE;
@ -1663,6 +1653,7 @@ BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt )
return bReturn;
}
#endif

View file

@ -2,9 +2,9 @@
*
* $RCSfile: chartuno.cxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: jp $ $Date: 2001-03-08 20:52:48 $
* last change: $Author: nn $ $Date: 2001-06-29 20:27:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -299,8 +299,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
pModel->AddUndo( new SdrUndoInsertObj( *pObj ) ); //! Undo-Kommentar?
// Dies veranlaesst Chart zum sofortigen Update
SvData aEmpty;
aIPObj->SendDataChanged( aEmpty );
//SvData aEmpty;
//aIPObj->SendDataChanged( aEmpty );
aIPObj->SendViewChanged();
}
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: viewfun3.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: nn $ $Date: 2001-05-11 18:29:47 $
* last change: $Author: nn $ $Date: 2001-06-29 20:28:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -407,8 +407,9 @@ void ScViewFunc::PasteFromSystem()
PasteDraw();
else
{
SvDataObjectRef pClipObj = SvDataObject::PasteClipboard();
if (pClipObj.Is())
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
// if (pClipObj.Is())
{
ULONG nBiff = Exchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5")));
@ -416,46 +417,52 @@ void ScViewFunc::PasteFromSystem()
// als erstes SvDraw-Model, dann Grafik
// (Grafik darf nur bei einzelner Grafik drinstehen)
if (pClipObj->HasFormat( SOT_FORMATSTR_ID_DRAWING ))
if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ))
PasteFromSystem( SOT_FORMATSTR_ID_DRAWING );
else if (pClipObj->HasFormat( SOT_FORMATSTR_ID_SVXB ))
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ))
PasteFromSystem( SOT_FORMATSTR_ID_SVXB );
else if (pClipObj->HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ))
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ))
{
// Wenn es vom Writer kommt, statt OLE RTF einfuegen
// If it's a Writer object, insert RTF instead of OLE
SvObjectDescriptor aDesc( pClipObj );
// GlobalName vom Writer wie da in docsh.cxx
SvGlobalName aWriterName( SO3_SW_CLASSID );
SvGlobalName aSwWebName( SO3_SWWEB_CLASSID );
if ((aDesc.GetClassName() == aWriterName || aDesc.GetClassName() == aSwWebName) &&
pClipObj->HasFormat(FORMAT_RTF))
BOOL bDoRtf = FALSE;
SotStorageStreamRef xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) )
{
SvStorageRef xStore( new SvStorage( *xStm ) );
bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) ||
aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) )
&& aDataHelper.HasFormat( SOT_FORMAT_RTF ) );
}
if ( bDoRtf )
PasteFromSystem( FORMAT_RTF );
else
PasteFromSystem( SOT_FORMATSTR_ID_EMBED_SOURCE );
}
else if (pClipObj->HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ))
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ))
PasteFromSystem( SOT_FORMATSTR_ID_LINK_SOURCE );
// FORMAT_PRIVATE no longer here (can't work if pOwnClip is NULL)
else if (pClipObj->HasFormat(nBiff)) // before xxx_OLE formats
else if (aDataHelper.HasFormat(nBiff)) // before xxx_OLE formats
PasteFromSystem(nBiff);
else if (pClipObj->HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ))
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ))
PasteFromSystem( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE );
else if (pClipObj->HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ))
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ))
PasteFromSystem( SOT_FORMATSTR_ID_LINK_SOURCE_OLE );
else if (pClipObj->HasFormat(FORMAT_RTF))
else if (aDataHelper.HasFormat(FORMAT_RTF))
PasteFromSystem(FORMAT_RTF);
else if (pClipObj->HasFormat(SOT_FORMATSTR_ID_HTML))
else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML))
PasteFromSystem(SOT_FORMATSTR_ID_HTML);
else if (pClipObj->HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE))
else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE))
PasteFromSystem(SOT_FORMATSTR_ID_HTML_SIMPLE);
else if (pClipObj->HasFormat(SOT_FORMATSTR_ID_SYLK))
else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_SYLK))
PasteFromSystem(SOT_FORMATSTR_ID_SYLK);
else if (pClipObj->HasFormat(FORMAT_STRING))
else if (aDataHelper.HasFormat(FORMAT_STRING))
PasteFromSystem(FORMAT_STRING);
else if (pClipObj->HasFormat(FORMAT_GDIMETAFILE))
else if (aDataHelper.HasFormat(FORMAT_GDIMETAFILE))
PasteFromSystem(FORMAT_GDIMETAFILE);
else if (pClipObj->HasFormat(FORMAT_BITMAP))
else if (aDataHelper.HasFormat(FORMAT_BITMAP))
PasteFromSystem(FORMAT_BITMAP);
// else
// ErrorMessage(STR_PASTE_ERROR);

View file

@ -2,9 +2,9 @@
*
* $RCSfile: viewfun4.cxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: nn $ $Date: 2001-03-30 19:14:44 $
* last change: $Author: nn $ $Date: 2001-06-29 20:28:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -95,7 +95,6 @@
#include <svtools/stritem.hxx>
#include <svtools/transfer.hxx>
#include <svtools/urlbmk.hxx>
#include <vcl/drag.hxx>
#include <vcl/system.hxx>
#include <vcl/msgbox.hxx>
@ -153,9 +152,10 @@ void ScViewFunc::PasteRTF( USHORT nStartCol, USHORT nStartRow,
if (bPasteIsDrop)
{
DropEvent aDropEvt;
if (aEditView.QueryDrop( aDropEvt ))
aEditView.Drop( aDropEvt );
//! paste drag server content into EditEngine
//DropEvent aDropEvt;
//if (aEditView.QueryDrop( aDropEvt ))
// aEditView.Drop( aDropEvt );
}
else
aEditView.PasteSpecial();

View file

@ -2,9 +2,9 @@
*
* $RCSfile: viewfun5.cxx,v $
*
* $Revision: 1.9 $
* $Revision: 1.10 $
*
* last change: $Author: nn $ $Date: 2001-05-14 08:43:38 $
* last change: $Author: nn $ $Date: 2001-06-29 20:28:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -86,7 +86,6 @@
#include <svtools/ptitem.hxx>
#include <svtools/stritem.hxx>
#include <svtools/transfer.hxx>
#include <vcl/drag.hxx>
#include <vcl/graph.hxx>
#include <sot/formats.hxx>
@ -477,13 +476,15 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
}
else if ( nFormatId == SOT_FORMAT_FILE )
{
USHORT nCount = DragServer::GetItemCount();
if (nCount == 0) // normal handling (not D&D)
//! multiple files?
//USHORT nCount = DragServer::GetItemCount();
//if (nCount == 0) // normal handling (not D&D)
{
String aFile;
if ( aDataHelper.GetString( nFormatId, aFile ) )
bRet = PasteFile( aPos, aFile );
}
#if 0
else // use multiple items from drag server
{
for( USHORT i = 0; i < nCount ; i++ )
@ -502,6 +503,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
}
bRet = TRUE;
}
#endif
}
else if ( nFormatId == SOT_FORMATSTR_ID_SOLK ||
nFormatId == SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ||