summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-06 17:02:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-07 00:48:36 +0100
commit2523f32dc68d35b69a7b0ee9764e61f7d8efb3ce (patch)
tree1292ca5c985e3ad7d917ceca2dc936c74a2b9315 /sc
parent1ce72593df9ab690ae4666160ec47494d1cd9a07 (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')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/inc/viewutil.hxx4
-rw-r--r--sc/source/ui/view/cellsh1.cxx18
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx15
5 files changed, 6 insertions, 35 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 6d718002f33f..dfdd03576e77 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -238,7 +238,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
aNewItem = rItem;
}
else
- ScViewUtil::ExecuteCharMap( rItem, *pViewData->GetViewShell()->GetViewFrame(), aNewItem, aString );
+ ScViewUtil::ExecuteCharMap( rItem, *pViewData->GetViewShell()->GetViewFrame() );
if ( !aString.isEmpty() )
{
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 5ea8308220b3..5678033c969a 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -44,9 +44,7 @@ class SC_DLLPUBLIC ScViewUtil
{
public:
static bool ExecuteCharMap( const SvxFontItem& rOldFont,
- SfxViewFrame& rFrame,
- SvxFontItem& rNewFont,
- OUString& rString );
+ SfxViewFrame& rFrame );
static bool IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index d54d7d51ce5a..e92e560d99d2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2470,23 +2470,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( pTabViewShell->GetDialogParent(), 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 && pFontItem )
- {
- vcl::Font aNewFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), Size(1,1) );
- aNewFont.SetCharSet( pFontItem->GetCharSet() );
- aNewFont.SetPitch( pFontItem->GetPitch() );
- pTabViewShell->InsertSpecialChar( pItem->GetValue(), aNewFont );
- rReq.AppendItem( *pFontItem );
- rReq.AppendItem( *pItem );
- rReq.Done();
- }
- }
+ pDlg->Execute();
}
break;
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 1876f088d2b3..762dfb4757ce 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -412,7 +412,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
}
else
{
- ScViewUtil::ExecuteCharMap( rItem, *pViewData->GetViewShell()->GetViewFrame(), aNewItem, aString );
+ ScViewUtil::ExecuteCharMap( rItem, *pViewData->GetViewShell()->GetViewFrame() );
// while the dialog was open, edit mode may have been stopped
if (!SC_MOD()->IsInputMode())
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;
}