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 .
22 portion
= appendPortion("text");
23 tableContext
= new TableContext();
25 tableStack
.push(tableContext
);
26 portion
= appendPortion("A1");
27 tableContext
.addPortion(portion
);
28 tableContext
.endCell();
29 portion
= appendPortion("B1");
30 tableContext
.addPortion(portion
);
31 tableContext
.endCell();
32 portion
= appendPortion("C1");
33 tableContext
.addPortion(portion
);
34 tableContext
.endCell();
35 tableContext
.endRow(rowProperties
);
36 portion
= appendPortion("A2");
37 tableContext
.addPortion(portion
);
38 tableContext
.endCell();
39 tableContext
= new TableContext();
41 tableStack
.push(tableContext
);
42 portion
= appendPortion("B2A1");
43 tableContext
.addPortion(portion
);
44 tableContext
.endCell();
45 portion
= appendPortion("B2B1");
46 tableContext
.addPortion(portion
);
47 tableContext
.endCell();
48 tableContext
.endRow(rowProperties
);
49 portion
= appendPortion("B2A2");
50 tableContext
.addPortion(portion
);
51 tableContext
.endCell();
52 portion
= appendPortion("B2B2");
53 tableContext
.addPortion(portion
);
54 tableContext
.endCell();
55 tableContext
.endRow(rowProperties
);
57 portion
= createTable(tableContext
);
58 tableContext
= tableStack
.pop();
59 tableContext
.addPortion(portion
);
60 portion
= appendPortion("B2");
61 tableContext
.addPortion(portion
);
62 tableContext
.endCell();
63 portion
= appendPortion("C2");
64 tableContext
.addPortion(portion
);
65 tableContext
.endCell();
66 tableContext
.endRow(rowProperties
);
68 portion
= createTable(tableContext
);
69 portion
= appendPortion("text");
74 merge text ranges of portions to one and add this range to ranges of row.
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */