update dev300-m58
[ooovba.git] / writerfilter / source / doctok / WW8BinTable.hxx
blob32c8a80320a17fb0bc95ba1e0f63efd44912d333
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: WW8BinTable.hxx,v $
10 * $Revision: 1.4 $
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_BIN_TABLE_HXX
32 #define INCLUDED_WW8_BIN_TABLE_HXX
34 #include <boost/shared_ptr.hpp>
35 #include <string>
36 #include <WW8FKP.hxx>
38 namespace writerfilter {
39 namespace doctok
42 /**
43 A bintable.
45 Word uses bintables to associate FC ranges with FKPs. A bintable
46 has a list of FCs. At each FC a range begins. The length of the
47 range is given by the distance of the according CPs.
49 class WW8BinTable
51 public:
52 virtual ~WW8BinTable() {};
53 /**
54 Shared pointer to a bintable.
56 typedef boost::shared_ptr<WW8BinTable> Pointer_t;
58 /**
59 Return count of entries.
61 virtual sal_uInt32 getEntryCount() const = 0;
63 /**
64 Return FC from bintable.
66 @param nIndex index in bintable to return FC from
68 virtual Fc getFc(sal_uInt32 nIndex) const = 0;
70 /**
71 Return page number.
73 @param nIndex index in bintable to return page number from
75 virtual sal_uInt32 getPageNumber(sal_uInt32 nIndex) const = 0;
77 /**
78 Return page number associated with FC.
80 @param rFc FC to return page number for
82 virtual sal_uInt32 getPageNumber(const Fc & rFc) const = 0;
84 /**
85 Return string representation of bintable.
87 virtual string toString() const = 0;
88 };
91 #endif // INCLUDED_WW8_BIN_TABLE_HXX