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: WW8Analyzer.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 INCLUDED_WW8_ANALYZER_HXX
32 #define INCLUDED_WW8_ANALYZER_HXX
34 #include <resourcemodel/WW8ResourceModel.hxx>
39 namespace writerfilter
45 bool operator () (sal_uInt32 n1
, sal_uInt32 n2
) const;
48 class WW8Analyzer
: public Properties
, public Table
,
49 public BinaryObj
, public Stream
51 typedef map
<sal_uInt32
, sal_uInt32
> SprmMap
;
53 typedef hash_set
<sal_uInt32
, hash
<sal_uInt32
>, eqSalUInt32
> IdSet
;
54 typedef map
<Id
, sal_uInt32
> AttributeMap
;
56 mutable SprmMap mSprmMap
;
58 mutable AttributeMap mAttributeMap
;
59 IdSet mAttributeIdSet
;
63 virtual ~WW8Analyzer();
67 virtual void attribute(Id Name
, Value
& val
);
68 virtual void sprm(Sprm
& sprm
);
72 virtual void entry(int pos
, writerfilter::Reference
<Properties
>::Pointer_t ref
);
76 virtual void data(const sal_uInt8
* buf
, size_t len
,
77 writerfilter::Reference
<Properties
>::Pointer_t ref
);
81 virtual void startSectionGroup();
82 virtual void endSectionGroup();
83 virtual void startParagraphGroup();
84 virtual void endParagraphGroup();
85 virtual void startCharacterGroup();
86 virtual void endCharacterGroup();
87 virtual void text(const sal_uInt8
* data
, size_t len
);
88 virtual void utext(const sal_uInt8
* data
, size_t len
);
89 virtual void props(writerfilter::Reference
<Properties
>::Pointer_t ref
);
90 virtual void table(Id name
,
91 writerfilter::Reference
<Table
>::Pointer_t ref
);
92 virtual void substream(Id name
,
93 writerfilter::Reference
<Stream
>::Pointer_t ref
);
94 virtual void info(const string
& info
);
96 void dumpStats(ostream
& o
) const;
100 #endif // INCLUDED_WW8_ANALYZER_HXX