[Libreoffice-commits] core.git: vcl/osx vcl/qa
vcl/osx/saldata.cxx |4 ++-- vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx | 22 -- vcl/qa/cppunit/outdev.cxx|4 ++-- 3 files changed, 8 insertions(+), 22 deletions(-) New commits: commit 3a8d16ba8ca7ef7349e893f2bf1c7e12d9a8d7ae Author: Chris Sherlock AuthorDate: Sat Nov 16 03:19:48 2019 +1100 Commit: Tomaž Vajngerl CommitDate: Sun Nov 17 15:54:29 2019 +0100 tdf#128847 - vcl: fix colorspace names for MacOS kCGColorSpaceGenericGray is deprecated and should be kCGColorSpaceGenericGrayGamma2_2, and kCGColorSpaceGenericRGB is similary deprecated and now should be kCGColorSpaceSRGB. This fixes the "color skew" issue found in a variety of tests. Change-Id: I8088b2377e03cde3f8e03e9d3778a40fc3081c4a Reviewed-on: https://gerrit.libreoffice.org/82809 Tested-by: Julien Nabet Reviewed-by: Tomaž Vajngerl diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx index ef46d6f4aa60..5235f657f8ca 100644 --- a/vcl/osx/saldata.cxx +++ b/vcl/osx/saldata.cxx @@ -51,8 +51,8 @@ SalData::SalData() mpFirstPrinter( nullptr ), mpFontList( nullptr ), mpStatusItem( nil ), -mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB) ), -mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGray) ), +mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceSRGB) ), +mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2) ), maCursors(), mbIsScrollbarDoubleMax( false ), #if !HAVE_FEATURE_MACOSX_SANDBOX diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx index bc8bdc6c06a1..71bfc40265b5 100644 --- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx +++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx @@ -71,11 +71,9 @@ void BitmapRenderTest::testTdf104141() // Check drawing results: ensure that it contains transparent // (greenish) pixels -#if !defined MACOSX //TODO: on Mac colors are drifted, so exact compare fails const Color aColor = pVDev->GetPixel(Point(21, 21)); CPPUNIT_ASSERT(aColor.GetGreen() > 10 * aColor.GetRed() && aColor.GetGreen() > 10 * aColor.GetBlue()); -#endif } void BitmapRenderTest::testTdf113918() @@ -188,10 +186,7 @@ void BitmapRenderTest::testAlphaVirtualDevice() aColor = pAlphaVirtualDevice->GetPixel(Point(1, 1)); // Read back the opaque pixel -#ifdef MACOSX -// Oh no... what we input is not the same as what we get out! -CPPUNIT_ASSERT_EQUAL(Color(0x002Cff44), aColor); -#elif defined _WIN32 +#if defined _WIN32 CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x0022ff55), aColor)); #else CPPUNIT_ASSERT_EQUAL(Color(0x0022ff55), aColor); @@ -203,10 +198,7 @@ void BitmapRenderTest::testAlphaVirtualDevice() CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height()); aColor = aBitmap.GetPixelColor(1, 1); -#ifdef MACOSX -// Oh no... what we input is not the same as what we get out! -CPPUNIT_ASSERT_EQUAL(Color(0x002Cff44), aColor); -#elif defined _WIN32 +#if defined _WIN32 CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x0022ff55), aColor)); #else CPPUNIT_ASSERT_EQUAL(Color(0x0022ff55), aColor); @@ -217,10 +209,7 @@ void BitmapRenderTest::testAlphaVirtualDevice() aColor = pAlphaVirtualDevice->GetPixel(Point(0, 0)); // Read back the semi-transparent pixel -#ifdef MACOSX -// Oh no... what we input is not the same as what we get out! -CPPUNIT_ASSERT_EQUAL(Color(0x342CFF44), aColor); -#elif defined _WIN32 +#if defined _WIN32 CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x4422FF55), aColor)); #else CPPUNIT_ASSERT_EQUAL(Color(0x4422FF55), aColor); @@ -232,10 +221,7 @@ void BitmapRenderTest::testAlphaVirtualDevice() CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height()); aColor = aBitmap.GetPixelColor(0, 0); -#ifdef MACOSX -// Oh no... what we input is not the same as what we get out! -CPPUNIT_ASSERT_EQUAL(Color(0x342CFF44), aColor); -#elif defined _WIN32 +#if defined _WIN32 CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x4422FF55), aColor)); #else CPPUNIT_ASSERT_EQUAL(Color(0x4422FF55), aColor); diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index e6a6b8f1c5f6..f4a27b0b0558 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -100,7 +100,7 @@ void VclOutdevTest::testVirtualDevice() #endif CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(0,0))); -#if defined LINUX //TODO: various failures on Mac and Windows tinderboxes +#if !defined _WIN32 //TODO: various failures on Windows tinderboxes CPPUNIT_ASSERT_EQUAL(COL_BLUE, pVDev->GetPixel(Point(1,2))); CPPUNIT_ASSERT_EQUAL(COL_RED, pVDev->GetPixel(Point(31,30))); #endif @@ -109,7 +109,7 @@ void VclOutdevTest::testVirtualDevice() // Gotcha: y and x swap for BitmapReadAccess: deep joy. Bi
[Libreoffice-commits] core.git: vcl/osx vcl/qa
vcl/osx/documentfocuslistener.cxx |2 +- vcl/qa/cppunit/canvasbitmaptest.cxx |1 - 2 files changed, 1 insertion(+), 2 deletions(-) New commits: commit 557da0b7d8e30da4b0e3a0c630383afd79b5bf85 Author: Noel Grandin Date: Tue Dec 6 12:32:49 2016 +0200 remove some ascii art and demote a SAL_WARN Change-Id: Ia4d084a598aca050cda02c17d11ed97eecef7650 diff --git a/vcl/osx/documentfocuslistener.cxx b/vcl/osx/documentfocuslistener.cxx index de9ebaa..3fa2c0b 100644 --- a/vcl/osx/documentfocuslistener.cxx +++ b/vcl/osx/documentfocuslistener.cxx @@ -77,8 +77,8 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) Reference< XAccessible > xAccessible( getAccessible(aEvent) ); detachRecursive(xAccessible); attachRecursive(xAccessible); +SAL_INFO("vcl", "Invalidate all children called" ); } -SAL_WARN("vcl", "Invalidate all children called" ); break; default: diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index e8c6b21..f069ab6 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -82,7 +82,6 @@ void checkCanvasBitmap( const rtl::Reference& xBmp, const char*msg, intnOriginalDepth ) { -SAL_INFO("vcl", "-"); SAL_INFO("vcl", "Testing " << msg << ", with depth " << nOriginalDepth); BitmapEx aContainedBmpEx( xBmp->getBitmapEx() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/osx vcl/qa vcl/quartz vcl/source vcl/unx
vcl/osx/documentfocuslistener.cxx |4 - vcl/qa/cppunit/canvasbitmaptest.cxx |4 - vcl/quartz/salbmp.cxx |2 vcl/source/app/svapp.cxx|2 vcl/source/control/quickselectionengine.cxx |4 - vcl/source/control/tabctrl.cxx |2 vcl/source/gdi/bitmapex.cxx |2 vcl/source/gdi/configsettings.cxx |9 --- vcl/source/gdi/gdimtf.cxx |9 +-- vcl/source/gdi/pdfwriter_impl2.cxx |6 +- vcl/source/gdi/pngread.cxx |2 vcl/source/gdi/textlayout.cxx |2 vcl/source/window/dndeventdispatcher.cxx|8 +- vcl/unx/generic/gdi/salgdi.cxx |2 vcl/unx/generic/print/genprnpsp.cxx | 12 ++-- vcl/unx/generic/printer/cupsmgr.cxx | 14 +--- vcl/unx/generic/printer/ppdparser.cxx | 36 +++- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx| 83 +++- vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx |3 - vcl/unx/gtk/fpicker/SalGtkPicker.cxx|2 vcl/unx/kde4/KDE4FilePicker.cxx | 14 ++-- 21 files changed, 77 insertions(+), 145 deletions(-) New commits: commit 4e182284510a5fc76c1343bfa432780dc4cd609d Author: Noel Grandin Date: Tue Dec 6 10:00:27 2016 +0200 OSL_TRACE -> SAL_ in vcl Change-Id: Icd317671a6b1b5356f0ccc7c59d50952fe20269b Reviewed-on: https://gerrit.libreoffice.org/31667 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/vcl/osx/documentfocuslistener.cxx b/vcl/osx/documentfocuslistener.cxx index 9009511..de9ebaa 100644 --- a/vcl/osx/documentfocuslistener.cxx +++ b/vcl/osx/documentfocuslistener.cxx @@ -78,7 +78,7 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) detachRecursive(xAccessible); attachRecursive(xAccessible); } -OSL_TRACE( "Invalidate all children called\n" ); +SAL_WARN("vcl", "Invalidate all children called" ); break; default: @@ -87,7 +87,7 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) } catch (const IndexOutOfBoundsException&) { -OSL_TRACE("Focused object has invalid index in parent"); +SAL_WARN("vcl", "Focused object has invalid index in parent"); } } diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index 7198b09..e8c6b21 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -82,8 +82,8 @@ void checkCanvasBitmap( const rtl::Reference& xBmp, const char*msg, intnOriginalDepth ) { -OSL_TRACE("-"); -OSL_TRACE("Testing %s, with depth %d", msg, nOriginalDepth); +SAL_INFO("vcl", "-"); +SAL_INFO("vcl", "Testing " << msg << ", with depth " << nOriginalDepth); BitmapEx aContainedBmpEx( xBmp->getBitmapEx() ); Bitmap aContainedBmp( aContainedBmpEx.GetBitmap() ); diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index 86c4dab..dc9b683 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -994,7 +994,7 @@ bool QuartzSalBitmap::GetSystemData( BitmapSystemData& rData ) /** * We need to hack things because VCL does not use kCGBitmapByteOrder32Host, while Cairo requires it. */ -OSL_TRACE("QuartzSalBitmap::%s(): kCGBitmapByteOrder32Host not found => inserting it.",__func__); +SAL_INFO("vcl.cg", "QuartzSalBitmap::" << __func__ << "(): kCGBitmapByteOrder32Host not found => inserting it."); CGImageRef xImage = CGBitmapContextCreateImage (mxGraphicContext); SAL_INFO("vcl.cg", "CGBitmapContextCreateImage(" << mxGraphicContext << ") = " << xImage ); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index af80c7c..7b06b5d 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1662,7 +1662,7 @@ void Application::ShowNativeErrorBox(const OUString& sTitle , sTitle, sMessage); if (btn != SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK) { -OSL_TRACE("ShowNativeMessageBox returned %d", btn); +SAL_WARN( "vcl", "ShowNativeMessageBox returned " << btn); } } diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx index e476950..3bd1574 100644 --- a/vcl/source/control/quickselectionengine.cxx +++ b/vcl/source/control/quickselectionengine.cxx @@ -118,7 +118,7 @@ namespace vcl if ( ( c >= 32 ) && ( c != 127 ) && !_keyEvent.GetKeyCode().IsMod2() ) { m_pData->sCurrentSearchString += OUStringLiteral1(c); -OSL_TRACE( "QuickSelectionEngine::Handle