summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <danielfaleirosilva@gmail.com>2018-06-14 23:29:34 -0300
committerDaniel Silva <danielfaleirosilva@gmail.com>2018-11-29 13:02:16 -0200
commit76e22667625ce8d16dfaa8617a199b774e987a70 (patch)
treec3a2367957e3bfeb433de4bd906a42d459dc9902
parent5c7fb4b4cd9409f8b92a4bb3fe288ba83ced2502 (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>
-rw-r--r--basctl/inc/strings.hrc6
-rw-r--r--basctl/source/basicide/basicrenderable.cxx15
-rw-r--r--sc/inc/strings.hrc15
-rw-r--r--sc/source/ui/unoobj/docuno.cxx26
-rw-r--r--sd/inc/DocumentRenderer.hrc12
-rw-r--r--sd/inc/strings.hrc3
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx30
-rw-r--r--sw/inc/strings.hrc9
-rw-r--r--sw/source/core/view/printdata.cxx56
-rw-r--r--vcl/uiconfig/ui/printdialog.ui40
10 files changed, 103 insertions, 109 deletions
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index 090519fd5a9d..db479a4f17f6 100644
--- a/basctl/inc/strings.hrc
+++ b/basctl/inc/strings.hrc
@@ -97,9 +97,9 @@
#define RID_STR_DLGIMP_MISMATCH_OMIT NC_("RID_STR_DLGIMP_MISMATCH_OMIT", "Omit")
#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_RANGE NC_("RID_STR_PRINTDLG_RANGE", "Print range")
-#define RID_STR_PRINTDLG_ALLPAGES NC_("RID_STR_PRINTDLG_ALLPAGES", "All ~Pages")
-#define RID_STR_PRINTDLG_PAGES NC_("RID_STR_PRINTDLG_PAGES", "Pa~ges")
+#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_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 e7e510d12b37..e89adb755686 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -43,19 +43,16 @@ Renderable::Renderable (BaseWindow* pWin)
aPrintRangeOpt.maGroupHint = "PrintRange" ;
aPrintRangeOpt.mbInternalOnly = true;
m_aUIProperties[0].Value = setSubgroupControlOpt("printrange",
- IDEResId( RID_STR_PRINTDLG_RANGE ), OUString(), aPrintRangeOpt);
+ IDEResId( RID_STR_PRINTDLG_PAGES ), OUString(), aPrintRangeOpt);
// create a choice for the range to print
OUString aPrintContentName( "PrintContent" );
- const Sequence<OUString> aChoices{IDEResId(RID_STR_PRINTDLG_ALLPAGES),
- IDEResId(RID_STR_PRINTDLG_PAGES)};
- const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0",
- ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"};
- const Sequence<OUString> aWidgetIds{"printallpages",
- "printpages"};
- m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
+ const Sequence<OUString> aChoices{IDEResId(RID_STR_PRINTDLG_PRINTALLPAGES),
+ IDEResId(RID_STR_PRINTDLG_PRINTPAGES)};
+ const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:ListBox"};
+ m_aUIProperties[1].Value = setChoiceListControlOpt( "printpagesbox", OUString(),
aHelpIds, aPrintContentName,
- aChoices, 0);
+ aChoices, 0 );
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true);
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index eac103571466..5fb1084aa398 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -102,15 +102,14 @@
#define STR_ACC_DOC_SPREADSHEET NC_("STR_ACC_DOC_SPREADSHEET", "%PRODUCTNAME Spreadsheets")
#define STR_ACC_DOC_SPREADSHEET_READONLY NC_("STR_ACC_DOC_SPREADSHEET_READONLY", "(read-only)")
#define STR_ACC_DOC_PREVIEW_SUFFIX NC_("STR_ACC_DOC_PREVIEW_SUFFIX", "(Preview mode)")
-#define SCSTR_PRINTOPT_PAGES NC_("SCSTR_PRINTOPT_PAGES", "Pages")
+#define SCSTR_PRINTOPT_PAGES NC_("SCSTR_PRINTOPT_PAGES", "Pages:")
#define SCSTR_PRINTOPT_SUPPRESSEMPTY NC_("SCSTR_PRINTOPT_SUPPRESSEMPTY", "~Suppress output of empty pages")
-#define SCSTR_PRINTOPT_PRNTCONTENT NC_("SCSTR_PRINTOPT_PRNTCONTENT", "Print content")
-#define SCSTR_PRINTOPT_ALLSHEETS NC_("SCSTR_PRINTOPT_ALLSHEETS", "~All sheets")
-#define SCSTR_PRINTOPT_SELECTEDSHEETS NC_("SCSTR_PRINTOPT_SELECTEDSHEETS", "~Selected sheets")
-#define SCSTR_PRINTOPT_SELECTEDCELLS NC_("SCSTR_PRINTOPT_SELECTEDCELLS", "Selected cells")
-#define SCSTR_PRINTOPT_FROMWHICH NC_("SCSTR_PRINTOPT_FROMWHICH", "From which print")
-#define SCSTR_PRINTOPT_ALLPAGES NC_("SCSTR_PRINTOPT_ALLPAGES", "All ~pages")
-#define SCSTR_PRINTOPT_PAGES_ NC_("SCSTR_PRINTOPT_PAGES_", "Pa~ges")
+#define SCSTR_PRINTOPT_ALLSHEETS NC_("SCSTR_PRINTOPT_ALLSHEETS", "Print All Sheets")
+#define SCSTR_PRINTOPT_SELECTEDSHEETS NC_("SCSTR_PRINTOPT_SELECTEDSHEETS", "Print Selected Sheets")
+#define SCSTR_PRINTOPT_SELECTEDCELLS NC_("SCSTR_PRINTOPT_SELECTEDCELLS", "Print Selected Cells")
+#define SCSTR_PRINTOPT_FROMWHICH NC_("SCSTR_PRINTOPT_FROMWHICH", "From which:")
+#define SCSTR_PRINTOPT_PRINTALLPAGES NC_("SCSTR_PRINTOPT_PRINTALLPAGES", "Print all pages")
+#define SCSTR_PRINTOPT_PRINTPAGES NC_("SCSTR_PRINTOPT_PRINTPAGES", "Print pages")
#define SCSTR_PRINTOPT_PRODNAME NC_("SCSTR_PRINTOPT_PRODNAME", "%PRODUCTNAME %s")
#define SCSTR_WARN_ME_IN_FUTURE_CHECK NC_("SCSTR_WARN_ME_IN_FUTURE_CHECK", "Warn me about this in the future.")
#define SCSTR_DDEDOC_NOT_LOADED NC_("SCSTR_DDEDOC_NOT_LOADED", "The following DDE source could not be updated possibly because the source document was not open. Please launch the source document and try again." )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 734cf6b89088..b96b467bfe92 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -278,7 +278,7 @@ ScPrintUIOptions::ScPrintUIOptions()
// show Subgroup for print content
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = "PrintRange";
- m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", ScResId( SCSTR_PRINTOPT_PRNTCONTENT ),
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", ScResId( SCSTR_PRINTOPT_PAGES ),
OUString(),
aPrintRangeOpt);
@@ -288,14 +288,8 @@ ScPrintUIOptions::ScPrintUIOptions()
ScResId( SCSTR_PRINTOPT_SELECTEDSHEETS ),
ScResId( SCSTR_PRINTOPT_SELECTEDCELLS )};
uno::Sequence< OUString > aHelpIds{
- ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0",
- ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1",
- ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2"};
- uno::Sequence< OUString > aWidgetIds{
- "printallsheets",
- "printselectedsheets",
- "printselectedcells"};
- m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
+ ".HelpID:vcl:PrintDialog:PrintContent:ListBox"};
+ m_aUIProperties[nIdx++].Value = setChoiceListControlOpt( "printpagesbox", OUString(),
aHelpIds, "PrintContent",
aChoices, nContent );
@@ -308,15 +302,11 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a choice for the range to print
OUString aPrintRangeName( "PrintRange" );
aChoices.realloc( 2 );
- aHelpIds.realloc( 2 );
- aWidgetIds.realloc( 2 );
- aChoices[0] = ScResId( SCSTR_PRINTOPT_ALLPAGES );
- aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0";
- aWidgetIds[0] = "printallpages";
- aChoices[1] = ScResId( SCSTR_PRINTOPT_PAGES_ );
- aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1";
- aWidgetIds[1] = "printpages";
- m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
+ aHelpIds.realloc( 1 );
+ aChoices[0] = ScResId( SCSTR_PRINTOPT_PRINTALLPAGES );
+ aChoices[1] = ScResId( SCSTR_PRINTOPT_PRINTPAGES );
+ aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintRange:ListBox";
+ m_aUIProperties[nIdx++].Value = setChoiceListControlOpt( "printextrabox", OUString(),
aHelpIds,
aPrintRangeName,
aChoices,
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", "",
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index a9825ba3e95e..5d690a126e01 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -590,10 +590,9 @@
#define STR_PRINTOPTUI_FORM_CONTROLS NC_("STR_PRINTOPTUI_FORM_CONTROLS", "Form control~s")
#define STR_PRINTOPTUI_COLOR NC_("STR_PRINTOPTUI_COLOR", "Color")
#define STR_PRINTOPTUI_PRINT_BLACK NC_("STR_PRINTOPTUI_PRINT_BLACK", "Print text in blac~k")
-#define STR_PRINTOPTUI_PAGES_TEXT NC_("STR_PRINTOPTUI_PAGES_TEXT", "Pages")
+#define STR_PRINTOPTUI_PAGES_TEXT NC_("STR_PRINTOPTUI_PAGES_TEXT", "Pages:")
#define STR_PRINTOPTUI_PRINT_BLANK NC_("STR_PRINTOPTUI_PRINT_BLANK", "Print ~automatically inserted blank pages")
#define STR_PRINTOPTUI_ONLY_PAPER NC_("STR_PRINTOPTUI_ONLY_PAPER", "~Use only paper tray from printer preferences")
-#define STR_PRINTOPTUI_PRINT NC_("STR_PRINTOPTUI_PRINT", "Print")
#define STR_PRINTOPTUI_NONE NC_("STR_PRINTOPTUI_NONE", "None (document only)")
#define STR_PRINTOPTUI_COMMENTS_ONLY NC_("STR_PRINTOPTUI_COMMENTS_ONLY", "Comments only")
#define STR_PRINTOPTUI_PLACE_END NC_("STR_PRINTOPTUI_PLACE_END", "Place at end of document")
@@ -608,9 +607,9 @@
#define STR_PRINTOPTUI_LEFT_SCRIPT NC_("STR_PRINTOPTUI_LEFT_SCRIPT", "Left-to-right script")
#define STR_PRINTOPTUI_RIGHT_SCRIPT NC_("STR_PRINTOPTUI_RIGHT_SCRIPT", "Right-to-left script")
#define STR_PRINTOPTUI_RANGE_COPIES NC_("STR_PRINTOPTUI_RANGE_COPIES", "Range and copies")
-#define STR_PRINTOPTUI_ALLPAGES NC_("STR_PRINTOPTUI_ALLPAGES", "~All pages")
-#define STR_PRINTOPTUI_SOMEPAGES NC_("STR_PRINTOPTUI_SOMEPAGES", "Pa~ges")
-#define STR_PRINTOPTUI_SELECTION NC_("STR_PRINTOPTUI_SELECTION", "~Selection")
+#define STR_PRINTOPTUI_PRINTALLPAGES NC_("STR_PRINTOPTUI_PRINTALLPAGES", "Print all pages")
+#define STR_PRINTOPTUI_PRINTPAGES NC_("STR_PRINTOPTUI_PRINTPAGES", "Print pages")
+#define STR_PRINTOPTUI_PRINTSELECTION NC_("STR_PRINTOPTUI_PRINTSELECTION", "Print selection")
#define STR_PRINTOPTUI_PLACE_MARGINS NC_("STR_PRINTOPTUI_PLACE_MARGINS", "Place in margins")
#define STR_FORMULA_CALC NC_("STR_FORMULA_CALC", "Functions")
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index b8e919bae9f7..694ecbeea9f6 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -177,7 +177,7 @@ SwPrintUIOptions::SwPrintUIOptions(
// create sequence of print UI options
// (5 options are not available for Writer-Web)
const int nRTLOpts = bRTL ? 1 : 0;
- const int nNumProps = nRTLOpts + (bWeb ? 15 : 21);
+ const int nNumProps = nRTLOpts + (bWeb ? 14 : 20);
m_aUIProperties.resize( nNumProps );
int nIdx = 0;
@@ -268,32 +268,33 @@ SwPrintUIOptions::SwPrintUIOptions(
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = "PrintRange";
aPrintRangeOpt.mbInternalOnly = true;
- m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", SwResId( STR_PRINTOPTUI_RANGE_COPIES),
- OUString(),
- aPrintRangeOpt);
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt( "printrange",
+ SwResId( STR_PRINTOPTUI_PAGES_TEXT ),
+ OUString(),
+ aPrintRangeOpt );
// create a choice for the content to create
const OUString aPrintRangeName( "PrintContent" );
- uno::Sequence< OUString > aChoices( 3 );
- uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
- uno::Sequence< OUString > aHelpIds( 3 );
- uno::Sequence< OUString > aWidgetIds( 3 );
- aChoices[0] = SwResId( STR_PRINTOPTUI_ALLPAGES);
- aChoicesDisabled[0] = false;
- aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0";
- aWidgetIds[0] = "printallpages";
- aChoices[1] = SwResId( STR_PRINTOPTUI_SOMEPAGES);
- aChoicesDisabled[1] = false;
- aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1";
- aWidgetIds[1] = "printpages";
- aChoices[2] = SwResId( STR_PRINTOPTUI_SELECTION);
- aChoicesDisabled[2] = ! bHasSelection;
- aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2";
- aWidgetIds[2] = "printselection";
- m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
- aHelpIds, aPrintRangeName,
- aChoices, 0 /* always default to 'All pages' */,
- aChoicesDisabled);
+ uno::Sequence< OUString > aChoices( 2 );
+ uno::Sequence< OUString > aHelpIds( 1 );
+
+ aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:ListBox";
+
+ aChoices[0] = SwResId( STR_PRINTOPTUI_PRINTALLPAGES );
+ aChoices[1] = SwResId( STR_PRINTOPTUI_PRINTPAGES );
+ if ( bHasSelection )
+ {
+ aChoices.realloc( 3 );
+ aChoices[2] = SwResId( STR_PRINTOPTUI_PRINTSELECTION );
+ }
+
+ m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt( "printpagesbox",
+ OUString(),
+ aHelpIds,
+ aPrintRangeName,
+ aChoices,
+ 0 /* always default to 'All pages' */ );
+
// show an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true );
m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(),
@@ -301,12 +302,7 @@ SwPrintUIOptions::SwPrintUIOptions(
"PageRange",
OUString::number( nCurrentPage ) /* set text box to current page number */,
aPageRangeOpt);
- // print content selection
- vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt;
- aContentsOpt.maGroupHint = "JobPage";
- m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("extrawriterprintoptions",
- SwResId( STR_PRINTOPTUI_PRINT),
- OUString(), aContentsOpt);
+
// create a list box for notes content
const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
aChoices.realloc( 5 );
diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui
index f5ee95537eb7..f7b7de2db876 100644
--- a/vcl/uiconfig/ui/printdialog.ui
+++ b/vcl/uiconfig/ui/printdialog.ui
@@ -573,7 +573,7 @@
</child>
<child>
<object class="GtkComboBox" id="printpagesbox">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
</object>
<packing>
@@ -591,25 +591,26 @@
<property name="row_spacing">6</property>
<property name="column_spacing">3</property>
<child>
- <object class="GtkLabel" id="labelpages">
- <property name="visible">True</property>
+ <object class="GtkLabel" id="printrange">
+ <property name="visible">False</property>
<property name="can_focus">False</property>
+ <property name="halign">center</property>
<property name="label" translatable="yes" context="printdialog|labelpages">Pages:</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="pagerange">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="placeholder_text" translatable="yes" context="printdialog|pagerange">e.g.: 1, 3-5, 7, 9</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
<property name="width">2</property>
</packing>
</child>
@@ -617,13 +618,13 @@
<object class="GtkLabel" id="labelpapersides">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
+ <property name="halign">center</property>
<property name="margin_left">6</property>
<property name="label" translatable="yes" context="printdialog|labelpapersides">Paper Sides:</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -633,7 +634,28 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="fromwhich">
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="label" translatable="yes" context="printdialog|fromwhich">From which print:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="printextrabox">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>