summaryrefslogtreecommitdiff
path: root/oox/source/helper
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-12-18 11:17:53 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-12-21 12:57:43 +0100
commitafa3dff9c7b963f1d312ef8c2efcbc8ab7271e62 (patch)
treebdf7f438a058ddbbf9006ede319c44649ba071ca /oox/source/helper
parent149743a124a3731cb98caf94190ef4a7deca9cb7 (diff)
do not preload all images in the pptx importer
Now with my GraphicFilter::MakeGraphicsAvailableThreaded() patches for Impress images will be loaded in parallel as they are needed, which should usually be more efficient than loading all of them immediately. This basically reverts commits: b1319842a49cdf6512bbd9e81081e2a9edbd6089 04e27df3c162f1df02f061b94434a38d1eaa3a46 9eb8e2737d3a4d52ce1b0cc44091a3b7ecf59e3b Change-Id: I46bb0d6d93fb69f03f464308f6fce1603aafdfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107945 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'oox/source/helper')
-rw-r--r--oox/source/helper/graphichelper.cxx67
1 files changed, 0 insertions, 67 deletions
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index e8a1c94326a7..82978a76451e 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -35,7 +35,6 @@
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
#include <tools/gen.hxx>
-#include <comphelper/propertysequence.hxx>
#include <comphelper/sequence.hxx>
#include <oox/helper/containerhelper.hxx>
#include <oox/helper/propertyset.hxx>
@@ -277,27 +276,6 @@ Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStrea
return xGraphic;
}
-std::vector< uno::Reference<graphic::XGraphic> > GraphicHelper::importGraphics(const std::vector< uno::Reference<io::XInputStream> >& rStreams) const
-{
- std::vector< uno::Sequence<beans::PropertyValue> > aArgsVec;
-
- for (const auto& rStream : rStreams)
- {
- uno::Sequence<beans::PropertyValue > aArgs = comphelper::InitPropertySequence(
- {
- {"InputStream", uno::makeAny(rStream)}
- });
- aArgsVec.push_back(aArgs);
- }
-
- std::vector< uno::Reference<graphic::XGraphic> > aRet;
-
- if (mxGraphicProvider.is())
- aRet = comphelper::sequenceToContainer< std::vector< uno::Reference<graphic::XGraphic> > >(mxGraphicProvider->queryGraphics(comphelper::containerToSequence(aArgsVec)));
-
- return aRet;
-}
-
Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& rGraphicData ) const
{
Reference< XGraphic > xGraphic;
@@ -309,51 +287,6 @@ Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& rG
return xGraphic;
}
-void GraphicHelper::importEmbeddedGraphics(const std::vector<OUString>& rStreamNames) const
-{
- // Don't actually return anything, just fill maEmbeddedGraphics.
-
- // Stream names and streams to be imported.
- std::vector<OUString> aMissingStreamNames;
- std::vector< uno::Reference<io::XInputStream> > aMissingStreams;
-
- initializeGraphicMapperIfNeeded();
-
- SAL_WARN_IF(!mxGraphicMapper.is(), "oox", "GraphicHelper::importEmbeddedGraphic - graphic mapper not available");
-
- for (const auto& rStreamName : rStreamNames)
- {
-
- if (rStreamName.isEmpty())
- {
- SAL_WARN("oox", "GraphicHelper::importEmbeddedGraphics - empty stream name");
- continue;
- }
-
- Reference<XGraphic> xGraphic;
-
- xGraphic = mxGraphicMapper->findGraphic(rStreamName);
-
- if (!xGraphic.is())
- {
- aMissingStreamNames.push_back(rStreamName);
- aMissingStreams.push_back(mxStorage->openInputStream(rStreamName));
- }
- }
-
- std::vector< uno::Reference<graphic::XGraphic> > aGraphics = importGraphics(aMissingStreams);
-
-
- assert(aGraphics.size() == aMissingStreamNames.size());
- for (size_t i = 0; i < aGraphics.size(); ++i)
- {
- if (aGraphics[i].is())
- {
- mxGraphicMapper->putGraphic(aMissingStreamNames[i], aGraphics[i]);
- }
- }
-}
-
Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStreamName, const WmfExternal* pExtHeader ) const
{
Reference< XGraphic > xGraphic;