diff options
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 07a9205fc427..ee2cccf72f35 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -776,22 +776,20 @@ bool ScViewFunc::PasteOnDrawObjectLinked( if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) { - std::unique_ptr<SvStream> xStm; - ScDrawView* pScDrawView = GetScDrawView(); - - if( pScDrawView && aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) ) - { - Graphic aGraphic; - TypeSerializer aSerializer(*xStm); - aSerializer.readGraphic(aGraphic); + if (ScDrawView* pScDrawView = GetScDrawView()) + if (std::unique_ptr<SvStream> xStm = aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB ) ) + { + Graphic aGraphic; + TypeSerializer aSerializer(*xStm); + aSerializer.readGraphic(aGraphic); - const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); - if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "" )) - { - return true; + if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "" )) + { + return true; + } } - } } else if ( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) { |