diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 0cbd41b00950..6a1b776f4ead 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -691,13 +691,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, Graphic aGraphic; if (vcl::ImportPDF(*xStm, aGraphic)) { - std::unique_ptr<sal_uInt8[]> pGraphicContent; - const sal_Int32 nGraphicContentSize(xStm->Tell()); - pGraphicContent.reset(new sal_uInt8[nGraphicContentSize]); xStm->Seek(0); - xStm->ReadBytes(pGraphicContent.get(), nGraphicContentSize); - aGraphic.SetGfxLink(std::make_shared<GfxLink>(std::move(pGraphicContent), nGraphicContentSize, GfxLinkType::NativePdf)); + BinaryDataContainer aGraphicContent(*xStm, nGraphicContentSize); + aGraphic.SetGfxLink(std::make_shared<GfxLink>(aGraphicContent, GfxLinkType::NativePdf)); InsertGraphic(aGraphic, mnAction, aInsertPos, nullptr, nullptr); bReturn = true; |