[Libreoffice-commits] core.git: 3 commits - filter/CppunitTest_filter_msfilter.mk filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source sw/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Sun Aug 23 10:29:20 PDT 2015


 filter/CppunitTest_filter_msfilter.mk |   46 ++++++++++++++++++++
 filter/CppunitTest_filter_utils.mk    |   46 --------------------
 filter/Module_filter.mk               |    2 
 filter/qa/cppunit/msfilter-test.cxx   |   77 ++++++++++++++++++++++++++++++++++
 filter/qa/cppunit/utils-test.cxx      |   77 ----------------------------------
 filter/source/msfilter/util.cxx       |   12 ++---
 sw/source/core/layout/paintfrm.cxx    |    4 -
 7 files changed, 132 insertions(+), 132 deletions(-)

New commits:
commit 8d933132ab01f0070225fae6cf704c9a1982e8f8
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sun Aug 23 19:15:14 2015 +0200

    tdf#91969: Parts of paragraph border is missing
    
    ...when border is around more than one paragraph
    
    Regression from:
    16f637dab3c1b5f7ac9eacf2c57347800d3fdf09
    
    Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b3e1f77..db70553 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -487,13 +487,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
     double const fMergeGap(properties.nSPixelSzW + properties.nSHalfPixelSzW); // NOT static!
     // A is above/before B
