*
* @return {@link STHighlightColor} for the run.
* @since 4.0.0
+ * @deprecated use {@link #getTextHighlightColor()} instead
*/
+ @Deprecated
+ @Removal(version = "7.0.0")
public STHighlightColor.Enum getTextHightlightColor() {
+ return getTextHighlightColor();
+ }
+
+ /**
+ * Gets the highlight color for the run
+ *
+ * @return {@link STHighlightColor} for the run.
+ * @since 5.2.3
+ */
+ public STHighlightColor.Enum getTextHighlightColor() {
CTRPr pr = getRunProperties(true);
CTHighlight highlight = pr.sizeOfHighlightArray() > 0 ? pr.getHighlightArray(0) : pr.addNewHighlight();
STHighlightColor color = highlight.xgetVal();
void testSetGetTextHighlightColor() throws IOException {
try (XWPFDocument document = new XWPFDocument()) {
final XWPFRun run = document.createParagraph().createRun();
- assertSame(STHighlightColor.NONE, run.getTextHightlightColor());
+ assertSame(STHighlightColor.NONE, run.getTextHighlightColor());
assertFalse(run.isHighlighted());
run.setTextHighlightColor("darkGreen"); // See 17.18.40 ST_HighlightColor (Text Highlight Colors)
- assertSame(STHighlightColor.DARK_GREEN, run.getTextHightlightColor());
+ assertSame(STHighlightColor.DARK_GREEN, run.getTextHighlightColor());
assertTrue(run.isHighlighted());
run.setTextHighlightColor("none");
assertFalse(run.isHighlighted());