Kaydet (Commit) cec647c4 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

vcl: We see what you meant by DBG_ASSERT(true, ...)

This also makes SalColormap::GetColor() return an RGB color
if m_hColormap is valid.

Change-Id: I154dc43a2be54f7da473263f9f2a29db0cf2fd4b
Reviewed-on: https://gerrit.libreoffice.org/19836Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0ecbe22d
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <unx/salunx.h> #include <unx/salunx.h>
#include <sal/log.hxx>
#include <sal/types.h> #include <sal/types.h>
#include "unx/i18n_im.hxx" #include "unx/i18n_im.hxx"
#include "unx/i18n_xkb.hxx" #include "unx/i18n_xkb.hxx"
...@@ -1865,7 +1866,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture ) ...@@ -1865,7 +1866,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture )
if( ret != GrabSuccess ) if( ret != GrabSuccess )
{ {
DBG_ASSERT( true, "SalDisplay::CaptureMouse could not grab pointer\n"); SAL_WARN("vcl", "SalDisplay::CaptureMouse could not grab pointer: " << ret);
return -1; return -1;
} }
} }
...@@ -2744,9 +2745,9 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const ...@@ -2744,9 +2745,9 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const
if( !m_aPalette.empty() && nPixel < m_nUsed ) if( !m_aPalette.empty() && nPixel < m_nUsed )
return m_aPalette[nPixel]; return m_aPalette[nPixel];
if( m_hColormap ) if( !m_hColormap )
{ {
DBG_ASSERT( true, "SalColormap::GetColor() !hColormap_\n" ); SAL_WARN("vcl", "SalColormap::GetColor() !m_hColormap");
return nPixel; return nPixel;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment