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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 6 12:55:09 UTC 2020


 extensions/source/propctrlr/propertyeditor.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit aa528eadbf3f1fa46390ad5b25e0f4e3c89e0382
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 6 11:08:28 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 6 13:54:37 2020 +0100

    Related: tdf#129484 overeager assert
    
    its ok to show a page that's already shown
    
    Change-Id: Iaf014669fcfbb4f91dd114fe8053ac4f91617b6c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86267
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 9a38153cd44d..9629e3d35dc7 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -302,12 +302,11 @@ namespace pcr
 
     void OPropertyEditor::ShowPropertyPage(sal_uInt16 nPageId, bool bShow)
     {
+        assert((m_aHiddenPages.find(nPageId) != m_aHiddenPages.end() ||
+                m_aShownPages.find(nPageId) != m_aShownPages.end()) && "page doesn't exist");
         OString sIdent(OString::number(nPageId));
         if (!bShow)
         {
-            assert(m_aHiddenPages.find(nPageId) == m_aHiddenPages.end() && "OPropertyEditor::ShowPropertyPage: page already hidden!");
-            assert(m_aShownPages.find(nPageId) != m_aShownPages.end() && "OPropertyEditor::ShowPropertyPage: page not shown to hide!");
-
             auto aPagePos = m_aShownPages.find(nPageId);
             if (aPagePos != m_aShownPages.end())
             {
@@ -320,9 +319,6 @@ namespace pcr
         }
         else
         {
-            assert(m_aShownPages.find(nPageId) == m_aShownPages.end() && "OPropertyEditor::ShowPropertyPage: page already shown!");
-            assert(m_aHiddenPages.find(nPageId) != m_aHiddenPages.end() && "OPropertyEditor::ShowPropertyPage: page not hidden to show!");
-
             auto aPagePos = m_aHiddenPages.find(nPageId);
             if (aPagePos != m_aHiddenPages.end())
             {


More information about the Libreoffice-commits mailing list