summaryrefslogtreecommitdiffstats
path: root/dtrans/source/win32/dtobj/DOTransferable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/source/win32/dtobj/DOTransferable.cxx')
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.cxx65
1 files changed, 0 insertions, 65 deletions
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 56c5dde01ca0..475ecadac7d3 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -31,10 +31,8 @@
#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include <comphelper/processfactory.hxx>
-
// namespace directives
-
using namespace std;
using namespace osl;
using namespace cppu;
@@ -44,11 +42,6 @@ using namespace com::sun::star::io;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
-
-
-//
-
-
namespace
{
const Type CPPUTYPE_SEQINT8 = getCppuType( ( Sequence< sal_Int8 >* )0 );
@@ -64,11 +57,8 @@ namespace
} // end namespace
-
-
// ctor
-
CDOTransferable::CDOTransferable(
const Reference< XComponentContext >& rxContext, IDataObjectPtr rDataObject ) :
m_rDataObject( rDataObject ),
@@ -79,10 +69,6 @@ CDOTransferable::CDOTransferable(
{
}
-
-//
-
-
Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
throw( UnsupportedFlavorException, IOException, RuntimeException )
{
@@ -90,17 +76,13 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
MutexGuard aGuard( m_aMutex );
-
// convert dataflavor to formatetc
-
CFormatEtc fetc = m_DataFormatTranslator.getFormatEtcFromDataFlavor( aFlavor );
OSL_ASSERT( CF_INVALID != fetc.getClipformat() );
-
// get the data from clipboard in a byte stream
-
ByteSequence_t clipDataStream;
try
@@ -137,29 +119,23 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
throw; // pass through exception
}
-
// return the data as any
-
return byteStreamToAny( clipDataStream, aFlavor.DataType );
}
-
// getTransferDataFlavors
-
Sequence< DataFlavor > SAL_CALL CDOTransferable::getTransferDataFlavors( )
throw( RuntimeException )
{
return m_FlavorList;
}
-
// isDataFlavorSupported
// returns true if we find a DataFlavor with the same MimeType and
// DataType
-
sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw( RuntimeException )
{
@@ -172,7 +148,6 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
return sal_False;
}
-
// helper function
// the list of datafalvors currently on the clipboard will be initialized
// only once; if the client of this Transferable will hold a reference
@@ -183,7 +158,6 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
// we save the first offered text format which we will later use for the
// conversion
-
void SAL_CALL CDOTransferable::initFlavorList( )
{
IEnumFORMATETCPtr pEnumFormatEtc;
@@ -231,10 +205,6 @@ void SAL_CALL CDOTransferable::initFlavorList( )
}
}
-
-//
-
-
inline
void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
{
@@ -248,10 +218,8 @@ void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
}
}
-
// helper function
-
//inline
DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
{
@@ -268,11 +236,9 @@ DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFo
return m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, lcid );
}
-
// returns the current locale on clipboard; if there is no locale on
// clipboard the function returns the current thread locale
-
LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
{
LCID lcid = GetThreadLocale( );
@@ -297,12 +263,10 @@ LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
return lcid;
}
-
// i think it's not necessary to call ReleaseStgMedium
// in case of failures because nothing should have been
// allocated etc.
-
CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
{
STGMEDIUM stgmedium;
@@ -377,10 +341,6 @@ CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFor
return byteStream;
}
-
-//
-
-
OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
{
ByteSequence_t aTextSequence;
@@ -422,10 +382,6 @@ OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
return OUString(pWChar);
}
-
-//
-
-
void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, ByteSequence_t& aByteSequence )
{
CStgTransferHelper memTransferHelper;
@@ -458,10 +414,6 @@ void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium,
memTransferHelper.read( aByteSequence.getArray( ), nMemSize );
}
-
-//
-
-
inline
Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& aRequestedDataType )
{
@@ -478,10 +430,6 @@ Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& a
return aAny;
}
-
-//
-
-
inline
OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
{
@@ -498,10 +446,6 @@ OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
return OUString( reinterpret_cast< sal_Unicode* >( aByteStream.getArray( ) ), nWChars );
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
const DataFlavor& lhs, const DataFlavor& rhs )
{
@@ -531,20 +475,12 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
return bRet;
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::cmpFullMediaType(
const Reference< XMimeContentType >& xLhs, const Reference< XMimeContentType >& xRhs ) const
{
return xLhs->getFullMediaType().equalsIgnoreAsciiCase( xRhs->getFullMediaType( ) );
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
const Reference< XMimeContentType >& xLhs, const Reference< XMimeContentType >& xRhs ) const
{
@@ -606,5 +542,4 @@ sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
return retVal;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */