24 #ifndef __IRunInStylesUtils__ 25 #define __IRunInStylesUtils__ 27 #include "IPMUnknown.h" 47 { fCharStyles.push_back(cs); }
48 RunInStyleResult(
UID cs, int32 len, int32 ndx, int32 lc) : fLength(len), fLineRuleIndex(ndx), fLinesCount(lc)
49 { fCharStyles.push_back(cs); }
53 UID CharStyle(uint32 i)
const 54 {
return (i < fCharStyles.size()) ? fCharStyles[i] : kInvalidUID; }
56 {
return fCharStyles; }
58 {
return fCharStyles; }
65 int32 LineRuleIndex()
const 66 {
return fLineRuleIndex; }
67 int16& LineRuleIndex()
68 {
return fLineRuleIndex; }
70 int32 LinesCount()
const 71 {
return fLinesCount; }
73 {
return fLinesCount; }
92 void Append(
UID cs, int32 len, int32 lineRule, int32 linesCount)
94 if (empty() || back().LineRuleIndex() != lineRule)
99 if (list.empty() || list.size() > 1 || list[0] != cs)
102 back().Length() += len;
106 void Append(
UID cs, int32 len)
108 if (empty() || back().LineRuleIndex() >= 0)
113 if (list.empty() || list.size() > 1 || list[0] != cs)
116 back().Length() += len;
121 { erase(begin(), begin() + 1); }
132 enum { kDefaultIID = IID_IRUNINSTYLESUTILS };
154 int32 *pParagraphLengthLeft = nil, bool16 moveBackwards = kFalse) = 0;
190 #endif // __IRunInStylesUtils__