1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_WW8_PIECE_TABLE_IMPL_HXX
21 #define INCLUDED_WW8_PIECE_TABLE_IMPL_HXX
24 #include <WW8CpAndFc.hxx>
25 #include <WW8PieceTable.hxx>
27 namespace writerfilter
{
30 using namespace ::std
;
32 class WW8PieceTableImpl
: public WW8PieceTable
34 typedef std::vector
<CpAndFc
> tEntries
;
37 tEntries::const_iterator
findCp(const Cp
& rCp
) const;
38 tEntries::const_iterator
findFc(const Fc
& rFc
) const;
40 mutable Cp2FcHashMap_t mCp2FcCache
;
43 WW8PieceTableImpl(WW8Stream
& rStream
, sal_uInt32 nOffset
,
46 virtual Fc
cp2fc(const Cp
& aCpIn
) const;
47 virtual Cp
fc2cp(const Fc
& aFcIn
) const;
48 virtual bool isComplex(const Cp
& aCp
) const;
49 virtual bool isComplex(const Fc
& aFc
) const;
51 virtual sal_uInt32
getCount() const;
52 virtual Cp
getFirstCp() const;
53 virtual Fc
getFirstFc() const;
54 virtual Cp
getLastCp() const;
55 virtual Fc
getLastFc() const;
56 virtual Cp
getCp(sal_uInt32 nIndex
) const;
57 virtual Fc
getFc(sal_uInt32 nIndex
) const;
58 virtual CpAndFc
createCpAndFc(const Cp
& rCp
, PropertyType eType
) const;
59 virtual CpAndFc
createCpAndFc(const Fc
& rFc
, PropertyType eType
) const;
61 virtual void dump(ostream
& o
) const;
65 #endif // INCLUDED_WW8_PIECE_TABLE_IMPL_HXX
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */