1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  *   Licensed to the Apache Software Foundation (ASF) under one or more
12  *   contributor license agreements. See the NOTICE file distributed
13  *   with this work for additional information regarding copyright
14  *   ownership. The ASF licenses this file to you under the Apache
15  *   License, Version 2.0 (the "License"); you may not use this file
16  *   except in compliance with the License. You may obtain a copy of
17  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <dp_misc.h>
21 #include "dp_parceldesc.hxx"
22 
23 
24 using namespace ::com::sun::star;
25 using namespace ::com::sun::star::uno;
26 
27 
28 namespace dp_registry
29 {
30 namespace backend
31 {
32 namespace sfwk
33 {
34 
35 
36 // XDocumentHandler
37 void SAL_CALL
startDocument()38 ParcelDescDocHandler::startDocument()
39 {
40     m_bIsParsed = false;
41 }
42 
43 void SAL_CALL
endDocument()44 ParcelDescDocHandler::endDocument()
45 {
46     m_bIsParsed = true;
47 }
48 
49 void SAL_CALL
characters(const OUString &)50 ParcelDescDocHandler::characters( const OUString & )
51 {
52 }
53 
54 void SAL_CALL
ignorableWhitespace(const OUString &)55 ParcelDescDocHandler::ignorableWhitespace( const OUString & )
56 {
57 }
58 
59 void SAL_CALL
processingInstruction(const OUString &,const OUString &)60 ParcelDescDocHandler::processingInstruction(
61     const OUString &, const OUString & )
62 {
63 }
64 
65 void SAL_CALL
setDocumentLocator(const Reference<xml::sax::XLocator> &)66 ParcelDescDocHandler::setDocumentLocator(
67     const Reference< xml::sax::XLocator >& )
68 {
69 }
70 
71 void SAL_CALL
startElement(const OUString & aName,const Reference<xml::sax::XAttributeList> & xAttribs)72 ParcelDescDocHandler::startElement( const OUString& aName,
73     const Reference< xml::sax::XAttributeList > & xAttribs )
74 {
75 
76     dp_misc::TRACE("ParcelDescDocHandler::startElement() for " +
77         aName + "\n");
78     if ( !skipIndex )
79     {
80         if ( aName == "parcel" )
81         {
82             m_sLang = xAttribs->getValueByName( "language" );
83         }
84         ++skipIndex;
85     }
86     else
87     {
88         dp_misc::TRACE("ParcelDescDocHandler::startElement() skipping for "
89             + aName + "\n");
90     }
91 
92 }
93 
endElement(const OUString & aName)94 void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName )
95 {
96     if ( skipIndex )
97     {
98         --skipIndex;
99         dp_misc::TRACE("ParcelDescDocHandler::endElement() skipping for "
100             + aName + "\n");
101     }
102 }
103 
104 
105 }
106 }
107 }
108 
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
110