Bump version to 4.1-6
[LibreOffice.git] / writerfilter / source / doctok / WW8Sttbf.hxx
blob8f588424bde7fbbd806dbd26770f31aeac4e9289
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_STTBF_HXX
21 #define INCLUDED_WW8_STTBF_HXX
23 #include "WW8StructBase.hxx"
24 #include "WW8ResourceModelImpl.hxx"
26 #include <boost/shared_ptr.hpp>
27 #include <vector>
29 namespace writerfilter {
30 namespace doctok
33 using namespace ::std;
35 /**
36 A string table in file.
38 The string table contains strings that each can have extra data.
40 class WW8Sttbf : public WW8StructBase
42 /// true if strings contain two-byte characters
43 bool mbComplex;
45 /// the number of entries
46 sal_uInt32 mnCount;
48 /// the size of the extra data (per string)
49 sal_uInt32 mnExtraDataCount;
51 /// offsets for the strings
52 vector<sal_uInt32> mEntryOffsets;
54 /// offsets for the extra data
55 vector<sal_uInt32> mExtraOffsets;
57 /**
58 Return offset of an entry.
60 @param nPos the index of the entry
62 sal_uInt32 getEntryOffset(sal_uInt32 nPos) const;
64 public:
65 typedef boost::shared_ptr<WW8Sttbf> Pointer_t;
67 WW8Sttbf(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount);
69 /**
70 Return the number of entries.
72 sal_uInt32 getEntryCount() const;
74 /**
75 Return the string of an entry.
77 @param nPos the index of the entry
79 OUString getEntry(sal_uInt32 nPos) const;
82 class WW8SttbTableResource : public ::writerfilter::Reference<Table>
84 WW8Sttbf::Pointer_t mpSttbf;
86 public:
87 WW8SttbTableResource(WW8Sttbf::Pointer_t pSttbf);
88 virtual ~WW8SttbTableResource();
90 void resolve(Table & rTable);
92 string getType() const;
95 class WW8StringProperty : public ::writerfilter::Reference<Properties>
97 sal_uInt32 mnId;
98 WW8StringValue::Pointer_t mpValue;
100 public:
101 SAL_WNODEPRECATED_DECLARATIONS_PUSH
102 WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue);
103 SAL_WNODEPRECATED_DECLARATIONS_POP
104 virtual ~WW8StringProperty();
106 void resolve(Properties & rProperties);
108 string getType() const;
112 #endif // INCLUDED_WW8_STTBF
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */