[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Sep 30 06:37:21 PDT 2013


 sw/qa/extras/rtfexport/data/fdo66743.rtf       |    5 +++++
 sw/qa/extras/rtfexport/rtfexport.cxx           |   10 ++++++++++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    4 ++--
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit bbf96f4feb309f94741e76bd92ec06f25d3e9734
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Sep 23 10:05:53 2013 +0200

    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.)
    
    (cherry picked from commit 21e07d473d1ce995ca0f1d0ac0edb03e75a7dfc1)
    
    Conflicts:
    	sw/qa/extras/rtfexport/rtfexport.cxx
    
    Change-Id: Id62047e0b2d5d8402a7c8bce95de487afe627e32
    Reviewed-on: https://gerrit.libreoffice.org/6091
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/rtfexport/data/fdo66743.rtf b/sw/qa/extras/rtfexport/data/fdo66743.rtf
new file mode 100644
index 0000000..81ffc77
--- /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 fafa4f1..442665f 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -65,6 +65,7 @@ public:
     void testTextFrameBorders();
     void testTextframeGradient();
     void testFdo66682();
+    void testFdo66743();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -119,6 +120,7 @@ void Test::run()
         {"textframe-borders.rtf", &Test::testTextFrameBorders},
         {"textframe-gradient.rtf", &Test::testTextframeGradient},
         {"fdo66682.rtf", &Test::testFdo66682},
+        {"fdo66743.rtf", &Test::testFdo66743},
     };
     // Don't test the first import of these, for some reason those tests fail
     const char* aBlacklist[] = {
@@ -605,6 +607,14 @@ void Test::testFdo66682()
     CPPUNIT_ASSERT_EQUAL(OUString(" "), aSuffix);
 }
 
+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 8ca130b..59e138b 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3512,8 +3512,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;


More information about the Libreoffice-commits mailing list