1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: basereader.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef BASEREADER_HXX_INCLUDED
32 #define BASEREADER_HXX_INCLUDED
34 #include "internal/global.hxx"
35 #include "internal/types.hxx"
36 #include "internal/config.hxx"
37 #include "internal/utilities.hxx"
38 #include "internal/i_xml_parser_event_handler.hxx"
40 #ifndef XML_PARSER_HXX_INCLUDED
41 #include "internal/xml_parser.hxx"
43 #include "internal/zipfile.hxx"
45 class CBaseReader
: public i_xml_parser_event_handler
48 virtual ~CBaseReader();
50 protected: // protected because its only an implementation relevant class
51 CBaseReader( const std::string
& DocumentName
);
53 CBaseReader( void* stream
, zlib_filefunc_def
* fa
);
55 virtual void start_document();
57 virtual void end_document();
59 virtual void start_element(
60 const std::wstring
& raw_name
,
61 const std::wstring
& local_name
,
62 const XmlTagAttributes_t
& attributes
) = 0;
64 virtual void end_element(
65 const std::wstring
& raw_name
, const std::wstring
& local_name
) = 0;
67 virtual void characters(const std::wstring
& character
) = 0;
69 virtual void ignore_whitespace(const std::wstring
& /*whitespaces*/){};
71 virtual void processing_instruction(
72 const std::wstring
& /*target*/, const std::wstring
& /*data*/){};
74 virtual void comment(const std::wstring
& /*comment*/){};
76 void Initialize( const std::string
& /*ContentName*/);
80 ZipFile::ZipContentBuffer_t m_ZipContent
;