update dev300-m58
[ooovba.git] / writerfilter / source / doctok / WW8FKP.hxx
blobc98ccb7a6047b23398ec136e20668fd45ae56291
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: WW8FKP.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_FKP_HXX
32 #define INCLUDED_WW8_FKP_HXX
34 #ifndef INCLUDES_WW8_CP_AND_FC_HXX
35 #include <WW8CpAndFc.hxx>
36 #endif
37 #ifndef INCLUDE_WW8_STRUCT_BASE_HXX
38 #include <WW8StructBase.hxx>
39 #endif
41 namespace writerfilter {
42 namespace doctok
45 /**
46 A formated diskpage (FKP).
48 Formatted diskpages are used by Word to store runs of SPRMs (single
49 property modifier). A FKP contains a list of file character
50 positions (FC). For each FC there is an entry containing the run of
51 SPRMs stored for that FC.
53 class WW8FKP : public WW8StructBase
55 public:
56 /**
57 Shared pointer to an FKP.
59 typedef boost::shared_ptr<WW8FKP> Pointer_t;
61 /**
62 Create FKP from stream.
64 @param rStream stream to create FKP from
65 @param nOffset offset in stream where the FKP starts.
67 WW8FKP(WW8Stream & rStream, sal_uInt32 nOffset)
68 : WW8StructBase(rStream, nOffset, 512)
72 /**
73 Return count of entries.
75 virtual sal_uInt32 getEntryCount() const = 0;
77 /**
78 Return an FC.
80 @param nIndex index of the FC to return
82 virtual Fc getFc(sal_uInt32 nIndex) const = 0;
84 /**
85 Returns the first FC of the FKP.
87 virtual Fc getFirstFc() const = 0;
89 /**
90 Returns the last FC of the FKP.
92 virtual Fc getLastFc() const = 0;
94 /**
95 Check if an FKP contains an FC.
97 @param rFc FC to look for
99 @retval true FKP contains FC
100 @retval false else
102 virtual bool contains(const Fc & rFc) const = 0;
105 Return properties stored in an FKP for a FC.
107 @param rFc FC to look for
109 virtual writerfilter::Reference<Properties>::Pointer_t
110 getProperties(const Fc & rFc)
111 const = 0;
115 Cache providing FKPs.
117 class WW8FKPCache
119 public:
121 Shared pointer to cache.
123 typedef boost::shared_ptr<WW8FKPCache> Pointer_t;
125 virtual ~WW8FKPCache();
128 Return FKP.
130 @param nPageNumber number of page to return
132 virtual WW8FKP::Pointer_t get(sal_uInt32 nPageNumber, bool bComplex) = 0;
136 #endif // INCLUDED_WW8_FKP_HXX