Kaydet (Commit) c412cba2 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#61909 fix import of RTF_HIGHLIGHT

It's an index in the color table, not a color value.

Change-Id: Ifa7b14e88231e5053c84dfbdd9b453715df1aaa6
üst aebfd023
......@@ -2,5 +2,27 @@
{\fonttbl
{\f000 Courier New;}
}
#include<iostream.h>\par
{\colortbl
\red000\green000\blue000;
\red255\green255\blue255;
\red255\green128\blue000;
\red255\green255\blue255;
\red000\green000\blue255;
\red255\green255\blue255;
\red128\green128\blue128;
\red255\green255\blue255;
\red128\green128\blue128;
\red255\green255\blue255;
\red128\green064\blue000;
\red255\green255\blue255;
\red000\green000\blue128;
\red255\green255\blue255;
\red000\green000\blue000;
\red255\green255\blue255;
\red128\green000\blue255;
\red255\green255\blue255;
\red000\green000\blue000;
\red255\green255\blue255;
}
\highlight11 #include<iostream.h>\par
}
......@@ -1171,7 +1171,10 @@ void Test::testFdo60722()
void Test::testFdo61909()
{
uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
// Was the Writer default font.
CPPUNIT_ASSERT_EQUAL(OUString("Courier New"), getProperty<OUString>(xTextRange, "CharFontName"));
// Was 0x008000.
CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<sal_uInt32>(xTextRange, "CharBackColor"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
......
......@@ -2841,7 +2841,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case RTF_HIGHLIGHT:
{
RTFValue::Pointer_t pValue(new RTFValue(nParam));
RTFValue::Pointer_t pValue(new RTFValue(getColorTable(nParam)));
m_aStates.top().aCharacterSprms.set(NS_sprm::LN_CHighlight, pValue);
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment