diff options
author | Daniel <danielfaleirosilva@gmail.com> | 2018-06-14 23:29:34 -0300 |
---|---|---|
committer | Daniel Silva <danielfaleirosilva@gmail.com> | 2018-11-29 13:02:16 -0200 |
commit | 76e22667625ce8d16dfaa8617a199b774e987a70 (patch) | |
tree | c3a2367957e3bfeb433de4bd906a42d459dc9902 /sd | |
parent | 5c7fb4b4cd9409f8b92a4bb3fe288ba83ced2502 (diff) |
Configures page range in print dialog
Change-Id: I62bd9affc9e065d7afcc60296a72eae4612b0ddd
Reviewed-on: https://gerrit.libreoffice.org/55840
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/DocumentRenderer.hrc | 12 | ||||
-rw-r--r-- | sd/inc/strings.hrc | 3 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 30 |
3 files changed, 18 insertions, 27 deletions
diff --git a/sd/inc/DocumentRenderer.hrc b/sd/inc/DocumentRenderer.hrc index d64235ef3873..73e7c2f50b9e 100644 --- a/sd/inc/DocumentRenderer.hrc +++ b/sd/inc/DocumentRenderer.hrc @@ -79,16 +79,16 @@ const char* STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST[] = const char* STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE[] = { - NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "~All slides"), - NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "~Slides"), - NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "Se~lection") + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "Print all slides"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "Print slides"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "Print selection") }; const char* STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE[] = { - NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "~All pages"), - NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "Pa~ges"), - NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "Se~lection") + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "Print all pages"), + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "Print pages"), + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "Print selection") }; #endif diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index b211873b8fa2..1aabcd162669 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -475,7 +475,8 @@ #define STR_IMPRESS_PRINT_UI_PAGE_SIDES NC_("STR_IMPRESS_PRINT_UI_PAGE_SIDES", "Page sides") #define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE", "Include") #define STR_IMPRESS_PRINT_UI_PAPER_TRAY NC_("STR_IMPRESS_PRINT_UI_PAPER_TRAY", "~Use only paper tray from printer preferences") -#define STR_IMPRESS_PRINT_UI_PAGE_RANGE NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE", "Print range") +#define STR_IMPRESS_PRINT_UI_PAGE_RANGE NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE", "Pages:") +#define STR_IMPRESS_PRINT_UI_SLIDE_RANGE NC_("STR_IMPRESS_PRINT_UI_SLIDE_RANGE", "Slides:") #define STR_SAR_WRAP_FORWARD NC_("STR_SAR_WRAP_FORWARD", "%PRODUCTNAME Impress has searched to the end of the presentation. Do you want to continue at the beginning?") #define STR_SAR_WRAP_BACKWARD NC_("STR_SAR_WRAP_BACKWARD", "%PRODUCTNAME Impress has searched to the beginning of the presentation. Do you want to continue at the end?") diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 09a227c0a854..7879f084667b 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -573,22 +573,11 @@ namespace { aPrintRangeOpt.mbInternalOnly = true; aPrintRangeOpt.maGroupHint = "PrintRange" ; AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("printrange", - SdResId(STR_IMPRESS_PRINT_UI_PAGE_RANGE), + mbImpress ? SdResId(STR_IMPRESS_PRINT_UI_SLIDE_RANGE) : SdResId(STR_IMPRESS_PRINT_UI_PAGE_RANGE), "", aPrintRangeOpt ) ); - // create a choice for the content to create - OUString aPrintRangeName( "PrintContent" ); - aHelpIds.realloc( 3 ); - aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ; - aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ; - aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ; - aWidgetIds.realloc( 3 ); - aWidgetIds[0] = "printallpages"; - aWidgetIds[1] = "printpages"; - aWidgetIds[2] = "printselection"; - // check if there is a selection of slides OUString aPageRange(OUString::number(mnCurPage + 1)); int nPrintRange(0); @@ -611,18 +600,19 @@ namespace { aBuf.append(','); aBuf.append(OUString::number(pPage->GetPageNum() / 2 + 1)); } - aPageRange = aBuf.getStr(); nPrintRange = 1; } } - AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(aWidgetIds, "", - aHelpIds, - aPrintRangeName, - mbImpress ? CreateChoice(STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE, SAL_N_ELEMENTS(STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE)) : - CreateChoice(STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE, SAL_N_ELEMENTS(STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE)), - nPrintRange ) - ); + OUString aPrintRangeName( "PrintContent" ); + aHelpIds.realloc( 1 ); + aHelpIds[0] = ".HelpID:vcl:PrintDialog:PageContentType:ListBox"; + AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "printpagesbox", OUString(), + aHelpIds, aPrintRangeName, + mbImpress ? CreateChoice( STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE, SAL_N_ELEMENTS(STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE ) ) : + CreateChoice( STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE, SAL_N_ELEMENTS(STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE ) ), + nPrintRange ) ); + // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); AddDialogControl(vcl::PrinterOptionsHelper::setEditControlOpt("pagerange", "", |