diff options
Diffstat (limited to 'vcl/source/window/printdlg.cxx')
-rw-r--r-- | vcl/source/window/printdlg.cxx | 194 |
1 files changed, 97 insertions, 97 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index c76701b31698..f642641a0fc2 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -524,57 +524,57 @@ Size const & PrintDialog::getJobPageSize() } PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterController> i_xController) - : GenericDialogController(i_pWindow, "vcl/ui/printdialog.ui", "PrintDialog") + : GenericDialogController(i_pWindow, u"vcl/ui/printdialog.ui"_ustr, u"PrintDialog"_ustr) , maPController(std::move( i_xController )) - , mxTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) - , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow")) - , mxPageLayoutFrame(m_xBuilder->weld_frame("layoutframe")) - , mxPrinters(m_xBuilder->weld_combo_box("printersbox")) - , mxStatusTxt(m_xBuilder->weld_label("status")) - , mxSetupButton(m_xBuilder->weld_button("setup")) - , mxCopyCountField(m_xBuilder->weld_spin_button("copycount")) - , mxCollateBox(m_xBuilder->weld_check_button("collate")) - , mxCollateImage(m_xBuilder->weld_image("collateimage")) - , mxPageRangeEdit(m_xBuilder->weld_entry("pagerange")) - , mxPageRangesRadioButton(m_xBuilder->weld_radio_button("rbRangePages")) - , mxPaperSidesBox(m_xBuilder->weld_combo_box("sidesbox")) - , mxSingleJobsBox(m_xBuilder->weld_check_button("singlejobs")) - , mxReverseOrderBox(m_xBuilder->weld_check_button("reverseorder")) - , mxOKButton(m_xBuilder->weld_button("ok")) - , mxCancelButton(m_xBuilder->weld_button("cancel")) - , mxBackwardBtn(m_xBuilder->weld_button("backward")) - , mxForwardBtn(m_xBuilder->weld_button("forward")) - , mxFirstBtn(m_xBuilder->weld_button("btnFirst")) - , mxLastBtn(m_xBuilder->weld_button("btnLast")) - , mxPreviewBox(m_xBuilder->weld_check_button("previewbox")) - , mxNumPagesText(m_xBuilder->weld_label("totalnumpages")) + , mxTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , mxScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr)) + , mxPageLayoutFrame(m_xBuilder->weld_frame(u"layoutframe"_ustr)) + , mxPrinters(m_xBuilder->weld_combo_box(u"printersbox"_ustr)) + , mxStatusTxt(m_xBuilder->weld_label(u"status"_ustr)) + , mxSetupButton(m_xBuilder->weld_button(u"setup"_ustr)) + , mxCopyCountField(m_xBuilder->weld_spin_button(u"copycount"_ustr)) + , mxCollateBox(m_xBuilder->weld_check_button(u"collate"_ustr)) + , mxCollateImage(m_xBuilder->weld_image(u"collateimage"_ustr)) + , mxPageRangeEdit(m_xBuilder->weld_entry(u"pagerange"_ustr)) + , mxPageRangesRadioButton(m_xBuilder->weld_radio_button(u"rbRangePages"_ustr)) + , mxPaperSidesBox(m_xBuilder->weld_combo_box(u"sidesbox"_ustr)) + , mxSingleJobsBox(m_xBuilder->weld_check_button(u"singlejobs"_ustr)) + , mxReverseOrderBox(m_xBuilder->weld_check_button(u"reverseorder"_ustr)) + , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , mxCancelButton(m_xBuilder->weld_button(u"cancel"_ustr)) + , mxBackwardBtn(m_xBuilder->weld_button(u"backward"_ustr)) + , mxForwardBtn(m_xBuilder->weld_button(u"forward"_ustr)) + , mxFirstBtn(m_xBuilder->weld_button(u"btnFirst"_ustr)) + , mxLastBtn(m_xBuilder->weld_button(u"btnLast"_ustr)) + , mxPreviewBox(m_xBuilder->weld_check_button(u"previewbox"_ustr)) + , mxNumPagesText(m_xBuilder->weld_label(u"totalnumpages"_ustr)) , mxPreview(new PrintPreviewWindow(this)) - , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", *mxPreview)) - , mxPageEdit(m_xBuilder->weld_entry("pageedit")) - , mxPagesBtn(m_xBuilder->weld_radio_button("pagespersheetbtn")) - , mxBrochureBtn(m_xBuilder->weld_radio_button("brochure")) - , mxPagesBoxTitleTxt(m_xBuilder->weld_label("pagespersheettxt")) - , mxNupPagesBox(m_xBuilder->weld_combo_box("pagespersheetbox")) - , mxNupNumPagesTxt(m_xBuilder->weld_label("pagestxt")) - , mxNupColEdt(m_xBuilder->weld_spin_button("pagecols")) - , mxNupTimesTxt(m_xBuilder->weld_label("by")) - , mxNupRowsEdt(m_xBuilder->weld_spin_button("pagerows")) - , mxPageMarginTxt1(m_xBuilder->weld_label("pagemargintxt1")) - , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button("pagemarginsb", FieldUnit::MM)) - , mxPageMarginTxt2(m_xBuilder->weld_label("pagemargintxt2")) - , mxSheetMarginTxt1(m_xBuilder->weld_label("sheetmargintxt1")) - , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button("sheetmarginsb", FieldUnit::MM)) - , mxSheetMarginTxt2(m_xBuilder->weld_label("sheetmargintxt2")) - , mxPaperSizeBox(m_xBuilder->weld_combo_box("papersizebox")) - , mxOrientationBox(m_xBuilder->weld_combo_box("pageorientationbox")) - , mxNupOrderTxt(m_xBuilder->weld_label("labelorder")) - , mxNupOrderBox(m_xBuilder->weld_combo_box("orderbox")) + , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *mxPreview)) + , mxPageEdit(m_xBuilder->weld_entry(u"pageedit"_ustr)) + , mxPagesBtn(m_xBuilder->weld_radio_button(u"pagespersheetbtn"_ustr)) + , mxBrochureBtn(m_xBuilder->weld_radio_button(u"brochure"_ustr)) + , mxPagesBoxTitleTxt(m_xBuilder->weld_label(u"pagespersheettxt"_ustr)) + , mxNupPagesBox(m_xBuilder->weld_combo_box(u"pagespersheetbox"_ustr)) + , mxNupNumPagesTxt(m_xBuilder->weld_label(u"pagestxt"_ustr)) + , mxNupColEdt(m_xBuilder->weld_spin_button(u"pagecols"_ustr)) + , mxNupTimesTxt(m_xBuilder->weld_label(u"by"_ustr)) + , mxNupRowsEdt(m_xBuilder->weld_spin_button(u"pagerows"_ustr)) + , mxPageMarginTxt1(m_xBuilder->weld_label(u"pagemargintxt1"_ustr)) + , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button(u"pagemarginsb"_ustr, FieldUnit::MM)) + , mxPageMarginTxt2(m_xBuilder->weld_label(u"pagemargintxt2"_ustr)) + , mxSheetMarginTxt1(m_xBuilder->weld_label(u"sheetmargintxt1"_ustr)) + , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button(u"sheetmarginsb"_ustr, FieldUnit::MM)) + , mxSheetMarginTxt2(m_xBuilder->weld_label(u"sheetmargintxt2"_ustr)) + , mxPaperSizeBox(m_xBuilder->weld_combo_box(u"papersizebox"_ustr)) + , mxOrientationBox(m_xBuilder->weld_combo_box(u"pageorientationbox"_ustr)) + , mxNupOrderTxt(m_xBuilder->weld_label(u"labelorder"_ustr)) + , mxNupOrderBox(m_xBuilder->weld_combo_box(u"orderbox"_ustr)) , mxNupOrder(new ShowNupOrderWindow) - , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, "orderpreview", *mxNupOrder)) - , mxBorderCB(m_xBuilder->weld_check_button("bordercb")) - , mxRangeExpander(m_xBuilder->weld_expander("exRangeExpander")) - , mxLayoutExpander(m_xBuilder->weld_expander("exLayoutExpander")) - , mxCustom(m_xBuilder->weld_widget("customcontents")) + , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, u"orderpreview"_ustr, *mxNupOrder)) + , mxBorderCB(m_xBuilder->weld_check_button(u"bordercb"_ustr)) + , mxRangeExpander(m_xBuilder->weld_expander(u"exRangeExpander"_ustr)) + , mxLayoutExpander(m_xBuilder->weld_expander(u"exLayoutExpander"_ustr)) + , mxCustom(m_xBuilder->weld_widget(u"customcontents"_ustr)) , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ) ) , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ) ) , maNoPageStr( VclResId( SV_PRINT_NOPAGES ) ) @@ -608,8 +608,8 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl { // fall back to last printer SettingsConfigItem* pItem = SettingsConfigItem::get(); - OUString aValue( pItem->getValue( "PrintDialog", - "LastPrinter" ) ); + OUString aValue( pItem->getValue( u"PrintDialog"_ustr, + u"LastPrinter"_ustr ) ); if (mxPrinters->find_text(aValue) != -1) { mxPrinters->set_active_text(aValue); @@ -752,37 +752,37 @@ void PrintDialog::storeToSettings() { SettingsConfigItem* pItem = SettingsConfigItem::get(); - pItem->setValue( "PrintDialog", - "LastPrinter", + pItem->setValue( u"PrintDialog"_ustr, + u"LastPrinter"_ustr, isPrintToFile() ? Printer::GetDefaultPrinterName() : mxPrinters->get_active_text() ); - pItem->setValue( "PrintDialog", - "LastPage", + pItem->setValue( u"PrintDialog"_ustr, + u"LastPage"_ustr, mxTabCtrl->get_tab_label_text(mxTabCtrl->get_current_page_ident())); - pItem->setValue( "PrintDialog", - "WindowState", + pItem->setValue( u"PrintDialog"_ustr, + u"WindowState"_ustr, m_xDialog->get_window_state(vcl::WindowDataMask::All) ); - pItem->setValue( "PrintDialog", - "CopyCount", + pItem->setValue( u"PrintDialog"_ustr, + u"CopyCount"_ustr, mxCopyCountField->get_text() ); - pItem->setValue( "PrintDialog", - "Collate", - mxCollateBox->get_active() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"Collate"_ustr, + mxCollateBox->get_active() ? u"true"_ustr : + u"false"_ustr ); - pItem->setValue( "PrintDialog", - "CollateSingleJobs", - mxSingleJobsBox->get_active() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"CollateSingleJobs"_ustr, + mxSingleJobsBox->get_active() ? u"true"_ustr : + u"false"_ustr ); - pItem->setValue( "PrintDialog", - "HasPreview", - hasPreview() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"HasPreview"_ustr, + hasPreview() ? u"true"_ustr : + u"false"_ustr ); pItem->Commit(); } @@ -792,8 +792,8 @@ void PrintDialog::readFromSettings() SettingsConfigItem* pItem = SettingsConfigItem::get(); // read last selected tab page; if it exists, activate it - OUString aValue = pItem->getValue( "PrintDialog", - "LastPage" ); + OUString aValue = pItem->getValue( u"PrintDialog"_ustr, + u"LastPage"_ustr ); sal_uInt16 nCount = mxTabCtrl->get_n_pages(); for (sal_uInt16 i = 0; i < nCount; ++i) { @@ -806,14 +806,14 @@ void PrintDialog::readFromSettings() } // persistent window state - aValue = pItem->getValue( "PrintDialog", - "WindowState" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"WindowState"_ustr ); if (!aValue.isEmpty()) m_xDialog->set_window_state(aValue); // collate - aValue = pItem->getValue( "PrintDialog", - "CollateBox" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"CollateBox"_ustr ); if( aValue.equalsIgnoreAsciiCase("alwaysoff") ) { mbCollateAlwaysOff = true; @@ -823,19 +823,19 @@ void PrintDialog::readFromSettings() else { mbCollateAlwaysOff = false; - aValue = pItem->getValue( "PrintDialog", - "Collate" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"Collate"_ustr ); mxCollateBox->set_active( aValue.equalsIgnoreAsciiCase("true") ); } // collate single jobs - aValue = pItem->getValue( "PrintDialog", - "CollateSingleJobs" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"CollateSingleJobs"_ustr ); mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true")); // preview box - aValue = pItem->getValue( "PrintDialog", - "HasPreview" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"HasPreview"_ustr ); if ( aValue.equalsIgnoreAsciiCase("false") ) mxPreviewBox->set_active( false ); else @@ -877,7 +877,7 @@ void PrintDialog::setPaperSizes() OUString aWidth( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) ); OUString aHeight( rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ) ); - OUString aUnit = eUnit == o3tl::Length::mm ? OUString("mm") : OUString("in"); + OUString aUnit = eUnit == o3tl::Length::mm ? u"mm"_ustr : u"in"_ustr; OUString aPaperName; // Paper sizes that we don't know of but the system printer driver lists are not "User @@ -1015,7 +1015,7 @@ void PrintDialog::updatePageRange(sal_Int32 nPages) } OUString sRange = aBuf.makeStringAndClear(); mxPageRangeEdit->set_text(sRange); - maPController->setValue("PageRange", Any(sRange)); + maPController->setValue(u"PageRange"_ustr, Any(sRange)); } } @@ -1372,8 +1372,8 @@ void PrintDialog::setupOptionalUI() OUString sOptionsUIFile; rOption.Value >>= sOptionsUIFile; mxCustomOptionsUIBuilder = Application::CreateBuilder(mxCustom.get(), sOptionsUIFile); - std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container("box"); - xWindow->set_help_id("vcl/ui/printdialog/PrintDialog"); + std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container(u"box"_ustr); + xWindow->set_help_id(u"vcl/ui/printdialog/PrintDialog"_ustr); xWindow->show(); continue; } @@ -1856,13 +1856,13 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) } else if (&rButton == mxSingleJobsBox.get()) { - maPController->setValue( "SinglePrintJobs", + maPController->setValue( u"SinglePrintJobs"_ustr, Any( isSingleJobs() ) ); checkControlDependencies(); } else if( &rButton == mxCollateBox.get() ) { - maPController->setValue( "Collate", + maPController->setValue( u"Collate"_ustr, Any( isCollate() ) ); checkControlDependencies(); } @@ -1870,7 +1870,7 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) { bool bChecked = mxReverseOrderBox->get_active(); maPController->setReversePrint( bChecked ); - maPController->setValue( "PrintReverse", + maPController->setValue( u"PrintReverse"_ustr, Any( bChecked ) ); maUpdatePreviewIdle.Start(); } @@ -2064,7 +2064,7 @@ IMPL_LINK_NOARG(PrintDialog, ActivateHdl, weld::Entry&, bool) if (nPage < 1) { nPage = 1; - mxPageEdit->set_text("1"); + mxPageEdit->set_text(u"1"_ustr); } else if (nPage > mnCachedPages) { @@ -2089,9 +2089,9 @@ IMPL_LINK( PrintDialog, SpinModifyHdl, weld::SpinButton&, rEdit, void ) } else if( &rEdit == mxCopyCountField.get() ) { - maPController->setValue( "CopyCount", + maPController->setValue( u"CopyCount"_ustr, Any( sal_Int32(mxCopyCountField->get_value()) ) ); - maPController->setValue( "Collate", + maPController->setValue( u"Collate"_ustr, Any( isCollate() ) ); } } @@ -2224,7 +2224,7 @@ void PrintDialog::previewBackward() void PrintDialog::previewFirst() { - mxPageEdit->set_text("1"); + mxPageEdit->set_text(u"1"_ustr); ActivateHdl(*mxPageEdit); } @@ -2245,13 +2245,13 @@ static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax) // PrintProgressDialog PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax) - : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", "PrintProgressDialog") + : GenericDialogController(i_pParent, u"vcl/ui/printprogressdialog.ui"_ustr, u"PrintProgressDialog"_ustr) , mbCanceled(false) , mnCur(0) , mnMax(i_nMax) - , mxText(m_xBuilder->weld_label("label")) - , mxProgress(m_xBuilder->weld_progress_bar("progressbar")) - , mxButton(m_xBuilder->weld_button("cancel")) + , mxText(m_xBuilder->weld_label(u"label"_ustr)) + , mxProgress(m_xBuilder->weld_progress_bar(u"progressbar"_ustr)) + , mxButton(m_xBuilder->weld_button(u"cancel"_ustr)) { if( mnMax < 1 ) mnMax = 1; |