From e662e835c208481c909d8caa34fc66b6fadda3c0 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 7 Sep 2021 21:10:07 +0200 Subject: Guard Orcus detection shortcut So that its policy matches the other places in this function Change-Id: I309441f63cf82bbae2b19c7de588d4228b988bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121764 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski --- framework/source/loadenv/loadenv.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework') diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index cd83d9403748..a4b7e6557004 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -745,6 +745,9 @@ void LoadEnv::impl_detectTypeAndFilter() if (queryOrcusTypeAndFilter(lDescriptor, sType, sFilter) && !sType.isEmpty() && !sFilter.isEmpty()) { + // SAFE -> + osl::MutexGuard aWriteLock(m_mutex); + // Orcus type detected. Skip the normal type detection process. m_lMediaDescriptor << lDescriptor; m_lMediaDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; @@ -752,6 +755,7 @@ void LoadEnv::impl_detectTypeAndFilter() m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERPROVIDER()] <<= OUString("orcus"); m_lMediaDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE()] <<= OUString("com.sun.star.sheet.SpreadsheetDocument"); return; + // <- SAFE } css::uno::Reference< css::document::XTypeDetection > xDetect( -- cgit