diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-06 18:39:20 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-07-09 09:48:22 +0200 |
commit | 87866d75fbfc72abfde680e3141926644eab7fda (patch) | |
tree | 666d121892641d46569090a84e7e3d6d78bcbc0d /sw/source/uibase | |
parent | 4655a28e386f754ca6b355344d35a0ef759d21ca (diff) |
tdf#115890 sw: fix invalid cast in SwContentTree::GetEntryAltText()
AccessibleListBoxEntry calls this for any entry.
This was always broken but now we have asserts to tell us about it.
Change-Id: I7094a1dfbffd359e0f536ca60cba2478e2a62464
Reviewed-on: https://gerrit.libreoffice.org/57086
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
(cherry picked from commit 2986f4baa8bdef1f9ab9108240ea890075321be1)
Reviewed-on: https://gerrit.libreoffice.org/57152
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit a900c91447897e725fc0cf674205eee633b326eb)
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 9b59a912c722..9012fd86fbcf 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -902,7 +902,7 @@ Size SwContentTree::GetOptimalSize() const OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const { - if( pEntry == nullptr) + if (pEntry == nullptr || !lcl_IsContent(pEntry)) return OUString(); assert(pEntry->GetUserData() == nullptr || dynamic_cast<SwContent*>(static_cast<SwTypeNumber*>(pEntry->GetUserData()))); |