diff options
-rw-r--r-- | sd/source/filter/sdpptwrp.cxx | 9 | ||||
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 51 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 9 |
9 files changed, 81 insertions, 59 deletions
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 23a15104efd6..c1a19f7e9f6d 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpptwrp.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sj $ $Date: 2001-03-16 13:33:37 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:41:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,6 +116,9 @@ sal_Bool SdPPTFilter::Import() if( pDocStream ) { + pDocStream->SetVersion( pStorage->GetVersion() ); + pDocStream->SetKey( pStorage->GetKey() ); + SdPPTImport* pImport = new SdPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium ); if ( !( bRet = pImport->Import() ) ) @@ -150,8 +153,8 @@ sal_Bool SdPPTFilter::Export() if( PPTExport && ( xStorRef = mrMedium.GetOutputStorage() ).Is() ) { sal_uInt32 nCnvrtFlags = 0; - OfficeApplication* pApplication = OFF_APP(); + if( pApplication ) { OfaFilterOptions* pFilterOptions = pApplication->GetFilterOptions(); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index e99fe757579e..f129c0429fbf 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdxmlwrp.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: cl $ $Date: 2001-03-14 09:22:28 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -289,6 +289,8 @@ sal_Bool SdXMLFilter::Import() if( xIStm.Is() ) { + xIStm->SetVersion( pStorage->GetVersion() ); + xIStm->SetKey( pStorage->GetKey() ); xIStm->SetBufferSize( 16 * 1024 ); aParserInput.aInputStream = new utl::OInputStreamWrapper( *xIStm ); } @@ -482,6 +484,8 @@ sal_Bool SdXMLFilter::Export() { const OUString sDocName( OUString::createFromAscii( pServices->mpStream ) ); xDocStream = pStorage->OpenStream( sDocName, STREAM_WRITE | STREAM_SHARE_DENYWRITE ); + xDocStream->SetVersion( pStorage->GetVersion() ); + xDocStream->SetKey( pStorage->GetKey() ); xDocStream->SetBufferSize( 16*1024 ); xDocOut = new utl::OOutputStreamWrapper( *xDocStream ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 78e9f3830dde..86e74b629ae9 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docshel4.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: sj $ $Date: 2001-03-16 13:44:56 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:38:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -443,6 +443,7 @@ BOOL SdDrawDocShell::LoadFrom(SvStorage* pStor) // Pool und StyleSheet Pool laden SvStorageStreamRef aPoolStm = pStor->OpenStream(pSfxStyleSheets); aPoolStm->SetVersion(pStor->GetVersion()); + aPoolStm->SetKey(pStor->GetKey()); bRet2 = aPoolStm->GetError() == 0; if (bRet2) { diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 25ddcb26198f..2a05e7bd1d23 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docshell.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: cl $ $Date: 2001-02-19 13:35:25 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:35:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -537,6 +537,12 @@ SvStream* SdDrawDocShell::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) xPictureStorage->IsStream( aPictureStreamName ) ) { pRet = xPictureStorage->OpenStream( aPictureStreamName ); + + if( pRet ) + { + pRet->SetVersion( xPictureStorage->GetVersion() ); + pRet->SetKey( xPictureStorage->GetKey() ); + } } } diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index ffccdbc6edb8..b73ff7cc0104 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuinsert.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: jp $ $Date: 2001-03-08 20:58:40 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:36:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,9 @@ #ifndef _SFXECODE_HXX //autogen #include <svtools/sfxecode.hxx> #endif +#ifndef _TRANSFER_HXX //autogen +#include <svtools/transfer.hxx> +#endif #ifndef _INSDLG_HXX //autogen #include <so3/insdlg.hxx> #endif @@ -274,36 +277,30 @@ FuInsertClipboard::FuInsertClipboard(SdViewShell* pViewSh, SdWindow* pWin, SdVie SdDrawDocument* pDoc, SfxRequest& rReq) : FuPoor(pViewSh, pWin, pView, pDoc, rReq) { - // !!!Clipboard: SvPasteObjectDialog() has to be redesigned - SvDataObjectRef aDataObj( SvDataObject::PasteClipboard() ); - const String aEmptyStr; - SvPasteObjectDialog* pDlg = new SvPasteObjectDialog(); - - pDlg->Insert(SOT_FORMATSTR_ID_EMBED_SOURCE, aEmptyStr ); - pDlg->Insert(SOT_FORMATSTR_ID_LINK_SOURCE, aEmptyStr ); - pDlg->Insert( SOT_FORMATSTR_ID_DRAWING, Clipboard::GetFormatName(SOT_FORMATSTR_ID_DRAWING)); - pDlg->Insert( SOT_FORMATSTR_ID_SVXB, Clipboard::GetFormatName(SOT_FORMATSTR_ID_SVXB)); - pDlg->Insert( FORMAT_GDIMETAFILE, Clipboard::GetFormatName(FORMAT_GDIMETAFILE) ); - pDlg->Insert( FORMAT_BITMAP, Clipboard::GetFormatName(FORMAT_BITMAP) ); - pDlg->Insert( FORMAT_STRING, String( SdResId(STR_FORMAT_STRING) ) ); - pDlg->Insert( SOT_FORMATSTR_ID_HTML, Clipboard::GetFormatName(SOT_FORMATSTR_ID_HTML) ); - pDlg->Insert( FORMAT_RTF, String( SdResId(STR_FORMAT_RTF) ) ); + TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard() ); + SvPasteObjectDialog* pDlg = new SvPasteObjectDialog(); + ::com::sun::star::datatransfer::DataFlavor aFlavor; + + pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, String() ); + pDlg->Insert( SOT_FORMATSTR_ID_LINK_SOURCE, String() ); + pDlg->Insert( SOT_FORMATSTR_ID_DRAWING, ( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_DRAWING, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( SOT_FORMATSTR_ID_SVXB, ( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_SVXB, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( FORMAT_GDIMETAFILE, ( SotExchange::GetFormatDataFlavor( FORMAT_GDIMETAFILE, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( FORMAT_BITMAP, ( SotExchange::GetFormatDataFlavor( FORMAT_BITMAP, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( FORMAT_STRING, ( SotExchange::GetFormatDataFlavor( FORMAT_STRING, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( SOT_FORMATSTR_ID_HTML, ( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_HTML, aFlavor ), aFlavor.HumanPresentableName ) ); + pDlg->Insert( FORMAT_RTF, ( SotExchange::GetFormatDataFlavor( FORMAT_RTF, aFlavor ), aFlavor.HumanPresentableName ) ); pDlg->Insert( EditEngine::RegisterClipboardFormatName(), String() ); - const ULONG nFormatId = pDlg->Execute(pWindow, aDataObj); + const ULONG nFormatId = pDlg->Execute( pWindow, aDataHelper.GetTransferable() ); - if( nFormatId ) + if( nFormatId && aDataHelper.GetTransferable().is() ) { - TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard() ); - - if( aDataHelper.GetTransferable().is() ) - { - sal_Int8 nAction = DND_ACTION_COPY; + sal_Int8 nAction = DND_ACTION_COPY; - pView->InsertData( aDataHelper.GetTransferable(), - pWindow->PixelToLogic( Rectangle( Point(), pWindow->GetOutputSizePixel() ).Center() ), - nAction, FALSE, nFormatId ); - } + pView->InsertData( aDataHelper.GetTransferable(), + pWindow->PixelToLogic( Rectangle( Point(), pWindow->GetOutputSizePixel() ).Center() ), + nAction, FALSE, nFormatId ); } delete pDlg; diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 3f5ffbcdce5d..78174ef8595d 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drviews7.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: ka $ $Date: 2001-03-08 11:23:24 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:37:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -512,10 +512,14 @@ void __EXPORT SdDrawViewShell::GetMenuState( SfxItemSet &rSet ) if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONTEXT ) ) rSet.Put( SfxStringItem( SID_CONTEXT, pDrView->GetStatusText() ) ); - if( Clipboard::GetFormatCount() == 0 ) + if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE ) || + SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE2 ) ) { - rSet.DisableItem( SID_PASTE ); - rSet.DisableItem( SID_PASTE2 ); + if( !TransferableDataHelper::CreateFromSystemClipboard().GetFormatCount() ) + { + rSet.DisableItem( SID_PASTE ); + rSet.DisableItem( SID_PASTE2 ); + } } if ( !bConvertToPathPossible ) diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 8a1549de5f3b..44a8f36b9550 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -2,9 +2,9 @@ * * $RCSfile: outlnvsh.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: dl $ $Date: 2001-03-12 07:54:14 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:37:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1119,12 +1119,17 @@ void SdOutlineViewShell::GetMenuState( SfxItemSet &rSet ) aSlideBtn.Enable(); } - if (Clipboard::GetFormatCount() == 0 || - (!Clipboard::HasFormat(FORMAT_STRING) && - !Clipboard::HasFormat(FORMAT_RTF) && - !Clipboard::HasFormat(SOT_FORMATSTR_ID_HTML))) + if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE ) ) { - rSet.DisableItem(SID_PASTE); + TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard() ); + + if( !aDataHelper.GetFormatCount() || + ( !aDataHelper.HasFormat( FORMAT_STRING ) && + !aDataHelper.HasFormat( FORMAT_RTF ) && + !aDataHelper.HasFormat( SOT_FORMATSTR_ID_HTML ) ) ) + { + rSet.DisableItem( SID_PASTE ); + } } if (!pOlView->GetViewByWindow(pWindow)->HasSelection()) diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 578978e388a3..1c0118c486ac 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdview2.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: ka $ $Date: 2001-03-14 12:58:28 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:37:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -721,11 +721,12 @@ sal_Int8 SdView::ExecuteDrop( const ExecuteDropEvent& rEvt, SdWindow* pWin, USHO //!!!DND if( !( bReturn = FmFormView::Drop(rMEvt, pWin) ) ) ) if( !InsertData( rEvt.maDropEvent.Transferable, aPos, nDropAction, TRUE, 0, nPage, nLayer ) && pViewSh ) { - String aTmpString1, aTmpString2; - INetBookmark aINetBookmark( aTmpString1, aTmpString2 ); - const USHORT nCount = DragServer::GetItemCount(); - SdNavigatorWin* pNavWin = NULL; - NavigatorDragType eDragType = NAVIGATOR_DRAGTYPE_NONE; + TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable ); + String aTmpString1, aTmpString2; + INetBookmark aINetBookmark( aTmpString1, aTmpString2 ); + const ULONG nCount = aDataHelper.GetFormatCount(); + SdNavigatorWin* pNavWin = NULL; + NavigatorDragType eDragType = NAVIGATOR_DRAGTYPE_NONE; if( pViewSh->GetViewFrame()->HasChildWindow( SID_NAVIGATOR ) ) pNavWin = (SdNavigatorWin*)(pViewSh->GetViewFrame()->GetChildWindow( SID_NAVIGATOR )->GetContextWindow( SD_MOD() ) ); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 875262be089a..6c6616e64b0f 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdview3.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: ka $ $Date: 2001-03-16 13:30:49 $ + * last change: $Author: ka $ $Date: 2001-03-16 17:37:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -588,7 +588,7 @@ BOOL SdView::InsertData( const Reference< XTransferable >& rxTransferable, TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && - ( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) || + ( aDataHelper.GetSotStorageStream( nFormat ? nFormat : SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) || aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBEDDED_OBJ, xStm ) || aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, xStm ) || aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, xStm ) ) ) @@ -797,7 +797,8 @@ BOOL SdView::InsertData( const Reference< XTransferable >& rxTransferable, { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( nFormat, xStm ) ) + if( aDataHelper.GetSotStorageStream( nFormat ? nFormat : FORMAT_RTF, xStm ) || + aDataHelper.GetSotStorageStream( nEditEngineFormat, xStm ) ) { EETextFormat nFmt = EE_FORMAT_RTF; |