summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-11-23 23:01:41 +0100
committerMichael Stahl <mstahl@redhat.com>2016-11-25 13:00:47 +0000
commit4f8eff151e8ec71eb1a5b6757d9b17d3224d67ca (patch)
tree2e9ebda1a48b7c74a4c77de014b3db4ce1e289ea
parentc100e38b49512512b11a0c594f244a4937bc6d66 (diff)
SwContentTree: fix bad static downcasts
Change-Id: I52c1b4a028928c3008d95df43dbc6e8183980df4 (cherry picked from commit c2c4c6ee16120108590dc64f295ab54e34a05ac0) Reviewed-on: https://gerrit.libreoffice.org/31193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 0693c909f152..3ef1c67f0b6e 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1404,8 +1404,9 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
bool SwContentTree::Expand( SvTreeListEntry* pParent )
{
- if(!m_bIsRoot || (static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE) ||
- (m_nRootType == ContentTypeId::OUTLINE))
+ if (!m_bIsRoot
+ || (static_cast<SwTypeNumber*>(pParent->GetUserData())->GetTypeId() == CTYPE_CTT && static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE)
+ || (m_nRootType == ContentTypeId::OUTLINE))
{
if(lcl_IsContentType(pParent))
{
@@ -1459,8 +1460,9 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
bool SwContentTree::Collapse( SvTreeListEntry* pParent )
{
- if(!m_bIsRoot || (static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE) ||
- (m_nRootType == ContentTypeId::OUTLINE))
+ if (!m_bIsRoot
+ || (static_cast<SwTypeNumber*>(pParent->GetUserData())->GetTypeId() == CTYPE_CTT && static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE)
+ || (m_nRootType == ContentTypeId::OUTLINE))
{
if(lcl_IsContentType(pParent))
{