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

Simplify static initializer

Change-Id: I82d5e2ad7373fb9d39aa087426ea80ca4559b556
Reviewed-on: https://gerrit.libreoffice.org/65245
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst a11a2665
......@@ -1172,16 +1172,12 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
const OUString sDescriptorPrefix = sPrefix_;
// Setup for dumping debugging documents
static const char *sMaxDumpDocs = nullptr;
static sal_Int32 nMaxDumpDocs = 0;
if (!sMaxDumpDocs)
{
sMaxDumpDocs = getenv("SW_DEBUG_MAILMERGE_DOCS");
if (!sMaxDumpDocs)
sMaxDumpDocs = "";
static const sal_Int32 nMaxDumpDocs = []() {
if (const char* sEnv = getenv("SW_DEBUG_MAILMERGE_DOCS"))
return OUString(sEnv, strlen(sEnv), osl_getThreadTextEncoding()).toInt32();
else
nMaxDumpDocs = OUString(sMaxDumpDocs, strlen(sMaxDumpDocs), osl_getThreadTextEncoding()).toInt32();
}
return sal_Int32(0);
}();
::rtl::Reference< MailDispatcher > xMailDispatcher;
::rtl::Reference< IMailDispatcherListener > xMailListener;
......
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