summaryrefslogtreecommitdiffstats
path: root/scribus/plugins/gettext/htmlim/htmlreader.h
diff options
context:
space:
mode:
authorJan Zeleny <jz@janzeleny.cz>2012-09-28 22:45:08 +0000
committerJan Zeleny <jzeleny@redhat.com>2012-09-29 23:04:08 +0200
commitc9e955091937f0a4b24c3f3e1ec5c6547c8f4c39 (patch)
tree8635e2efed56d732a2d01a49edd95729be3ce220 /scribus/plugins/gettext/htmlim/htmlreader.h
parent34e65a2e4567675f7d712de2433ff10c0c0edb90 (diff)
downloadscribus-public.tar.gz
scribus-public.tar.xz
scribus-public.zip
Create only styles for element typespublic
Up until now a new style was created for every start tag in the HTML code. Now there are only a handful of styles are created, one for each element type (h1, h2, code, div, ...). Other styles are applied directly to characters.
Diffstat (limited to 'scribus/plugins/gettext/htmlim/htmlreader.h')
-rw-r--r--scribus/plugins/gettext/htmlim/htmlreader.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/scribus/plugins/gettext/htmlim/htmlreader.h b/scribus/plugins/gettext/htmlim/htmlreader.h
index b28300d..6333a5e 100644
--- a/scribus/plugins/gettext/htmlim/htmlreader.h
+++ b/scribus/plugins/gettext/htmlim/htmlreader.h
@@ -59,9 +59,10 @@ private:
gtParagraphStyle *pstyle;
QMap<QString, Alignment> alignments;
- QMap<QString, QString> *elements;
+ QMap<QString, gtParagraphStyle *> *elements;
QVector<QString> *blockElements;
QStack<gtParagraphStyle *> *styleStack;
+ QStack<QString> *elementStack;
int styleNumber;
/* This indicates that one line break has just been done.
* Without this, two following block elements would create
@@ -72,6 +73,8 @@ private:
* filter spaces on the beginning of lines after line breaks */
bool lineBroken;
+ bool paragraphSet;
+
QStack<ListStyle> listStyles;
QStack<int> nextItemNumbers;
@@ -83,6 +86,7 @@ private:
bool noFormatting;
void initPStyles();
+ void addElementToMap(const char *elementName, const char *elementStyle);
double getSize(double currentFontSize, QString styleValue, bool isFontSize);
static HTMLReader* hreader;
public: