From b587072aeae0670758b517d26fe0cb1fdda6a3b6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 22 Nov 2019 11:03:07 +0000 Subject: drop impl_sleep hack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit doesn't seem to make any sense, maybe it did in some dmake-era dependency problem when building our help content ? Change-Id: Id964ad73249ef33ba0102fb7d2d853b2719e3814 Reviewed-on: https://gerrit.libreoffice.org/83466 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- helpcompiler/source/HelpCompiler.cxx | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 8be6842fd3a1..b8a0af737d89 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -32,10 +32,6 @@ #include #include -static void impl_sleep( sal_uInt32 nSec ) -{ - osl::Thread::wait( std::chrono::seconds(nSec) ); -} HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_inputFile, const fs::path &in_src, const fs::path &in_zipdir, const fs::path &in_resCompactStylesheet, const fs::path &in_resEmbStylesheet, const std::string &in_module, const std::string &in_lang, @@ -124,10 +120,6 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath) if( bExtensionMode ) { res = xmlParseFile(filePath.native_file_string().c_str()); - if( !res ){ - impl_sleep( 3 ); - res = xmlParseFile(filePath.native_file_string().c_str()); - } } else { @@ -146,11 +138,6 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath) params[nbparams] = nullptr; } xmlDocPtr doc = xmlParseFile(filePath.native_file_string().c_str()); - if( !doc ) - { - impl_sleep( 3 ); - doc = xmlParseFile(filePath.native_file_string().c_str()); - } saveXhpForJar( doc, filePath ); @@ -454,14 +441,9 @@ void HelpCompiler::compile() if (!docResolvedOrg) { - impl_sleep( 3 ); - docResolvedOrg = getSourceDocument(inputFile); - if( !docResolvedOrg ) - { - std::stringstream aStrStream; - aStrStream << "ERROR: file not existing: " << inputFile.native_file_string().c_str() << std::endl; - throw HelpProcessingException( HelpProcessingErrorClass::General, aStrStream.str() ); - } + std::stringstream aStrStream; + aStrStream << "ERROR: file not existing: " << inputFile.native_file_string().c_str() << std::endl; + throw HelpProcessingException( HelpProcessingErrorClass::General, aStrStream.str() ); } std::string documentId; -- cgit v1.2.3