vcl/source/filter/graphicfilter.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit cfab7a8073e8f988a2466af6df900a0aa8d7f735
Author:     Mike Kaganski <[email protected]>
AuthorDate: Thu Oct 2 12:18:53 2025 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sat Oct 4 10:47:05 2025 +0200

    Use BinaryDataContainer::getAsStream
    
    ... instead of creating a new stream, and copying data into that.
    
    Change-Id: I04f5ddde5e83dd47da19ed7c46579e292e290eee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191844
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index cedb91503a57..31928e81bf1f 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -673,8 +673,7 @@ void 
GraphicFilter::MakeGraphicsAvailableThreaded(std::vector<Graphic*>& graphic
     streams.reserve(toLoad.size());
     for( auto graphic : toLoad )
     {
-        streams.push_back( std::make_unique<SvMemoryStream>( 
const_cast<sal_uInt8*>(graphic->GetSharedGfxLink()->GetData()),
-            graphic->GetSharedGfxLink()->GetDataSize(), StreamMode::READ | 
StreamMode::WRITE));
+        
streams.push_back(graphic->GetSharedGfxLink()->getDataContainer().getAsStream());
     }
     std::vector< std::shared_ptr<Graphic>> loadedGraphics;
     loadedGraphics.reserve(streams.size());

Reply via email to