xref: /aoo4110/main/unoxml/source/dom/notation.cxx (revision b1cdbd2c)
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 <notation.hxx>
25 
26 #include <string.h>
27 
28 namespace DOM
29 {
CNotation(CDocument const & rDocument,::osl::Mutex const & rMutex,xmlNotationPtr const pNotation)30     CNotation::CNotation(CDocument const& rDocument, ::osl::Mutex const& rMutex,
31             xmlNotationPtr const pNotation)
32         : CNotation_Base(rDocument, rMutex,
33             NodeType_NOTATION_NODE, reinterpret_cast<xmlNodePtr>(pNotation))
34         , m_aNotationPtr(pNotation)
35     {
36     }
37 
getPublicId()38     OUString SAL_CALL CNotation::getPublicId() throw (RuntimeException)
39     {
40         OSL_ENSURE(false,
41             "CNotation::getPublicId: not implemented (#i113683#)");
42         return OUString();
43     }
44 
45     /**
46     The system identifier of this notation.
47     */
getSystemId()48     OUString SAL_CALL CNotation::getSystemId() throw (RuntimeException)
49     {
50         OSL_ENSURE(false,
51             "CNotation::getSystemId: not implemented (#i113683#)");
52         return OUString();
53     }
54 
55 
getNodeName()56     OUString SAL_CALL CNotation::getNodeName()throw (RuntimeException)
57     {
58         ::osl::MutexGuard const g(m_rMutex);
59 
60        OUString aName;
61         if (m_aNodePtr != NULL)
62         {
63             const xmlChar* xName = m_aNodePtr->name;
64             aName = OUString((sal_Char*)xName, strlen((char*)xName), RTL_TEXTENCODING_UTF8);
65         }
66         return aName;
67     }
68 
getNodeValue()69     OUString SAL_CALL CNotation::getNodeValue() throw (RuntimeException)
70     {
71         return OUString();
72     }
73 }
74