Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #include <doctok/resources.hxx>
21 : :
22 : : namespace writerfilter {
23 : : namespace doctok {
24 : :
25 : : /* WW8sprmTDefTable */
26 : :
27 : 0 : sal_uInt32 WW8sprmTDefTable::get_cellx_count()
28 : : {
29 : 0 : return getU8(0x4) + 1;
30 : : }
31 : :
32 : 0 : sal_uInt16 WW8sprmTDefTable::get_cellx(sal_uInt32 nIndex)
33 : : {
34 : 0 : return getU16(0x5 + nIndex * 2);
35 : : }
36 : :
37 : 0 : sal_uInt32 WW8sprmTDefTable::get_tc_count()
38 : : {
39 : 0 : return get_cellx_count() - 1;
40 : : }
41 : :
42 : : writerfilter::Reference<Properties>::Pointer_t
43 : 0 : WW8sprmTDefTable::get_tc(sal_uInt32 pos)
44 : : {
45 : : return writerfilter::Reference<Properties>::Pointer_t
46 : : (new WW8TC(this,
47 [ # # ]: 0 : 0x5 + get_cellx_count() * 2 + pos * WW8TC::getSize()));
48 : : }
49 : :
50 : : /* WW8sprmTTableBorders */
51 : :
52 : 0 : sal_uInt32 WW8sprmTTableBorders::get_rgbbrc_count()
53 : : {
54 : 0 : return 6;
55 : : }
56 : :
57 : : writerfilter::Reference<Properties>::Pointer_t
58 : 0 : WW8sprmTTableBorders::get_rgbbrc(sal_uInt32 pos)
59 : : {
60 : : return writerfilter::Reference<Properties>::Pointer_t
61 [ # # ]: 0 : (new WW8BRC(*this, 0x3 + pos * WW8BRC::getSize()));
62 : : }
63 : :
64 : : /* WW8sprmTCellBottomColor */
65 : :
66 : 0 : sal_uInt32 WW8sprmTCellBottomColor::get_cellBottomColor_count()
67 : : {
68 : 0 : return getU8(0x2) / 4;
69 : : }
70 : :
71 : 0 : sal_uInt32 WW8sprmTCellBottomColor::get_cellBottomColor(sal_uInt32 pos)
72 : : {
73 : 0 : return getU32(0x3 + 4 * pos);
74 : : }
75 : :
76 : : /* WW8sprmTCellLeftColor */
77 : :
78 : 0 : sal_uInt32 WW8sprmTCellLeftColor::get_cellLeftColor_count()
79 : : {
80 : 0 : return getU8(0x2) / 4;
81 : : }
82 : :
83 : 0 : sal_uInt32 WW8sprmTCellLeftColor::get_cellLeftColor(sal_uInt32 pos)
84 : : {
85 : 0 : return getU32(0x3 + 4 * pos);
86 : : }
87 : :
88 : : /* WW8sprmTCellTopColor */
89 : :
90 : 0 : sal_uInt32 WW8sprmTCellTopColor::get_cellTopColor_count()
91 : : {
92 : 0 : return getU8(0x2) / 4;
93 : : }
94 : :
95 : 0 : sal_uInt32 WW8sprmTCellTopColor::get_cellTopColor(sal_uInt32 pos)
96 : : {
97 : 0 : return getU32(0x3 + 4 * pos);
98 : : }
99 : :
100 : : /* WW8sprmTCellRightColor */
101 : :
102 : 0 : sal_uInt32 WW8sprmTCellRightColor::get_cellRightColor_count()
103 : : {
104 : 0 : return getU8(0x2) / 4;
105 : : }
106 : :
107 : 0 : sal_uInt32 WW8sprmTCellRightColor::get_cellRightColor(sal_uInt32 pos)
108 : : {
109 : 0 : return getU32(0x3 + 4 * pos);
110 : : }
111 : :
112 : : /* WW8sprmTDefTableShd */
113 : :
114 : 0 : sal_uInt32 WW8sprmTDefTableShd::get_shd_count()
115 : : {
116 : 0 : return getU8(0x2) / WW8SHD::getSize();
117 : : }
118 : :
119 : : writerfilter::Reference<Properties>::Pointer_t
120 : 0 : WW8sprmTDefTableShd::get_shd(sal_uInt32 pos)
121 : : {
122 : : return writerfilter::Reference<Properties>::Pointer_t
123 [ # # ]: 0 : (new WW8SHD(*this, 0x3 + pos * WW8SHD::getSize()));
124 : : }
125 : :
126 : : /* WW8sprmTCellShd */
127 : :
128 : 0 : sal_uInt32 WW8sprmTCellShd::get_shd_count()
129 : : {
130 : 0 : return getU8(0x2) / WW8CellShd::getSize();
131 : : }
132 : :
133 : : writerfilter::Reference<Properties>::Pointer_t
134 : 0 : WW8sprmTCellShd::get_shd(sal_uInt32 pos)
135 : : {
136 : : return writerfilter::Reference<Properties>::Pointer_t
137 [ # # ]: 0 : (new WW8CellShd(*this, 0x3 + pos * WW8CellShd::getSize()));
138 : : }
139 : :
140 : : /* WW8sprmTCellShadow */
141 : :
142 : 0 : sal_uInt32 WW8sprmTCellShadow::get_cellShadow_count()
143 : : {
144 : 0 : return getU8(0x2) / WW8CellShd::getSize();
145 : : }
146 : :
147 : : writerfilter::Reference<Properties>::Pointer_t
148 : 0 : WW8sprmTCellShadow::get_cellShadow(sal_uInt32 pos)
149 : : {
150 : : return writerfilter::Reference<Properties>::Pointer_t
151 [ # # ]: 0 : (new WW8CellShd(*this, 0x3 + pos * WW8CellShd::getSize()));
152 : : }
153 : :
154 [ + - ][ + - ]: 60 : }}
155 : :
156 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|