chart2/source/controller/main/ChartController_TextEdit.cxx |    2 
 cui/source/factory/dlgfact.cxx                             |   29 ++++---------
 cui/source/factory/dlgfact.hxx                             |    9 ++--
 include/svx/svxdlg.hxx                                     |   13 ++---
 sc/source/ui/drawfunc/drawsh.cxx                           |    2 
 sc/source/ui/view/cellsh1.cxx                              |    3 -
 sc/source/ui/view/viewutil.cxx                             |    2 
 sd/source/ui/func/fubullet.cxx                             |    5 --
 svx/source/dialog/imapwnd.cxx                              |    2 
 sw/source/ui/dialog/macassgn.cxx                           |    5 --
 sw/source/ui/misc/glossary.cxx                             |    4 -
 sw/source/ui/misc/insfnote.cxx                             |    3 -
 sw/source/ui/misc/srtdlg.cxx                               |    3 -
 sw/source/uibase/shells/annotsh.cxx                        |    3 -
 sw/source/uibase/shells/drwtxtsh.cxx                       |    3 -
 sw/source/uibase/shells/textsh.cxx                         |    3 -
 16 files changed, 39 insertions(+), 52 deletions(-)

New commits:
commit 6e90bcdcd918a44f94f77098c54ed264a939c43c
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Mar 6 16:55:10 2018 +0000

    disambiguate CreateSfxDialog
    
    Change-Id: I6a02d7b197c3cc31a4c9b2eec3d5bd786544df3c
    Reviewed-on: https://gerrit.libreoffice.org/50837
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx 
b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 60ff53feb417..f3c59f6c9d21 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -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 )
     {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index b441edfdf85f..5f0bc3f9751b 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -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,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index c5b69f6aec31..635e553c0552 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -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,
+                                                             bool bInsert ) 
override;
+    virtual VclPtr<SfxAbstractDialog>    CreateEventConfigDialog( vcl::Window* 
pParent,
                                                              const SfxItemSet& 
rAttr,
-                                                             const 
css::uno::Reference< css::frame::XFrame >& _rxFrame,
-                                                             sal_uInt32 
nResId, bool bInsert ) override;
+                                                             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;
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 23e506de90b6..3c38f7050886 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -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,
+                                                                        bool 
bInsert )=0;
+    virtual VclPtr<SfxAbstractDialog>       CreateEventConfigDialog( 
vcl::Window* pParent,
                                                                         const 
SfxItemSet& rAttr,
-                                    const css::uno::Reference< 
css::frame::XFrame >& _rxFrame,
-                                                                        
sal_uInt32 nResId,
-                                                                        bool 
bInsert
-                                                                        )=0;
+                                    const css::uno::Reference< 
css::frame::XFrame >& _rxFrame )=0;
     virtual VclPtr<AbstractSvxPostItDialog>    CreateSvxPostItDialog( 
vcl::Window* pParent,
                                                                         const 
SfxItemSet& rCoreSet,
                                                                         bool 
bPrevNext = false) = 0;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 6fbbabae8315..99174788dc9d 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -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();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 4eb7e8da6634..d54d7d51ce5a 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -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 )
                 {
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 3d1fdddf17bd..f303f7d7a85f 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -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);
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 72b79a8c774e..f4b2be0e45fa 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -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;
 
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 26239a4801e3..234c96c74f26 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -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 )
     {
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 28932f3f33c8..55e69c58cdd7 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -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();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index a0d01146c6ea..8a8ed5f41d7e 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -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 ) )
         {
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index dc008b7af46e..d5d8ac063abc 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -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);
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index a8f2a7450677..abd043a8006e 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -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);
diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index 723a7dceaa08..214f9086b448 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -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 )
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx 
b/sw/source/uibase/shells/drwtxtsh.cxx
index 09a4e4f5aea5..424b1e6984de 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -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 )
         {
diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index e8939afbd181..26c6864461e0 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to