On Mon, 2013-04-08 at 17:52 +0200, Albert Thuswaldner wrote: > I almost completed the conversion of the Delete Contents dialog in > Calc (see patch #1)
What's missing from your patch is the .ui file itself, do a git add /path/to/that/file.ui and git commit --amend > What I didn't manage to do was to completely kill the resource id > RID_SCDLG_DELCONT > > How to handle these things are not covered in your tutorial, at least > I could not find that... Yeah, so the removal of .src and .hrc stuff is a happy-sideeffect of moving to .ui files, but there are some cases where some .src contents remain (until e.g. we move over to gettext) and some cases where .hrc defines have been reused for non-resource files purposes (where the long-term thing will be to just move them into .hxx files) But in this particular case it so happens (common enough occurrence) that the remaining .hrc define can be removed anyway. See attached. > I am also scratching my head over the hid key in the help file, not > sure I got that right ( see patch #2 ) Looks about right to me. What I would do in addition is to take one of the two duplicated "hid/.uno:Delete" bookmarks and change one to be the fallback toplevel dialog help e.g. "hid/modules/scalc/ui/deletecontents/DeleteContentsDialog" C.
>From c01fdc694b4a150c960e66f4e10c36b9018bf79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caol...@redhat.com> Date: Tue, 9 Apr 2013 16:17:59 +0100 Subject: [PATCH] we can remove RID_SCDLG_DELCONT Change-Id: I8edc9210bc172cd285fe4dce54d30606ecc7c716 --- sc/inc/sc.hrc | 2 +- sc/inc/scabstdlg.hxx | 4 ++-- sc/source/ui/attrdlg/scdlgfact.cxx | 19 ++++--------------- sc/source/ui/attrdlg/scdlgfact.hxx | 4 ++-- sc/source/ui/view/cellsh1.cxx | 2 +- 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 0b460be..9d85a5a 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -953,7 +953,7 @@ #define RID_SCDLG_SPEC_FILTER (SC_DIALOGS_START + 9) #define RID_SCDLG_DELCELL (SC_DIALOGS_START + 11) #define RID_SCDLG_INSCELL (SC_DIALOGS_START + 12) -#define RID_SCDLG_DELCONT (SC_DIALOGS_START + 13) + #define RID_SCDLG_INSCONT (SC_DIALOGS_START + 14) #define RID_SCDLG_MOVETAB (SC_DIALOGS_START + 15) #define RID_SCDLG_STRINPUT (SC_DIALOGS_START + 16) diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 14de680..7b6c602 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -363,8 +363,8 @@ public: //for dataform virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg - virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - sal_uInt16 nCheckDefaults = 0 ) = 0; + virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent, //add for ScDeleteContentsDlg + sal_uInt16 nCheckDefaults = 0) = 0; virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg ScDocument& rDocument, FillDir eFillDir, diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 9ca906a..b6ce1f8 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -873,22 +873,11 @@ AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window -AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, - sal_uInt16 nCheckDefaults ) +AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent, + sal_uInt16 nCheckDefaults) { - ScDeleteContentsDlg * pDlg=NULL; - switch ( nId ) - { - case RID_SCDLG_DELCONT : - pDlg = new ScDeleteContentsDlg( pParent, nCheckDefaults ); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScDeleteContentsDlg_Impl( pDlg ); - return 0; + ScDeleteContentsDlg* pDlg = new ScDeleteContentsDlg(pParent, nCheckDefaults); + return new AbstractScDeleteContentsDlg_Impl( pDlg ); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 65298a3..823eaeb 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -430,8 +430,8 @@ public: //for dataform virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg - virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - sal_uInt16 nCheckDefaults = 0 ); + virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent, //add for ScDeleteContentsDlg + sal_uInt16 nCheckDefaults = 0); virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg ScDocument& rDocument, diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 4377c80..04d6eb9 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -359,7 +359,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScDeleteContentsDlg* pDlg = pFact->CreateScDeleteContentsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DELCONT ); + AbstractScDeleteContentsDlg* pDlg = pFact->CreateScDeleteContentsDlg(pTabViewShell->GetDialogParent()); OSL_ENSURE(pDlg, "Dialog create fail!"); ScDocument* pDoc = GetViewData()->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); -- 1.8.1.2
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice