[Libreoffice-commits] core.git: vcl/inc vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 28 00:41:00 UTC 2020
vcl/inc/impgraph.hxx | 2 --
vcl/source/gdi/impgraph.cxx | 18 ++++++++----------
2 files changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 1bb5011c6f261d3f6946ca6a78e2be17fa60a245
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 21 14:19:38 2020 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 28 01:40:20 2020 +0100
ImpGraphic: inline loadPrepared as it is used only in one place
Change-Id: Id3753522f016d3c619e6ef8c68b3172768b5ca90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108254
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 86fa80606b8f..f4417a262d1c 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -209,8 +209,6 @@ private:
bool ensureAvailable () const;
- bool loadPrepared();
-
sal_Int32 getPageNumber() const;
// Set the pref size, but don't force swap-in
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index e55c148a5df0..f40500b44519 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1350,15 +1350,6 @@ bool ImpGraphic::ensureAvailable() const
return bResult;
}
-bool ImpGraphic::loadPrepared()
-{
- Graphic aGraphic;
- if (!mpGfxLink->LoadNative(aGraphic))
- return false;
- updateFromLoadedGraphic(aGraphic.ImplGetImpGraphic());
- return true;
-}
-
void ImpGraphic::updateFromLoadedGraphic(ImpGraphic* graphic)
{
GraphicExternalLink aLink = maGraphicExternalLink;
@@ -1394,7 +1385,14 @@ bool ImpGraphic::swapIn()
if (mbPrepared)
{
- bReturn = loadPrepared();
+ Graphic aGraphic;
+ if (!mpGfxLink->LoadNative(aGraphic))
+ return false;
+
+ updateFromLoadedGraphic(aGraphic.ImplGetImpGraphic());
+
+ maLastUsed = std::chrono::high_resolution_clock::now();
+ bReturn = true;
}
else if (mpGfxLink && mpGfxLink->IsNative())
{
More information about the Libreoffice-commits
mailing list