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/source | |
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/source')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 30 |
1 files changed, 10 insertions, 20 deletions
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", "", |