~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to filters/kword/html/export/ExportCss.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $Header: /home/kde/koffice/filters/kword/html/export/ExportCss.h,v 1.6 2003/06/19 19:43:33 zrusin Exp $
 
2
 
 
3
/*
 
4
   This file is part of the KDE project
 
5
   Copyright (C) 2001, 2002 Nicolas GOUTTE <goutte@kde.org>
 
6
 
 
7
   This library is free software; you can redistribute it and/or
 
8
   modify it under the terms of the GNU Library General Public
 
9
   License as published by the Free Software Foundation; either
 
10
   version 2 of the License, or (at your option) any later version.
 
11
 
 
12
   This library is distributed in the hope that it will be useful,
 
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
   Library General Public License for more details.
 
16
 
 
17
   You should have received a copy of the GNU Library General Public License
 
18
   along with this library; see the file COPYING.LIB.  If not, write to
 
19
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
20
   Boston, MA 02111-1307, USA.
 
21
*/
 
22
 
 
23
#ifndef EXPORTCSS_H
 
24
#define EXPORTCSS_H
 
25
 
 
26
#include <qmap.h>
 
27
 
 
28
#include <KWEFBaseWorker.h>
 
29
#include "ExportFilter.h"
 
30
 
 
31
class StyleMap : public QMap<QString,LayoutData>
 
32
{
 
33
public:
 
34
    StyleMap(void) {}
 
35
    ~StyleMap(void) {}
 
36
};
 
37
 
 
38
class HtmlCssWorker : public HtmlWorker
 
39
{
 
40
public:
 
41
    HtmlCssWorker(void) { }
 
42
    virtual ~HtmlCssWorker(void) { }
 
43
public:
 
44
    virtual bool doOpenStyles(void); // HTML's <style>
 
45
    virtual bool doCloseStyles(void); // HTML's </style>
 
46
    virtual bool doFullDefineStyle(LayoutData& layout);
 
47
    virtual bool doFullPaperFormat(const int format,
 
48
        const double width, const double height, const int orientation);
 
49
    virtual bool doFullPaperBorders (const double top, const double left,
 
50
        const double bottom, const double right); // Like KWord's <PAPERBORDERS>
 
51
protected:
 
52
    virtual QString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered);
 
53
    virtual void openParagraph(const QString& strTag, const LayoutData& layout,
 
54
                               QChar::Direction direction=QChar::DirL);
 
55
    virtual void closeParagraph(const QString& strTag, const LayoutData& layout);
 
56
    virtual void openSpan(const FormatData& formatOrigin, const FormatData& format);
 
57
    virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format);
 
58
private:
 
59
    QString layoutToCss(const LayoutData& layoutOrigin,const LayoutData& layout,
 
60
        const bool force) const;
 
61
    QString escapeCssIdentifier(const QString& strText) const;
 
62
    QString textFormatToCss(const TextFormatting& formatOrigin,
 
63
        const TextFormatting& formatData, const bool force) const;
 
64
private:
 
65
    QString m_strPageSize;
 
66
    QString m_strPaperBorders;
 
67
    StyleMap m_styleMap;
 
68
};
 
69
 
 
70
#endif /* EXPORTCSS_H */