[Libreoffice-commits] core.git: cui/source

Shubham Goyal (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 08:20:23 UTC 2020


 cui/source/dialogs/iconcdlg.cxx |   27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

New commits:
commit f61e5e85c6bc3337eabfe3b9b69c4c1a3abf08e7
Author:     Shubham Goyal <22shubh22 at gmail.com>
AuthorDate: Sun Jan 26 13:25:38 2020 +0530
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Feb 12 09:19:46 2020 +0100

    tdf#43157 Clean up DBG_ASSERT
    
    Change-Id: Ie41f91f873d7cada5e738d758ad6b677adcee989
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87428
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 7f36bd8ddc85..fdeb3a36b780 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -20,6 +20,7 @@
 #include <iconcdlg.hxx>
 #include <cuihyperdlg.hxx>
 
+#include <cassert>
 #include <sal/log.hxx>
 #include <vcl/svapp.hxx>
 
@@ -121,7 +122,7 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ResetHdl, weld::Button&, void)
     ResetPageImpl ();
 
     IconChoicePageData* pData = GetPageData ( msCurrentPageId );
-    DBG_ASSERT( pData, "ID not known" );
+    assert( pData && "ID not known " );
 
     pData->xPage->Reset( *pSet );
 }
@@ -133,22 +134,20 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ResetHdl, weld::Button&, void)
 \**********************************************************************/
 void SvxHpLinkDlg::ActivatePageImpl()
 {
-    DBG_ASSERT( !maPageList.empty(), "no Pages registered" );
+    assert( !maPageList.empty() && "no Pages registered " );
     IconChoicePageData* pData = GetPageData ( msCurrentPageId );
-    DBG_ASSERT( pData, "ID not known" );
-    if ( pData )
-    {
-        if ( pData->bRefresh )
-        {
-            pData->xPage->Reset( *pSet );
-            pData->bRefresh = false;
-        }
+    assert( pData && "ID not known " );
 
-        if ( pExampleSet )
-            pData->xPage->ActivatePage( *pExampleSet );
-        m_xDialog->set_help_id(pData->xPage->GetHelpId());
+    if ( pData->bRefresh )
+    {
+        pData->xPage->Reset( *pSet );
+        pData->bRefresh = false;
     }
 
+    if ( pExampleSet )
+        pData->xPage->ActivatePage( *pExampleSet );
+    m_xDialog->set_help_id(pData->xPage->GetHelpId());
+
     m_xResetBtn->show();
 }
 
@@ -216,7 +215,7 @@ void SvxHpLinkDlg::ResetPageImpl ()
 {
     IconChoicePageData *pData = GetPageData ( msCurrentPageId );
 
-    DBG_ASSERT( pData, "ID not known" );
+    assert( pData && "ID not known " );
 
     pData->xPage->Reset( *pSet );
 }


More information about the Libreoffice-commits mailing list