File indexing completed on 2024-04-28 16:21:22
0001 /* This file is part of the KDE project 0002 Copyright 2005-2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net> 0003 2006 Fredrik Edemar <f_edemar@linux.se> 0004 2005-2006 Raphael Langerhorst <raphael.langerhorst@kdemail.net> 0005 2004 Tomas Mecir <mecirt@gmail.com> 0006 2003 Norbert Andres <nandres@web.de> 0007 2002 Philipp Mueller <philipp.mueller@gmx.de> 0008 2000 David Faure <faure@kde.org> 0009 2000 Werner Trobin <trobin@kde.org> 0010 2000-2006 Laurent Montel <montel@kde.org> 0011 1999, 2000 Torben Weis <weis@kde.org> 0012 1999 Stephan Kulow <coolo@kde.org> 0013 0014 This library is free software; you can redistribute it and/or 0015 modify it under the terms of the GNU Library General Public 0016 License as published by the Free Software Foundation; either 0017 version 2 of the License, or (at your option) any later version. 0018 0019 This library is distributed in the hope that it will be useful, 0020 but WITHOUT ANY WARRANTY; without even the implied warranty of 0021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0022 Library General Public License for more details. 0023 0024 You should have received a copy of the GNU Library General Public License 0025 along with this library; see the file COPYING.LIB. If not, write to 0026 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0027 Boston, MA 02110-1301, USA. 0028 */ 0029 0030 #ifndef CALLIGRA_SHEETS_FORMAT 0031 #define CALLIGRA_SHEETS_FORMAT 0032 0033 #include "sheets_odf_export.h" 0034 0035 namespace Calligra 0036 { 0037 namespace Sheets 0038 { 0039 0040 /** 0041 * \ingroup Style 0042 * Collection of string formatting enumeration and functions. 0043 */ 0044 namespace Format 0045 { 0046 0047 enum Type { 0048 Generic = 0, 0049 Number = 1, 0050 Text = 5, 0051 Money = 10, 0052 Percentage = 25, 0053 Scientific = 30, 0054 0055 ShortDate = 35, ///< Short (numeric) date format, e.g. 08-04-2007 (locale specific) 0056 TextDate = 36, ///< Long (text) date format, e.g. Sunday 08 April 2007 (locale specific) 0057 DatesBegin = 200, ///< \internal 0058 Date1 = 200, ///< e.g. 18-Feb-99 0059 Date2 = 201, ///< e.g. 18-Feb-1999 0060 Date3 = 202, ///< e.g. 18-Feb 0061 Date4 = 203, ///< e.g. 18-05 0062 Date5 = 204, ///< e.g. 18/05/00 0063 Date6 = 205, ///< e.g. 18/05/1999 0064 Date7 = 206, ///< e.g. Feb-99 0065 Date8 = 207, ///< e.g. February-99 0066 Date9 = 208, ///< e.g. February-1999 0067 Date10 = 209, ///< e.g. F-99 0068 Date11 = 210, ///< e.g. 18/Feb 0069 Date12 = 211, ///< e.g. 18/02 0070 Date13 = 212, ///< e.g. 18/Feb/1999 0071 Date14 = 213, ///< e.g. 2000/Feb/18 0072 Date15 = 214, ///< e.g. 2000-Feb-18 0073 Date16 = 215, ///< e.g. 2000-02-18 0074 Date17 = 216, ///< e.g. 2 February 2000 0075 Date18 = 217, ///< e.g. 02/18/1999 0076 Date19 = 218, ///< e.g. 02/18/99 0077 Date20 = 219, ///< e.g. Feb/18/99 0078 Date21 = 220, ///< e.g. Feb/18/1999 0079 Date22 = 221, ///< e.g. Feb-1999 0080 Date23 = 222, ///< e.g. 1999 0081 Date24 = 223, ///< e.g. 99 0082 Date25 = 224, ///< e.g. 2000/02/18 0083 Date26 = 225, ///< e.g. 2000/Feb/18 0084 Date27 = 226, ///< e.g. Feb/99, complements Date7 0085 Date28 = 227, ///< e.g. Feb/1999, complements Date22 0086 Date29 = 228, ///< e.g. February/99, complements Date8 0087 Date30 = 229, ///< e.g. February/1999, complements Date9 0088 Date31 = 230, ///< e.g. 18-02, complements Date12 0089 Date32 = 231, ///< e.g. 02/99 0090 Date33 = 232, ///< e.g. 02-99, complements Date32 0091 Date34 = 233, ///< e.g. Mon, 2 Feb 99 0092 Date35 = 234, ///< e.g. Mon, 2 February 1999 0093 DatesEnd = 234, ///< \internal 0094 0095 DateTime = 40, ///< e.g. 08-04-2007 11:02 (locale specific) 0096 0097 TimesBegin = 50, ///< \internal 0098 Time = 50, ///< Short time format without seconds, e.g. 11:02 (locale specific) 0099 SecondeTime = 51, ///< Long time format with seconds, e.g. 11:02:45 (locale specific) 0100 Time1 = 52, ///< e.g. 9:01 AM 0101 Time2 = 53, ///< e.g. 9:01:05 AM 0102 Time3 = 54, ///< e.g. 9 h 01 min 28 s 0103 Time4 = 55, ///< e.g. 9:01 0104 Time5 = 56, ///< e.g. 9:01:12 0105 Time6 = 57, ///< [mm]:ss 0106 Time7 = 58, ///< [h]:mm:ss 0107 Time8 = 59, ///< [h]:mm 0108 TimesEnd = 59, ///< \internal 0109 0110 FractionsBegin = 70, ///< \internal 0111 fraction_half = 70, 0112 fraction_quarter = 71, 0113 fraction_eighth = 72, 0114 fraction_sixteenth = 73, 0115 fraction_tenth = 74, 0116 fraction_hundredth = 75, 0117 fraction_one_digit = 76, 0118 fraction_two_digits = 77, 0119 fraction_three_digits = 78, 0120 FractionsEnd = 78, ///< \internal 0121 0122 Custom = 300, 0123 None = 400 0124 }; 0125 0126 //helper functions for the formatting 0127 CALLIGRA_SHEETS_ODF_EXPORT bool isDate(Type type); 0128 CALLIGRA_SHEETS_ODF_EXPORT bool isTime(Type type); 0129 CALLIGRA_SHEETS_ODF_EXPORT bool isFraction(Type type); 0130 CALLIGRA_SHEETS_ODF_EXPORT bool isMoney(Type type); 0131 CALLIGRA_SHEETS_ODF_EXPORT bool isNumber(Type type); 0132 0133 } // namespace Format 0134 } // namespace Sheets 0135 } // namespace Calligra 0136 0137 #endif // CALLIGRA_SHEETS_FORMAT