fdo#66743 fix import of some RTF_CLSHDNG values

This should be in sync with model.xml, got broken when the somewhat
random values got fixed to be the same as the ones which are in the ww8
spec.

(Regression from 26d40686128e70916a636e20f5ccc5763bbb6cc8.)

Change-Id: Id62047e0b2d5d8402a7c8bce95de487afe627e32
This commit is contained in:
Miklos Vajna 2013-09-23 10:05:53 +02:00
parent 4dd261e526
commit 21e07d473d
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,5 @@
{\rtf1
\trowd \clshdng1500\cellx4000
\pard\plain A1\cell\row
\pard\par
}

View file

@ -69,6 +69,7 @@ public:
void testFdo66682();
void testParaShadow();
void testCharacterBorder();
void testFdo66743();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@ -127,6 +128,7 @@ void Test::run()
{"fdo66682.rtf", &Test::testFdo66682},
{"para-shadow.rtf", &Test::testParaShadow},
{"charborder.odt", &Test::testCharacterBorder},
{"fdo66743.rtf", &Test::testFdo66743},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@ -673,6 +675,14 @@ void Test::testCharacterBorder()
}
}
void Test::testFdo66743()
{
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
// This was too dark, 0x7f7f7f.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xd8d8d8), getProperty<sal_Int32>(xCell, "BackColor"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();

View file

@ -3564,8 +3564,8 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case 500: nValue = 2; break;
case 1000: nValue = 3; break;
case 1200: nValue = 27; break;
case 1500: nValue = 28; break;
case 1200: nValue = 37; break;
case 1500: nValue = 38; break;
case 2000: nValue = 4; break;
case 2500: nValue = 5; break;
case 3000: nValue = 6; break;