[Libreoffice-commits] core.git: cppuhelper/source desktop/source package/source slideshow/source stoc/source sw/source testtools/source toolkit/source ucb/source vcl/source vcl/unx vcl/workben
cppuhelper/source/bootstrap.cxx |3 ++- desktop/source/app/officeipcthread.cxx| 16 desktop/source/deployment/misc/dp_misc.cxx|3 ++- package/source/zipapi/ZipOutputStream.cxx |4 +++- slideshow/source/engine/slideshowimpl.cxx |3 ++- stoc/source/javaloader/javaloader.cxx |5 +++-- sw/source/core/docnode/finalthreadmanager.cxx |5 +++-- testtools/source/bridgetest/cppobj.cxx|3 ++- toolkit/source/awt/vclxtoolkit.cxx|3 ++- ucb/source/ucp/webdav-curl/SerfLockStore.cxx |7 +++ vcl/source/opengl/OpenGLContext.cxx |3 ++- vcl/unx/generic/dtrans/X11_selection.cxx |5 +++-- vcl/workben/vcldemo.cxx |3 ++- 13 files changed, 33 insertions(+), 30 deletions(-) New commits: commit 555f4333182abd0ca4aa06b354763f6dfbc3eb20 Author: Arnaud VERSINI AuthorDate: Sun Nov 6 17:04:20 2022 +0100 Commit: Stephan Bergmann CommitDate: Mon Jan 9 08:37:35 2023 + use std::this_thread::sleep_for instead of osl equivalent Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index f468518ba456..bd975460f06c 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -215,7 +216,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() catch ( connection::NoConnectException & ) { // wait 500 ms, then try to connect again -::osl::Thread::wait( std::chrono::milliseconds(500) ); +std::this_thread::sleep_for(std::chrono::milliseconds(500)); } } } diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 45b8906c3b42..74f838939bfa 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #if ENABLE_DBUS #include @@ -792,10 +793,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference * thread) else { // Pipe connection failed (other office exited or crashed) -TimeValue tval; -tval.Seconds = 0; -tval.Nanosec = 5; -salhelper::Thread::wait( tval ); +std::this_thread::sleep_for( std::chrono::milliseconds(500) ); } } else @@ -805,10 +803,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference * thread) return RequestHandler::IPC_STATUS_PIPE_ERROR; // Wait for second office to be ready -TimeValue aTimeValue; -aTimeValue.Seconds = 0; -aTimeValue.Nanosec = 1000; // 10ms -salhelper::Thread::wait( aTimeValue ); +std::this_thread::sleep_for( std::chrono::milliseconds(10) ); } } while ( nPipeMode == PIPEMODE_DONTKNOW ); @@ -1206,10 +1201,7 @@ void PipeIpcThread::execute() } SAL_WARN( "desktop.app", "Error on accept: " << static_cast(nError)); -TimeValue tval; -tval.Seconds = 1; -tval.Nanosec = 0; -salhelper::Thread::wait( tval ); +std::this_thread::sleep_for( std::chrono::seconds(1) ); } } while( schedule() ); } diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 2983de24b959..bbe3a085fc68 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -447,7 +448,7 @@ Reference resolveUnoURL( catch (const connection::NoConnectException &) { if (i < 40) { -::osl::Thread::wait( std::chrono::milliseconds(500) ); +std::this_thread::sleep_for( std::chrono::milliseconds(500) ); } else throw; } diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 9b582c4691e8..df21f1ffeb13 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -32,6 +32,8 @@ #include #include +#include + using namespace com::sun::star; using namespace com::sun::star::io; using namespace com::sun::star::uno; @@ -151,7 +153,7 @@ void ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess(std::size_t if(m_aEntries.size() > nThreadTasks) { -osl::Thread::wait(std::chrono::microseconds(100)); +std::this_thread::sle
[Libreoffice-commits] core.git: cppuhelper/source desktop/source editeng/source filter/qa filter/source forms/source framework/qa framework/source
cppuhelper/source/factory.cxx |2 +- desktop/source/deployment/manager/dp_extensionmanager.cxx |2 +- desktop/source/deployment/registry/package/dp_package.cxx |2 +- editeng/source/editeng/impedit3.cxx|2 +- filter/qa/complex/filter/detection/typeDetection/files.csv |2 +- filter/source/graphicfilter/idxf/dxfentrd.cxx |2 +- filter/source/msfilter/msdffimp.cxx|2 +- filter/source/xslt/export/spreadsheetml/table.xsl |2 +- forms/source/component/Filter.cxx |2 +- framework/qa/complex/framework/recovery/RecoveryTest.java |2 +- framework/source/inc/accelerators/presethandler.hxx|4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) New commits: commit c9a0cbc856281b8f4e8bafb570127e291b282629 Author: Andrea Gelmini AuthorDate: Wed Aug 19 13:25:12 2020 +0200 Commit: Julien Nabet CommitDate: Wed Aug 19 15:41:21 2020 +0200 Fix typos Change-Id: I58c510121a9f535b2a31854f10b5f6535554d379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100988 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 8a951033cc08..1d997146f099 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -688,7 +688,7 @@ Reference< XInterface > ORegistryFactoryHelper::createInstanceWithArgumentsAndCo } if( xModuleFactoryDepr.is() ) { -SAL_INFO_IF(xContext.is(), "cppuhelper", "ignoring context calling ORegistryFactoryHelper::createInstaceWithArgumentsAndContext()!"); +SAL_INFO_IF(xContext.is(), "cppuhelper", "ignoring context calling ORegistryFactoryHelper::createInstanceWithArgumentsAndContext()!"); return xModuleFactoryDepr->createInstanceWithArguments( rArguments ); } diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index c9ecf7d2123c..2f82d3d500ad 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -862,7 +862,7 @@ void ExtensionManager::removeExtension( } catch (...) { excOccurred1 = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( -"Extension Manager: exception during removeEtension", +"Extension Manager: exception during removeExtension", static_cast(this), excOccurred1); excOccurred1 <<= exc; } diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index a6d099db9f5c..e0adb4395f4c 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -691,7 +691,7 @@ bool BackendImpl::PackageImpl::checkLicense( return 0; //always return LICENSE as long as the user did not accept the license -//so that XExtensonManager::checkPrerequisitesAndEnable will again +//so that XExtensionManager::checkPrerequisitesAndEnable will again //check the license if (!checkPlatform(xCmdEnv)) return deployment::Prerequisites::PLATFORM | diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index eba85963052e..0caebc3ae342 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1927,7 +1927,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te sal_Int32 nWordLen = nWordEnd - nWordStart; if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) ) { -// May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD +// May happen, because getLineBreak may differ from getWordBoundary with DICTIONARY_WORD const OUString aWord = pNode->GetString().copy(nWordStart, nWordLen); sal_Int32 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Before the dickey letter Reference< XHyphenatedWord > xHyphWord; diff --git a/filter/qa/complex/filter/detection/typeDetection/files.csv b/filter/qa/complex/filter/detection/typeDetection/files.csv index 55fe02bd699b..b882ea1179ca 100644 --- a/filter/qa/complex/filter/detection/typeDetection/files.csv +++ b/filter/qa/complex/filter/detection/typeDetection/files.csv @@ -3,7 +3,7 @@ fileAlias;fileURL;defaultFileType;streamFileType #** N O T E #** #** The detection for template filter and writer_text_encoded -#** will be changed on following childworkspsace +#** will be changed on following childworkspace #** #** ### diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter
[Libreoffice-commits] core.git: cppuhelper/source desktop/source
cppuhelper/source/servicemanager.cxx | 42 ++- desktop/source/lib/init.cxx |9 +-- 2 files changed, 47 insertions(+), 4 deletions(-) New commits: commit 1aedb6c4345719a963a883b13fa983db3ab4b9a8 Author: Michael Meeks Date: Fri Nov 24 17:05:26 2017 + LOK: provide user feedback while preloading. Problems are hard enough to debug in a jailed kit process inside a docker image; provide some visual feedback via stderr. Change-Id: I54b0a21c1375be2acc9da0bbacf959a419471b08 Reviewed-on: https://gerrit.libreoffice.org/45256 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 8aa294ca0720..163e0e631d37 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -1806,6 +1808,33 @@ cppuhelper::ServiceManager::findServiceImplementation( return impl; } +/// Make a simpler unique name for preload / progress reporting. +static rtl::OUString simplifyModule(const rtl::OUString &uri) +{ +sal_Int32 nIdx; +OUStringBuffer edit(uri); +if ((nIdx = edit.lastIndexOf('/')) > 0) +edit.remove(0,nIdx+1); +if ((nIdx = edit.lastIndexOf(':')) > 0) +edit.remove(0,nIdx+1); +if ((nIdx = edit.lastIndexOf("lo.so")) > 0) +edit.truncate(nIdx); +if ((nIdx = edit.lastIndexOf(".3")) > 0) +edit.truncate(nIdx); +if ((nIdx = edit.lastIndexOf("gcc3.so")) > 0) +edit.truncate(nIdx); +if ((nIdx = edit.lastIndexOf(".so")) > 0) +edit.truncate(nIdx); +if ((nIdx = edit.lastIndexOf("_uno")) > 0) +edit.truncate(nIdx); +if ((nIdx = edit.lastIndexOf(".jar")) > 0) +edit.truncate(nIdx); +if (edit.indexOf("lib") == 0) +edit.remove(0,3); +return edit.makeStringAndClear(); +} + +/// Used only by LibreOfficeKit when used by Online to pre-initialize void cppuhelper::ServiceManager::preloadImplementations() { #ifdef DISABLE_DYNLOADING abort(); @@ -1814,6 +1843,9 @@ void cppuhelper::ServiceManager::preloadImplementations() { osl::MutexGuard g(rBHelper.rMutex); css::uno::Environment aSourceEnv(css::uno::Environment::getCurrent()); +std::cerr << "preload: "; +std::vector aReported; + // loop all implementations for (Data::NamedImplementations::const_iterator iterator( data_.namedImplementations.begin()); @@ -1821,8 +1853,15 @@ void cppuhelper::ServiceManager::preloadImplementations() { { try { +const rtl::OUString &aLibrary = iterator->second->info->uri; +if (std::find(aReported.begin(), aReported.end(), aLibrary) == aReported.end()) +{ +std::cerr << simplifyModule(aLibrary) << " "; +aReported.push_back(aLibrary); +} + // expand absolute URI implementation component library -aUri = cppu::bootstrap_expandUri(iterator->second->info->uri); +aUri = cppu::bootstrap_expandUri(aLibrary); } catch (css::lang::IllegalArgumentException& aError) { @@ -1922,6 +1961,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { aModule.release(); } } +std::cerr << std::endl; #endif } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 42e78e8bec96..5d0e39c419cc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -3482,6 +3483,7 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit: } } +/// Used only by LibreOfficeKit when used by Online to pre-initialize static void preloadData() { // First: sit down and read all dictionaries: yum. @@ -3491,14 +3493,14 @@ static void preloadData() css::uno::Reference xLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); uno::Sequence< css::lang::Locale > aLocales = xLocales->getLocales(); -SAL_INFO("lok", "Preloading #" << aLocales.getLength() << " dictionaries"); +std::cerr << "Preloading dictionaries: "; for (auto &it : aLocales) { -SAL_INFO("lok", "load " << it.Language << "_" << it.Country); +std::cerr << it.Language << "_" << it.Country << " "; css::beans::PropertyValues aNone; xSpellChecker->isValid("forcefed", it, aNone); } -SAL_INFO("lok", "Preloading done"); +std::cerr << "\n"; } static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl) @@ -3596,6 +3598,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char if (eStage == PRE_INIT)
[Libreoffice-commits] core.git: cppuhelper/source desktop/source extensions/source forms/source include/rtl jvmfwk/plugins jvmfwk/source sal/qa scripting/source sc/source sd/source starmath/source sto
cppuhelper/source/implbase_ex.cxx |2 desktop/source/deployment/registry/executable/dp_executable.cxx |2 extensions/source/update/check/updatecheck.cxx |4 forms/source/xforms/model_helper.hxx|4 include/rtl/strbuf.hxx | 25 ++ include/rtl/string.hxx | 70 +++ include/rtl/ustrbuf.hxx | 25 ++ include/rtl/ustring.hxx | 100 +- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 jvmfwk/plugins/sunmajor/pluginlib/util.hxx |4 jvmfwk/source/framework.cxx |8 sal/qa/rtl/process/rtl_Process.cxx |2 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |1 sal/qa/rtl/uri/rtl_Uri.cxx |4 sc/source/core/data/patattr.cxx |2 scripting/source/provider/MasterScriptProvider.cxx |2 sd/source/ui/view/drviews7.cxx |2 starmath/source/mathmlimport.cxx|4 stoc/source/security/permissions.cxx|4 svl/source/items/poolio.cxx |4 svx/source/xml/xmleohlp.cxx |2 sw/source/core/txtnode/txtedt.cxx |3 sw/source/core/unocore/unotbl.cxx |2 sw/source/ui/chrdlg/chardlg.cxx |8 sw/source/ui/config/optcomp.cxx |4 sw/source/ui/inc/chrdlg.hxx |2 sw/source/ui/inc/swcont.hxx |2 sw/source/ui/index/swuiidxmrk.cxx |2 unotools/source/config/compatibility.cxx|4 vcl/source/filter/graphicfilter.cxx |2 xmloff/source/forms/elementimport.cxx |4 31 files changed, 179 insertions(+), 131 deletions(-) New commits: commit e3133ae2371b6e2d4b47daa6a3487ea4f2753315 Author: Stephan Bergmann Date: Thu Jan 23 18:43:53 2014 +0100 Let C++ inline functions return bool instead of sal_Bool ...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Missing overloads of insert() for bool have been added to OStringBuffer and OUStringBuffer (which required dropping one !VALID_CONVERSION check that would now pick that overload, but would be flagged by compilerplugins/clang/pointertobool.cxx). Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9 diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index aeb054a..c2a87fb 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -73,7 +73,7 @@ static inline bool __td_equals( SAL_THROW(()) { return ((pTDR1 == pTDR2) || -((OUString const *)&pTDR1->pTypeName)->equals( *(OUString const *)&pTDR2->pTypeName ) != sal_False); +((OUString const *)&pTDR1->pTypeName)->equals( *(OUString const *)&pTDR2->pTypeName )); } //-- static inline type_entry * __getTypeEntries( class_data * cd ) diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index b84c95a..927aa4f 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -284,7 +284,7 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() if (osl::File::E_None == osl::File::getAbsoluteFileURL( OUString(), dp_misc::expandUnoRcUrl(m_url), sFile)) { -if (sal_True == sFile.match(sExtensionDir, 0)) +if (sFile.match(sExtensionDir, 0)) bSuccess = true; } } diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 5eac7a0..f38d745 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -117,7 +117,7 @@ static inline OUString getBaseInstallation() inline bool isObsoleteUpdateInfo(const OUString& rBuildId) { -return sal_True != rBuildId.equals(getBuildId()) && !rBuildId.isEmpty(); +return !rBuildId.equals(getBuildId()) && !rBuildId.isEmpty(); } @@ -1267,7 +1267,7 @@ UpdateC