62 #include <QString> |
62 #include <QString> |
63 #include <QStringList> |
63 #include <QStringList> |
64 #include <QMultiHash> |
64 #include <QMultiHash> |
65 |
65 |
66 QTM_BEGIN_NAMESPACE |
66 QTM_BEGIN_NAMESPACE |
|
67 class QVersitDocument; |
|
68 class QVersitProperty; |
67 |
69 |
68 class Q_AUTOTEST_EXPORT VersitUtils |
70 class Q_AUTOTEST_EXPORT VersitUtils |
69 { |
71 { |
70 public: |
72 public: |
71 static QByteArray encode(const QByteArray& ba, QTextCodec* codec); |
73 static QByteArray encode(const QByteArray& ba, QTextCodec* codec); |
72 static QByteArray encode(char ch, QTextCodec* codec); |
74 static QByteArray encode(char ch, QTextCodec* codec); |
73 static QList<QByteArrayMatcher>* newlineList(QTextCodec* codec); |
75 static QList<QByteArrayMatcher>* newlineList(QTextCodec* codec); |
74 static void changeCodec(QTextCodec* codec); |
76 static void changeCodec(QTextCodec* codec); |
|
77 static QVersitProperty takeProperty(const QVersitDocument& document, |
|
78 const QString& propertyName, |
|
79 QList<QVersitProperty>* toBeRemoved); |
75 |
80 |
76 private: |
81 private: |
77 // These are caches for performance: |
82 // These are caches for performance: |
78 // The previous codec that encode(char, QTextCodec) was called with |
83 // The previous codec that encode(char, QTextCodec) was called with |
79 static QTextCodec* m_previousCodec; |
84 static QTextCodec* m_previousCodec; |