File indexing completed on 2024-05-12 16:28:56

0001 /*
0002  * This file is part of Office 2007 Filters for Calligra
0003  *
0004  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
0005  *
0006  * Contact: Christoph Schleifenbaum christoph@kdab.com
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Lesser General Public License
0010  * version 2.1 as published by the Free Software Foundation.
0011  *
0012  * This library is distributed in the hope that it will be useful, but
0013  * WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General Public
0018  * License along with this library; if not, write to the Free Software
0019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
0020  * 02110-1301 USA
0021  *
0022  */
0023 #ifndef NUMBERFORMATPARSER_H
0024 #define NUMBERFORMATPARSER_H
0025 
0026 #include <KoGenStyle.h>
0027 
0028 class QColor;
0029 class QLocale;
0030 class QString;
0031 class KoGenStyles;
0032 
0033 class NumberFormatParser
0034 {
0035 public:
0036     static QColor color(const QString& name);
0037     static QLocale locale(int langid);
0038 
0039     static KoGenStyle parse(const QString& numberFormat, KoGenStyles* styles = 0,
0040                 KoGenStyle::Type type = KoGenStyle::ParagraphAutoStyle);
0041     static bool isDateFormat(const QString& numberFormat);
0042 };
0043 
0044 #endif