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_CLX_HXX
21 #define INCLUDED_WW8_CLX_HXX
23 #include <doctok/resources.hxx>
25 #include "WW8OutputWithDepth.hxx"
27 namespace writerfilter
{
32 Piece table as stored in a Word file.
34 It contains character positions (CPs) and file character positions
35 (FCs). Each CP is correlated to one FC.
37 class WW8Clx
: public WW8StructBase
39 /// Pointer to the file information block.
40 WW8Fib::Pointer_t pFib
;
42 /// Offset where FCs begin
43 sal_uInt32 nOffsetPieceTable
;
47 typedef boost::shared_ptr
<WW8Clx
> Pointer_t
;
49 WW8Clx(WW8Stream
& rStream
,
50 sal_uInt32 nOffset
, sal_uInt32 nCount
);
52 virtual void dump(OutputWithDepth
<string
> & o
) const;
55 Return the number of pieces.
57 sal_uInt32
getPieceCount() const;
60 Return a certain character position.
62 @param nIndex index of the character position
64 sal_uInt32
getCp(sal_uInt32 nIndex
) const;
67 Return a certain file character position.
69 @param nIndex index of the file character position
71 sal_uInt32
getFc(sal_uInt32 nIndex
) const;
74 Return if a certain FC is complex.
76 @nIndex index of the FC
78 sal_Bool
isComplexFc(sal_uInt32 nIndex
) const;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */