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