diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-06 17:02:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-07 00:48:36 +0100 |
commit | 2523f32dc68d35b69a7b0ee9764e61f7d8efb3ce (patch) | |
tree | 1292ca5c985e3ad7d917ceca2dc936c74a2b9315 /sc/source/ui/view/viewutil.cxx | |
parent | 1ce72593df9ab690ae4666160ec47494d1cd9a07 (diff) |
if the arg is true, the dialog dispatchs InsertSpecialChar itself
and GetOutputItemSet is unused and the args won't be there. While
they are there if the arg is false
Change-Id: I934e99479f8fdf4d5102e47f6082fbbda8ececcd
Reviewed-on: https://gerrit.libreoffice.org/50838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/viewutil.cxx')
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index f303f7d7a85f..cb8ef91e37b3 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -327,9 +327,7 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal } bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, - SfxViewFrame& rFrame, - SvxFontItem& rNewFont, - OUString& rString ) + SfxViewFrame& rFrame ) { bool bRet = false; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -339,16 +337,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) ); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( &rFrame.GetWindow(), aSet, true )); - if ( pDlg->Execute() == RET_OK ) - { - const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false); - const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); - if ( pItem ) - rString = pItem->GetValue(); - if ( pFontItem ) - rNewFont = SvxFontItem( pFontItem->GetFamily(), pFontItem->GetFamilyName(), pFontItem->GetStyleName(), pFontItem->GetPitch(), pFontItem->GetCharSet(), rNewFont.Which() ); - bRet = true; - } + pDlg->Execute(); } return bRet; } |