summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2019-03-05 15:08:53 +0100
committerAron Budea <aron.budea@collabora.com>2019-09-26 18:56:45 +0200
commit2501aeb5de92fe357eb71ed64cca20f394390398 (patch)
tree61bf651fe2424e14c57576b2afd198e8e048e4e3 /basctl
parent6decbdcd4323ff594d5bf59a68574b2dedde423c (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 Reviewed-on: https://gerrit.libreoffice.org/68846 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> (cherry picked from commit 044fa501e95dcac8120767996dfb7ba8f25a703f) Change-Id: Ia06b8f2513d98fbdb1971477cf7b7127595d338c
Diffstat (limited to 'basctl')
-rw-r--r--basctl/inc/strings.hrc8
-rw-r--r--basctl/source/basicide/basicrenderable.cxx14
2 files changed, 15 insertions, 7 deletions
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index a39ba9d76c04..9af4245de3d8 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_BTNDEL NC_("RID_STR_BTNDEL", "~Delete")
#define RID_STR_BTNNEW NC_("RID_STR_BTNNEW", "~New")
#define RID_STR_CHOOSE NC_("RID_STR_CHOOSE", "Choose")
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);