1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include <domimplementation.hxx>
29 
30 #include <rtl/instance.hxx>
31 
32 
33 namespace DOM
34 {
35     // why the heck is this thing static?
36     // perhaps it would be helpful to know what the implementation should
37     // do to answer this question...
38     namespace {
39         struct DOMImplementation
40             : public ::rtl::Static<CDOMImplementation, DOMImplementation> {};
41     }
42 
43     CDOMImplementation* CDOMImplementation::get()
44     {
45         return & DOMImplementation::get();
46     }
47 
48     // there is just 1 static instance, so these must not delete it!
49     void SAL_CALL CDOMImplementation::acquire() throw () { }
50     void SAL_CALL CDOMImplementation::release() throw () { }
51 
52     /**
53     Creates a DOM Document object of the specified type with its document element.
54     */
55     Reference <XDocument > SAL_CALL CDOMImplementation::createDocument(
56            OUString const& /*rNamespaceURI*/,
57            OUString const& /*rQualifiedName*/,
58            Reference< XDocumentType > const& /*xDoctype*/)
59         throw (RuntimeException)
60     {
61         OSL_ENSURE(false,
62             "CDOMImplementation::createDocument: not implemented (#i113683#)");
63         return Reference<XDocument>();
64     }
65 
66     /**
67     Creates an empty DocumentType node.
68     */
69     Reference< XDocumentType > SAL_CALL CDOMImplementation::createDocumentType(
70             OUString const& /*rQualifiedName*/,
71             OUString const& /*rPublicId*/, OUString const& /*rSystemId*/)
72         throw (RuntimeException)
73     {
74         OSL_ENSURE(false, "CDOMImplementation::createDocumentType: "
75                 "not implemented (#i113683#)");
76         return Reference<XDocumentType>();
77     }
78 
79     /**
80     Test if the DOM implementation implements a specific feature.
81     */
82     sal_Bool SAL_CALL
83     CDOMImplementation::hasFeature(OUString const& /*feature*/, OUString const& /*ver*/)
84         throw (RuntimeException)
85     {
86         OSL_ENSURE(false,
87             "CDOMImplementation::hasFeature: not implemented (#i113683#)");
88         return sal_False;
89     }
90 }
91