--- a
+++ b/gsoc2009/textfilter/scribus/plugins/idmlimplugin/idmlstyles.h
@@ -0,0 +1,123 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+ /***************************************************************************
+  *   Copyright (C) 2009 by Jain Basil Aliyas                               *
+  *   mail@jainbasil.net                                                    *
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+  *   it under the terms of the GNU General Public License as published by  *
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
+  *   This program is distributed in the hope that it will be useful,       *
+  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+  *   GNU General Public License for more details.                          *
+  *                                                                         *
+  *   You should have received a copy of the GNU General Public License     *
+  *   along with this program; if not, write to the                         *
+  *   Free Software Foundation, Inc.,                                       *
+  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+  ***************************************************************************/
+
+#ifndef IDMLSTYLES_H
+#define IDMLSTYLES_H
+
+#include <QDomDocument>
+#include <QDomNode>
+#include <QDomElement>
+#include <QMap>
+#include <QString>
+#include "styles/charstyle.h"
+#include "styles/paragraphstyle.h"
+#include "styles/linestyle.h"
+
+// Mapping between self of a style and its pointer
+typedef QMap<QString, ParagraphStyle*> PStyleMap;
+typedef QMap<QString, CharStyle*> CStyleMap;
+typedef QMap<QString, LineStyle*> LStyleMap;
+
+struct IDMLCStyle
+{
+    // Those Character styles that are supported in Scribus are only defined in this structure.
+    QString self;
+    bool imported;
+    QString fontStyle;
+    double pointSize;
+    QString kerningMethod;
+    double Tracking;
+    bool underline;
+    bool strikeThru;
+    double horizScale;
+    double vertScale;
+    double baselineShift;
+    double fillTint;
+    double strokeTint;
+    double underlineOffset;
+    double underlineWeight;
+    double strikethruOffset;
+    double strikethruWeight;
+    QString fillColor;
+    QString strokeColor;
+    QString language;
+    QString Name;
+    QString BasedOn;
+    QString AppliedFont;
+    QString StrikeThroughType;
+    QString KeyboardShortcut;
+    //Try adding shortcut later
+};
+
+struct IDMLPStyle
+{
+    QString self;
+    QString Name;
+    bool imported;
+    QString NextStyle;
+    IDMLCStyle parCStyle;
+    
+    /* paragraph attributes which are present in scribus */
+    double FirstLineIndent;
+    double RightIndent;
+    double LeftIndent;
+    double SpaceBefore;
+    double SpaceAfter;
+    
+};
+
+class IDMLStyles
+{
+  public:
+    IDMLStyles(QString &stylePath);
+    ~IDMLStyles();
+    void loadFile(QString &fileName);
+    bool processStyleFile();
+    //void formCStyle(IDMLCStyle Cstyle);
+    //void formPStyle();
+    
+    /* Some functions to parse all the inner elements */
+    void getCharacterStyles(QDomElement&);
+    void getParagraphStyles(QDomElement&);
+    void getTOCStyles(QDomElement&);
+    void getCellStyles(QDomElement&);
+    void getTableStyles(QDomElement&);
+    void getObjectStyles(QDomElement&);
+    
+  private:
+    PStyleMap PStyles;
+    CStyleMap CStyles;
+    LStyleMap LStyles;
+    ParagraphStyle *pstyle,*nextStyle;
+    CharStyle cstyle;
+    LineStyle line;
+    //IDMLCStyle CharStyle;
+    QDomDocument doc;
+    QDomNode node;
+    QDomElement root,element;
+};
+
+#endif