calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / drawinglayer / source / primitive2d / textenumsprimitive2d.cxx
blob7f13cbbbe9e92a85c899e4c1e74f3283ec131d66
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 <drawinglayer/primitive2d/textenumsprimitive2d.hxx>
23 namespace drawinglayer::primitive2d
25 TextLine mapFontLineStyleToTextLine(FontLineStyle eLineStyle)
27 switch(eLineStyle)
29 case LINESTYLE_SINGLE: return TEXT_LINE_SINGLE;
30 case LINESTYLE_DOUBLE: return TEXT_LINE_DOUBLE;
31 case LINESTYLE_DOTTED: return TEXT_LINE_DOTTED;
32 case LINESTYLE_DASH: return TEXT_LINE_DASH;
33 case LINESTYLE_LONGDASH: return TEXT_LINE_LONGDASH;
34 case LINESTYLE_DASHDOT: return TEXT_LINE_DASHDOT;
35 case LINESTYLE_DASHDOTDOT: return TEXT_LINE_DASHDOTDOT;
36 case LINESTYLE_SMALLWAVE: return TEXT_LINE_SMALLWAVE;
37 case LINESTYLE_WAVE: return TEXT_LINE_WAVE;
38 case LINESTYLE_DOUBLEWAVE: return TEXT_LINE_DOUBLEWAVE;
39 case LINESTYLE_BOLD: return TEXT_LINE_BOLD;
40 case LINESTYLE_BOLDDOTTED: return TEXT_LINE_BOLDDOTTED;
41 case LINESTYLE_BOLDDASH: return TEXT_LINE_BOLDDASH;
42 case LINESTYLE_BOLDLONGDASH: return TEXT_LINE_BOLDLONGDASH;
43 case LINESTYLE_BOLDDASHDOT: return TEXT_LINE_BOLDDASHDOT;
44 case LINESTYLE_BOLDDASHDOTDOT: return TEXT_LINE_BOLDDASHDOTDOT;
45 case LINESTYLE_BOLDWAVE: return TEXT_LINE_BOLDWAVE;
46 // FontLineStyle_FORCE_EQUAL_SIZE, LINESTYLE_DONTKNOW, LINESTYLE_NONE
47 default: return TEXT_LINE_NONE;
51 FontLineStyle mapTextLineToFontLineStyle(TextLine eLineStyle)
53 switch(eLineStyle)
55 default: /*TEXT_LINE_NONE*/ return LINESTYLE_NONE;
56 case TEXT_LINE_SINGLE: return LINESTYLE_SINGLE;
57 case TEXT_LINE_DOUBLE: return LINESTYLE_DOUBLE;
58 case TEXT_LINE_DOTTED: return LINESTYLE_DOTTED;
59 case TEXT_LINE_DASH: return LINESTYLE_DASH;
60 case TEXT_LINE_LONGDASH: return LINESTYLE_LONGDASH;
61 case TEXT_LINE_DASHDOT: return LINESTYLE_DASHDOT;
62 case TEXT_LINE_DASHDOTDOT: return LINESTYLE_DASHDOTDOT;
63 case TEXT_LINE_SMALLWAVE: return LINESTYLE_SMALLWAVE;
64 case TEXT_LINE_WAVE: return LINESTYLE_WAVE;
65 case TEXT_LINE_DOUBLEWAVE: return LINESTYLE_DOUBLEWAVE;
66 case TEXT_LINE_BOLD: return LINESTYLE_BOLD;
67 case TEXT_LINE_BOLDDOTTED: return LINESTYLE_BOLDDOTTED;
68 case TEXT_LINE_BOLDDASH: return LINESTYLE_BOLDDASH;
69 case TEXT_LINE_BOLDLONGDASH: return LINESTYLE_LONGDASH;
70 case TEXT_LINE_BOLDDASHDOT: return LINESTYLE_BOLDDASHDOT;
71 case TEXT_LINE_BOLDDASHDOTDOT:return LINESTYLE_BOLDDASHDOTDOT;
72 case TEXT_LINE_BOLDWAVE: return LINESTYLE_BOLDWAVE;
76 TextStrikeout mapFontStrikeoutToTextStrikeout(FontStrikeout eFontStrikeout)
78 switch(eFontStrikeout)
80 case STRIKEOUT_SINGLE: return TEXT_STRIKEOUT_SINGLE;
81 case STRIKEOUT_DOUBLE: return TEXT_STRIKEOUT_DOUBLE;
82 case STRIKEOUT_BOLD: return TEXT_STRIKEOUT_BOLD;
83 case STRIKEOUT_SLASH: return TEXT_STRIKEOUT_SLASH;
84 case STRIKEOUT_X: return TEXT_STRIKEOUT_X;
85 // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW
86 default: return TEXT_STRIKEOUT_NONE;
90 FontStrikeout mapTextStrikeoutToFontStrikeout(TextStrikeout eTextStrikeout)
92 switch(eTextStrikeout)
94 default: /*case primitive2d::TEXT_STRIKEOUT_NONE*/ return STRIKEOUT_NONE;
95 case TEXT_STRIKEOUT_SINGLE: return STRIKEOUT_SINGLE;
96 case TEXT_STRIKEOUT_DOUBLE: return STRIKEOUT_DOUBLE;
97 case TEXT_STRIKEOUT_BOLD: return STRIKEOUT_BOLD;
98 case TEXT_STRIKEOUT_SLASH: return STRIKEOUT_SLASH;
99 case TEXT_STRIKEOUT_X: return STRIKEOUT_X;
103 } // end of namespace
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */