Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / sw / inc / tblenum.hxx
blob327d0ea52e376325bf2d2fdcc5c29d1f0039c233
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 .
19 #ifndef INCLUDED_SW_INC_TBLENUM_HXX
20 #define INCLUDED_SW_INC_TBLENUM_HXX
22 #include <o3tl/typed_flags_set.hxx>
24 // For changing table columns/rows widths/heights.
25 enum class TableChgWidthHeightType : sal_uInt16
27 ColLeft = 0,
28 ColRight = 1,
29 RowTop = 2,
30 RowBottom = 3,
31 CellLeft = 4,
32 CellRight = 5,
33 CellTop = 6,
34 CellBottom = 7,
35 InvalidPos = 0x0f,
37 // The following can be "or"ed in.
38 InsertDeleteMode = 0x4000, // Insert/Del-mode: the Bigger-Flag
39 // tells what happens:
40 // bBigger -> box gets removed.
41 // !bBigger-> box gets inserted.
42 BiggerMode = 0x8000, // Box becomes larger -> else smaller.
44 namespace o3tl {
45 template<> struct typed_flags<TableChgWidthHeightType> : is_typed_flags<TableChgWidthHeightType, 0xc00f> {};
47 constexpr TableChgWidthHeightType extractPosition(TableChgWidthHeightType e) {
48 return static_cast<TableChgWidthHeightType>(static_cast<int>(e) & 0xf);
51 enum class TableChgMode
53 FixedWidthChangeAbs, // Table fixed width, change neighbour.
54 FixedWidthChangeProp, // Table fixed width, change all neighbours.
55 VarWidthChangeAbs // Table variable, change all neighbours.
58 enum class SplitTable_HeadlineOption
60 NONE = 0, // Leave everything in place.
61 BorderCopy, // Copy border of the previous line.
62 ContentCopy, // Copy 1st line with all contents.
63 BoxAttrCopy, // Copy box attributes of 1st line.
64 BoxAttrAllCopy // Copy box attributes and paragraph styles of 1st line.
67 enum class TableMergeErr
69 Ok,
70 NoSelection,
71 TooComplex
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */