1*2722ceddSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2722ceddSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2722ceddSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2722ceddSAndrew Rist  * distributed with this work for additional information
6*2722ceddSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2722ceddSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2722ceddSAndrew Rist  * "License"); you may not use this file except in compliance
9*2722ceddSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2722ceddSAndrew Rist  *
11*2722ceddSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2722ceddSAndrew Rist  *
13*2722ceddSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2722ceddSAndrew Rist  * software distributed under the License is distributed on an
15*2722ceddSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2722ceddSAndrew Rist  * KIND, either express or implied.  See the License for the
17*2722ceddSAndrew Rist  * specific language governing permissions and limitations
18*2722ceddSAndrew Rist  * under the License.
19*2722ceddSAndrew Rist  *
20*2722ceddSAndrew Rist  *************************************************************/
21*2722ceddSAndrew Rist 
22*2722ceddSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_desktop.hxx"
26cdf0e10cSrcweir #include "dp_misc.h"
27cdf0e10cSrcweir #include "dp_parceldesc.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir 
30cdf0e10cSrcweir 
31cdf0e10cSrcweir using namespace ::com::sun::star;
32cdf0e10cSrcweir using namespace ::com::sun::star::uno;
33cdf0e10cSrcweir 
34cdf0e10cSrcweir using ::rtl::OUString;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace css = ::com::sun::star;
37cdf0e10cSrcweir namespace dp_registry
38cdf0e10cSrcweir {
39cdf0e10cSrcweir namespace backend
40cdf0e10cSrcweir {
41cdf0e10cSrcweir namespace sfwk
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
45cdf0e10cSrcweir // XDocumentHandler
46cdf0e10cSrcweir void SAL_CALL
startDocument()47cdf0e10cSrcweir ParcelDescDocHandler::startDocument()
48cdf0e10cSrcweir throw ( xml::sax::SAXException, RuntimeException )
49cdf0e10cSrcweir {
50cdf0e10cSrcweir     m_bIsParsed = false;
51cdf0e10cSrcweir }
52cdf0e10cSrcweir 
53cdf0e10cSrcweir void SAL_CALL
endDocument()54cdf0e10cSrcweir ParcelDescDocHandler::endDocument()
55cdf0e10cSrcweir throw ( xml::sax::SAXException, RuntimeException )
56cdf0e10cSrcweir {
57cdf0e10cSrcweir     m_bIsParsed = true;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir 
60cdf0e10cSrcweir void SAL_CALL
characters(const OUString &)61cdf0e10cSrcweir ParcelDescDocHandler::characters( const OUString & )
62cdf0e10cSrcweir     throw ( xml::sax::SAXException, RuntimeException )
63cdf0e10cSrcweir {
64cdf0e10cSrcweir }
65cdf0e10cSrcweir 
66cdf0e10cSrcweir void SAL_CALL
ignorableWhitespace(const OUString &)67cdf0e10cSrcweir ParcelDescDocHandler::ignorableWhitespace( const OUString & )
68cdf0e10cSrcweir     throw ( xml::sax::SAXException, RuntimeException )
69cdf0e10cSrcweir {
70cdf0e10cSrcweir }
71cdf0e10cSrcweir 
72cdf0e10cSrcweir void SAL_CALL
processingInstruction(const OUString &,const OUString &)73cdf0e10cSrcweir ParcelDescDocHandler::processingInstruction(
74cdf0e10cSrcweir     const OUString &, const OUString & )
75cdf0e10cSrcweir         throw ( xml::sax::SAXException, RuntimeException )
76cdf0e10cSrcweir {
77cdf0e10cSrcweir }
78cdf0e10cSrcweir 
79cdf0e10cSrcweir void SAL_CALL
setDocumentLocator(const Reference<xml::sax::XLocator> &)80cdf0e10cSrcweir ParcelDescDocHandler::setDocumentLocator(
81cdf0e10cSrcweir     const Reference< xml::sax::XLocator >& )
82cdf0e10cSrcweir         throw ( xml::sax::SAXException, RuntimeException )
83cdf0e10cSrcweir {
84cdf0e10cSrcweir }
85cdf0e10cSrcweir 
86cdf0e10cSrcweir void SAL_CALL
startElement(const OUString & aName,const Reference<xml::sax::XAttributeList> & xAttribs)87cdf0e10cSrcweir ParcelDescDocHandler::startElement( const OUString& aName,
88cdf0e10cSrcweir     const Reference< xml::sax::XAttributeList > & xAttribs )
89cdf0e10cSrcweir         throw ( xml::sax::SAXException,
90cdf0e10cSrcweir             RuntimeException )
91cdf0e10cSrcweir {
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() for ") +
94cdf0e10cSrcweir         aName + OUSTR("\n"));
95cdf0e10cSrcweir     if ( !skipIndex )
96cdf0e10cSrcweir     {
97cdf0e10cSrcweir         if ( aName.equals( OUString::createFromAscii( "parcel" ) ) )
98cdf0e10cSrcweir         {
99cdf0e10cSrcweir             m_sLang = xAttribs->getValueByName( OUString::createFromAscii( "language" ) );
100cdf0e10cSrcweir         }
101cdf0e10cSrcweir         ++skipIndex;
102cdf0e10cSrcweir     }
103cdf0e10cSrcweir     else
104cdf0e10cSrcweir     {
105cdf0e10cSrcweir         dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() skipping for ")
106cdf0e10cSrcweir             + aName + OUSTR("\n"));
107cdf0e10cSrcweir     }
108cdf0e10cSrcweir 
109cdf0e10cSrcweir }
110cdf0e10cSrcweir 
endElement(const OUString & aName)111cdf0e10cSrcweir void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName )
112cdf0e10cSrcweir    throw ( xml::sax::SAXException, RuntimeException )
113cdf0e10cSrcweir {
114cdf0e10cSrcweir     if ( skipIndex )
115cdf0e10cSrcweir     {
116cdf0e10cSrcweir         --skipIndex;
117cdf0e10cSrcweir         dp_misc::TRACE(OUSTR("ParcelDescDocHandler::endElement() skipping for ")
118cdf0e10cSrcweir             + aName + OUSTR("\n"));
119cdf0e10cSrcweir     }
120cdf0e10cSrcweir }
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 
123cdf0e10cSrcweir }
124cdf0e10cSrcweir }
125cdf0e10cSrcweir }
126cdf0e10cSrcweir 
127