diff options
author | Armin Le Grand <alg@apache.org> | 2014-01-29 16:10:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-30 09:21:30 +0000 |
commit | 90d39a8a22c3f75e7eb4a79062e1d94c1fa1ff85 (patch) | |
tree | 60231554ed1c8f7807847318a3e7fcf9612da46d /sc | |
parent | 36c5078d244e5a757d92cdc0f183ebd11712f6fc (diff) |
Resolves: #i124085# disabled CF_DIBV5...
(no advantages but some problems), increased png support
(cherry picked from commit c991f7cae8dcb306cb0d1f32bc5fcd8ea0a1ea81)
Change-Id: I52bef1295b32eb3692a0428c96edd0c55287f34a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 2 |
7 files changed, 21 insertions, 5 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index efaa081bb26b..25a7e0e3274f 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -308,6 +308,7 @@ void ScDrawTransferObj::AddSupportedFormats() { AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); AddFormat( SOT_FORMAT_GDIMETAFILE ); } @@ -319,6 +320,7 @@ void ScDrawTransferObj::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_SVXB ); AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); } else if ( pBookmark ) // url button @@ -364,6 +366,7 @@ void ScDrawTransferObj::AddSupportedFormats() // leave out bitmap and metafile if there are only controls if ( !lcl_HasOnlyControls( pModel ) ) { + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); AddFormat( SOT_FORMAT_GDIMETAFILE ); } @@ -416,7 +419,9 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF { bOK = SetObject( pModel, SCDRAWTRANS_TYPE_DRAWMODEL, rFlavor ); } - else if ( nFormat == SOT_FORMAT_BITMAP || nFormat == SOT_FORMAT_GDIMETAFILE ) + else if ( nFormat == SOT_FORMAT_BITMAP + || nFormat == SOT_FORMATSTR_ID_PNG + || nFormat == SOT_FORMAT_GDIMETAFILE ) { // #i71538# use complete SdrViews // SdrExchangeView aView( pModel ); diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 47c2bfd7860a..679a21e9e0c3 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -198,6 +198,7 @@ void ScSelectionTransferObj::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); AddFormat( SOT_FORMATSTR_ID_HTML ); AddFormat( SOT_FORMATSTR_ID_SYLK ); @@ -214,6 +215,7 @@ void ScSelectionTransferObj::AddSupportedFormats() case SC_SELTRANS_DRAW_BITMAP: AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); AddFormat( SOT_FORMAT_GDIMETAFILE ); break; @@ -222,6 +224,7 @@ void ScSelectionTransferObj::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_SVXB ); AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); break; @@ -245,6 +248,7 @@ void ScSelectionTransferObj::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); AddFormat( SOT_FORMAT_GDIMETAFILE ); break; diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index db0df041e14c..8275b59fa24c 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -231,6 +231,7 @@ void ScTransferObj::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SOT_FORMATSTR_ID_PNG ); AddFormat( SOT_FORMAT_BITMAP ); // ScImportExport formats @@ -338,7 +339,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) OSL_FAIL("unknown DataType"); } } - else if ( nFormat == SOT_FORMAT_BITMAP ) + else if ( nFormat == SOT_FORMAT_BITMAP || nFormat == SOT_FORMATSTR_ID_PNG ) { Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), aBlock.aEnd.Col(), aBlock.aEnd.Row(), diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 73bdddd39279..90feae4b3302 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -381,6 +381,7 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_DRAWING ); lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_SVXB ); lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_GDIMETAFILE ); + lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_PNG ); lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_BITMAP ); lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_EMBED_SOURCE ); @@ -409,7 +410,8 @@ static sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) bPossible = sal_True; else { - if ( rData.HasFormat( SOT_FORMAT_BITMAP ) || + if ( rData.HasFormat( SOT_FORMATSTR_ID_PNG ) || + rData.HasFormat( SOT_FORMAT_BITMAP ) || rData.HasFormat( SOT_FORMAT_GDIMETAFILE ) || rData.HasFormat( SOT_FORMATSTR_ID_SVXB ) || rData.HasFormat( FORMAT_PRIVATE ) || diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 5b8a95d781c9..85498c2c0fef 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3789,6 +3789,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) { if ( IsDropFormatSupported(SOT_FORMATSTR_ID_SVXB) || IsDropFormatSupported(SOT_FORMAT_GDIMETAFILE) + || IsDropFormatSupported(SOT_FORMATSTR_ID_PNG) || IsDropFormatSupported(SOT_FORMAT_BITMAP) ) { // graphic dragged onto drawing object @@ -3823,6 +3824,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB ) || IsDropFormatSupported( SOT_FORMAT_RTF ) || IsDropFormatSupported( SOT_FORMAT_GDIMETAFILE ) || + IsDropFormatSupported( SOT_FORMATSTR_ID_PNG ) || IsDropFormatSupported( SOT_FORMAT_BITMAP ) || IsDropFormatSupported( SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) || IsDropFormatSupported( SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ) || @@ -3963,6 +3965,8 @@ static sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransf nFormatId = SOT_FORMAT_STRING; else if ( aDataHelper.HasFormat( SOT_FORMAT_GDIMETAFILE ) ) nFormatId = SOT_FORMAT_GDIMETAFILE; + else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_PNG ) ) + nFormatId = SOT_FORMATSTR_ID_PNG; else if ( aDataHelper.HasFormat( SOT_FORMAT_BITMAP ) ) nFormatId = SOT_FORMAT_BITMAP; diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 6d5fa726d3ae..63f4a448b65e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -715,7 +715,7 @@ sal_Bool ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTran if( aDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) ) bRet = ApplyGraphicToObject( pHitObj, Graphic(aMtf) ); } - else if ( aDataHelper.HasFormat( SOT_FORMAT_BITMAP ) ) + else if ( aDataHelper.HasFormat( SOT_FORMAT_BITMAP ) || aDataHelper.HasFormat( SOT_FORMATSTR_ID_PNG ) ) { BitmapEx aBmpEx; if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 079d55624899..5045e06c460c 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -452,7 +452,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } } } - else if (nFormatId == SOT_FORMAT_BITMAP) + else if (nFormatId == SOT_FORMAT_BITMAP || nFormatId == SOT_FORMATSTR_ID_PNG) { BitmapEx aBmpEx; if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) |