[Libreoffice-commits] .: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 3 07:38:57 PST 2012


 sw/inc/fldui.hrc                  |    2 +-
 sw/inc/swabstdlg.hxx              |    8 ++++----
 sw/source/ui/dialog/swdlgfact.cxx |   36 ++++++++----------------------------
 sw/source/ui/dialog/swdlgfact.hxx |    8 ++++----
 sw/source/ui/inc/misc.hrc         |    2 +-
 sw/source/ui/shells/textfld.cxx   |    3 +--
 sw/source/ui/shells/textsh1.cxx   |    4 ++--
 sw/source/ui/uiview/viewdlg2.cxx  |    4 ++--
 8 files changed, 23 insertions(+), 44 deletions(-)

New commits:
commit 2401ebdd3667e776fab5e66e4e2d39106369276e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 3 15:36:09 2012 +0000

    drop unnecessary resource ids
    
    Change-Id: Ie0018bde73eed6049d1ef2287157b86151766e83

diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc
index be413f2..c500a1d 100644
--- a/sw/inc/fldui.hrc
+++ b/sw/inc/fldui.hrc
@@ -22,7 +22,7 @@
 
 #define DLG_FLD_INPUT       (RC_FLDDLG_BEGIN + 5)
 #define DLG_CHANGE_DB       (RC_FLDDLG_BEGIN + 9)
