diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-11-07 21:41:33 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-10 11:47:22 +0000 |
commit | cec647c42a07091d946723cdf711aa3b56d0b6cf (patch) | |
tree | a0f0a3f551b1b652156e7bef4d3a1a1715b19b28 /vcl/unx | |
parent | 0ecbe22d290ca14cfccaa239ad67309e5d14784d (diff) |
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/19836
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index b86fa3792bf6..49e00de430b9 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -52,6 +52,7 @@ #include <vcl/settings.hxx> #include <unx/salunx.h> +#include <sal/log.hxx> #include <sal/types.h> #include "unx/i18n_im.hxx" #include "unx/i18n_xkb.hxx" @@ -1865,7 +1866,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture ) 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; } } @@ -2744,9 +2745,9 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const if( !m_aPalette.empty() && nPixel < m_nUsed ) 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; } |