summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-09-23 10:05:53 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-09-23 10:39:44 +0200
commit21e07d473d1ce995ca0f1d0ac0edb03e75a7dfc1 (patch)
treed476fcc35b975a6c23abe311d11525c103e1b754
parent4dd261e526f43a364c645e7022c49b61c8001a39 (diff)
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
-rw-r--r--sw/qa/extras/rtfexport/data/fdo66743.rtf5
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx10
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx4
3 files changed, 17 insertions, 2 deletions
diff --git a/sw/qa/extras/rtfexport/data/fdo66743.rtf b/sw/qa/extras/rtfexport/data/fdo66743.rtf
new file mode 100644
index 000000000000..81ffc7749cfd
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo66743.rtf
@@ -0,0 +1,5 @@
+{\rtf1
+\trowd \clshdng1500\cellx4000
+\pard\plain A1\cell\row
+\pard\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 64eb1beb3122..1951ddbc3809 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -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();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index d73c5bd600fe..d3614b92cb05 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -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;