-#define DLG_JAVAEDIT        (RC_FLDDLG_BEGIN + 10)
+
 #define DLG_FLD_INSERT      (RC_FLDDLG_BEGIN + 11)
 #define DLG_FLD_DROPDOWN    (RC_FLDDLG_BEGIN + 12)
 
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 578c81d..5355b97 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -430,14 +430,14 @@ public:
     virtual AbstractFldInputDlg*        CreateFldInputDlg( int nResId,
                                                 Window *pParent, SwWrtShell &rSh,
                                                 SwField* pField, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg
-    virtual AbstractInsFootNoteDlg*     CreateInsFootNoteDlg( int nResId,
-                                                Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
+    virtual AbstractInsFootNoteDlg*     CreateInsFootNoteDlg(Window * pParent,
+        SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
     virtual VclAbstractDialog*          CreateTitlePageDlg ( Window * pParent ) = 0;
     virtual VclAbstractDialog *         CreateVclSwViewDialog( int nResId,
                                                 SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
     virtual AbstractInsTableDlg*        CreateInsTableDlg(SwView& rView) = 0; //add for SwInsTableDlg
-    virtual AbstractJavaEditDialog*     CreateJavaEditDialog( int nResId,
-                                                Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog
+    virtual AbstractJavaEditDialog*     CreateJavaEditDialog(Window* pParent,
+        SwWrtShell* pWrtSh) = 0; //add for SwJavaEditDialog
     virtual AbstractMailMergeDlg*       CreateMailMergeDlg( int nResId,
                                                 Window* pParent, SwWrtShell& rSh,
                                                  const String& rSourceName,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 0d15759..3028bba 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1163,21 +1163,11 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId
     return 0;
 }
 
-AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
-                                                Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
+AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
+    Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
 {
-    SwInsFootNoteDlg* pDlg=NULL;
-    switch ( nResId )
-    {
-        case DLG_INS_FOOTNOTE :
-            pDlg = new SwInsFootNoteDlg( pParent, rSh, bEd );
-            break;
-        default:
-            break;
-    }
-    if ( pDlg )
-        return new AbstractInsFootNoteDlg_Impl( pDlg );
-    return 0;
+    SwInsFootNoteDlg* pDlg = new SwInsFootNoteDlg(pParent, rSh, bEd);
+    return new AbstractInsFootNoteDlg_Impl( pDlg );
 }
 
 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *pParent )
@@ -1212,21 +1202,11 @@ AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rV
     return new AbstractInsTableDlg_Impl( pDlg );
 }
 
-AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( int nResId,
-                                                Window* pParent, SwWrtShell* pWrtSh ) //add for SwJavaEditDialog
+AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog(
+    Window* pParent, SwWrtShell* pWrtSh) //add for SwJavaEditDialog
 {
-    SwJavaEditDialog* pDlg=NULL;
-    switch ( nResId )
-    {
-        case DLG_JAVAEDIT :
-            pDlg = new SwJavaEditDialog( pParent, pWrtSh );
-            break;
-        default:
-            break;
-    }
-    if ( pDlg )
-        return new AbstractJavaEditDialog_Impl( pDlg );
-    return 0;
+    SwJavaEditDialog* pDlg = new SwJavaEditDialog(pParent, pWrtSh);
+    return new AbstractJavaEditDialog_Impl( pDlg );
 }
 
 AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index ee2e7bb..451d595 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -498,14 +498,14 @@ public:
     virtual AbstractFldInputDlg*        CreateFldInputDlg( int nResId,
                                                 Window *pParent, SwWrtShell &rSh,
                                                 SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg
-    virtual AbstractInsFootNoteDlg*     CreateInsFootNoteDlg( int nResId,
-                                                Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
+    virtual AbstractInsFootNoteDlg*     CreateInsFootNoteDlg(
+        Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
    virtual VclAbstractDialog *         CreateTitlePageDlg ( Window * pParent );
     virtual VclAbstractDialog *         CreateVclSwViewDialog( int nResId,
                                                 SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
     virtual AbstractInsTableDlg*        CreateInsTableDlg(SwView& rView); //add for SwInsTableDlg
-    virtual AbstractJavaEditDialog*     CreateJavaEditDialog( int nResId,
-                                                Window* pParent, SwWrtShell* pWrtSh ); //add for SwJavaEditDialog
+    virtual AbstractJavaEditDialog*     CreateJavaEditDialog(Window* pParent,
+        SwWrtShell* pWrtSh); //add for SwJavaEditDialog
     virtual AbstractMailMergeDlg*       CreateMailMergeDlg( int nResId,
                                                 Window* pParent, SwWrtShell& rSh,
                                                  const String& rSourceName,
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index ac8c0cf..da0e00e 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -24,7 +24,7 @@
 #define STR_GLOSSARY_BIB_DLG        (RC_MISC_BEGIN + 5)
 
 #define DLG_GLOSSARY                (RC_MISC_BEGIN + 11)
-#define DLG_INS_FOOTNOTE            (RC_MISC_BEGIN + 12)
+
 #define DLG_DOC_FOOTNOTE            (RC_MISC_BEGIN + 13)
 #define DLG_BIB_BASE                (RC_MISC_BEGIN + 16)
 #define DLG_INSERT_BOOKMARK         (RC_MISC_BEGIN + 17)
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index d781450..9c0a61b 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -514,8 +514,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
                 {
                     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
                     OSL_ENSURE(pFact, "Dialogdiet fail!");
-                    AbstractJavaEditDialog* pDlg = pFact->CreateJavaEditDialog( DLG_JAVAEDIT,
-                                                            pMDI, &rSh);
+                    AbstractJavaEditDialog* pDlg = pFact->CreateJavaEditDialog(pMDI, &rSh);
                     OSL_ENSURE(pDlg, "Dialogdiet fail!");
                     if ( pDlg->Execute() )
                     {
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 05dd33f..1124d51 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -436,8 +436,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
         {
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
             OSL_ENSURE(pFact, "Dialogdiet fail!");
-            AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
-                                                        GetView().GetWindow(), rWrtSh, sal_False );
+            AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg(
+                GetView().GetWindow(), rWrtSh, sal_False);
             OSL_ENSURE(pDlg, "Dialogdiet fail!");
             pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
             if ( pDlg->Execute() == RET_OK )
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index 1a782f2..3c6acb5 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -72,8 +72,8 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
         {
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
             OSL_ENSURE(pFact, "Dialogdiet fail!");
-            AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
-                                                        pMDI, *pWrtShell, sal_True );
+            AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg(
+                pMDI, *pWrtShell, sal_True);
             OSL_ENSURE(pDlg, "Dialogdiet fail!");
 
             pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());


More information about the Libreoffice-commits mailing list