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
24using namespace ::com::sun::star;
25using namespace ::com::sun::star::uno;
26
27
29{
30
31
32// XDocumentHandler
33void SAL_CALL
35{
36 m_bIsParsed = false;
37}
38
39void SAL_CALL
41{
42 m_bIsParsed = true;
43}
44
45void SAL_CALL
47{
48}
49
50void SAL_CALL
52{
53}
54
55void SAL_CALL
57 const OUString &, const OUString & )
58{
59}
60
61void SAL_CALL
63 const Reference< xml::sax::XLocator >& )
64{
65}
66
67void SAL_CALL
69 const Reference< xml::sax::XAttributeList > & xAttribs )
70{
71
72 dp_misc::TRACE("ParcelDescDocHandler::startElement() for " +
73 aName + "\n");
74 if ( !skipIndex )
75 {
76 if ( aName == "parcel" )
77 {
78 m_sLang = xAttribs->getValueByName( "language" );
79 }
80 ++skipIndex;
81 }
82 else
83 {
84 dp_misc::TRACE("ParcelDescDocHandler::startElement() skipping for "
85 + aName + "\n");
86 }
87
88}
89
90void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName )
91{
92 if ( skipIndex )
93 {
94 --skipIndex;
95 dp_misc::TRACE("ParcelDescDocHandler::endElement() skipping for "
96 + aName + "\n");
97 }
98}
99
100
101}
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
virtual void SAL_CALL endElement(const OUString &aName) override
virtual void SAL_CALL characters(const OUString &aChars) override
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
virtual void SAL_CALL startDocument() override
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual void SAL_CALL endDocument() override
OUString aName
void TRACE(OUString const &sText)
print the text to the console in a debug build.
Definition: dp_misc.cxx:486