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: WW8PieceTableImpl.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_PIECE_TABLE_IMPL_HXX
32 #define INCLUDED_WW8_PIECE_TABLE_IMPL_HXX
35 #include <WW8CpAndFc.hxx>
36 #ifndef INCLUDE_WW8_PIECE_TABLE_HXX
37 #include <WW8PieceTable.hxx>
40 namespace writerfilter
{
43 using namespace ::std
;
45 class WW8PieceTableImpl
: public WW8PieceTable
47 typedef std::vector
<CpAndFc
> tEntries
;
50 tEntries::const_iterator
findCp(const Cp
& rCp
) const;
51 tEntries::const_iterator
findFc(const Fc
& rFc
) const;
53 mutable Cp2FcHashMap_t mCp2FcCache
;
56 WW8PieceTableImpl(WW8Stream
& rStream
, sal_uInt32 nOffset
,
59 virtual Fc
cp2fc(const Cp
& aCpIn
) const;
60 virtual Cp
fc2cp(const Fc
& aFcIn
) const;
61 virtual bool isComplex(const Cp
& aCp
) const;
62 virtual bool isComplex(const Fc
& aFc
) const;
64 virtual sal_uInt32
getCount() const;
65 virtual Cp
getFirstCp() const;
66 virtual Fc
getFirstFc() const;
67 virtual Cp
getLastCp() const;
68 virtual Fc
getLastFc() const;
69 virtual Cp
getCp(sal_uInt32 nIndex
) const;
70 virtual Fc
getFc(sal_uInt32 nIndex
) const;
71 virtual CpAndFc
createCpAndFc(const Cp
& rCp
, PropertyType eType
) const;
72 virtual CpAndFc
createCpAndFc(const Fc
& rFc
, PropertyType eType
) const;
74 virtual void dump(ostream
& o
) const;
78 #endif // INCLUDED_WW8_PIECE_TABLE_IMPL_HXX