diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 22 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 10 |
2 files changed, 12 insertions, 20 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 0d0f609cf013..a3c33f6d639d 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -79,19 +79,6 @@ namespace dp_gui { #define SHARED_PACKAGE_MANAGER "shared" #define BUNDLED_PACKAGE_MANAGER "bundled" -namespace { - -struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles > -{ - OUString operator () () { - const SolarMutexGuard guard; - std::locale loc = Translate::Create("fps"); - return Translate::get(STR_FILTERNAME_ALL, loc); - } -}; - -} - // ExtBoxWithBtns_Impl class ExtBoxWithBtns_Impl : public ExtensionBox_Impl { @@ -662,8 +649,15 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() } } + static const OUString StrAllFiles = []() + { + const SolarMutexGuard guard; + std::locale loc = Translate::Create("fps"); + return Translate::get(STR_FILTERNAME_ALL, loc); + }(); + // All files at top: - xFilePicker->appendFilter( StrAllFiles::get(), "*.*" ); + xFilePicker->appendFilter( StrAllFiles, "*.*" ); xFilePicker->appendFilter( DpResId(RID_STR_ALL_SUPPORTED), supportedFilters.makeStringAndClear() ); // then supported ones: for (auto const& elem : title2filter) diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index aafa45e239e0..d24811621d72 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -70,11 +70,7 @@ struct UnoRc : public rtl::StaticWithInit< } }; -struct OfficePipeId : public rtl::StaticWithInit<OUString, OfficePipeId> { - OUString operator () (); -}; - -OUString OfficePipeId::operator () () +OUString generateOfficePipeId() { OUString userPath; ::utl::Bootstrap::PathStatus aLocateResult = @@ -113,7 +109,9 @@ OUString OfficePipeId::operator () () bool existsOfficePipe() { - OUString const & pipeId = OfficePipeId::get(); + static OUString OfficePipeId = generateOfficePipeId(); + + OUString const & pipeId = OfficePipeId; if (pipeId.isEmpty()) return false; ::osl::Security sec; |