xref: /aoo42x/main/unoxml/source/dom/notation.cxx (revision e9cbe144)
1*e9cbe144SAndrew Rist /**************************************************************
2*e9cbe144SAndrew Rist  *
3*e9cbe144SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*e9cbe144SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*e9cbe144SAndrew Rist  * distributed with this work for additional information
6*e9cbe144SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*e9cbe144SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*e9cbe144SAndrew Rist  * "License"); you may not use this file except in compliance
9*e9cbe144SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*e9cbe144SAndrew Rist  *
11*e9cbe144SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*e9cbe144SAndrew Rist  *
13*e9cbe144SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*e9cbe144SAndrew Rist  * software distributed under the License is distributed on an
15*e9cbe144SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e9cbe144SAndrew Rist  * KIND, either express or implied.  See the License for the
17*e9cbe144SAndrew Rist  * specific language governing permissions and limitations
18*e9cbe144SAndrew Rist  * under the License.
19*e9cbe144SAndrew Rist  *
20*e9cbe144SAndrew Rist  *************************************************************/
21*e9cbe144SAndrew Rist 
22*e9cbe144SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include <notation.hxx>
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <string.h>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir namespace DOM
29cdf0e10cSrcweir {
CNotation(CDocument const & rDocument,::osl::Mutex const & rMutex,xmlNotationPtr const pNotation)30cdf0e10cSrcweir     CNotation::CNotation(CDocument const& rDocument, ::osl::Mutex const& rMutex,
31cdf0e10cSrcweir             xmlNotationPtr const pNotation)
32cdf0e10cSrcweir         : CNotation_Base(rDocument, rMutex,
33cdf0e10cSrcweir             NodeType_NOTATION_NODE, reinterpret_cast<xmlNodePtr>(pNotation))
34cdf0e10cSrcweir         , m_aNotationPtr(pNotation)
35cdf0e10cSrcweir     {
36cdf0e10cSrcweir     }
37cdf0e10cSrcweir 
getPublicId()38cdf0e10cSrcweir     OUString SAL_CALL CNotation::getPublicId() throw (RuntimeException)
39cdf0e10cSrcweir     {
40cdf0e10cSrcweir         OSL_ENSURE(false,
41cdf0e10cSrcweir             "CNotation::getPublicId: not implemented (#i113683#)");
42cdf0e10cSrcweir         return OUString();
43cdf0e10cSrcweir     }
44cdf0e10cSrcweir 
45cdf0e10cSrcweir     /**
46cdf0e10cSrcweir     The system identifier of this notation.
47cdf0e10cSrcweir     */
getSystemId()48cdf0e10cSrcweir     OUString SAL_CALL CNotation::getSystemId() throw (RuntimeException)
49cdf0e10cSrcweir     {
50cdf0e10cSrcweir         OSL_ENSURE(false,
51cdf0e10cSrcweir             "CNotation::getSystemId: not implemented (#i113683#)");
52cdf0e10cSrcweir         return OUString();
53cdf0e10cSrcweir     }
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 
getNodeName()56cdf0e10cSrcweir     OUString SAL_CALL CNotation::getNodeName()throw (RuntimeException)
57cdf0e10cSrcweir     {
58cdf0e10cSrcweir         ::osl::MutexGuard const g(m_rMutex);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir        OUString aName;
61cdf0e10cSrcweir         if (m_aNodePtr != NULL)
62cdf0e10cSrcweir         {
63cdf0e10cSrcweir             const xmlChar* xName = m_aNodePtr->name;
64cdf0e10cSrcweir             aName = OUString((sal_Char*)xName, strlen((char*)xName), RTL_TEXTENCODING_UTF8);
65cdf0e10cSrcweir         }
66cdf0e10cSrcweir         return aName;
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir 
getNodeValue()69cdf0e10cSrcweir     OUString SAL_CALL CNotation::getNodeValue() throw (RuntimeException)
70cdf0e10cSrcweir     {
71cdf0e10cSrcweir         return OUString();
72cdf0e10cSrcweir     }
73cdf0e10cSrcweir }
74