diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-31 20:12:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-31 21:59:29 +0200 |
commit | e66fdb597b30fc701bb068824d0ae4d89fecd55f (patch) | |
tree | fb36ca6ea0706015fdf840b5169b1187c2cddf97 /unoxml | |
parent | 5a882b83dfe1483883a5d112ae1aa6d685d7334f (diff) |
osl::Mutex->std::mutex in CDocumentBuilder
Change-Id: I4ffd2c1d5a28a692e94b8dfa6e468c297789ef63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119760
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/dom/documentbuilder.cxx | 12 | ||||
-rw-r--r-- | unoxml/source/dom/documentbuilder.hxx | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 8d42ad5f9b75..b40a7347ea08 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -129,7 +129,7 @@ namespace DOM Reference< XDocument > SAL_CALL CDocumentBuilder::newDocument() { - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); // create a new document xmlDocPtr pDocument = xmlNewDoc(reinterpret_cast<const xmlChar*>("1.0")); @@ -333,7 +333,7 @@ namespace DOM throw RuntimeException(); } - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); // IO context struct. Must outlive pContext, as destroying that via // xmlFreeParserCtxt may still access this context_t @@ -364,7 +364,7 @@ namespace DOM Reference< XDocument > SAL_CALL CDocumentBuilder::parseURI(const OUString& sUri) { - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); std::unique_ptr<xmlParserCtxt, XmlFreeParserCtxt> const pContext( xmlNewParserCtxt()); @@ -403,14 +403,14 @@ namespace DOM void SAL_CALL CDocumentBuilder::setEntityResolver(Reference< XEntityResolver > const& xER) { - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); m_xEntityResolver = xER; } Reference< XEntityResolver > CDocumentBuilder::getEntityResolver() { - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); return m_xEntityResolver; } @@ -418,7 +418,7 @@ namespace DOM void SAL_CALL CDocumentBuilder::setErrorHandler(Reference< XErrorHandler > const& xEH) { - ::osl::MutexGuard const g(m_Mutex); + std::lock_guard const g(m_Mutex); m_xErrorHandler = xEH; } diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index 40edc4525979..4e3d123094f5 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -35,6 +35,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <mutex> namespace DOM { @@ -47,7 +48,7 @@ namespace DOM : public CDocumentBuilder_Base { private: - ::osl::Mutex m_Mutex; + std::mutex m_Mutex; css::uno::Reference< css::xml::sax::XEntityResolver > m_xEntityResolver; css::uno::Reference< css::xml::sax::XErrorHandler > m_xErrorHandler; |