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: WW8Clx.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_CLX_HXX
32 #define INCLUDED_WW8_CLX_HXX
34 #include <resources.hxx>
36 #ifndef INCLUDED_WW8_OUTPUT_WITH_DEPTH_HXX
37 #include <WW8OutputWithDepth.hxx>
40 namespace writerfilter
{
45 Piece table as stored in a Word file.
47 It contains character positions (CPs) and file character positions
48 (FCs). Each CP is correlated to one FC.
50 class WW8Clx
: public WW8StructBase
52 /// Pointer to the file information block.
53 WW8Fib::Pointer_t pFib
;
55 /// Offset where FCs begin
56 sal_uInt32 nOffsetPieceTable
;
60 typedef boost::shared_ptr
<WW8Clx
> Pointer_t
;
62 WW8Clx(WW8Stream
& rStream
,
63 sal_uInt32 nOffset
, sal_uInt32 nCount
);
65 virtual void dump(OutputWithDepth
<string
> & o
) const;
68 Return the number of pieces.
70 sal_uInt32
getPieceCount() const;
73 Return a certain character position.
75 @param nIndex index of the character position
77 sal_uInt32
getCp(sal_uInt32 nIndex
) const;
80 Return a certain file character position.
82 @param nIndex index of the file character position
84 sal_uInt32
getFc(sal_uInt32 nIndex
) const;
87 Return if a certain FC is complex.
89 @nIndex index of the FC
91 sal_Bool
isComplexFc(sal_uInt32 nIndex
) const;