1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include <domimplementation.hxx>
25 
26 #include <rtl/instance.hxx>
27 
28 
29 namespace DOM
30 {
31     // why the heck is this thing static?
32     // perhaps it would be helpful to know what the implementation should
33     // do to answer this question...
34     namespace {
35         struct DOMImplementation
36             : public ::rtl::Static<CDOMImplementation, DOMImplementation> {};
37     }
38 
get()39     CDOMImplementation* CDOMImplementation::get()
40     {
41         return & DOMImplementation::get();
42     }
43 
44     // there is just 1 static instance, so these must not delete it!
acquire()45     void SAL_CALL CDOMImplementation::acquire() throw () { }
release()46     void SAL_CALL CDOMImplementation::release() throw () { }
47 
48     /**
49     Creates a DOM Document object of the specified type with its document element.
50     */
createDocument(OUString const &,OUString const &,Reference<XDocumentType> const &)51     Reference <XDocument > SAL_CALL CDOMImplementation::createDocument(
52            OUString const& /*rNamespaceURI*/,
53            OUString const& /*rQualifiedName*/,
54            Reference< XDocumentType > const& /*xDoctype*/)
55         throw (RuntimeException)
56     {
57         OSL_ENSURE(false,
58             "CDOMImplementation::createDocument: not implemented (#i113683#)");
59         return Reference<XDocument>();
60     }
61 
62     /**
63     Creates an empty DocumentType node.
64     */
createDocumentType(OUString const &,OUString const &,OUString const &)65     Reference< XDocumentType > SAL_CALL CDOMImplementation::createDocumentType(
66             OUString const& /*rQualifiedName*/,
67             OUString const& /*rPublicId*/, OUString const& /*rSystemId*/)
68         throw (RuntimeException)
69     {
70         OSL_ENSURE(false, "CDOMImplementation::createDocumentType: "
71                 "not implemented (#i113683#)");
72         return Reference<XDocumentType>();
73     }
74 
75     /**
76     Test if the DOM implementation implements a specific feature.
77     */
78     sal_Bool SAL_CALL
hasFeature(OUString const &,OUString const &)79     CDOMImplementation::hasFeature(OUString const& /*feature*/, OUString const& /*ver*/)
80         throw (RuntimeException)
81     {
82         OSL_ENSURE(false,
83             "CDOMImplementation::hasFeature: not implemented (#i113683#)");
84         return sal_False;
85     }
86 }
87