bump product version to 4.1.6.2
[LibreOffice.git] / writerfilter / source / doctok / WW8Table.cxx
blobf3fa7c3e22cd8fe74aa2e560a6e656848c35d946
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 #include <doctok/resources.hxx>
22 namespace writerfilter {
23 namespace doctok {
25 /* WW8sprmTDefTable */
27 sal_uInt32 WW8sprmTDefTable::get_cellx_count()
29 return getU8(0x4) + 1;
32 sal_uInt16 WW8sprmTDefTable::get_cellx(sal_uInt32 nIndex)
34 return getU16(0x5 + nIndex * 2);
37 sal_uInt32 WW8sprmTDefTable::get_tc_count()
39 return get_cellx_count() - 1;
42 writerfilter::Reference<Properties>::Pointer_t
43 WW8sprmTDefTable::get_tc(sal_uInt32 pos)
45 return writerfilter::Reference<Properties>::Pointer_t
46 (new WW8TC(this,
47 0x5 + get_cellx_count() * 2 + pos * WW8TC::getSize()));
50 /* WW8sprmTTableBorders */
52 sal_uInt32 WW8sprmTTableBorders::get_rgbbrc_count()
54 return 6;
57 writerfilter::Reference<Properties>::Pointer_t
58 WW8sprmTTableBorders::get_rgbbrc(sal_uInt32 pos)
60 return writerfilter::Reference<Properties>::Pointer_t
61 (new WW8BRC(*this, 0x3 + pos * WW8BRC::getSize()));
64 /* WW8sprmTCellBottomColor */
66 sal_uInt32 WW8sprmTCellBottomColor::get_cellBottomColor_count()
68 return getU8(0x2) / 4;
71 sal_uInt32 WW8sprmTCellBottomColor::get_cellBottomColor(sal_uInt32 pos)
73 return getU32(0x3 + 4 * pos);
76 /* WW8sprmTCellLeftColor */
78 sal_uInt32 WW8sprmTCellLeftColor::get_cellLeftColor_count()
80 return getU8(0x2) / 4;
83 sal_uInt32 WW8sprmTCellLeftColor::get_cellLeftColor(sal_uInt32 pos)
85 return getU32(0x3 + 4 * pos);
88 /* WW8sprmTCellTopColor */
90 sal_uInt32 WW8sprmTCellTopColor::get_cellTopColor_count()
92 return getU8(0x2) / 4;
95 sal_uInt32 WW8sprmTCellTopColor::get_cellTopColor(sal_uInt32 pos)
97 return getU32(0x3 + 4 * pos);
100 /* WW8sprmTCellRightColor */
102 sal_uInt32 WW8sprmTCellRightColor::get_cellRightColor_count()
104 return getU8(0x2) / 4;
107 sal_uInt32 WW8sprmTCellRightColor::get_cellRightColor(sal_uInt32 pos)
109 return getU32(0x3 + 4 * pos);
112 /* WW8sprmTDefTableShd */
114 sal_uInt32 WW8sprmTDefTableShd::get_shd_count()
116 return getU8(0x2) / WW8SHD::getSize();
119 writerfilter::Reference<Properties>::Pointer_t
120 WW8sprmTDefTableShd::get_shd(sal_uInt32 pos)
122 return writerfilter::Reference<Properties>::Pointer_t
123 (new WW8SHD(*this, 0x3 + pos * WW8SHD::getSize()));
126 /* WW8sprmTCellShd */
128 sal_uInt32 WW8sprmTCellShd::get_shd_count()
130 return getU8(0x2) / WW8CellShd::getSize();
133 writerfilter::Reference<Properties>::Pointer_t
134 WW8sprmTCellShd::get_shd(sal_uInt32 pos)
136 return writerfilter::Reference<Properties>::Pointer_t
137 (new WW8CellShd(*this, 0x3 + pos * WW8CellShd::getSize()));
140 /* WW8sprmTCellShadow */
142 sal_uInt32 WW8sprmTCellShadow::get_cellShadow_count()
144 return getU8(0x2) / WW8CellShd::getSize();
147 writerfilter::Reference<Properties>::Pointer_t
148 WW8sprmTCellShadow::get_cellShadow(sal_uInt32 pos)
150 return writerfilter::Reference<Properties>::Pointer_t
151 (new WW8CellShd(*this, 0x3 + pos * WW8CellShd::getSize()));
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */