LibreOffice Module desktop (master)  1
dp_parceldesc.cxx
Go to the documentation of this file.
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
39 {
40  m_bIsParsed = false;
41 }
42 
43 void SAL_CALL
45 {
46  m_bIsParsed = true;
47 }
48 
49 void SAL_CALL
51 {
52 }
53 
54 void SAL_CALL
56 {
57 }
58 
59 void SAL_CALL
61  const OUString &, const OUString & )
62 {
63 }
64 
65 void SAL_CALL
67  const Reference< xml::sax::XLocator >& )
68 {
69 }
70 
71 void SAL_CALL
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 
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: */
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual void SAL_CALL endElement(const OUString &aName) override
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
virtual void SAL_CALL characters(const OUString &aChars) override
virtual void SAL_CALL startDocument() override
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
void TRACE(OUString const &sText)
print the text to the console in a debug build.
Definition: dp_misc.cxx:527