1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_desktop.hxx" 30 #include "dp_misc.h" 31 #include "dp_parceldesc.hxx" 32 33 34 35 using namespace ::com::sun::star; 36 using namespace ::com::sun::star::uno; 37 38 using ::rtl::OUString; 39 40 namespace css = ::com::sun::star; 41 namespace dp_registry 42 { 43 namespace backend 44 { 45 namespace sfwk 46 { 47 48 49 // XDocumentHandler 50 void SAL_CALL 51 ParcelDescDocHandler::startDocument() 52 throw ( xml::sax::SAXException, RuntimeException ) 53 { 54 m_bIsParsed = false; 55 } 56 57 void SAL_CALL 58 ParcelDescDocHandler::endDocument() 59 throw ( xml::sax::SAXException, RuntimeException ) 60 { 61 m_bIsParsed = true; 62 } 63 64 void SAL_CALL 65 ParcelDescDocHandler::characters( const OUString & ) 66 throw ( xml::sax::SAXException, RuntimeException ) 67 { 68 } 69 70 void SAL_CALL 71 ParcelDescDocHandler::ignorableWhitespace( const OUString & ) 72 throw ( xml::sax::SAXException, RuntimeException ) 73 { 74 } 75 76 void SAL_CALL 77 ParcelDescDocHandler::processingInstruction( 78 const OUString &, const OUString & ) 79 throw ( xml::sax::SAXException, RuntimeException ) 80 { 81 } 82 83 void SAL_CALL 84 ParcelDescDocHandler::setDocumentLocator( 85 const Reference< xml::sax::XLocator >& ) 86 throw ( xml::sax::SAXException, RuntimeException ) 87 { 88 } 89 90 void SAL_CALL 91 ParcelDescDocHandler::startElement( const OUString& aName, 92 const Reference< xml::sax::XAttributeList > & xAttribs ) 93 throw ( xml::sax::SAXException, 94 RuntimeException ) 95 { 96 97 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() for ") + 98 aName + OUSTR("\n")); 99 if ( !skipIndex ) 100 { 101 if ( aName.equals( OUString::createFromAscii( "parcel" ) ) ) 102 { 103 m_sLang = xAttribs->getValueByName( OUString::createFromAscii( "language" ) ); 104 } 105 ++skipIndex; 106 } 107 else 108 { 109 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() skipping for ") 110 + aName + OUSTR("\n")); 111 } 112 113 } 114 115 void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName ) 116 throw ( xml::sax::SAXException, RuntimeException ) 117 { 118 if ( skipIndex ) 119 { 120 --skipIndex; 121 dp_misc::TRACE(OUSTR("ParcelDescDocHandler::endElement() skipping for ") 122 + aName + OUSTR("\n")); 123 } 124 } 125 126 127 } 128 } 129 } 130 131