[Libreoffice-commits] core.git: 4 commits - configure.ac writerperfect/Module_writerperfect.mk writerperfect/qa writerperfect/source

David Tardon dtardon at redhat.com
Tue Jun 3 01:14:38 PDT 2014


 configure.ac                                                              |    2 
 writerperfect/Module_writerperfect.mk                                     |    3 
 writerperfect/qa/unit/data/writer/libmwaw/indeterminate/GreatWorks_v2.hqx |  180 ++++++++++
 writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx          |  180 ----------
 writerperfect/source/common/WPXSvInputStream.cxx                          |    6 
 writerperfect/source/writer/MSWorksImportFilter.cxx                       |    2 
 writerperfect/source/writer/WordPerfectImportFilter.cxx                   |    8 
 7 files changed, 190 insertions(+), 191 deletions(-)

New commits:
commit 7b91c6aaf9e0ef09ba31dee564dcee4def545549
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jun 3 10:13:32 2014 +0200

    do not disable complete test, just the one file
    
    Change-Id: I1acccba8c2ef44d76c13eadb97d03119f08baa1d

diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk
index 0321d06..9c30697 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -35,9 +35,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\
 	CppunitTest_writerperfect_calc \
 	CppunitTest_writerperfect_draw \
 	CppunitTest_writerperfect_impress \
+	CppunitTest_writerperfect_writer \
 	StaticLibrary_writerperfect_importtestbase \
 ))
 
-#disabled, breaks on Windows:	CppunitTest_writerperfect_writer \
-
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/qa/unit/data/writer/libmwaw/indeterminate/.gitignore b/writerperfect/qa/unit/data/writer/libmwaw/indeterminate/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx b/writerperfect/qa/unit/data/writer/libmwaw/indeterminate/GreatWorks_v2.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/indeterminate/GreatWorks_v2.hqx
commit d3ddcbaeef9648cff78069b8ed443d7d3d611546
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jun 3 10:11:53 2014 +0200

    drop useless const_cast
    
    Change-Id: Ie5e6f519a511931b383b6131a4a188abb3396946

diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index e2bcdc8..185ae17 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -439,7 +439,7 @@ private:
     bool mbCheckedZip;
 public:
     sal_Int64 mnLength;
-    unsigned char *mpReadBuffer;
+    const unsigned char *mpReadBuffer;
     unsigned long mnReadBufferLength;
     unsigned long mnReadBufferPos;
 };
@@ -865,7 +865,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
         mpImpl->mnReadBufferLength = numBytes;
 
     unsigned long tmpNumBytes(0);
-    mpImpl->mpReadBuffer = const_cast<unsigned char*>(mpImpl->read(mpImpl->mnReadBufferLength, tmpNumBytes));
+    mpImpl->mpReadBuffer = mpImpl->read(mpImpl->mnReadBufferLength, tmpNumBytes);
     if (tmpNumBytes != mpImpl->mnReadBufferLength)
         mpImpl->mnReadBufferLength = tmpNumBytes;
 
commit 9533611f410dd36950c69a45fb6abe7e8760b281
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jun 3 10:00:23 2014 +0200

    drop useless const_cast
    
    Change-Id: I8a14faf56303b986c3e6c8e9bec53210ae86fc87

diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index b5786bf..e2bcdc8 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -876,7 +876,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
     numBytesRead = numBytes;
 
     mpImpl->mnReadBufferPos += numBytesRead;
-    return const_cast<const unsigned char *>(mpImpl->mpReadBuffer);
+    return mpImpl->mpReadBuffer;
 }
 
 long WPXSvInputStream::tell()
commit 1031dba9e205a80de5011931b52c628881f62372
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jun 3 09:59:10 2014 +0200

    getDataStream() returns non-const ptr now
    
    Change-Id: I6d1e811622cda61575464df8e4036b388a4ab706

diff --git a/configure.ac b/configure.ac
index 8346945..7dab4cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7696,7 +7696,7 @@ AS_IF([test "$COM" = "MSC"],
       [librevenge_libdir="${WORKDIR}/LinkTarget/Library"],
       [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"]
 )
-libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"])
+libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"])
 
 dnl ===================================================================
 dnl Check for system libe-book
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 2d253fb..9217cc6 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -28,7 +28,7 @@ static bool handleEmbeddedWKSObject(const librevenge::RVNGBinaryData &data, OdfD
 {
     OdsGenerator exporter;
     exporter.addDocumentHandler(pHandler, streamType);
-    return libwps::WPSDocument::parse(const_cast<librevenge::RVNGInputStream *>(data.getDataStream()), &exporter)==libwps::WPS_OK;
+    return libwps::WPSDocument::parse(data.getDataStream(), &exporter)==libwps::WPS_OK;
 }
 
 bool MSWorksImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index c741782..58a6d6d 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -65,23 +65,23 @@ static bool handleEmbeddedWPGObject(const librevenge::RVNGBinaryData &data, OdfD
 
     libwpg::WPGFileFormat fileFormat = libwpg::WPG_AUTODETECT;
 
-    if (!libwpg::WPGraphics::isSupported(const_cast<librevenge::RVNGInputStream *>(data.getDataStream())))
+    if (!libwpg::WPGraphics::isSupported(data.getDataStream()))
         fileFormat = libwpg::WPG_WPG1;
 
-    return libwpg::WPGraphics::parse(const_cast<librevenge::RVNGInputStream *>(data.getDataStream()), &exporter, fileFormat);
+    return libwpg::WPGraphics::parse(data.getDataStream(), &exporter, fileFormat);
 }
 
 static bool handleEmbeddedWPGImage(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output)
 {
     libwpg::WPGFileFormat fileFormat = libwpg::WPG_AUTODETECT;
 
-    if (!libwpg::WPGraphics::isSupported(const_cast<librevenge::RVNGInputStream *>(input.getDataStream())))
+    if (!libwpg::WPGraphics::isSupported(input.getDataStream()))
         fileFormat = libwpg::WPG_WPG1;
 
     librevenge::RVNGStringVector svgOutput;
     librevenge::RVNGSVGDrawingGenerator aSVGGenerator(svgOutput, "");
 
-    if (!libwpg::WPGraphics::parse(const_cast<librevenge::RVNGInputStream *>(input.getDataStream()), &aSVGGenerator, fileFormat))
+    if (!libwpg::WPGraphics::parse(input.getDataStream(), &aSVGGenerator, fileFormat))
         return false;
 
     assert(1 == svgOutput.size());


More information about the Libreoffice-commits mailing list