[Libreoffice-commits] .: 2 commits - basic/source sw/qa writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 21 03:11:20 PDT 2012


 basic/source/runtime/dllmgr.hxx                |    6 +++---
 sw/qa/extras/rtfimport/data/fdo52389.rtf       |    3 +++
 sw/qa/extras/rtfimport/rtfimport.cxx           |    9 +++++++++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    2 ++
 4 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit ebf0e1953ef422bb83201c89f0558bb9071edf63
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Fri Sep 21 11:58:02 2012 +0200

    fdo#52389 fix RTF import of paragraph without RTF_PAR at the end of the doc
    
    Change-Id: Ib7b48986d5b01c75ae0be8dd6618a2e8be2ae51c

diff --git a/sw/qa/extras/rtfimport/data/fdo52389.rtf b/sw/qa/extras/rtfimport/data/fdo52389.rtf
new file mode 100644
index 0000000..37fbb2a
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo52389.rtf
@@ -0,0 +1,3 @@
+{\rtf1
+\pard\par
+dania!}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4378353..9d56761 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -110,6 +110,7 @@ public:
     void testAllGapsWord();
     void testFdo52052();
     void testInk();
+    void testFdo52389();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -159,6 +160,7 @@ public:
     CPPUNIT_TEST(testAllGapsWord);
     CPPUNIT_TEST(testFdo52052);
     CPPUNIT_TEST(testInk);
+    CPPUNIT_TEST(testFdo52389);
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -961,6 +963,13 @@ void Test::testInk()
     CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xDraws->getByIndex(0), "Surround"));
 }
 
+void Test::testFdo52389()
+{
+    // The last '!' character at the end of the document was lost
+    load("fdo52389.rtf");
+    CPPUNIT_ASSERT_EQUAL(6, getLength());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4acaad9..f8200ff 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3774,6 +3774,8 @@ int RTFDocumentImpl::popState()
     // This is the end of the doc, see if we need to close the last section.
     if (m_pTokenizer->getGroup() == 1 && !m_bFirstRun)
     {
+        if (m_bNeedCr)
+            dispatchSymbol(RTF_PAR);
         m_bDeferredContSectBreak = false;
         sectBreak(true);
     }
commit 991b8394ffe598ec3b17968184fe60eb2cc04cc9
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Sep 21 19:05:16 2012 +0900

    replace deprecated std::auto_ptr with boost::scoped_ptr
    
    Change-Id: Id10a6cef0ae25247ded7846dfd7df27922a9410a

diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx
index cc0c7fc..5a88034 100644
--- a/basic/source/runtime/dllmgr.hxx
+++ b/basic/source/runtime/dllmgr.hxx
@@ -22,10 +22,10 @@
 
 #include "sal/config.h"
 
-#include <memory>
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
 
 #include "basic/sberrors.hxx"
-#include "boost/noncopyable.hpp"
 
 namespace rtl { class OUString; }
 class SbxArray;
@@ -46,7 +46,7 @@ public:
 private:
     struct Impl;
 
-    std::auto_ptr< Impl > impl_;
+    boost::scoped_ptr< Impl > impl_;
 };
 
 #endif


More information about the Libreoffice-commits mailing list