diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-10-04 18:47:57 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-10-04 18:47:57 +0000 |
commit | 03add1ee5ee8f977f4743825e706992aa4879f1a (patch) | |
tree | 132e07d325d43273e0b731e4a9411eb1b24575c9 /svtools/source/misc | |
parent | 961e1368284d48d8000f46a802b7fd2c41defa02 (diff) |
INTEGRATION: CWS mav09 (1.64.56); FILE MERGED
2004/07/08 15:41:39 mav 1.64.56.3: RESYNC: (1.65-1.66); FILE MERGED
2004/04/29 21:03:36 mav 1.64.56.2: RESYNC: (1.64-1.65); FILE MERGED
2004/04/14 13:53:40 mba 1.64.56.1: #i27773#: new storage API
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/transfer.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index bb8ae7e270f9..b0c595a3fef7 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: transfer.cxx,v $ * - * $Revision: 1.66 $ + * $Revision: 1.67 $ * - * last change: $Author: rt $ $Date: 2004-06-17 15:12:46 $ + * last change: $Author: kz $ $Date: 2004-10-04 19:47:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,6 +116,8 @@ #include <cppuhelper/implbase1.hxx> #endif +#include <comphelper/seqstream.hxx> + #ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XCLIPBOARDNOTIFIER_HPP_ #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #endif @@ -1970,6 +1972,25 @@ sal_Bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, return bRet; } +sal_Bool TransferableDataHelper::GetInputStream( SotFormatStringId nFormat, Reference < XInputStream >& rxStream ) +{ + DataFlavor aFlavor; + return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetInputStream( aFlavor, rxStream ) ); +} + +// ----------------------------------------------------------------------------- + +sal_Bool TransferableDataHelper::GetInputStream( const DataFlavor& rFlavor, Reference < XInputStream >& rxStream ) +{ + Sequence< sal_Int8 > aSeq; + sal_Bool bRet = GetSequence( rFlavor, aSeq ); + + if( bRet ) + rxStream = new ::comphelper::SequenceInputStream( aSeq ); + + return bRet; +} + // ----------------------------------------------------------------------------- |