diff options
author | heiko tietze <tietze.heiko@gmail.com> | 2019-03-05 15:08:53 +0100 |
---|---|---|
committer | Heiko Tietze <tietze.heiko@gmail.com> | 2019-03-14 16:03:23 +0100 |
commit | 044fa501e95dcac8120767996dfb7ba8f25a703f (patch) | |
tree | f099c36335e7a6d200b0cfa21c0506cfb546aa76 /basctl | |
parent | ff4ebd8c7df3d6aa7f0e3798635e6a461cfd936d (diff) |
Resolves tdf#122707 - Replace listbox for print range by radio buttons
Some changes to the ui file (GtkGrid, alignment, radio buttons),
setChoiceRadiosControlOpt() instead of *list
Labels adjusted accordingly
Patch partially reverts I62bd9affc9e065d7afcc60296a72eae4612b0ddd
Change-Id: Ia06b8f2513d98fbdb1971477cf7b7127595d338c
Reviewed-on: https://gerrit.libreoffice.org/68846
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/inc/strings.hrc | 8 | ||||
-rw-r--r-- | basctl/source/basicide/basicrenderable.cxx | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc index 6e93d8649f83..6487c607694a 100644 --- a/basctl/inc/strings.hrc +++ b/basctl/inc/strings.hrc @@ -98,10 +98,10 @@ #define RID_STR_DLGIMP_MISMATCH_TITLE NC_("RID_STR_DLGIMP_MISMATCH_TITLE", "Dialog Import - Language Mismatch") #define RID_STR_DLGIMP_MISMATCH_TEXT NC_("RID_STR_DLGIMP_MISMATCH_TEXT", "The dialog to be imported supports other languages than the target library.\n\nAdd these languages to the library to keep additional language resources provided by the dialog or omit them to stay with the current library languages.\n\nNote: For languages not supported by the dialog the resources of the dialog's default language will be used.\n ") #define RID_STR_PRINTDLG_PAGES NC_("RID_STR_PRINTDLG_PAGES", "Pages:") -#define RID_STR_PRINTDLG_PRINTALLPAGES NC_("RID_STR_PRINTDLG_PRINTALLPAGES", "Print all pages") -#define RID_STR_PRINTDLG_PRINTPAGES NC_("RID_STR_PRINTDLG_PRINTPAGES", "Print pages") -#define RID_STR_PRINTDLG_PRINTEVENPAGES NC_("RID_STR_PRINTDLG_PRINTEVENPAGES", "Print even pages") -#define RID_STR_PRINTDLG_PRINTODDPAGES NC_("RID_STR_PRINTDLG_PRINTODDPAGES", "Print odd pages") +#define RID_STR_PRINTDLG_PRINTALLPAGES NC_("RID_STR_PRINTDLG_PRINTALLPAGES", "All ~Pages") +#define RID_STR_PRINTDLG_PRINTPAGES NC_("RID_STR_PRINTDLG_PRINTPAGES", "Pa~ges:") +#define RID_STR_PRINTDLG_PRINTEVENPAGES NC_("RID_STR_PRINTDLG_PRINTEVENPAGES", "~Even pages") +#define RID_STR_PRINTDLG_PRINTODDPAGES NC_("RID_STR_PRINTDLG_PRINTODDPAGES", "~Odd pages") #define RID_STR_CHOOSE NC_("RID_STR_CHOOSE", "Choose") #define RID_STR_RUN NC_("RID_STR_RUN", "Run") #define RID_STR_RECORD NC_("RID_STR_RECORD", "~Save") diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index 7913c8a10d75..ee0116d368bf 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -42,6 +42,7 @@ Renderable::Renderable (BaseWindow* pWin) vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = "PrintRange" ; aPrintRangeOpt.mbInternalOnly = true; + m_aUIProperties[0].Value = setSubgroupControlOpt("printrange", IDEResId( RID_STR_PRINTDLG_PAGES ), OUString(), aPrintRangeOpt); @@ -51,10 +52,17 @@ Renderable::Renderable (BaseWindow* pWin) IDEResId(RID_STR_PRINTDLG_PRINTPAGES), IDEResId(RID_STR_PRINTDLG_PRINTEVENPAGES), IDEResId(RID_STR_PRINTDLG_PRINTODDPAGES)}; - const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:ListBox"}; - m_aUIProperties[1].Value = setChoiceListControlOpt( "printpagesbox", OUString(), + const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0", + ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1", + ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2", + ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:3"}; + const Sequence<OUString> aWidgetIds{"rbAllPages", + "rbRangePages", + "rbEvenPages", + "rbOddPages"}; + m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), aHelpIds, aPrintContentName, - aChoices, 0 ); + aChoices, 0); // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true); |