Kaydet (Commit) 034a4624 authored tarafından Mike Kaganski's avatar Mike Kaganski

Simplify static initialization

Change-Id: Ief8157da03f2fa79f97d83bdbb589030ddd82686
Reviewed-on: https://gerrit.libreoffice.org/62538
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst f88b9503
......@@ -76,13 +76,7 @@ namespace svx
const FeatureDescriptions& getFeatureDescriptions()
{
static FeatureDescriptions s_aFeatureDescriptions;
if ( s_aFeatureDescriptions.empty() )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( s_aFeatureDescriptions.empty() )
{
FeatureDescription aDescriptions[] = {
static const FeatureDescriptions s_aFeatureDescriptions({
{ OUString(FMURL_FORM_POSITION), SID_FM_RECORD_ABSOLUTE, FormFeature::MoveAbsolute },
{ OUString(FMURL_FORM_RECORDCOUNT), SID_FM_RECORD_TOTAL, FormFeature::TotalRecords },
{ OUString(FMURL_RECORD_MOVEFIRST), SID_FM_RECORD_FIRST, FormFeature::MoveToFirst },
......@@ -103,11 +97,7 @@ namespace svx
{ OUString(FMURL_FORM_FILTER), SID_FM_FILTERCRIT, FormFeature::InteractiveFilter },
{ OUString(FMURL_FORM_APPLY_FILTER), SID_FM_FORM_FILTERED, FormFeature::ToggleApplyFilter },
{ OUString(FMURL_FORM_REMOVE_FILTER), SID_FM_REMOVE_FILTER_SORT, FormFeature::RemoveFilterAndSort }
};
for (FeatureDescription & rDescription : aDescriptions)
s_aFeatureDescriptions.push_back( rDescription );
}
};
});
return s_aFeatureDescriptions;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment