diff options
Diffstat (limited to 'unoxml/source/dom/documenttype.cxx')
-rw-r--r-- | unoxml/source/dom/documenttype.cxx | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/unoxml/source/dom/documenttype.cxx b/unoxml/source/dom/documenttype.cxx index 8179221afba7..6c7103d57533 100644 --- a/unoxml/source/dom/documenttype.cxx +++ b/unoxml/source/dom/documenttype.cxx @@ -26,20 +26,24 @@ * ************************************************************************/ -#include "documenttype.hxx" -#include "entitiesmap.hxx" -#include "notationsmap.hxx" +#include <documenttype.hxx> #include <string.h> +#include <entitiesmap.hxx> +#include <notationsmap.hxx> + + namespace DOM { - CDocumentType::CDocumentType(const xmlDtdPtr aDtdPtr) + CDocumentType::CDocumentType( + CDocument const& rDocument, ::osl::Mutex const& rMutex, + xmlDtdPtr const pDtd) + : CDocumentType_Base(rDocument, rMutex, + NodeType_DOCUMENT_TYPE_NODE, reinterpret_cast<xmlNodePtr>(pDtd)) + , m_aDtdPtr(pDtd) { - m_aNodeType = NodeType_DOCUMENT_TYPE_NODE; - m_aDtdPtr = aDtdPtr; - init_node((xmlNodePtr)aDtdPtr); } /** @@ -48,10 +52,12 @@ namespace DOM */ Reference< XNamedNodeMap > SAL_CALL CDocumentType::getEntities() throw (RuntimeException) { + ::osl::MutexGuard const g(m_rMutex); + Reference< XNamedNodeMap > aMap; if (m_aDtdPtr != NULL) { - aMap = Reference< XNamedNodeMap >(new CEntitiesMap(this)); + aMap.set(new CEntitiesMap(this, m_rMutex)); } return aMap; } @@ -61,7 +67,8 @@ namespace DOM */ OUString SAL_CALL CDocumentType::getInternalSubset() throw (RuntimeException) { - // XXX + OSL_ENSURE(false, + "CDocumentType::getInternalSubset: not implemented (#i113683#)"); return OUString(); } @@ -71,6 +78,8 @@ namespace DOM */ OUString SAL_CALL CDocumentType::getName() throw (RuntimeException) { + ::osl::MutexGuard const g(m_rMutex); + OUString aName; if (m_aDtdPtr != NULL) { @@ -84,10 +93,12 @@ namespace DOM */ Reference< XNamedNodeMap > SAL_CALL CDocumentType::getNotations() throw (RuntimeException) { + ::osl::MutexGuard const g(m_rMutex); + Reference< XNamedNodeMap > aMap; if (m_aDtdPtr != NULL) { - aMap.set(new CNotationsMap(this)); + aMap.set(new CNotationsMap(this, m_rMutex)); } return aMap; } @@ -97,6 +108,8 @@ namespace DOM */ OUString SAL_CALL CDocumentType::getPublicId() throw (RuntimeException) { + ::osl::MutexGuard const g(m_rMutex); + OUString aId; if (m_aDtdPtr != NULL) { @@ -110,6 +123,8 @@ namespace DOM */ OUString SAL_CALL CDocumentType::getSystemId() throw (RuntimeException) { + ::osl::MutexGuard const g(m_rMutex); + OUString aId; if (m_aDtdPtr != NULL) { @@ -117,10 +132,12 @@ namespace DOM } return aId; } + OUString SAL_CALL CDocumentType::getNodeName()throw (RuntimeException) { return getName(); } + OUString SAL_CALL CDocumentType::getNodeValue() throw (RuntimeException) { return OUString(); |