summaryrefslogtreecommitdiffstats
path: root/unoxml/source/dom/domimplementation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unoxml/source/dom/domimplementation.cxx')
-rw-r--r--unoxml/source/dom/domimplementation.cxx47
1 files changed, 31 insertions, 16 deletions
diff --git a/unoxml/source/dom/domimplementation.cxx b/unoxml/source/dom/domimplementation.cxx
index f2a7ed9b112d..95d01d3c4b29 100644
--- a/unoxml/source/dom/domimplementation.cxx
+++ b/unoxml/source/dom/domimplementation.cxx
@@ -26,28 +26,41 @@
*
************************************************************************/
-#include "domimplementation.hxx"
+#include <domimplementation.hxx>
+
+#include <rtl/instance.hxx>
+
namespace DOM
{
- CDOMImplementation* CDOMImplementation::aDOMImplementation = new CDOMImplementation();
+ // why the heck is this thing static?
+ // perhaps it would be helpful to know what the implementation should
+ // do to answer this question...
+ namespace {
+ struct DOMImplementation
+ : public ::rtl::Static<CDOMImplementation, DOMImplementation> {};
+ }
+
CDOMImplementation* CDOMImplementation::get()
{
- return CDOMImplementation::aDOMImplementation;
+ return & DOMImplementation::get();
}
+ // there is just 1 static instance, so these must not delete it!
+ void SAL_CALL CDOMImplementation::acquire() throw () { }
+ void SAL_CALL CDOMImplementation::release() throw () { }
+
/**
Creates a DOM Document object of the specified type with its document element.
*/
Reference <XDocument > SAL_CALL CDOMImplementation::createDocument(
- const OUString& namespaceURI,
- const OUString& qualifiedName,
- const Reference< XDocumentType >& doctype)
+ OUString const& /*rNamespaceURI*/,
+ OUString const& /*rQualifiedName*/,
+ Reference< XDocumentType > const& /*xDoctype*/)
throw (RuntimeException)
{
- OUString aNamespaceURI = namespaceURI;
- OUString aQName = qualifiedName;
- Reference< XDocumentType > aType = doctype;
+ OSL_ENSURE(false,
+ "CDOMImplementation::createDocument: not implemented (#i113683#)");
return Reference<XDocument>();
}
@@ -55,22 +68,24 @@ namespace DOM
Creates an empty DocumentType node.
*/
Reference< XDocumentType > SAL_CALL CDOMImplementation::createDocumentType(
- const OUString& qualifiedName, const OUString& publicId, const OUString& systemId)
+ OUString const& /*rQualifiedName*/,
+ OUString const& /*rPublicId*/, OUString const& /*rSystemId*/)
throw (RuntimeException)
{
- OUString qName = qualifiedName;
- OUString aPublicId = publicId;
- OUString aSystemId = systemId;
+ OSL_ENSURE(false, "CDOMImplementation::createDocumentType: "
+ "not implemented (#i113683#)");
return Reference<XDocumentType>();
}
+
/**
Test if the DOM implementation implements a specific feature.
*/
- sal_Bool SAL_CALL CDOMImplementation::hasFeature(const OUString& feature, const OUString& ver)
+ sal_Bool SAL_CALL
+ CDOMImplementation::hasFeature(OUString const& /*feature*/, OUString const& /*ver*/)
throw (RuntimeException)
{
- OUString aFeature = feature;
- OUString aVersion = ver;
+ OSL_ENSURE(false,
+ "CDOMImplementation::hasFeature: not implemented (#i113683#)");
return sal_False;
}
}