diff options
Diffstat (limited to 'svtools/source/misc/transfer.cxx')
-rw-r--r-- | svtools/source/misc/transfer.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 31fb53d72aeb..fe15173ff927 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -674,8 +674,8 @@ void TransferableHelper::AddFormat( const DataFlavor& rFlavor ) if( FORMAT_BITMAP == aFlavorEx.mnSotId ) { - AddFormat( SOT_FORMATSTR_ID_BMP ); AddFormat( SOT_FORMATSTR_ID_PNG ); + AddFormat( SOT_FORMATSTR_ID_BMP ); } else if( FORMAT_GDIMETAFILE == aFlavorEx.mnSotId ) { @@ -786,18 +786,19 @@ sal_Bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataF { const Bitmap aBitmap(rBitmapEx.GetBitmap()); - if(rBitmapEx.IsTransparent()) - { - const Bitmap aMask(rBitmapEx.GetAlpha().GetBitmap()); - - // explicitely use Bitmap::Write with bCompressed = sal_False and bFileHeader = sal_True - WriteDIBV5(aBitmap, aMask, aMemStm); - } - else - { + // #i124085# take out DIBV5 for writing to the clipboard + //if(rBitmapEx.IsTransparent()) + //{ + // const Bitmap aMask(rBitmapEx.GetAlpha().GetBitmap()); + // + // // explicitely use Bitmap::Write with bCompressed = sal_False and bFileHeader = sal_True + // WriteDIBV5(aBitmap, aMask, aMemStm); + //} + //else + //{ // explicitely use Bitmap::Write with bCompressed = sal_False and bFileHeader = sal_True WriteDIB(aBitmap, aMemStm, false, true); - } + //} } maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); @@ -1725,6 +1726,7 @@ sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapE Bitmap aMask; // explicitely use Bitmap::Read with bFileHeader = sal_True + // #i124085# keep DIBV5 for read from clipboard, but should not happen ReadDIBV5(aBitmap, aMask, *xStm); if(aMask.IsEmpty()) |