summaryrefslogtreecommitdiffstats
path: root/unoxml/source/dom/entity.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:02 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:02 +0100
commit90087ebb40a6cf12c9464da4e4ea7cc8b5f24bc5 (patch)
treebb3d6cb01c18dd12ae7ec77234cd43a6092d5a4b /unoxml/source/dom/entity.cxx
parentUse SAL_PRIuUINT32 instead of %d (diff)
parentmasterfix DEV300: #i10000# drafts removed (diff)
downloadcore-90087ebb40a6cf12c9464da4e4ea7cc8b5f24bc5.tar.gz
core-90087ebb40a6cf12c9464da4e4ea7cc8b5f24bc5.zip
Merge commit 'ooo/DEV300_m103'
Conflicts: binfilter/bf_xmloff/source/forms/formcellbinding.hxx binfilter/bf_xmloff/source/forms/xmloff_elementexport.cxx binfilter/bf_xmloff/source/forms/xmloff_formcellbinding.cxx filter/source/xsltfilter/makefile.mk unoxml/source/dom/characterdata.cxx unoxml/source/dom/document.cxx unoxml/source/dom/documentbuilder.cxx unoxml/source/dom/element.cxx unoxml/source/dom/elementlist.cxx unoxml/source/dom/node.cxx unoxml/source/dom/node.hxx unoxml/source/dom/text.cxx unoxml/source/events/event.cxx unoxml/source/events/event.hxx unoxml/source/events/eventdispatcher.cxx unoxml/source/events/eventdispatcher.hxx unoxml/source/events/mouseevent.cxx unoxml/source/events/mouseevent.hxx unoxml/source/events/mutationevent.cxx unoxml/source/events/mutationevent.hxx unoxml/source/events/uievent.cxx unoxml/source/events/uievent.hxx unoxml/source/xpath/nodelist.cxx unoxml/source/xpath/nodelist.hxx unoxml/source/xpath/xpathobject.cxx
Diffstat (limited to 'unoxml/source/dom/entity.cxx')
-rw-r--r--unoxml/source/dom/entity.cxx36
1 files changed, 30 insertions, 6 deletions
diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
index f9e8fc2564bc..134d78c8d4bc 100644
--- a/unoxml/source/dom/entity.cxx
+++ b/unoxml/source/dom/entity.cxx
@@ -26,18 +26,35 @@
*
************************************************************************/
-#include "entity.hxx"
+#include <entity.hxx>
#include <string.h>
+
namespace DOM
{
- CEntity::CEntity(const xmlEntityPtr aEntityPtr)
+ CEntity::CEntity(CDocument const& rDocument, ::osl::Mutex const& rMutex,
+ xmlEntityPtr const pEntity)
+ : CEntity_Base(rDocument, rMutex,
+ NodeType_ENTITY_NODE, reinterpret_cast<xmlNodePtr>(pEntity))
+ , m_aEntityPtr(pEntity)
+ {
+ }
+
+ bool CEntity::IsChildTypeAllowed(NodeType const nodeType)
{
- m_aNodeType = NodeType_ENTITY_NODE;
- m_aEntityPtr = aEntityPtr;
- init_node((xmlNodePtr)aEntityPtr);
+ switch (nodeType) {
+ case NodeType_ELEMENT_NODE:
+ case NodeType_PROCESSING_INSTRUCTION_NODE:
+ case NodeType_COMMENT_NODE:
+ case NodeType_TEXT_NODE:
+ case NodeType_CDATA_SECTION_NODE:
+ case NodeType_ENTITY_REFERENCE_NODE:
+ return true;
+ default:
+ return false;
+ }
}
/**
@@ -45,7 +62,8 @@ namespace DOM
*/
OUString SAL_CALL CEntity::getNotationName() throw (RuntimeException)
{
- // XXX
+ OSL_ENSURE(false,
+ "CEntity::getNotationName: not implemented (#i113683#)");
return OUString();
}
@@ -54,6 +72,8 @@ namespace DOM
*/
OUString SAL_CALL CEntity::getPublicId() throw (RuntimeException)
{
+ ::osl::MutexGuard const g(m_rMutex);
+
OUString aID;
if(m_aEntityPtr != NULL)
{
@@ -67,6 +87,8 @@ namespace DOM
*/
OUString SAL_CALL CEntity::getSystemId() throw (RuntimeException)
{
+ ::osl::MutexGuard const g(m_rMutex);
+
OUString aID;
if(m_aEntityPtr != NULL)
{
@@ -76,6 +98,8 @@ namespace DOM
}
OUString SAL_CALL CEntity::getNodeName()throw (RuntimeException)
{
+ ::osl::MutexGuard const g(m_rMutex);
+
OUString aName;
if (m_aNodePtr != NULL)
{