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 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_desktop.hxx" 26 #include "dp_misc.h" 27 #include "dp_parceldesc.hxx" 28 29 30 31 using namespace ::com::sun::star; 32 using namespace ::com::sun::star::uno; 33 34 using ::rtl::OUString; 35 36 namespace css = ::com::sun::star; 37 namespace dp_registry 38 { 39 namespace backend 40 { 41 namespace sfwk 42 { 43 44 45 // XDocumentHandler 46 void SAL_CALL 47 ParcelDescDocHandler::startDocument() 48 throw ( xml::sax::SAXException, RuntimeException ) 49 { 50 m_bIsParsed = false; 51 } 52 53 void SAL_CALL 54 ParcelDescDocHandler::endDocument() 55 throw ( xml::sax::SAXException, RuntimeException ) 56 { 57 m_bIsParsed = true; 58 } 59 60 void SAL_CALL 61 ParcelDescDocHandler::characters( const OUString & ) 62 throw ( xml::sax::SAXException, RuntimeException ) 63 { 64 } 65 66 void SAL_CALL 67 ParcelDescDocHandler::ignorableWhitespace( const OUString & ) 68 throw ( xml::sax::SAXException, RuntimeException ) 69 { 70 } 71 72 void SAL_CALL 73 ParcelDescDocHandler::processingInstruction( 74 const OUString &, const OUString & ) 75 throw ( xml::sax::SAXException, RuntimeException ) 76 { 77 } 78 79 void SAL_CALL 80 ParcelDescDocHandler::setDocumentLocator( 81 const Reference< xml::sax::XLocator >& ) 82 throw ( xml::sax::SAXException, RuntimeException ) 83 { 84 } 85 86 void SAL_CALL 87 ParcelDescDocHandler::startElement( const OUString& aName, 88 const Reference< xml::sax::XAttributeList > & xAttribs ) 89 throw ( xml::sax::SAXException, 90 RuntimeException ) 91 { 92 93 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() for ") + 94 aName + OUSTR("\n")); 95 if ( !skipIndex ) 96 { 97 if ( aName.equals( OUString::createFromAscii( "parcel" ) ) ) 98 { 99 m_sLang = xAttribs->getValueByName( OUString::createFromAscii( "language" ) ); 100 } 101 ++skipIndex; 102 } 103 else 104 { 105 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() skipping for ") 106 + aName + OUSTR("\n")); 107 } 108 109 } 110 111 void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName ) 112 throw ( xml::sax::SAXException, RuntimeException ) 113 { 114 if ( skipIndex ) 115 { 116 --skipIndex; 117 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::endElement() skipping for ") 118 + aName + OUSTR("\n")); 119 } 120 } 121 122 123 } 124 } 125 } 126 127