Skip to content
  • Jarosław Staniek's avatar
    KoGenStyle(s) cleanup · 51f546dc
    Jarosław Staniek authored
    * KoGenStyle::Type cleanup:
    - renamed StyleUser to StyleParagraph
    - renamed StyleAuto to StyleParagraphAuto
    - move the 'Auto' to the end for the table style families
    * KoGenStyles::Flags made QFlags                         
    * KoGenStyles::lookup() -> KoGenStyles::insert()
    * move KoGenStyle::isEmpty() code to .cpp
    * use constFind(), constBegin(), constEnd() for iterators if possible
    * made some methods const
    * introduced KoGenStyles::StylesPlacement for saving odf and inserting raw styles.
    * insertRawStyles() replaces 4 methods. saveOdfStyles() replaces 4 other methods.
    * KoGenStyle::N_NumTypes -> KoGenStyle::N_NumPropertyTypes
    * added KoGenStyle::N_NumTypes
    * KoGenStyles: StyleArray -> QList<KoGenStyles::NamedStyle>
    * KoGenStyles: NameMap typedef removed, using just QSet<QString> is clear
    * To minimize size of the patch, I am noting down remaining possible TODOs:
    * Implemented qDebug() for KoGenStyles instead of dump()
    * Added KoGenStyles::FontFaceDecls to enum KoGenStyles::StylesPlacement, so
    - removed void KoGenStyles::saveOdfFontFaceDecls(KoXmlWriter* xmlWriter) const; for the same result use KoGenStyles::saveOdfStyles(FontFaceDecls, xmlWriter)
    - it's possible to add font faces using raw XML in insertRawOdfStyles()
    - moved private methods to the Private class
    * Added other proposed improvements
    * Use Style and AutoStyle suffixes for Type enum
    * Updated the whole koffice code for the KoGenStyle(s) change
    
    Revieweing, testing:
    *reviewed and approved by Jos; http://reviewboard.kde.org/r/3090/
    *builds agains trunk, checked if there's no change in semantics, relevant unit tests updated and passed
    *while global search/replace was executed to port to the new API, the change has been reviewed line-by-line too
    
    
    svn path=/trunk/koffice/; revision=1108989
    51f546dc