diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-11 00:06:49 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-11 05:38:52 +0100 |
commit | 98d71c4e0847797a4ba9229a8e6d832a8a3d5e0f (patch) | |
tree | 97012c315567a679abc827873746afa5fa90bdd0 /sfx2/source/doc | |
parent | 284a7f60fff72c4d8c011ff60ea2e40163cd25c3 (diff) |
tdf#69060: lock refreshing font data when loading a document
This accumulates all calls to OutputDevice::ImplRefreshAllFontData
while loading document's model, to avoid multiple updates for each
imported font. After loading, OutputDevice::ImplRefreshAllFontData
is executed once.
Change-Id: I5b23a2b8a3765dee9061b6479665d04c2ba11cbf
Reviewed-on: https://gerrit.libreoffice.org/47112
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index f1ae5b009231..e83ff19c3186 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -581,6 +581,10 @@ bool SfxObjectShell::ImportFromGeneratedStream_Impl( bool SfxObjectShell::DoLoad( SfxMedium *pMed ) { ModifyBlocker_Impl aBlock( this ); + struct FontLockGuard { + FontLockGuard() { Application::LockFontUpdates(true); } + ~FontLockGuard() { Application::LockFontUpdates(false); } + } aFontLockGuard; pMedium = pMed; pMedium->CanDisposeStorage_Impl( true ); |