File indexing completed on 2025-01-19 13:27:35
0001 /* 0002 * This file is part of Office 2007 Filters for Calligra 0003 * 0004 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 0005 * 0006 * Contact: Suresh Chande suresh.chande@nokia.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 0024 #ifndef XLSXXMLCOMMONREADER_H 0025 #define XLSXXMLCOMMONREADER_H 0026 0027 #include <MsooXmlTheme.h> 0028 #include <MsooXmlReader.h> 0029 #include <KoGenStyle.h> 0030 0031 #include <QColor> 0032 0033 class KoCharacterStyle; 0034 0035 //! A class reading MSOOXML XLSX markup 0036 //! This is a base class implementing reading elements common to some XLSX content types. 0037 class XlsxXmlCommonReader : public MSOOXML::MsooXmlReader 0038 { 0039 public: 0040 explicit XlsxXmlCommonReader(KoOdfWriters *writers); 0041 0042 ~XlsxXmlCommonReader() override; 0043 0044 protected: 0045 QColor tintedColor(const QColor& color, qreal tint); 0046 0047 KoFilter::ConversionStatus read_t(); 0048 KoFilter::ConversionStatus read_r(); 0049 KoFilter::ConversionStatus read_rPr(); 0050 KoFilter::ConversionStatus read_vertAlign(); 0051 KoFilter::ConversionStatus read_sz(); 0052 KoFilter::ConversionStatus read_rFont(); 0053 0054 QColor m_currentColor; 0055 KoFilter::ConversionStatus read_color(); 0056 0057 KoFilter::ConversionStatus read_u(); 0058 KoFilter::ConversionStatus read_strike(); 0059 KoFilter::ConversionStatus read_b(); 0060 KoFilter::ConversionStatus read_outline(); 0061 KoFilter::ConversionStatus read_scheme(); 0062 KoFilter::ConversionStatus read_i(); 0063 0064 KoCharacterStyle *m_currentTextStyleProperties; 0065 0066 //! Used for creating style in w:pPr (style:style/@style:name attr) 0067 KoGenStyle m_currentTextStyle; 0068 0069 MSOOXML::DrawingMLTheme* m_themes; 0070 QVector<QString> m_colorIndices; 0071 0072 private: 0073 void init(); 0074 0075 class Private; 0076 Private* const d; 0077 }; 0078 0079 #endif //XLSXXMLSHAREDSTRINGSREADER_H