summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoOasisStyles.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoOasisStyles.h')
-rw-r--r--lib/kofficecore/KoOasisStyles.h122
1 files changed, 61 insertions, 61 deletions
diff --git a/lib/kofficecore/KoOasisStyles.h b/lib/kofficecore/KoOasisStyles.h
index caa8d513..9a8e64e4 100644
--- a/lib/kofficecore/KoOasisStyles.h
+++ b/lib/kofficecore/KoOasisStyles.h
@@ -19,15 +19,15 @@
#ifndef KOOASISSTYLES_H
#define KOOASISSTYLES_H
-#include <qdom.h>
-#include <qdict.h>
-#include <qvaluevector.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqdict.h>
+#include <tqvaluevector.h>
+#include <tqmap.h>
#include <koffice_export.h>
class KoGenStyles;
class KoXmlWriter;
-class QBrush;
+class TQBrush;
class KoGenStyle;
class KoStyleStack;
@@ -43,119 +43,119 @@ public:
/// Look into @p doc for styles and remember them
/// @param doc document to look into
/// @param stylesDotXml true when loading styles.xml, false otherwise
- void createStyleMap( const QDomDocument& doc, bool stylesDotXml );
+ void createStyleMap( const TQDomDocument& doc, bool stylesDotXml );
/**
* Look up a style by name.
- * This method can find styles defined by the tags "style:page-layout",
- * "style:presentation-page-layout", or "style:font-decl".
+ * This method can find styles defined by the tags "style:page-tqlayout",
+ * "style:presentation-page-tqlayout", or "style:font-decl".
* Do NOT use this method for style:style styles.
*
* @param name the style name
- * @return the dom element representing the style, or QString::null if it wasn't found.
+ * @return the dom element representing the style, or TQString() if it wasn't found.
*/
- const QDomElement* findStyle( const QString& name ) const;
+ const TQDomElement* findStyle( const TQString& name ) const;
/**
* Look up a style:style by name.
* @param name the style name
* @param family the style family (for a style:style, use 0 otherwise)
- * @return the dom element representing the style, or QString::null if it wasn't found.
+ * @return the dom element representing the style, or TQString() if it wasn't found.
*/
- const QDomElement* findStyle( const QString& name, const QString& family ) const;
+ const TQDomElement* findStyle( const TQString& name, const TQString& family ) const;
/// Similar to findStyle but for auto-styles in styles.xml only.
- const QDomElement* findStyleAutoStyle( const QString& name, const QString& family ) const;
+ const TQDomElement* findStyleAutoStyle( const TQString& name, const TQString& family ) const;
/// @return the style:styles that are "user styles", i.e. those from office:styles
/// findStyle() is used for lookup. userStyles() is used to load all user styles upfront.
- QValueVector<QDomElement> userStyles() const;
+ TQValueVector<TQDomElement> userStyles() const;
/// @return the default style for a given family ("graphic","paragraph","table" etc.)
/// Returns 0 if no default style for this family is available
- const QDomElement* defaultStyle( const QString& family ) const;
+ const TQDomElement* defaultStyle( const TQString& family ) const;
/// @return the office:style element
- const QDomElement& officeStyle() const { return m_officeStyle; }
+ const TQDomElement& officeStyle() const { return m_officeStyle; }
/// @return all list styles ("text:list-style" elements), hashed by name
- const QDict<QDomElement>& listStyles() const { return m_listStyles; }
+ const TQDict<TQDomElement>& listStyles() const { return m_listStyles; }
/// @return master pages ("style:master-page" elements), hashed by name
- const QDict<QDomElement>& masterPages() const { return m_masterPages; }
+ const TQDict<TQDomElement>& masterPages() const { return m_masterPages; }
/// @return draw styles, hashed by name
- const QDict<QDomElement>& drawStyles() const { return m_drawStyles; }
+ const TQDict<TQDomElement>& drawStyles() const { return m_drawStyles; }
/// @return all styles ("style:style" elements) for a given family, hashed by name
- const QDict<QDomElement>& styles(const QString& family) const;
+ const TQDict<TQDomElement>& styles(const TQString& family) const;
/// Prefix and suffix are always included into formatStr. Having them as separate fields simply
/// allows to extract them from formatStr, to display them in separate widgets.
struct NumericStyleFormat
{
- QString formatStr;
- QString prefix;
- QString suffix;
+ TQString formatStr;
+ TQString prefix;
+ TQString suffix;
enum { Number, Scientific, Fraction, Currency, Percentage,
Date, Time, Boolean, Text } type;
int precision;
- QString currencySymbol;
+ TQString currencySymbol;
};
- typedef QMap<QString, NumericStyleFormat> DataFormatsMap;
+ typedef TQMap<TQString, NumericStyleFormat> DataFormatsMap;
/// Value (date/time/number...) formats found while parsing styles. Used e.g. for fields.
/// Key: format name. Value:
const DataFormatsMap& dataFormats() const { return m_dataFormats; }
- static QString saveOasisDateStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisTimeStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisFractionStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisScientificStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisNumberStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisPercentageStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const QString & _format, const QString &symbol,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisTextStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
-
- static void saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const QBrush & brush );
- static QString saveOasisHatchStyle( KoGenStyles& mainStyles, const QBrush &brush );
-
- static QBrush loadOasisFillStyle( const KoStyleStack &styleStack, const QString & fill, const KoOasisStyles & oasisStyles );
+ static TQString saveOasisDateStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisTimeStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisFractionStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisScientificStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisNumberStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisPercentageStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &symbol,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisTextStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+
+ static void saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const TQBrush & brush );
+ static TQString saveOasisHatchStyle( KoGenStyles& mainStyles, const TQBrush &brush );
+
+ static TQBrush loadOasisFillStyle( const KoStyleStack &styleStack, const TQString & fill, const KoOasisStyles & oasisStyles );
private:
/// Add styles to styles map
- void insertStyles( const QDomElement& styles, bool styleAutoStyles = false );
+ void insertStyles( const TQDomElement& styles, bool styleAutoStyles = false );
private:
- void insertOfficeStyles( const QDomElement& styles );
- void insertStyle( const QDomElement& style, bool styleAutoStyles );
- void importDataStyle( const QDomElement& parent );
- static bool saveOasisTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text, bool &antislash );
- static void parseOasisDateKlocale(KoXmlWriter &elementWriter, QString & format, QString & text );
- static bool saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text );
- static void parseOasisTimeKlocale(KoXmlWriter &elementWriter, QString & format, QString & text );
- static void addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const QString &_suffix, const QString &_prefix );
+ void insertOfficeStyles( const TQDomElement& styles );
+ void insertStyle( const TQDomElement& style, bool styleAutoStyles );
+ void importDataStyle( const TQDomElement& tqparent );
+ static bool saveOasisTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text, bool &antislash );
+ static void parseOasisDateKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static bool saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static void parseOasisTimeKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static void addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const TQString &_suffix, const TQString &_prefix );
KoOasisStyles( const KoOasisStyles & ); // forbidden
KoOasisStyles& operator=( const KoOasisStyles & ); // forbidden
private:
- QDict<QDomElement> m_styles; // page-layout, font-decl etc.
- QDict<QDomElement> m_defaultStyle;
- QDomElement m_officeStyle;
+ TQDict<TQDomElement> m_styles; // page-tqlayout, font-decl etc.
+ TQDict<TQDomElement> m_defaultStyle;
+ TQDomElement m_officeStyle;
- QDict<QDomElement> m_masterPages;
- QDict<QDomElement> m_listStyles;
+ TQDict<TQDomElement> m_masterPages;
+ TQDict<TQDomElement> m_listStyles;
- QDict<QDomElement> m_drawStyles;
+ TQDict<TQDomElement> m_drawStyles;
DataFormatsMap m_dataFormats;
class Private;