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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 9a38153..9629e3d 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())
{