-    if( mergeA.second <= mergeB.second &&
+    if( mergeA.second <= mergeB.first &&
         mergeA.second + fMergeGap >= mergeB.first )
     {
         return 1;
     }
     // B is above/before A
-    else if( mergeB.second <= mergeA.second &&
+    else if( mergeB.second <= mergeA.first &&
              mergeB.second + fMergeGap >= mergeA.first )
     {
         return 2;
commit 9a23428ff030106c4d91ba8b6f3a68ce56b7c428
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Fri Jul 24 04:23:30 2015 +0200

    Use less operator here to be consistent with the original idea (see comment)
    
    This doesn't change the result of the BestIndex method
    
    Change-Id: If1efc04feac3d4966c126b1fa93d017a4beafbe1

diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index f7e44c0..ce51d20 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -1361,17 +1361,17 @@ namespace
 static void CalculateScheme(const BitmapColor& rBitmapColor, std::vector<int> &vScheme, sal_uInt16 nVariance)
 {
     vScheme.resize(3,1);
-    if( rBitmapColor.GetRed() > rBitmapColor.GetGreen() + nVariance )
+    if( rBitmapColor.GetRed() < rBitmapColor.GetGreen() + nVariance )
         ++vScheme[0];
-    if( rBitmapColor.GetRed() > rBitmapColor.GetBlue() + nVariance )
+    if( rBitmapColor.GetRed() < rBitmapColor.GetBlue() + nVariance )
         ++vScheme[0];
-    if( rBitmapColor.GetGreen() > rBitmapColor.GetRed() + nVariance )
+    if( rBitmapColor.GetGreen() < rBitmapColor.GetRed() + nVariance )
         ++vScheme[1];
-    if( rBitmapColor.GetGreen() > rBitmapColor.GetBlue() + nVariance )
+    if( rBitmapColor.GetGreen() < rBitmapColor.GetBlue() + nVariance )
         ++vScheme[1];
-    if( rBitmapColor.GetBlue() > rBitmapColor.GetRed() + nVariance )
+    if( rBitmapColor.GetBlue() < rBitmapColor.GetRed() + nVariance )
         ++vScheme[2];
-    if( rBitmapColor.GetBlue() > rBitmapColor.GetGreen() + nVariance )
+    if( rBitmapColor.GetBlue() < rBitmapColor.GetGreen() + nVariance )
         ++vScheme[2];
 }
 
commit 3f339c5e77881a0680552c05997db03a7587bf4b
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Thu Jul 16 21:49:55 2015 +0200

    Better to call this msfilter test
    
    Change-Id: I2abd6aedb16303d8988c17e7204c9607bf8336a3

diff --git a/filter/CppunitTest_filter_utils.mk b/filter/CppunitTest_filter_msfilter.mk
similarity index 56%
rename from filter/CppunitTest_filter_utils.mk
rename to filter/CppunitTest_filter_msfilter.mk
index 1d042a9..aa567cd 100644
--- a/filter/CppunitTest_filter_utils.mk
+++ b/filter/CppunitTest_filter_msfilter.mk
@@ -7,18 +7,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_CppunitTest_CppunitTest,filter_utils))
+$(eval $(call gb_CppunitTest_CppunitTest,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_utils))
-$(eval $(call gb_CppunitTest_use_ure,filter_utils))
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_msfilter))
+$(eval $(call gb_CppunitTest_use_ure,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_configuration,filter_utils))
+$(eval $(call gb_CppunitTest_use_configuration,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_externals,filter_utils, \
+$(eval $(call gb_CppunitTest_use_externals,filter_msfilter, \
     boost_headers \
 ))
 
-$(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
+$(eval $(call gb_CppunitTest_use_libraries,filter_msfilter, \
 	tl \
 	comphelper \
 	unotest \
@@ -29,7 +29,7 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
 	$(gb_UWINAPI) \
 ))
 
-$(eval $(call gb_CppunitTest_use_components,filter_utils,\
+$(eval $(call gb_CppunitTest_use_components,filter_msfilter,\
 	configmgr/source/configmgr \
 	filter/source/config/cache/filterconfig1 \
 	framework/util/fwk \
@@ -39,8 +39,8 @@ $(eval $(call gb_CppunitTest_use_components,filter_utils,\
 	ucb/source/ucp/file/ucpfile1 \
 ))
 
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_utils, \
-	filter/qa/cppunit/utils-test \
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_msfilter, \
+	filter/qa/cppunit/msfilter-test \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 4cb6462..4af530c 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -81,7 +81,7 @@ endif
 $(eval $(call gb_Module_add_check_targets,filter,\
     CppunitTest_filter_xslt \
     CppunitTest_filter_priority \
-    CppunitTest_filter_utils \
+    CppunitTest_filter_msfilter \
 ))
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/filter/qa/cppunit/utils-test.cxx b/filter/qa/cppunit/msfilter-test.cxx
similarity index 95%
rename from filter/qa/cppunit/utils-test.cxx
rename to filter/qa/cppunit/msfilter-test.cxx
index 5e306ef..b6706f4a 100644
--- a/filter/qa/cppunit/utils-test.cxx
+++ b/filter/qa/cppunit/msfilter-test.cxx
@@ -20,18 +20,18 @@
 
 namespace {
 
-class UtilsTest
+class MSFilterTest
     : public test::BootstrapFixtureBase
 {
 public:
     void testTransColToIco();
 
-    CPPUNIT_TEST_SUITE(UtilsTest);
+    CPPUNIT_TEST_SUITE(MSFilterTest);
     CPPUNIT_TEST(testTransColToIco);
     CPPUNIT_TEST_SUITE_END();
 };
 
-void UtilsTest::testTransColToIco()
+void MSFilterTest::testTransColToIco()
 {
     const sal_uInt32 aStdCol[] = {
         0xeeeeee, 0xffff99, 0xff6600, 0xff3333, 0xff00cc, 0xff33ff, 0x9900ff, 0x6666ff, 0x00ccff, 0x66ffff, 0x33ff99, 0x99ff66, 0xccff00,
@@ -68,7 +68,7 @@ void UtilsTest::testTransColToIco()
 
 }
 
-CPPUNIT_TEST_SUITE_REGISTRATION(UtilsTest);
+CPPUNIT_TEST_SUITE_REGISTRATION(MSFilterTest);
 
 }
 


More information about the Libreoffice-commits mailing list