summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/chardlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/chardlg.cxx')
-rw-r--r--cui/source/tabpages/chardlg.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 1d2fed77c86e..5d71363f0299 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1364,13 +1364,16 @@ void SvxCharEffectsPage::Initialize()
SetExchangeSupport();
// HTML-Mode
- const SfxPoolItem* pItem;
- SfxObjectShell* pShell;
- if ( SfxItemState::SET == GetItemSet().GetItemState( SID_HTML_MODE, false, &pItem ) ||
- ( nullptr != ( pShell = SfxObjectShell::Current() ) &&
- nullptr != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
+ const SfxUInt16Item* pHtmlModeItem = GetItemSet().GetItemIfSet( SID_HTML_MODE, false );
+ if ( !pHtmlModeItem)
+ {
+ SfxObjectShell* pShell = SfxObjectShell::Current();
+ if (pShell)
+ pHtmlModeItem = pShell->GetItem( SID_HTML_MODE );
+ }
+ if (pHtmlModeItem)
{
- m_nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ m_nHtmlMode = pHtmlModeItem->GetValue();
if ( ( m_nHtmlMode & HTMLMODE_ON ) == HTMLMODE_ON )
{
//!!! hide some controls please