RunIndex colorRunIndex;
RunIndex fontRunIndex;
RunIndex underlinedCharacterRunIndex;
+ RunIndex backgroundColorRunIndex;
bool isColorDefined;
bool isFontDefined;
bool isUnderlinedCharacterDefined;
+ bool isBackgroundColorDefined;
};
/**
span.isFontDefined = false;
span.underlinedCharacterRunIndex = 0u;
span.isUnderlinedCharacterDefined = false;
+ span.backgroundColorRunIndex = 0u;
+ span.isBackgroundColorDefined = false;
}
/**
Vector<ColorRun>& colorRuns,
Vector<FontDescriptionRun>& fontRuns,
Vector<UnderlinedCharacterRun>& underlinedCharacterRuns,
+ Vector<ColorRun>& backgroundColorRuns,
RunIndex& colorRunIndex,
RunIndex& fontRunIndex,
RunIndex& underlinedCharacterRunIndex,
+ RunIndex& backgroundColorRunIndex,
const CharacterIndex characterIndex,
int& tagReference)
{
UnderlinedCharacterRun underlinedCharacterRun;
Initialize(underlinedCharacterRun);
+ ColorRun backgroundColorRun;
+ Initialize(backgroundColorRun);
+
Span span;
Initialize(span);
colorRun.characterRun.characterIndex = characterIndex;
fontRun.characterRun.characterIndex = characterIndex;
underlinedCharacterRun.characterRun.characterIndex = characterIndex;
+ backgroundColorRun.characterRun.characterIndex = characterIndex;
span.colorRunIndex = colorRunIndex;
span.fontRunIndex = fontRunIndex;
span.underlinedCharacterRunIndex = underlinedCharacterRunIndex;
+ span.backgroundColorRunIndex = backgroundColorRunIndex;
- ProcessSpanTag(spanTag, colorRun, fontRun, underlinedCharacterRun, span.isColorDefined, span.isFontDefined, span.isUnderlinedCharacterDefined);
+ ProcessSpanTag(spanTag, colorRun, fontRun, underlinedCharacterRun, backgroundColorRun, span.isColorDefined, span.isFontDefined, span.isUnderlinedCharacterDefined, span.isBackgroundColorDefined);
// Push the span into the stack.
spanStack.Push(span);
++underlinedCharacterRunIndex;
}
+ if(span.isBackgroundColorDefined)
+ {
+ // Push the run in the logical model.
+ backgroundColorRuns.PushBack(backgroundColorRun);
+ ++backgroundColorRunIndex;
+ }
+
// Increase reference
++tagReference;
}
underlinedCharacterRun.characterRun.numberOfCharacters = characterIndex - underlinedCharacterRun.characterRun.characterIndex;
}
+ if(span.isBackgroundColorDefined)
+ {
+ ColorRun& backgroundColorRun = *(backgroundColorRuns.Begin() + span.backgroundColorRunIndex);
+ backgroundColorRun.characterRun.numberOfCharacters = characterIndex - backgroundColorRun.characterRun.characterIndex;
+ }
+
--tagReference;
}
}
}
else if(TokenComparison(XHTML_SPAN_TAG, tag.buffer, tag.length))
{
- ProcessSpanForRun(tag, spanStack, markupProcessData.colorRuns, markupProcessData.fontRuns, markupProcessData.underlinedCharacterRuns, colorRunIndex, fontRunIndex, underlinedCharacterRunIndex, characterIndex, spanTagReference);
+ ProcessSpanForRun(tag, spanStack, markupProcessData.colorRuns, markupProcessData.fontRuns, markupProcessData.underlinedCharacterRuns, markupProcessData.backgroundColorRuns, colorRunIndex, fontRunIndex, underlinedCharacterRunIndex, backgroundRunIndex, characterIndex, spanTagReference);
}
else if(TokenComparison(XHTML_STRIKETHROUGH_TAG, tag.buffer, tag.length))
{