~ubuntu-branches/ubuntu/maverick/notecase/maverick

« back to all changes in this revision

Viewing changes to src/lib/FmtInfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Van Wambeke
  • Date: 2008-05-29 20:20:17 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080529202017-kp2a07u83prpz0id
Tags: 1.9.1-0ubuntu1
New Upstream Release (LP: #230041)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        FmtInfoList();
58
58
        virtual ~FmtInfoList();
59
59
 
60
 
        static bool IsStartTag(int nFormatTag);
61
 
        static int  CalcFormatEndTag(int nFormatTag);
62
 
        static int      CalcFormatStartTag(int nFormatTag);
63
 
        static int      CalcOppositeTag(int nFormatTag);
 
60
        void operator =(const std::vector<FmtInfo> &other);
 
61
 
 
62
        //TOFIX move to FmtInfo?
 
63
        static inline bool IsStartTag(int nFormatTag){
 
64
                return (nFormatTag%2 == 1); //odd code belongs to start tags
 
65
        }
 
66
        static inline int  CalcFormatEndTag(int nFormatTag){
 
67
                if(IsStartTag(nFormatTag))
 
68
                        return nFormatTag+1;
 
69
                return -1;
 
70
        }
 
71
        static inline int       CalcFormatStartTag(int nFormatTag){
 
72
                if(!IsStartTag(nFormatTag))
 
73
                        return nFormatTag-1;
 
74
                return -1;
 
75
        }
 
76
        static inline int       CalcOppositeTag(int nFormatTag){
 
77
                if(IsStartTag(nFormatTag))
 
78
                        return CalcFormatEndTag(nFormatTag);
 
79
                return CalcFormatStartTag(nFormatTag);
 
80
        }
64
81
 
65
82
        void Sort();
66
83