disambiguate CreateSfxDialog
Change-Id: I6a02d7b197c3cc31a4c9b2eec3d5bd786544df3c Reviewed-on: https://gerrit.libreoffice.org/50837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -166,7 +166,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
|
||||
vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
|
||||
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
|
||||
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetChartWindow(), aSet, getFrame(), RID_SVXDLG_CHARMAP, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( GetChartWindow(), aSet, false ));
|
||||
OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
|
||||
if( pDlg->Execute() == RET_OK )
|
||||
{
|
||||
|
@@ -1204,27 +1204,20 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
|
||||
return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg );
|
||||
}
|
||||
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent,
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const Reference< XFrame >& _rxDocumentFrame,
|
||||
sal_uInt32 nResId, bool bInsert )
|
||||
bool bInsert )
|
||||
{
|
||||
SfxModalDialog* pDlg=nullptr;
|
||||
switch ( nResId )
|
||||
{
|
||||
case SID_EVENTCONFIG :
|
||||
pDlg = VclPtr<SfxMacroAssignDlg>::Create( pParent, _rxDocumentFrame, rAttr );
|
||||
break;
|
||||
case RID_SVXDLG_CHARMAP :
|
||||
pDlg = VclPtr<SvxCharacterMap>::Create( pParent, &rAttr, bInsert );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SfxModalDialog* pDlg = VclPtr<SvxCharacterMap>::Create(pParent, &rAttr, bInsert);
|
||||
return VclPtr<CuiAbstractSfxDialog_Impl>::Create(pDlg);
|
||||
}
|
||||
|
||||
if ( pDlg )
|
||||
return VclPtr<CuiAbstractSfxDialog_Impl>::Create( pDlg );
|
||||
return nullptr;
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const Reference< XFrame >& _rxDocumentFrame)
|
||||
{
|
||||
SfxModalDialog* pDlg = VclPtr<SfxMacroAssignDlg>::Create(pParent, _rxDocumentFrame, rAttr);
|
||||
return VclPtr<CuiAbstractSfxDialog_Impl>::Create(pDlg);
|
||||
}
|
||||
|
||||
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent,
|
||||
|
@@ -468,10 +468,13 @@ public:
|
||||
const SfxItemSet& rAttr,
|
||||
const SdrView* pView,
|
||||
sal_uInt32 nResId ) override;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( vcl::Window* pParent,
|
||||
virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& _rxFrame,
|
||||
sal_uInt32 nResId, bool bInsert ) override;
|
||||
bool bInsert ) override;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& _rxFrame
|
||||
) override;
|
||||
virtual VclPtr<VclAbstractDialog> CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame,
|
||||
sal_uInt32 nResId,
|
||||
const OUString& rParameter ) override;
|
||||
|
@@ -438,14 +438,13 @@ public:
|
||||
virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const SdrView* pView,
|
||||
sal_uInt32 nResId
|
||||
)=0;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( vcl::Window* pParent,
|
||||
sal_uInt32 nResId )=0;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& _rxFrame,
|
||||
sal_uInt32 nResId,
|
||||
bool bInsert
|
||||
)=0;
|
||||
bool bInsert )=0;
|
||||
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rAttr,
|
||||
const css::uno::Reference< css::frame::XFrame >& _rxFrame )=0;
|
||||
virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog( vcl::Window* pParent,
|
||||
const SfxItemSet& rCoreSet,
|
||||
bool bPrevNext = false) = 0;
|
||||
|
@@ -347,7 +347,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin )
|
||||
xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, *pItemSet, xFrame ));
|
||||
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
|
||||
{
|
||||
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
|
||||
|
@@ -2469,8 +2469,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
|
||||
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
|
||||
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
|
||||
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
|
||||
pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( pTabViewShell->GetDialogParent(), aSet, true ));
|
||||
|
||||
if ( pDlg->Execute() == RET_OK )
|
||||
{
|
||||
|
@@ -338,7 +338,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
|
||||
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
|
||||
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->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
|
||||
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);
|
||||
|
@@ -190,9 +190,8 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
|
||||
aSet.Put( *pFontItem );
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet,
|
||||
mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(),
|
||||
RID_SVXDLG_CHARMAP, true ) : nullptr);
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateCharMapDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet,
|
||||
true ) : nullptr);
|
||||
if( !pDlg )
|
||||
return;
|
||||
|
||||
|
@@ -646,7 +646,7 @@ void IMapWindow::DoMacroAssign()
|
||||
aSet.Put( aMacroItem );
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( this, aSet, mxDocumentFrame ));
|
||||
|
||||
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
|
||||
{
|
||||
|
@@ -120,9 +120,8 @@ bool SwMacroAssignDlg::INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh,
|
||||
aSet.Put( AddEvents( MACASSGN_INETFMT ) );
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg( pFact->CreateSfxDialog( pParent, aSet,
|
||||
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(),
|
||||
SID_EVENTCONFIG, false ) );
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg( pFact->CreateEventConfigDialog( pParent, aSet,
|
||||
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface() ) );
|
||||
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
|
||||
{
|
||||
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
|
||||
|
@@ -543,8 +543,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
|
||||
|
||||
const SfxPoolItem* pItem;
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet,
|
||||
pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( this, aSet,
|
||||
pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ));
|
||||
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK &&
|
||||
SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) )
|
||||
{
|
||||
|
@@ -106,8 +106,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void)
|
||||
aAllSet.Put( rFont );
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( this, aAllSet,
|
||||
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( this, aAllSet, false ));
|
||||
if (RET_OK == pDlg->Execute())
|
||||
{
|
||||
const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
|
||||
|
@@ -390,8 +390,7 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl, Button*, void)
|
||||
{
|
||||
SfxAllItemSet aSet( rSh.GetAttrPool() );
|
||||
aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) );
|
||||
ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateSfxDialog( m_pDelimPB, aSet,
|
||||
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, false ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog( m_pDelimPB, aSet, false ));
|
||||
if( RET_OK == pMap->Execute() )
|
||||
{
|
||||
const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false);
|
||||
|
@@ -1750,8 +1750,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
|
||||
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont.GetFamilyName() ) );
|
||||
|
||||
// If character is selected then it can be shown.
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
|
||||
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rView.GetWindow(), aAllSet, true));
|
||||
|
||||
sal_uInt16 nResult = pDlg->Execute();
|
||||
if( nResult == RET_OK )
|
||||
|
@@ -727,8 +727,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
|
||||
|
||||
// If character is selected, it can be shown
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
|
||||
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( rView.GetWindow(), aAllSet, true ));
|
||||
sal_uInt16 nResult = pDlg->Execute();
|
||||
if( nResult == RET_OK )
|
||||
{
|
||||
|
@@ -933,8 +933,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
|
||||
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) );
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet,
|
||||
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
|
||||
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( GetView().GetWindow(), aAllSet, true ));
|
||||
if( RET_OK == pDlg->Execute() )
|
||||
{
|
||||
const SfxStringItem* pCItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
|
||||
|
Reference in New Issue
Block a user