[Libreoffice-commits] core.git: include/vcl sfx2/source vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 28 19:41:29 UTC 2020
include/vcl/outdev.hxx | 3 ---
include/vcl/svapp.hxx | 11 -----------
sfx2/source/doc/objstor.cxx | 4 ----
vcl/inc/svdata.hxx | 3 ---
vcl/source/app/svapp.cxx | 5 -----
vcl/source/outdev/font.cxx | 32 +-------------------------------
6 files changed, 1 insertion(+), 57 deletions(-)
New commits:
commit f34c304638258eb1d30a7fab942313199c65cc3f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 28 15:16:17 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 28 20:40:45 2020 +0100
tdf#137643 Revert "lock refreshing font data when loading a document"
from tdf#69060, to replace with an alternative solution
This reverts commit 98d71c4e0847797a4ba9229a8e6d832a8a3d5e0f.
and
This reverts commit 64d8e5f8db70f4f913abb902b41f4cff8dd1cdad.
Change-Id: I384e994b54aa1bfc735c6ab591b9b1410058451f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104716
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 60664ce3de02..ea8292909a39 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1292,9 +1292,6 @@ public:
//If bNewFontLists is true then drop and refetch lists of system fonts
SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
- // Lock font updates for all output devices
- static void LockFontUpdates(bool bLock);
-
protected:
SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index e5ecc5cb499d..b1d7759765c3 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1307,17 +1307,6 @@ public:
///@}
- /** Lock font updates for all output devices
-
- @remark When performing operations that might involve multiple registration of fonts, such as
- opening/closing documents with multiple embedded fonts, then each font addition/removal
- might cause an event that initiates a rebuild of each OutputDevice's font lists.
-
- Locking font updates disables processing such events, and unlocking causes a single such
- processing for all OutputDevices.
- */
- static void LockFontUpdates(bool bLock);
-
// For vclbootstrapprotector:
static void setDeInitHook(Link<LinkParamNone*,void> const & hook);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2f8a2c5f7779..d5803e1b0029 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -567,10 +567,6 @@ 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 );
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index b8a7a54f35b7..e7a423234043 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -383,9 +383,6 @@ struct ImplSVData
VclPtr<WorkWindow> mpDefaultWin; // Default-Window
bool mbDeInit = false; // Is VCL deinitializing
std::unique_ptr<SalSystem> mpSalSystem; // SalSystem interface
- int mnFontUpdatesLockCount = 0; // avoid repeated font updates
- bool mbFontUpdatesPending = false; // need to update font data after unlock
- bool mbFontUpdatesNewLists = false; // generate new font lists
bool mbResLocaleSet = false; // SV-Resource-Manager
std::locale maResLocale; // Resource locale
ImplSchedulerContext maSchedCtx; // Data for class Scheduler
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 150caea518ee..3ee9413edf7f 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1038,11 +1038,6 @@ void Application::RemoveUserEvent( ImplSVEvent * nUserEvent )
}
}
-void Application::LockFontUpdates(bool bLock)
-{
- OutputDevice::LockFontUpdates(bLock);
-}
-
vcl::Window* Application::GetFocusWindow()
{
return ImplGetSVData()->mpWinData->mpFocusWin;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index a5301e3a594a..faaff5682df5 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -543,16 +543,7 @@ void OutputDevice::ImplClearAllFontData(bool bNewFontLists)
void OutputDevice::ImplRefreshAllFontData(bool bNewFontLists)
{
- auto svdata = ImplGetSVData();
- DBG_TESTSOLARMUTEX();
- if (!svdata->mnFontUpdatesLockCount)
- ImplUpdateFontDataForAllFrames(&OutputDevice::ImplRefreshFontData, bNewFontLists);
- else
- {
- svdata->mbFontUpdatesPending = true;
- if (bNewFontLists)
- svdata->mbFontUpdatesNewLists = true;
- }
+ ImplUpdateFontDataForAllFrames( &OutputDevice::ImplRefreshFontData, bNewFontLists );
}
void OutputDevice::ImplUpdateAllFontData(bool bNewFontLists)
@@ -598,27 +589,6 @@ void OutputDevice::ImplUpdateFontDataForAllFrames( const FontUpdateHandler_t pHd
}
}
-void OutputDevice::LockFontUpdates(bool bLock)
-{
- auto svdata = ImplGetSVData();
- DBG_TESTSOLARMUTEX();
- if (bLock)
- {
- ++svdata->mnFontUpdatesLockCount;
- }
- else if (svdata->mnFontUpdatesLockCount > 0)
- {
- --svdata->mnFontUpdatesLockCount;
- if (!svdata->mnFontUpdatesLockCount && svdata->mbFontUpdatesPending)
- {
- ImplRefreshAllFontData(svdata->mbFontUpdatesNewLists);
-
- svdata->mbFontUpdatesPending = false;
- svdata->mbFontUpdatesNewLists = false;
- }
- }
-}
-
void OutputDevice::BeginFontSubstitution()
{
ImplSVData* pSVData = ImplGetSVData();
More information about the Libreoffice-commits
mailing list