[Libreoffice-commits] core.git: 2 commits - instsetoo_native/util sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Apr 17 02:37:59 PDT 2015


 instsetoo_native/util/openoffice.lst.in        |    4 ++--
 sw/qa/extras/rtfimport/data/tdf86182.rtf       |    4 ++++
 sw/qa/extras/rtfimport/rtfimport.cxx           |    7 +++++++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 06a2e00c1a3c00cb40700f61f7cd61ac6681a7c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Apr 17 11:32:10 2015 +0200

    instsetoo_native: also keep profile at 4 here
    
    Change-Id: I29f7efd065805b12199b8a6a3aadcf62cdcecee7

diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index fc2e98b..46176a9 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -51,7 +51,7 @@ LibreOffice
             POSTVERSIONEXTENSION
             BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@
             BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR@
-            USERDIRPRODUCTVERSION @LIBO_VERSION_MAJOR@
+            USERDIRPRODUCTVERSION 4
             ABOUTBOXPRODUCTVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
             ABOUTBOXPRODUCTVERSIONSUFFIX @LIBO_VERSION_SUFFIX_SUFFIX@
             BASEPRODUCTVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR@
@@ -98,7 +98,7 @@ LibreOffice_Dev
             POSTVERSIONEXTENSION
             BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@
             BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR@
-            USERDIRPRODUCTVERSION @LIBO_VERSION_MAJOR@
+            USERDIRPRODUCTVERSION 4
             ABOUTBOXPRODUCTVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
             ABOUTBOXPRODUCTVERSIONSUFFIX @LIBO_VERSION_SUFFIX_SUFFIX@
             BASEPRODUCTVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR@
commit 4ee2a882dddb395a816cd54004b634d57cfb2446
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Apr 17 10:44:47 2015 +0200

    tdf#86182 RTF import: fix handling of \rtlpar
    
    Commit 558d5c25a0b1d6a937d33291a4b6cd7fca6cb15b (implement RTF_LTRPAR
    and RTF_RTLPAR, 2011-06-09) was just a guess, this one is the proper
    mapping.
    
    Change-Id: I1156ef5ddc34264d761d3e64dd0537bc6ec0ced7

diff --git a/sw/qa/extras/rtfimport/data/tdf86182.rtf b/sw/qa/extras/rtfimport/data/tdf86182.rtf
new file mode 100644
index 0000000..d63c489
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf86182.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\rtlpar
+\u1662\'3f\u1587\'3f
+\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index c579403..f4c14c7 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -46,6 +46,7 @@
 #include <com/sun/star/text/WrapTextMode.hpp>
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 
 #include <rtl/ustring.hxx>
@@ -2238,6 +2239,12 @@ DECLARE_RTFIMPORT_TEST(mathtype, "mathtype.rtf")
     CPPUNIT_ASSERT(!aFormula.isEmpty());
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf86182, "tdf86182.rtf")
+{
+    // Writing mode was the default, i.e. text::WritingMode2::CONTEXT.
+    CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>(getParagraph(1), "WritingMode"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8550613..4965e13 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3021,7 +3021,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     case RTF_RTLPAR:
     {
         auto pValue = std::make_shared<RTFValue>(nKeyword == RTF_LTRPAR ? 0 : 1);
-        m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_textDirection, pValue);
+        m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_bidi, pValue);
     }
     break;
     case RTF_LTRROW:


More information about the Libreoffice-commits mailing list