diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 08:51:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 12:20:06 +0200 |
commit | ecf6f6f25663e81ebf18589b895a22bc5b6ffbab (patch) | |
tree | 578b7ec831d287e89500e59a28580b643f96ecbb | |
parent | 00b3bcc64fc32165d19e78b99cc6f78317824806 (diff) |
loplugin:ostr in cui
Change-Id: I593eb3c02768423fc8cea8d93c112655860228d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167258
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
129 files changed, 2828 insertions, 2814 deletions
diff --git a/cui/inc/dlgname.hxx b/cui/inc/dlgname.hxx index deb55df1c962..d12b8edb1bea 100644 --- a/cui/inc/dlgname.hxx +++ b/cui/inc/dlgname.hxx @@ -37,7 +37,7 @@ private: public: SvxNameDialog(weld::Window* pWindow, const OUString& rName, const OUString& rDesc, - const OUString& rTitle = ""); + const OUString& rTitle = u""_ustr); OUString GetName() const { return m_xEdtName->get_text(); } diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx index f7f3295a921d..3c75cb15dc4c 100644 --- a/cui/source/customize/CommandCategoryListBox.cxx +++ b/cui/source/customize/CommandCategoryListBox.cxx @@ -139,7 +139,7 @@ void CommandCategoryListBox::Init(const css::uno::Reference<css::uno::XComponent } // Separate the "All commands"category from the actual categories - m_xControl->append_separator(""); + m_xControl->append_separator(u""_ustr); typedef std::pair<OUString, sal_Int16> str_id; std::vector<str_id> aCategories; @@ -184,7 +184,7 @@ void CommandCategoryListBox::Init(const css::uno::Reference<css::uno::XComponent } // Separate regular commands from styles and macros - m_xControl->append_separator(""); + m_xControl->append_separator(u""_ustr); // Add macros category m_aGroupInfo.push_back( @@ -270,7 +270,7 @@ OUString CommandCategoryListBox::getCommandName(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - sUIName = lProps.getUnpackedValueOrDefault("Name", OUString()); + sUIName = lProps.getUnpackedValueOrDefault(u"Name"_ustr, OUString()); } } catch (const css::uno::RuntimeException&) @@ -569,12 +569,12 @@ void CommandCategoryListBox::addChildren( continue; } - css::uno::Any value = xPropSet->getPropertyValue("URI"); + css::uno::Any value = xPropSet->getPropertyValue(u"URI"_ustr); value >>= uri; try { - value = xPropSet->getPropertyValue("Description"); + value = xPropSet->getPropertyValue(u"Description"_ustr); value >>= description; } catch (css::uno::Exception&) diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index 1d013654d8f7..20610dc9b096 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -42,13 +42,13 @@ static OUString lcl_activeAppName(vcl::EnumContext::Application eApp) switch (eApp) { case vcl::EnumContext::Application::Writer: - return "ActiveWriter"; + return u"ActiveWriter"_ustr; case vcl::EnumContext::Application::Calc: - return "ActiveCalc"; + return u"ActiveCalc"_ustr; case vcl::EnumContext::Application::Impress: - return "ActiveImpress"; + return u"ActiveImpress"_ustr; case vcl::EnumContext::Application::Draw: - return "ActiveDraw"; + return u"ActiveDraw"_ustr; default: return OUString(); } @@ -59,13 +59,13 @@ static OUString lcl_getAppName(vcl::EnumContext::Application eApp) switch (eApp) { case vcl::EnumContext::Application::Writer: - return "Writer"; + return u"Writer"_ustr; case vcl::EnumContext::Application::Calc: - return "Calc"; + return u"Calc"_ustr; case vcl::EnumContext::Application::Impress: - return "Impress"; + return u"Impress"_ustr; case vcl::EnumContext::Application::Draw: - return "Draw"; + return u"Draw"_ustr; default: return OUString(); } @@ -89,8 +89,8 @@ static OUString getAppNameRegistryPath() static OUString customizedUIPathBuffer() { - OUString sDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( - "bootstrap") ":UserInstallation}/user/config/soffice.cfg/"); + OUString sDirPath(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( + "bootstrap") ":UserInstallation}/user/config/soffice.cfg/"_ustr); rtl::Bootstrap::expandMacros(sDirPath); return sDirPath; } @@ -217,7 +217,8 @@ void CustomNotebookbarGenerator::getFileNameAndAppName(OUString& sAppName, return; const auto xContext = comphelper::getProcessComponentContext(); - utl::OConfigurationTreeRoot aRoot(xContext, "org.openoffice.Office.UI.ToolbarMode/", false); + utl::OConfigurationTreeRoot aRoot(xContext, u"org.openoffice.Office.UI.ToolbarMode/"_ustr, + false); const Reference<frame::XFrame>& xFrame = pFrame->GetFrame().GetFrameInterface(); const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create(xContext); diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index 59a2cdb64017..522dfd3eb721 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -206,29 +206,29 @@ OUString SvxConfigPageHelper::GetModuleName(std::u16string_view aModuleId) { if (aModuleId == u"com.sun.star.text.TextDocument" || aModuleId == u"com.sun.star.text.GlobalDocument") - return "Writer"; + return u"Writer"_ustr; else if (aModuleId == u"com.sun.star.text.WebDocument") - return "Writer/Web"; + return u"Writer/Web"_ustr; else if (aModuleId == u"com.sun.star.drawing.DrawingDocument") - return "Draw"; + return u"Draw"_ustr; else if (aModuleId == u"com.sun.star.presentation.PresentationDocument") - return "Impress"; + return u"Impress"_ustr; else if (aModuleId == u"com.sun.star.sheet.SpreadsheetDocument") - return "Calc"; + return u"Calc"_ustr; else if (aModuleId == u"com.sun.star.script.BasicIDE") - return "Basic"; + return u"Basic"_ustr; else if (aModuleId == u"com.sun.star.formula.FormulaProperties") - return "Math"; + return u"Math"_ustr; else if (aModuleId == u"com.sun.star.sdb.RelationDesign") - return "Relation Design"; + return u"Relation Design"_ustr; else if (aModuleId == u"com.sun.star.sdb.QueryDesign") - return "Query Design"; + return u"Query Design"_ustr; else if (aModuleId == u"com.sun.star.sdb.TableDesign") - return "Table Design"; + return u"Table Design"_ustr; else if (aModuleId == u"com.sun.star.sdb.DataSourceBrowser") - return "Data Source Browser"; + return u"Data Source Browser"_ustr; else if (aModuleId == u"com.sun.star.sdb.DatabaseDocument") - return "Database"; + return u"Database"_ustr; return OUString(); } diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index 4ee5ce9be0ca..2a75181ae95a 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -40,10 +40,10 @@ SvxMenuConfigPage::SvxMenuConfigPage(weld::Container* pPage, weld::DialogControl : SvxConfigPage(pPage, pController, rSet) , m_bIsMenuBar(bIsMenuBar) { - m_xGearBtn = m_xBuilder->weld_menu_button("menugearbtn"); + m_xGearBtn = m_xBuilder->weld_menu_button(u"menugearbtn"_ustr); m_xGearBtn->show(); m_xContentsListBox.reset( - new SvxMenuEntriesListBox(m_xBuilder->weld_tree_view("menucontents"), this)); + new SvxMenuEntriesListBox(m_xBuilder->weld_tree_view(u"menucontents"_ustr), this)); weld::TreeView& rTreeView = m_xContentsListBox->get_widget(); m_xDropTargetHelper.reset(new SvxConfigPageFunctionDropTarget(*this, rTreeView)); rTreeView.connect_size_allocate(LINK(this, SvxMenuConfigPage, MenuEntriesSizeAllocHdl)); @@ -75,9 +75,9 @@ SvxMenuConfigPage::SvxMenuConfigPage(weld::Container* pPage, weld::DialogControl m_xResetBtn->connect_clicked(LINK(this, SvxMenuConfigPage, ResetMenuHdl)); // These operations are not possible on menus/context menus yet - m_xModifyBtn->remove_item("changeIcon"); - m_xModifyBtn->remove_item("resetIcon"); - m_xModifyBtn->remove_item("restoreItem"); + m_xModifyBtn->remove_item(u"changeIcon"_ustr); + m_xModifyBtn->remove_item(u"resetIcon"_ustr); + m_xModifyBtn->remove_item(u"restoreItem"_ustr); if (!bIsMenuBar) { @@ -185,9 +185,9 @@ void SvxMenuConfigPage::UpdateButtonStates() if (pMenuData && m_bIsMenuBar) { // Add option (gear_add) will always be enabled - m_xGearBtn->set_item_sensitive("menu_gear_delete", pMenuData->IsDeletable()); - m_xGearBtn->set_item_sensitive("menu_gear_rename", pMenuData->IsRenamable()); - m_xGearBtn->set_item_sensitive("menu_gear_move", pMenuData->IsMovable()); + m_xGearBtn->set_item_sensitive(u"menu_gear_delete"_ustr, pMenuData->IsDeletable()); + m_xGearBtn->set_item_sensitive(u"menu_gear_rename"_ustr, pMenuData->IsRenamable()); + m_xGearBtn->set_item_sensitive(u"menu_gear_move"_ustr, pMenuData->IsMovable()); } } @@ -532,14 +532,14 @@ IMPL_LINK(SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt, bool bIsValidSelection = (m_xContentsListBox->n_children() != 0 && nSelectIndex != -1); std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(&rTreeView, "cui/ui/entrycontextmenu.ui")); - auto xContextMenu = xBuilder->weld_menu("menu"); - xContextMenu->set_visible("add", false); - xContextMenu->set_visible("remove", bIsValidSelection); - xContextMenu->set_visible("rename", bIsValidSelection && !bIsSeparator); - xContextMenu->set_visible("changeIcon", false); - xContextMenu->set_visible("resetIcon", false); - xContextMenu->set_visible("restoreDefault", false); + Application::CreateBuilder(&rTreeView, u"cui/ui/entrycontextmenu.ui"_ustr)); + auto xContextMenu = xBuilder->weld_menu(u"menu"_ustr); + xContextMenu->set_visible(u"add"_ustr, false); + xContextMenu->set_visible(u"remove"_ustr, bIsValidSelection); + xContextMenu->set_visible(u"rename"_ustr, bIsValidSelection && !bIsSeparator); + xContextMenu->set_visible(u"changeIcon"_ustr, false); + xContextMenu->set_visible(u"resetIcon"_ustr, false); + xContextMenu->set_visible(u"restoreDefault"_ustr, false); OUString sCommand(xContextMenu->popup_at_rect( &rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1)))); @@ -549,7 +549,7 @@ IMPL_LINK(SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt, } else if (sCommand == "rename") { - ModifyItemHdl("renameItem"); + ModifyItemHdl(u"renameItem"_ustr); } else if (!sCommand.isEmpty()) SAL_WARN("cui.customize", "Unknown context menu action: " << sCommand); @@ -571,14 +571,14 @@ IMPL_LINK(SvxMenuConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCEvt, SelectFunctionHdl(rTreeView); std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(&rTreeView, "cui/ui/entrycontextmenu.ui")); - auto xContextMenu = xBuilder->weld_menu("menu"); - xContextMenu->set_visible("add", true); - xContextMenu->set_visible("remove", false); - xContextMenu->set_visible("rename", false); - xContextMenu->set_visible("changeIcon", false); - xContextMenu->set_visible("resetIcon", false); - xContextMenu->set_visible("restoreDefault", false); + Application::CreateBuilder(&rTreeView, u"cui/ui/entrycontextmenu.ui"_ustr)); + auto xContextMenu = xBuilder->weld_menu(u"menu"_ustr); + xContextMenu->set_visible(u"add"_ustr, true); + xContextMenu->set_visible(u"remove"_ustr, false); + xContextMenu->set_visible(u"rename"_ustr, false); + xContextMenu->set_visible(u"changeIcon"_ustr, false); + xContextMenu->set_visible(u"resetIcon"_ustr, false); + xContextMenu->set_visible(u"restoreDefault"_ustr, false); OUString sCommand(xContextMenu->popup_at_rect( &rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1)))); diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 7389d05b91d2..a503e4312e9d 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -77,21 +77,21 @@ static OUString getFileName(std::u16string_view aFileName) else if (aFileName == u"notebookbar_groupedbar_compact.ui") return CuiResId(RID_CUISTR_GROUPEDBAR_COMPACT); else - return "None"; + return u"None"_ustr; } static OUString getModuleId(std::u16string_view sModuleName) { if (sModuleName == u"Writer") - return "com.sun.star.text.TextDocument"; + return u"com.sun.star.text.TextDocument"_ustr; else if (sModuleName == u"Draw") - return "com.sun.star.drawing.DrawingDocument"; + return u"com.sun.star.drawing.DrawingDocument"_ustr; else if (sModuleName == u"Impress") - return "com.sun.star.presentation.PresentationDocument"; + return u"com.sun.star.presentation.PresentationDocument"_ustr; else if (sModuleName == u"Calc") - return "com.sun.star.sheet.SpreadsheetDocument"; + return u"com.sun.star.sheet.SpreadsheetDocument"_ustr; else - return "None"; + return u"None"_ustr; } SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(weld::Container* pPage, @@ -116,7 +116,7 @@ SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(weld::Container* pPage, rCommandCategoryBox.hide(); m_xContentsListBox.reset( - new SvxNotebookbarEntriesListBox(m_xBuilder->weld_tree_view("toolcontents"), this)); + new SvxNotebookbarEntriesListBox(m_xBuilder->weld_tree_view(u"toolcontents"_ustr), this)); m_xDropTargetHelper.reset( new SvxConfigPageFunctionDropTarget(*this, m_xContentsListBox->get_widget())); weld::TreeView& rTreeView = m_xContentsListBox->get_widget(); @@ -149,8 +149,8 @@ void SvxNotebookbarConfigPage::Init() m_xSaveInListBox->append(sSaveInListBoxID, sScopeName); m_xSaveInListBox->set_active_id(sSaveInListBoxID); - m_xTopLevelListBox->append("NotebookBar", CuiResId(RID_CUISTR_ALL_COMMANDS)); - m_xTopLevelListBox->set_active_id("NotebookBar"); + m_xTopLevelListBox->append(u"NotebookBar"_ustr, CuiResId(RID_CUISTR_ALL_COMMANDS)); + m_xTopLevelListBox->set_active_id(u"NotebookBar"_ustr); SelectElement(); } @@ -223,7 +223,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId if (sClassId == u"GtkSeparatorMenuItem" || sClassId == u"GtkSeparator") { - rTreeView.set_text(rIter, "--------------------------------------------", 0); + rTreeView.set_text(rIter, u"--------------------------------------------"_ustr, 0); } else { diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 1997de819d29..a1ba639f0e27 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -46,12 +46,12 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(weld::Container* pPage, const SfxItemSet& rSet) : SvxConfigPage(pPage, pController, rSet) { - m_xGearBtn = m_xBuilder->weld_menu_button("toolbargearbtn"); + m_xGearBtn = m_xBuilder->weld_menu_button(u"toolbargearbtn"_ustr); m_xGearBtn->show(); m_xContainer->set_help_id(HID_SVX_CONFIG_TOOLBAR); m_xContentsListBox.reset( - new SvxToolbarEntriesListBox(m_xBuilder->weld_tree_view("toolcontents"), this)); + new SvxToolbarEntriesListBox(m_xBuilder->weld_tree_view(u"toolcontents"_ustr), this)); m_xDropTargetHelper.reset( new SvxConfigPageFunctionDropTarget(*this, m_xContentsListBox->get_widget())); @@ -95,10 +95,10 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(weld::Container* pPage, m_xResetBtn->connect_clicked(LINK(this, SvxToolbarConfigPage, ResetToolbarHdl)); // "Insert Submenu" is irrelevant to the toolbars - m_xInsertBtn->remove_item("insertsubmenu"); + m_xInsertBtn->remove_item(u"insertsubmenu"_ustr); // Gear menu's "Move" action is irrelevant to the toolbars - m_xGearBtn->set_item_sensitive("toolbar_gear_move", false); + m_xGearBtn->set_item_sensitive(u"toolbar_gear_move"_ustr, false); // default toolbar to select is standardbar unless a different one // has been passed in @@ -482,7 +482,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OUString&, rIdent, void) aNewName = aNameDialog.GetName(); if (aNewName.isEmpty()) // tdf#80758 - Accelerator character ("~") is passed as - pEntry->SetName("~"); // the button name in case of empty values. + pEntry->SetName(u"~"_ustr); // the button name in case of empty values. else pEntry->SetName(aNewName); @@ -686,8 +686,10 @@ void SvxToolbarConfigPage::UpdateButtonStates() // Handle the gear button // "toolbar_gear_add" option is always enabled - m_xGearBtn->set_item_sensitive("toolbar_gear_delete", pToolbar && pToolbar->IsDeletable()); - m_xGearBtn->set_item_sensitive("toolbar_gear_rename", pToolbar && pToolbar->IsRenamable()); + m_xGearBtn->set_item_sensitive(u"toolbar_gear_delete"_ustr, + pToolbar && pToolbar->IsDeletable()); + m_xGearBtn->set_item_sensitive(u"toolbar_gear_rename"_ustr, + pToolbar && pToolbar->IsRenamable()); } short SvxToolbarConfigPage::QueryReset() @@ -728,17 +730,17 @@ void SvxToolbarConfigPage::SelectElement() { case 0: { - m_xGearBtn->set_item_active("toolbar_gear_iconOnly", true); + m_xGearBtn->set_item_active(u"toolbar_gear_iconOnly"_ustr, true); break; } case 1: { - m_xGearBtn->set_item_active("toolbar_gear_textOnly", true); + m_xGearBtn->set_item_active(u"toolbar_gear_textOnly"_ustr, true); break; } case 2: { - m_xGearBtn->set_item_active("toolbar_gear_iconAndText", true); + m_xGearBtn->set_item_active(u"toolbar_gear_iconAndText"_ustr, true); break; } } @@ -867,27 +869,27 @@ IMPL_LINK(SvxToolbarConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEv bool bIsValidSelection = (m_xContentsListBox->n_children() != 0 && nSelectIndex != -1); std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(&rTreeView, "cui/ui/entrycontextmenu.ui")); - auto xContextMenu = xBuilder->weld_menu("menu"); - xContextMenu->set_visible("add", false); - xContextMenu->set_visible("remove", bIsValidSelection); - xContextMenu->set_visible("rename", bIsValidSelection && !bIsSeparator); - xContextMenu->set_visible("changeIcon", bIsValidSelection && !bIsSeparator); - xContextMenu->set_visible("resetIcon", bIsValidSelection && !bIsSeparator); - xContextMenu->set_visible("restoreDefault", bIsValidSelection && !bIsSeparator); + Application::CreateBuilder(&rTreeView, u"cui/ui/entrycontextmenu.ui"_ustr)); + auto xContextMenu = xBuilder->weld_menu(u"menu"_ustr); + xContextMenu->set_visible(u"add"_ustr, false); + xContextMenu->set_visible(u"remove"_ustr, bIsValidSelection); + xContextMenu->set_visible(u"rename"_ustr, bIsValidSelection && !bIsSeparator); + xContextMenu->set_visible(u"changeIcon"_ustr, bIsValidSelection && !bIsSeparator); + xContextMenu->set_visible(u"resetIcon"_ustr, bIsValidSelection && !bIsSeparator); + xContextMenu->set_visible(u"restoreDefault"_ustr, bIsValidSelection && !bIsSeparator); OUString sCommand(xContextMenu->popup_at_rect( &rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1)))); if (sCommand == "remove") RemoveCommandHdl(*m_xRemoveCommandButton); else if (sCommand == "rename") - ModifyItemHdl("renameItem"); + ModifyItemHdl(u"renameItem"_ustr); else if (sCommand == "changeIcon") - ModifyItemHdl("changeIcon"); + ModifyItemHdl(u"changeIcon"_ustr); else if (sCommand == "resetIcon") - ModifyItemHdl("resetIcon"); + ModifyItemHdl(u"resetIcon"_ustr); else if (sCommand == "restoreDefault") - ModifyItemHdl("restoreItem"); + ModifyItemHdl(u"restoreItem"_ustr); else if (!sCommand.isEmpty()) SAL_WARN("cui.customize", "Unknown context menu action: " << sCommand); return true; @@ -907,14 +909,14 @@ IMPL_LINK(SvxToolbarConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCE rTreeView.select(*xIter); SelectFunctionHdl(rTreeView); std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(&rTreeView, "cui/ui/entrycontextmenu.ui")); - auto xContextMenu = xBuilder->weld_menu("menu"); - xContextMenu->set_visible("add", true); - xContextMenu->set_visible("remove", false); - xContextMenu->set_visible("rename", false); - xContextMenu->set_visible("changeIcon", false); - xContextMenu->set_visible("resetIcon", false); - xContextMenu->set_visible("restoreDefault", false); + Application::CreateBuilder(&rTreeView, u"cui/ui/entrycontextmenu.ui"_ustr)); + auto xContextMenu = xBuilder->weld_menu(u"menu"_ustr); + xContextMenu->set_visible(u"add"_ustr, true); + xContextMenu->set_visible(u"remove"_ustr, false); + xContextMenu->set_visible(u"rename"_ustr, false); + xContextMenu->set_visible(u"changeIcon"_ustr, false); + xContextMenu->set_visible(u"resetIcon"_ustr, false); + xContextMenu->set_visible(u"restoreDefault"_ustr, false); OUString sCommand(xContextMenu->popup_at_rect( &rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1)))); diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 027ac72968e8..04924b9a8f57 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -852,7 +852,8 @@ IMPL_LINK(SfxAcceleratorConfigPage, KeyInputHdl, const KeyEvent&, rKey, bool) SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& aSet) - : SfxTabPage(pPage, pController, "cui/ui/accelconfigpage.ui", "AccelConfigPage", &aSet) + : SfxTabPage(pPage, pController, u"cui/ui/accelconfigpage.ui"_ustr, u"AccelConfigPage"_ustr, + &aSet) #if HAVE_FEATURE_SCRIPTING , m_pMacroInfoItem() #endif @@ -863,18 +864,18 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage, , m_bStylesInfoInitialized(false) , m_aUpdateDataTimer("SfxAcceleratorConfigPage UpdateDataTimer") , m_aFillGroupIdle("SfxAcceleratorConfigPage m_aFillGroupIdle") - , m_xEntriesBox(m_xBuilder->weld_tree_view("shortcuts")) - , m_xOfficeButton(m_xBuilder->weld_radio_button("office")) - , m_xModuleButton(m_xBuilder->weld_radio_button("module")) - , m_xChangeButton(m_xBuilder->weld_button("change")) - , m_xRemoveButton(m_xBuilder->weld_button("delete")) - , m_xGroupLBox(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view("category"))) - , m_xFunctionBox(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("function"))) - , m_xKeyBox(m_xBuilder->weld_tree_view("keys")) - , m_xSearchEdit(m_xBuilder->weld_entry("searchEntry")) - , m_xLoadButton(m_xBuilder->weld_button("load")) - , m_xSaveButton(m_xBuilder->weld_button("save")) - , m_xResetButton(m_xBuilder->weld_button("reset")) + , m_xEntriesBox(m_xBuilder->weld_tree_view(u"shortcuts"_ustr)) + , m_xOfficeButton(m_xBuilder->weld_radio_button(u"office"_ustr)) + , m_xModuleButton(m_xBuilder->weld_radio_button(u"module"_ustr)) + , m_xChangeButton(m_xBuilder->weld_button(u"change"_ustr)) + , m_xRemoveButton(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xGroupLBox(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view(u"category"_ustr))) + , m_xFunctionBox(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view(u"function"_ustr))) + , m_xKeyBox(m_xBuilder->weld_tree_view(u"keys"_ustr)) + , m_xSearchEdit(m_xBuilder->weld_entry(u"searchEntry"_ustr)) + , m_xLoadButton(m_xBuilder->weld_button(u"load"_ustr)) + , m_xSaveButton(m_xBuilder->weld_button(u"save"_ustr)) + , m_xResetButton(m_xBuilder->weld_button(u"reset"_ustr)) { Size aSize(m_xEntriesBox->get_approximate_digit_width() * 40, m_xEntriesBox->get_height_rows(10)); @@ -977,7 +978,7 @@ void SfxAcceleratorConfigPage::InitAccCfg() m_sModuleLongName = xModuleManager->identify(m_xFrame); comphelper::SequenceAsHashMap lModuleProps(xModuleManager->getByName(m_sModuleLongName)); m_sModuleUIName - = lModuleProps.getUnpackedValueOrDefault("ooSetupFactoryUIName", OUString()); + = lModuleProps.getUnpackedValueOrDefault(u"ooSetupFactoryUIName"_ustr, OUString()); // get global accelerator configuration m_xGlobal = css::ui::GlobalAcceleratorConfiguration::create(m_xContext); @@ -1428,7 +1429,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, void xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType; if (sMediaType.isEmpty()) xUIConfigProps->setPropertyValue( - MEDIATYPE_PROPNAME, uno::Any(OUString("application/vnd.sun.xml.ui.configuration"))); + MEDIATYPE_PROPNAME, uno::Any(u"application/vnd.sun.xml.ui.configuration"_ustr)); uno::Reference<ui::XUIConfigurationManager2> xCfgMgr = ui::UIConfigurationManager::create(m_xContext); @@ -1482,7 +1483,7 @@ void SfxAcceleratorConfigPage::StartFileDialog(StartFileDialogType nType, const m_pFileDlg->SetTitle(rTitle); m_pFileDlg->AddFilter(aFilterAllStr, FILEDIALOG_FILTER_ALL); - m_pFileDlg->AddFilter(aFilterCfgStr, "*.cfg"); + m_pFileDlg->AddFilter(aFilterCfgStr, u"*.cfg"_ustr); m_pFileDlg->SetCurrentFilter(aFilterCfgStr); m_pFileDlg->SetContext(sfx2::FileDialogHelper::AcceleratorConfig); @@ -1501,10 +1502,10 @@ bool SfxAcceleratorConfigPage::FillItemSet(SfxItemSet*) css::uno::Reference<css::beans::XPropertySet> xFrameProps(m_xFrame, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::frame::XLayoutManager> xLayoutManager; - xFrameProps->getPropertyValue("LayoutManager") >>= xLayoutManager; + xFrameProps->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; css::uno::Reference<css::beans::XPropertySet> xLayoutProps(xLayoutManager, css::uno::UNO_QUERY_THROW); - xLayoutProps->setPropertyValue("RefreshContextToolbarToolTip", css::uno::Any(true)); + xLayoutProps->setPropertyValue(u"RefreshContextToolbarToolTip"_ustr, css::uno::Any(true)); } catch (const uno::RuntimeException&) { @@ -1580,7 +1581,7 @@ OUString SfxAcceleratorConfigPage::GetLabel4Command(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - OUString sLabel = lProps.getUnpackedValueOrDefault("Name", OUString()); + OUString sLabel = lProps.getUnpackedValueOrDefault(u"Name"_ustr, OUString()); if (!sLabel.isEmpty()) return sLabel; } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index ff5702121755..ca717c2632c7 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -206,24 +206,24 @@ static std::unique_ptr<SfxTabPage> CreateSvxEventConfigPage( weld::Container* pP * *****************************************************************************/ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSet) - : SfxTabDialogController(pParent, "cui/ui/customizedialog.ui", "CustomizeDialog", pInSet) + : SfxTabDialogController(pParent, u"cui/ui/customizedialog.ui"_ustr, u"CustomizeDialog"_ustr, pInSet) { SvxConfigPageHelper::InitImageType(); - AddTabPage("menus", CreateSvxMenuConfigPage, nullptr); - AddTabPage("toolbars", CreateSvxToolbarConfigPage, nullptr); - AddTabPage("notebookbar", CreateSvxNotebookbarConfigPage, nullptr); - AddTabPage("contextmenus", CreateSvxContextMenuConfigPage, nullptr); - AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr); - AddTabPage("events", CreateSvxEventConfigPage, nullptr); + AddTabPage(u"menus"_ustr, CreateSvxMenuConfigPage, nullptr); + AddTabPage(u"toolbars"_ustr, CreateSvxToolbarConfigPage, nullptr); + AddTabPage(u"notebookbar"_ustr, CreateSvxNotebookbarConfigPage, nullptr); + AddTabPage(u"contextmenus"_ustr, CreateSvxContextMenuConfigPage, nullptr); + AddTabPage(u"keyboard"_ustr, CreateKeyboardConfigPage, nullptr); + AddTabPage(u"events"_ustr, CreateSvxEventConfigPage, nullptr); if (const SfxPoolItem* pItem = pInSet->GetItem(SID_CONFIG)) { OUString text = static_cast<const SfxStringItem*>(pItem)->GetValue(); if (text.startsWith( ITEM_TOOLBAR_URL ) ) - SetCurPageId("toolbars"); + SetCurPageId(u"toolbars"_ustr); else if (text.startsWith( ITEM_EVENT_URL) ) - SetCurPageId("events"); + SetCurPageId(u"events"_ustr); } #if HAVE_FEATURE_SCRIPTING else if (pInSet->GetItemIfSet(SID_MACROINFO)) @@ -231,7 +231,7 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe // for the "assign" button in the Basic Macros chooser automatically switch // to the keyboard tab in which this macro will be pre-selected for assigning // to a keystroke - SetCurPageId("keyboard"); + SetCurPageId(u"keyboard"_ustr); } #endif } @@ -251,10 +251,10 @@ void SvxConfigDialog::SetFrame(const css::uno::Reference<css::frame::XFrame>& xF aModuleId != "com.sun.star.sheet.SpreadsheetDocument" && aModuleId != "com.sun.star.presentation.PresentationDocument" && aModuleId != "com.sun.star.drawing.DrawingDocument") - RemoveTabPage("notebookbar"); + RemoveTabPage(u"notebookbar"_ustr); if (aModuleId == "com.sun.star.frame.StartModule") - RemoveTabPage("keyboard"); + RemoveTabPage(u"keyboard"_ustr); } void SvxConfigDialog::PageCreated(const OUString &rId, SfxTabPage& rPage) @@ -422,7 +422,7 @@ MenuSaveInData::GetEntries() { if ( pRootEntry == nullptr ) { - pRootEntry.reset( new SvxConfigEntry( "MainMenus", OUString(), true, /*bParentData*/false) ); + pRootEntry.reset( new SvxConfigEntry( u"MainMenus"_ustr, OUString(), true, /*bParentData*/false) ); if ( m_xMenuSettings.is() ) { @@ -742,7 +742,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries() { std::unordered_map< OUString, bool > aMenuInfo; - m_pRootEntry.reset( new SvxConfigEntry( "ContextMenus", OUString(), true, /*bParentData*/false ) ); + m_pRootEntry.reset( new SvxConfigEntry( u"ContextMenus"_ustr, OUString(), true, /*bParentData*/false ) ); css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aElementsInfo; try { @@ -1000,30 +1000,30 @@ IMPL_LINK(SvxMenuEntriesListBox, QueryTooltip, const weld::TreeIter&, rIter, OUS * *****************************************************************************/ SvxConfigPage::SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/menuassignpage.ui", "MenuAssignPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/menuassignpage.ui"_ustr, u"MenuAssignPage"_ustr, &rSet) , m_aUpdateDataTimer( "SvxConfigPage UpdateDataTimer" ) , bInitialised(false) , pCurrentSaveInData(nullptr) - , m_xCommandCategoryListBox(new CommandCategoryListBox(m_xBuilder->weld_combo_box("commandcategorylist"))) - , m_xFunctions(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("functions"))) - , m_xCategoryLabel(m_xBuilder->weld_label("categorylabel")) - , m_xDescriptionFieldLb(m_xBuilder->weld_label("descriptionlabel")) - , m_xDescriptionField(m_xBuilder->weld_text_view("desc")) - , m_xLeftFunctionLabel(m_xBuilder->weld_label("leftfunctionlabel")) - , m_xSearchEdit(m_xBuilder->weld_entry("searchEntry")) - , m_xSearchLabel(m_xBuilder->weld_label("searchlabel")) - , m_xCustomizeLabel(m_xBuilder->weld_label("customizelabel")) - , m_xTopLevelListBox(m_xBuilder->weld_combo_box("toplevellist")) - , m_xMoveUpButton(m_xBuilder->weld_button("up")) - , m_xMoveDownButton(m_xBuilder->weld_button("down")) - , m_xSaveInListBox(m_xBuilder->weld_combo_box("savein")) - , m_xCustomizeBox(m_xBuilder->weld_widget("customizebox")) - , m_xInsertBtn(m_xBuilder->weld_menu_button("insert")) - , m_xModifyBtn(m_xBuilder->weld_menu_button("modify")) - , m_xResetBtn(m_xBuilder->weld_button("defaultsbtn")) - , m_xCommandButtons(m_xBuilder->weld_widget("arrowgrid")) - , m_xAddCommandButton(m_xBuilder->weld_button("add")) - , m_xRemoveCommandButton(m_xBuilder->weld_button("remove")) + , m_xCommandCategoryListBox(new CommandCategoryListBox(m_xBuilder->weld_combo_box(u"commandcategorylist"_ustr))) + , m_xFunctions(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view(u"functions"_ustr))) + , m_xCategoryLabel(m_xBuilder->weld_label(u"categorylabel"_ustr)) + , m_xDescriptionFieldLb(m_xBuilder->weld_label(u"descriptionlabel"_ustr)) + , m_xDescriptionField(m_xBuilder->weld_text_view(u"desc"_ustr)) + , m_xLeftFunctionLabel(m_xBuilder->weld_label(u"leftfunctionlabel"_ustr)) + , m_xSearchEdit(m_xBuilder->weld_entry(u"searchEntry"_ustr)) + , m_xSearchLabel(m_xBuilder->weld_label(u"searchlabel"_ustr)) + , m_xCustomizeLabel(m_xBuilder->weld_label(u"customizelabel"_ustr)) + , m_xTopLevelListBox(m_xBuilder->weld_combo_box(u"toplevellist"_ustr)) + , m_xMoveUpButton(m_xBuilder->weld_button(u"up"_ustr)) + , m_xMoveDownButton(m_xBuilder->weld_button(u"down"_ustr)) + , m_xSaveInListBox(m_xBuilder->weld_combo_box(u"savein"_ustr)) + , m_xCustomizeBox(m_xBuilder->weld_widget(u"customizebox"_ustr)) + , m_xInsertBtn(m_xBuilder->weld_menu_button(u"insert"_ustr)) + , m_xModifyBtn(m_xBuilder->weld_menu_button(u"modify"_ustr)) + , m_xResetBtn(m_xBuilder->weld_button(u"defaultsbtn"_ustr)) + , m_xCommandButtons(m_xBuilder->weld_widget(u"arrowgrid"_ustr)) + , m_xAddCommandButton(m_xBuilder->weld_button(u"add"_ustr)) + , m_xRemoveCommandButton(m_xBuilder->weld_button(u"remove"_ustr)) { CustomNotebookbarGenerator::getFileNameAndAppName(m_sAppName, m_sFileName); @@ -1676,7 +1676,7 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, weld::TreeView&, void) m_xAddCommandButton->set_sensitive(false); m_xRemoveCommandButton->set_sensitive(false); - m_xDescriptionField->set_text(""); + m_xDescriptionField->set_text(u""_ustr); } UpdateButtonStates(); @@ -1780,12 +1780,12 @@ bool SvxConfigPage::MoveEntryData(int nSourceEntry, int nTargetEntry) SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( weld::Window* pParent, SvxEntries* entries, SvxConfigEntry const * selection, bool bCreateMenu ) - : GenericDialogController(pParent, "cui/ui/movemenu.ui", "MoveMenuDialog") - , m_xMenuBox(m_xBuilder->weld_widget("namebox")) - , m_xMenuNameEdit(m_xBuilder->weld_entry("menuname")) - , m_xMenuListBox(m_xBuilder->weld_tree_view("menulist")) - , m_xMoveUpButton(m_xBuilder->weld_button("up")) - , m_xMoveDownButton(m_xBuilder->weld_button("down")) + : GenericDialogController(pParent, u"cui/ui/movemenu.ui"_ustr, u"MoveMenuDialog"_ustr) + , m_xMenuBox(m_xBuilder->weld_widget(u"namebox"_ustr)) + , m_xMenuNameEdit(m_xBuilder->weld_entry(u"menuname"_ustr)) + , m_xMenuListBox(m_xBuilder->weld_tree_view(u"menulist"_ustr)) + , m_xMoveUpButton(m_xBuilder->weld_button(u"up"_ustr)) + , m_xMoveDownButton(m_xBuilder->weld_button(u"down"_ustr)) { m_xMenuListBox->set_size_request(-1, m_xMenuListBox->get_height_rows(12)); @@ -2036,7 +2036,7 @@ void ToolbarSaveInData::SetSystemStyle( uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY ); if ( xPropSet.is() ) { - uno::Any a = xPropSet->getPropertyValue( "LayoutManager" ); + uno::Any a = xPropSet->getPropertyValue( u"LayoutManager"_ustr ); a >>= xLayoutManager; } @@ -2182,7 +2182,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() if ( pRootEntry == nullptr ) { - pRootEntry.reset( new SvxConfigEntry( "MainToolbars", OUString(), true, /*bParentData*/false) ); + pRootEntry.reset( new SvxConfigEntry( u"MainToolbars"_ustr, OUString(), true, /*bParentData*/false) ); const uno::Sequence< uno::Sequence < beans::PropertyValue > > info = GetConfigManager()->getUIElementsInfo( @@ -2691,9 +2691,9 @@ void ToolbarSaveInData::LoadToolbar( } SvxNewToolbarDialog::SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName) - : GenericDialogController(pWindow, "cui/ui/newtoolbardialog.ui", "NewToolbarDialog") - , m_xEdtName(m_xBuilder->weld_entry("edit")) - , m_xSaveInListBox(m_xBuilder->weld_combo_box("savein")) + : GenericDialogController(pWindow, u"cui/ui/newtoolbardialog.ui"_ustr, u"NewToolbarDialog"_ustr) + , m_xEdtName(m_xBuilder->weld_entry(u"edit"_ustr)) + , m_xSaveInListBox(m_xBuilder->weld_combo_box(u"savein"_ustr)) { m_xEdtName->set_text(rName); m_xEdtName->select_region(0, -1); @@ -2711,14 +2711,14 @@ SvxNewToolbarDialog::~SvxNewToolbarDialog() SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow, uno::Reference< css::ui::XImageManager > xImageManager, uno::Reference< css::ui::XImageManager > xParentImageManager) - : GenericDialogController(pWindow, "cui/ui/iconselectordialog.ui", "IconSelector") + : GenericDialogController(pWindow, u"cui/ui/iconselectordialog.ui"_ustr, u"IconSelector"_ustr) , m_xImageManager(std::move(xImageManager)) , m_xParentImageManager(std::move(xParentImageManager)) - , m_xTbSymbol(new ValueSet(m_xBuilder->weld_scrolled_window("symbolswin", true))) - , m_xTbSymbolWin(new weld::CustomWeld(*m_xBuilder, "symbolsToolbar", *m_xTbSymbol)) - , m_xFtNote(m_xBuilder->weld_label("noteLabel")) - , m_xBtnImport(m_xBuilder->weld_button("importButton")) - , m_xBtnDelete(m_xBuilder->weld_button("deleteButton")) + , m_xTbSymbol(new ValueSet(m_xBuilder->weld_scrolled_window(u"symbolswin"_ustr, true))) + , m_xTbSymbolWin(new weld::CustomWeld(*m_xBuilder, u"symbolsToolbar"_ustr, *m_xTbSymbol)) + , m_xFtNote(m_xBuilder->weld_label(u"noteLabel"_ustr)) + , m_xBtnImport(m_xBuilder->weld_button(u"importButton"_ustr)) + , m_xBtnDelete(m_xBuilder->weld_button(u"deleteButton"_ustr)) { typedef std::unordered_map< OUString, bool > ImageInfo; @@ -2956,7 +2956,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( const OUString& aURL ) { uno::Reference< graphic::XGraphic > xGraphic; - uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue("URL", aURL) }; + uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue(u"URL"_ustr, aURL) }; css::awt::Size aSize; bool bOK = false; @@ -2966,7 +2966,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( uno::Reference< beans::XPropertySet > props = m_xGraphProvider->queryGraphicDescriptor( aMediaProps ); - uno::Any a = props->getPropertyValue( "SizePixel" ); + uno::Any a = props->getPropertyValue( u"SizePixel"_ustr ); a >>= aSize; if (0 == aSize.Width || 0 == aSize.Height) return false; @@ -3026,7 +3026,7 @@ namespace { OUString name; OUString message = CuiResId( RID_CUISTR_REPLACE_ICON_WARNING ); - OUString placeholder("%ICONNAME" ); + OUString placeholder(u"%ICONNAME"_ustr ); sal_Int32 pos = message.indexOf( placeholder ); if ( pos != -1 ) { @@ -3159,14 +3159,14 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { bool result = false; - uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue("URL", aURL) }; + uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue(u"URL"_ustr, aURL) }; try { uno::Reference< beans::XPropertySet > props = m_xGraphProvider->queryGraphicDescriptor( aMediaProps ); - uno::Any a = props->getPropertyValue("SizePixel"); + uno::Any a = props->getPropertyValue(u"SizePixel"_ustr); uno::Reference< graphic::XGraphic > xGraphic = m_xGraphProvider->queryGraphic( aMediaProps ); if ( xGraphic.is() ) @@ -3224,8 +3224,8 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) * *******************************************************************************/ SvxIconChangeDialog::SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage) - : MessageDialogController(pWindow, "cui/ui/iconchangedialog.ui", "IconChange", "grid") - , m_xLineEditDescription(m_xBuilder->weld_text_view("addrTextview")) + : MessageDialogController(pWindow, u"cui/ui/iconchangedialog.ui"_ustr, u"IconChange"_ustr, u"grid"_ustr) + , m_xLineEditDescription(m_xBuilder->weld_text_view(u"addrTextview"_ustr)) { m_xLineEditDescription->set_size_request(m_xLineEditDescription->get_approximate_digit_width() * 48, m_xLineEditDescription->get_text_height() * 8); diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 5875b977a434..1cc1895a490a 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -232,7 +232,7 @@ std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& s xStyleSet->getByName(aStyleInfo.sStyle) >>= xStyle; if (!xStyle.is()) continue; - xStyle->getPropertyValue("DisplayName") >>= aStyleInfo.sLabel; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= aStyleInfo.sLabel; } catch(const css::uno::RuntimeException&) { throw; } @@ -521,8 +521,8 @@ void CuiConfigGroupListBox::FillScriptList(const css::uno::Reference< css::scrip xRootNode->getChildNodes(); bool bIsRootNode = false; - OUString user("user"); - OUString share("share"); + OUString user(u"user"_ustr); + OUString share(u"share"_ustr); if ( xRootNode->getName() == "Root" ) { bIsRootNode = true; @@ -740,7 +740,7 @@ OUString CuiConfigGroupListBox::GetImage( Any aAny = xModuleManager->getByName(appModule); if( !( aAny >>= moduleDescr ) ) { - throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue"); + throw RuntimeException(u"SFTreeListBox::Init: failed to get PropertyValue"_ustr); } for ( sal_Int32 pos = moduleDescr.getLength(); pos--; ) { @@ -810,7 +810,7 @@ OUString CuiConfigGroupListBox::MapCommand2UIName(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - sUIName = lProps.getUnpackedValueOrDefault("Name", OUString()); + sUIName = lProps.getUnpackedValueOrDefault(u"Name"_ustr, OUString()); } } catch(const css::uno::RuntimeException&) @@ -902,12 +902,12 @@ void CuiConfigGroupListBox::GroupSelected() } Any value = - xPropSet->getPropertyValue("URI"); + xPropSet->getPropertyValue(u"URI"_ustr); value >>= uri; try { - value = xPropSet->getPropertyValue("Description"); + value = xPropSet->getPropertyValue(u"Description"_ustr); value >>= description; } catch (Exception &) { @@ -1129,16 +1129,16 @@ void CuiConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem ) SvxScriptSelectorDialog::SvxScriptSelectorDialog( weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& xFrame) - : GenericDialogController(pParent, "cui/ui/macroselectordialog.ui", "MacroSelectorDialog") - , m_xDialogDescription(m_xBuilder->weld_label("helpmacro")) - , m_xCategories(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view("categories"))) - , m_xCommands(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("commands"))) - , m_xLibraryFT(m_xBuilder->weld_label("libraryft")) - , m_xMacronameFT(m_xBuilder->weld_label("macronameft")) - , m_xOKButton(m_xBuilder->weld_button("ok")) - , m_xCancelButton(m_xBuilder->weld_button("cancel")) - , m_xDescriptionText(m_xBuilder->weld_text_view("description")) - , m_xDescriptionFrame(m_xBuilder->weld_frame("descriptionframe")) + : GenericDialogController(pParent, u"cui/ui/macroselectordialog.ui"_ustr, u"MacroSelectorDialog"_ustr) + , m_xDialogDescription(m_xBuilder->weld_label(u"helpmacro"_ustr)) + , m_xCategories(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view(u"categories"_ustr))) + , m_xCommands(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view(u"commands"_ustr))) + , m_xLibraryFT(m_xBuilder->weld_label(u"libraryft"_ustr)) + , m_xMacronameFT(m_xBuilder->weld_label(u"macronameft"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCancelButton(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xDescriptionText(m_xBuilder->weld_text_view(u"description"_ustr)) + , m_xDescriptionFrame(m_xBuilder->weld_frame(u"descriptionframe"_ustr)) { m_xCancelButton->show(); m_xDialogDescription->show(); @@ -1209,11 +1209,11 @@ IMPL_LINK(SvxScriptSelectorDialog, ContextMenuHdl, const CommandEvent&, rCEvt, b if (rCEvt.GetCommand() != CommandEventId::ContextMenu || !xTreeView.n_children()) return false; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&xTreeView, "modules/BasicIDE/ui/sortmenu.ui")); - std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("sortmenu")); - std::unique_ptr<weld::Menu> xDropMenu(xBuilder->weld_menu("sortsubmenu")); - xDropMenu->set_active("alphabetically", xTreeView.get_sort_order()); - xDropMenu->set_active("properorder", !xTreeView.get_sort_order()); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&xTreeView, u"modules/BasicIDE/ui/sortmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"sortmenu"_ustr)); + std::unique_ptr<weld::Menu> xDropMenu(xBuilder->weld_menu(u"sortsubmenu"_ustr)); + xDropMenu->set_active(u"alphabetically"_ustr, xTreeView.get_sort_order()); + xDropMenu->set_active(u"properorder"_ustr, !xTreeView.get_sort_order()); OUString sCommand(xPopup->popup_at_rect(&xTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); if (sCommand == "alphabetically") diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 755fd16b416a..b78aabf6ed62 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -38,14 +38,14 @@ using namespace ::com::sun::star; SvxEventConfigPage::SvxEventConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, SvxEventConfigPage::EarlyInit) - : SvxMacroTabPage_(pPage, pController, "cui/ui/eventsconfigpage.ui", "EventsConfigPage", rSet) - , m_xSaveInListBox(m_xBuilder->weld_combo_box("savein")) + : SvxMacroTabPage_(pPage, pController, u"cui/ui/eventsconfigpage.ui"_ustr, u"EventsConfigPage"_ustr, rSet) + , m_xSaveInListBox(m_xBuilder->weld_combo_box(u"savein"_ustr)) { - mpImpl->xEventLB = m_xBuilder->weld_tree_view("events"); - mpImpl->xAssignPB = m_xBuilder->weld_button("macro"); - mpImpl->xDeletePB = m_xBuilder->weld_button("delete"); - mpImpl->xDeleteAllPB = m_xBuilder->weld_button("deleteall"); - mpImpl->xAssignComponentPB = m_xBuilder->weld_button("component"); + mpImpl->xEventLB = m_xBuilder->weld_tree_view(u"events"_ustr); + mpImpl->xAssignPB = m_xBuilder->weld_button(u"macro"_ustr); + mpImpl->xDeletePB = m_xBuilder->weld_button(u"delete"_ustr); + mpImpl->xDeleteAllPB = m_xBuilder->weld_button(u"deleteall"_ustr); + mpImpl->xAssignComponentPB = m_xBuilder->weld_button(u"component"_ustr); mpImpl->xEventLB->set_size_request(mpImpl->xEventLB->get_approximate_digit_width() * 70, mpImpl->xEventLB->get_height_rows(20)); diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 79197be4bf43..a352ea4b97dc 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -504,7 +504,7 @@ void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) IMPL_LINK_NOARG(SvxMacroTabPage_, DeleteAllHdl_Impl, weld::Button&, void) { - OUString sEventType = "Script" ; + OUString sEventType = u"Script"_ustr ; OUString sEmptyString; mpImpl->xEventLB->all_foreach([this, &sEventType, &sEmptyString](weld::TreeIter& rEntry) { @@ -608,8 +608,8 @@ Any SvxMacroTabPage_::GetPropsByName( const OUString& eventName, EventsHash& eve ::comphelper::NamedValueCollection aProps; if ( !(rAssignedEvent.first.isEmpty() || rAssignedEvent.second.isEmpty()) ) { - aProps.put( "EventType", rAssignedEvent.first ); - aProps.put( "Script", rAssignedEvent.second ); + aProps.put( u"EventType"_ustr, rAssignedEvent.first ); + aProps.put( u"Script"_ustr, rAssignedEvent.second ); } aReturn <<= aProps.getPropertyValues(); @@ -625,8 +625,8 @@ EventPair SvxMacroTabPage_::GetPairFromAny( const Any& aAny ) if( aAny >>= props ) { ::comphelper::NamedValueCollection aProps( props ); - type = aProps.getOrDefault( "EventType", type ); - url = aProps.getOrDefault( "Script", url ); + type = aProps.getOrDefault( u"EventType"_ustr, type ); + url = aProps.getOrDefault( u"Script"_ustr, url ); } return std::make_pair( type, url ); } @@ -636,15 +636,15 @@ SvxMacroTabPage::SvxMacroTabPage(weld::Container* pPage, weld::DialogController* const SfxItemSet& rSet, Reference< container::XNameReplace > const & xNameReplace, sal_uInt16 nSelectedIndex) - : SvxMacroTabPage_(pPage, pController, "cui/ui/macroassignpage.ui", "MacroAssignPage", rSet) + : SvxMacroTabPage_(pPage, pController, u"cui/ui/macroassignpage.ui"_ustr, u"MacroAssignPage"_ustr, rSet) { - mpImpl->xEventLB = m_xBuilder->weld_tree_view("assignments"); + mpImpl->xEventLB = m_xBuilder->weld_tree_view(u"assignments"_ustr); mpImpl->xEventLB->set_size_request(mpImpl->xEventLB->get_approximate_digit_width() * 70, mpImpl->xEventLB->get_height_rows(9)); - mpImpl->xAssignPB = m_xBuilder->weld_button("assign"); - mpImpl->xDeletePB = m_xBuilder->weld_button("delete"); - mpImpl->xDeleteAllPB = m_xBuilder->weld_button("deleteall"); - mpImpl->xAssignComponentPB = m_xBuilder->weld_button("component"); + mpImpl->xAssignPB = m_xBuilder->weld_button(u"assign"_ustr); + mpImpl->xDeletePB = m_xBuilder->weld_button(u"delete"_ustr); + mpImpl->xDeleteAllPB = m_xBuilder->weld_button(u"deleteall"_ustr); + mpImpl->xAssignComponentPB = m_xBuilder->weld_button(u"component"_ustr); SetFrame( _rxDocumentFrame ); @@ -681,10 +681,10 @@ IMPL_LINK_NOARG(AssignComponentDialog, ButtonHandler, weld::Button&, void) } AssignComponentDialog::AssignComponentDialog(weld::Window* pParent, OUString aURL) - : GenericDialogController(pParent, "cui/ui/assigncomponentdialog.ui", "AssignComponent") + : GenericDialogController(pParent, u"cui/ui/assigncomponentdialog.ui"_ustr, u"AssignComponent"_ustr) , maURL(std::move( aURL )) - , mxMethodEdit(m_xBuilder->weld_entry("methodEntry")) - , mxOKButton(m_xBuilder->weld_button("ok")) + , mxMethodEdit(m_xBuilder->weld_entry(u"methodEntry"_ustr)) + , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr)) { mxOKButton->connect_clicked(LINK(this, AssignComponentDialog, ButtonHandler)); @@ -709,7 +709,7 @@ IMPL_LINK_NOARG(SvxMacroAssignSingleTabDialog, OKHdl_Impl, weld::Button&, void) SvxMacroAssignSingleTabDialog::SvxMacroAssignSingleTabDialog(weld::Window *pParent, const SfxItemSet& rSet) - : SfxSingleTabDialogController(pParent, &rSet, "cui/ui/macroassigndialog.ui", "MacroAssignDialog") + : SfxSingleTabDialogController(pParent, &rSet, u"cui/ui/macroassigndialog.ui"_ustr, u"MacroAssignDialog"_ustr) { GetOKButton().connect_clicked(LINK(this, SvxMacroAssignSingleTabDialog, OKHdl_Impl)); } diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index a0d2061e531c..61bee50455b3 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -202,8 +202,8 @@ bool getPreviewFile(const AdditionInfo& aAdditionInfo, OUString& sPreviewFile) = ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext()); // copy the images to the user's additions folder - OUString userFolder = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER - "/" SAL_CONFIGFILE("bootstrap") "::UserInstallation}"; + OUString userFolder = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER + "/" SAL_CONFIGFILE("bootstrap") "::UserInstallation}"_ustr; rtl::Bootstrap::expandMacros(userFolder); userFolder += "/user/additions/" + aAdditionInfo.sExtensionID + "/"; @@ -425,17 +425,17 @@ void SearchAndParseThread::execute() } AdditionsDialog::AdditionsDialog(weld::Window* pParent, const OUString& sAdditionsTag) - : GenericDialogController(pParent, "cui/ui/additionsdialog.ui", "AdditionsDialog") + : GenericDialogController(pParent, u"cui/ui/additionsdialog.ui"_ustr, u"AdditionsDialog"_ustr) , m_aSearchDataTimer("AdditionsDialog SearchDataTimer") - , m_xEntrySearch(m_xBuilder->weld_entry("entrySearch")) - , m_xButtonClose(m_xBuilder->weld_button("buttonClose")) - , m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow")) - , m_xContentGrid(m_xBuilder->weld_container("contentGrid")) - , m_xLabelProgress(m_xBuilder->weld_label("labelProgress")) - , m_xGearBtn(m_xBuilder->weld_menu_button("buttonGear")) + , m_xEntrySearch(m_xBuilder->weld_entry(u"entrySearch"_ustr)) + , m_xButtonClose(m_xBuilder->weld_button(u"buttonClose"_ustr)) + , m_xContentWindow(m_xBuilder->weld_scrolled_window(u"contentWindow"_ustr)) + , m_xContentGrid(m_xBuilder->weld_container(u"contentGrid"_ustr)) + , m_xLabelProgress(m_xBuilder->weld_label(u"labelProgress"_ustr)) + , m_xGearBtn(m_xBuilder->weld_menu_button(u"buttonGear"_ustr)) { m_xGearBtn->connect_selected(LINK(this, AdditionsDialog, GearHdl)); - m_xGearBtn->set_item_active("gear_sort_voting", true); + m_xGearBtn->set_item_active(u"gear_sort_voting"_ustr, true); m_aSearchDataTimer.SetInvokeHandler(LINK(this, AdditionsDialog, ImplUpdateDataHdl)); m_aSearchDataTimer.SetTimeout(EDIT_UPDATEDATA_TIMEOUT); @@ -451,7 +451,7 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, const OUString& sAdditio OUString titlePrefix = CuiResId(RID_CUISTR_ADDITIONS_DIALOG_TITLE_PREFIX); if (!m_sTag.isEmpty()) { // tdf#142564 localize extension category names - OUString sDialogTitle = ""; + OUString sDialogTitle = u""_ustr; if (sAdditionsTag == "Templates") { sDialogTitle = CuiResId(RID_CUISTR_ADDITIONS_TEMPLATES); @@ -597,27 +597,27 @@ bool AdditionsDialog::sortByDownload(const AdditionInfo& a, const AdditionInfo& AdditionsItem::AdditionsItem(weld::Widget* pParent, AdditionsDialog* pParentDialog, const AdditionInfo& additionInfo) - : m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/additionsfragment.ui")) - , m_xContainer(m_xBuilder->weld_widget("additionsEntry")) - , m_xImageScreenshot(m_xBuilder->weld_image("imageScreenshot")) - , m_xButtonInstall(m_xBuilder->weld_button("buttonInstall")) - , m_xLinkButtonWebsite(m_xBuilder->weld_link_button("btnWebsite")) - , m_xLabelName(m_xBuilder->weld_label("lbName")) - , m_xLabelAuthor(m_xBuilder->weld_label("labelAuthor")) - , m_xLabelDescription(m_xBuilder->weld_label("labelDescription")) - , m_xLabelLicense(m_xBuilder->weld_label("lbLicenseText")) - , m_xLabelVersion(m_xBuilder->weld_label("lbVersionText")) - , m_xLinkButtonComments(m_xBuilder->weld_link_button("linkButtonComments")) - , m_xImageVoting1(m_xBuilder->weld_image("imageVoting1")) - , m_xImageVoting2(m_xBuilder->weld_image("imageVoting2")) - , m_xImageVoting3(m_xBuilder->weld_image("imageVoting3")) - , m_xImageVoting4(m_xBuilder->weld_image("imageVoting4")) - , m_xImageVoting5(m_xBuilder->weld_image("imageVoting5")) - , m_xLabelDownloadNumber(m_xBuilder->weld_label("labelDownloadNumber")) - , m_xButtonShowMore(m_xBuilder->weld_button("buttonShowMore")) + : m_xBuilder(Application::CreateBuilder(pParent, u"cui/ui/additionsfragment.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_widget(u"additionsEntry"_ustr)) + , m_xImageScreenshot(m_xBuilder->weld_image(u"imageScreenshot"_ustr)) + , m_xButtonInstall(m_xBuilder->weld_button(u"buttonInstall"_ustr)) + , m_xLinkButtonWebsite(m_xBuilder->weld_link_button(u"btnWebsite"_ustr)) + , m_xLabelName(m_xBuilder->weld_label(u"lbName"_ustr)) + , m_xLabelAuthor(m_xBuilder->weld_label(u"labelAuthor"_ustr)) + , m_xLabelDescription(m_xBuilder->weld_label(u"labelDescription"_ustr)) + , m_xLabelLicense(m_xBuilder->weld_label(u"lbLicenseText"_ustr)) + , m_xLabelVersion(m_xBuilder->weld_label(u"lbVersionText"_ustr)) + , m_xLinkButtonComments(m_xBuilder->weld_link_button(u"linkButtonComments"_ustr)) + , m_xImageVoting1(m_xBuilder->weld_image(u"imageVoting1"_ustr)) + , m_xImageVoting2(m_xBuilder->weld_image(u"imageVoting2"_ustr)) + , m_xImageVoting3(m_xBuilder->weld_image(u"imageVoting3"_ustr)) + , m_xImageVoting4(m_xBuilder->weld_image(u"imageVoting4"_ustr)) + , m_xImageVoting5(m_xBuilder->weld_image(u"imageVoting5"_ustr)) + , m_xLabelDownloadNumber(m_xBuilder->weld_label(u"labelDownloadNumber"_ustr)) + , m_xButtonShowMore(m_xBuilder->weld_button(u"buttonShowMore"_ustr)) , m_pParentDialog(pParentDialog) - , m_sDownloadURL("") - , m_sExtensionID("") + , m_sDownloadURL(u""_ustr) + , m_sExtensionID(u""_ustr) { SolarMutexGuard aGuard; @@ -687,8 +687,8 @@ bool AdditionsItem::getExtensionFile(OUString& sExtensionFile) = ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext()); // copy the extensions' files to the user's additions folder - OUString userFolder = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER - "/" SAL_CONFIGFILE("bootstrap") "::UserInstallation}"; + OUString userFolder = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER + "/" SAL_CONFIGFILE("bootstrap") "::UserInstallation}"_ustr; rtl::Bootstrap::expandMacros(userFolder); userFolder += "/user/additions/" + m_sExtensionID + "/"; @@ -763,8 +763,9 @@ IMPL_LINK_NOARG(AdditionsItem, InstallHdl, weld::Button&, void) uno::Reference<task::XAbortChannel> xAbortChannel; try { - m_pParentDialog->m_xExtensionManager->addExtension( - aExtensionFile, uno::Sequence<beans::NamedValue>(), "user", xAbortChannel, pCmdEnv); + m_pParentDialog->m_xExtensionManager->addExtension(aExtensionFile, + uno::Sequence<beans::NamedValue>(), + u"user"_ustr, xAbortChannel, pCmdEnv); m_xButtonInstall->set_label(CuiResId(RID_CUISTR_ADDITIONS_INSTALLEDBUTTON)); } catch (const ucb::CommandFailedException) diff --git a/cui/source/dialogs/DiagramDialog.cxx b/cui/source/dialogs/DiagramDialog.cxx index b63d6cb6e313..a2499056210c 100644 --- a/cui/source/dialogs/DiagramDialog.cxx +++ b/cui/source/dialogs/DiagramDialog.cxx @@ -18,14 +18,14 @@ #include <svx/diagram/IDiagramHelper.hxx> DiagramDialog::DiagramDialog(weld::Window* pWindow, SdrObjGroup& rDiagram) - : GenericDialogController(pWindow, "cui/ui/diagramdialog.ui", "DiagramDialog") + : GenericDialogController(pWindow, u"cui/ui/diagramdialog.ui"_ustr, u"DiagramDialog"_ustr) , m_rDiagram(rDiagram) , m_nUndos(0) - , mpBtnCancel(m_xBuilder->weld_button("btnCancel")) - , mpBtnAdd(m_xBuilder->weld_button("btnAdd")) - , mpBtnRemove(m_xBuilder->weld_button("btnRemove")) - , mpTreeDiagram(m_xBuilder->weld_tree_view("treeDiagram")) - , mpTextAdd(m_xBuilder->weld_text_view("textAdd")) + , mpBtnCancel(m_xBuilder->weld_button(u"btnCancel"_ustr)) + , mpBtnAdd(m_xBuilder->weld_button(u"btnAdd"_ustr)) + , mpBtnRemove(m_xBuilder->weld_button(u"btnRemove"_ustr)) + , mpTreeDiagram(m_xBuilder->weld_tree_view(u"treeDiagram"_ustr)) + , mpTextAdd(m_xBuilder->weld_text_view(u"textAdd"_ustr)) { mpBtnCancel->connect_clicked(LINK(this, DiagramDialog, OnAddCancel)); mpBtnAdd->connect_clicked(LINK(this, DiagramDialog, OnAddClick)); @@ -48,7 +48,7 @@ IMPL_LINK_NOARG(DiagramDialog, OnAddCancel, weld::Button&, void) // available (?) - but it does no harm either... while (0 != m_nUndos) { - comphelper::dispatchCommand(".uno:Undo", {}); + comphelper::dispatchCommand(u".uno:Undo"_ustr, {}); m_nUndos--; } @@ -89,7 +89,7 @@ IMPL_LINK_NOARG(DiagramDialog, OnAddClick, weld::Button&, void) std::unique_ptr<weld::TreeIter> pEntry(mpTreeDiagram->make_iterator()); mpTreeDiagram->insert(nullptr, -1, &sText, &sNodeId, nullptr, nullptr, false, pEntry.get()); mpTreeDiagram->select(*pEntry); - comphelper::dispatchCommand(".uno:RegenerateDiagram", {}); + comphelper::dispatchCommand(u".uno:RegenerateDiagram"_ustr, {}); } } @@ -125,7 +125,7 @@ IMPL_LINK_NOARG(DiagramDialog, OnRemoveClick, weld::Button&, void) } mpTreeDiagram->remove(*pEntry); - comphelper::dispatchCommand(".uno:RegenerateDiagram", {}); + comphelper::dispatchCommand(u".uno:RegenerateDiagram"_ustr, {}); } } } diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx index e9aba0a6e409..feb7f401025c 100644 --- a/cui/source/dialogs/FontFeaturesDialog.cxx +++ b/cui/source/dialogs/FontFeaturesDialog.cxx @@ -20,16 +20,17 @@ using namespace css; namespace cui { FontFeaturesDialog::FontFeaturesDialog(weld::Window* pParent, OUString aFontName) - : GenericDialogController(pParent, "cui/ui/fontfeaturesdialog.ui", "FontFeaturesDialog") + : GenericDialogController(pParent, u"cui/ui/fontfeaturesdialog.ui"_ustr, + u"FontFeaturesDialog"_ustr) , m_sFontName(std::move(aFontName)) - , m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow")) - , m_xContentBox(m_xBuilder->weld_container("contentBox")) - , m_xContentGrid(m_xBuilder->weld_container("contentGrid")) - , m_xStylisticSetsBox(m_xBuilder->weld_container("stylisticSetsBox")) - , m_xStylisticSetsGrid(m_xBuilder->weld_container("stylisticSetsGrid")) - , m_xCharacterVariantsBox(m_xBuilder->weld_container("characterVariantsBox")) - , m_xCharacterVariantsGrid(m_xBuilder->weld_container("characterVariantsGrid")) - , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWindow)) + , m_xContentWindow(m_xBuilder->weld_scrolled_window(u"contentWindow"_ustr)) + , m_xContentBox(m_xBuilder->weld_container(u"contentBox"_ustr)) + , m_xContentGrid(m_xBuilder->weld_container(u"contentGrid"_ustr)) + , m_xStylisticSetsBox(m_xBuilder->weld_container(u"stylisticSetsBox"_ustr)) + , m_xStylisticSetsGrid(m_xBuilder->weld_container(u"stylisticSetsGrid"_ustr)) + , m_xCharacterVariantsBox(m_xBuilder->weld_container(u"characterVariantsBox"_ustr)) + , m_xCharacterVariantsGrid(m_xBuilder->weld_container(u"characterVariantsGrid"_ustr)) + , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWindow)) { initialize(); } @@ -103,7 +104,7 @@ int FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFea if (rFontFeature.m_aDefinition) aDefinition = rFontFeature.m_aDefinition; if (!aDefinition) - aDefinition = { nFontFeatureCode, "" }; + aDefinition = { nFontFeatureCode, u""_ustr }; if (rFontFeature.isStylisticSet()) { diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx b/cui/source/dialogs/GraphicTestsDialog.cxx index ad0c25aab1f5..49525d71bb62 100644 --- a/cui/source/dialogs/GraphicTestsDialog.cxx +++ b/cui/source/dialogs/GraphicTestsDialog.cxx @@ -25,10 +25,10 @@ GraphicTestEntry::GraphicTestEntry(weld::Container* pParent, weld::Dialog* pDialog, OUString aTestName, OUString aTestStatus, Bitmap aTestBitmap) - : m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/graphictestentry.ui")) - , m_xContainer(m_xBuilder->weld_container("gptestbox")) - , m_xTestLabel(m_xBuilder->weld_label("gptestlabel")) - , m_xTestButton(m_xBuilder->weld_button("gptestbutton")) + : m_xBuilder(Application::CreateBuilder(pParent, u"cui/ui/graphictestentry.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"gptestbox"_ustr)) + , m_xTestLabel(m_xBuilder->weld_label(u"gptestlabel"_ustr)) + , m_xTestButton(m_xBuilder->weld_button(u"gptestbutton"_ustr)) , m_xResultBitmap(aTestBitmap) { m_xParentDialog = pDialog; @@ -57,10 +57,10 @@ IMPL_LINK(GraphicTestEntry, HandleResultViewRequest, weld::Button&, rButton, voi } GraphicsTestsDialog::GraphicsTestsDialog(weld::Container* pParent) - : GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", "GraphicTestsDialog") - , m_xResultLog(m_xBuilder->weld_text_view("gptest_txtVW")) - , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld")) - , m_xContainerBox(m_xBuilder->weld_box("gptest_box")) + : GenericDialogController(pParent, u"cui/ui/graphictestdlg.ui"_ustr, u"GraphicTestsDialog"_ustr) + , m_xResultLog(m_xBuilder->weld_text_view(u"gptest_txtVW"_ustr)) + , m_xDownloadResults(m_xBuilder->weld_button(u"gptest_downld"_ustr)) + , m_xContainerBox(m_xBuilder->weld_box(u"gptest_box"_ustr)) { OUString userProfile = comphelper::BackupFileHelper::getUserProfileURL(); m_xZipFileUrl = userProfile + "/GraphicTestResults.zip"; diff --git a/cui/source/dialogs/ImageViewerDialog.cxx b/cui/source/dialogs/ImageViewerDialog.cxx index b245c8c08b60..d15960193d0f 100644 --- a/cui/source/dialogs/ImageViewerDialog.cxx +++ b/cui/source/dialogs/ImageViewerDialog.cxx @@ -11,8 +11,8 @@ #include <ImageViewerDialog.hxx> ImageViewerDialog::ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap, OUString atitle) - : GenericDialogController(pParent, "cui/ui/imageviewer.ui", "ImageViewerDialog") - , m_xDisplayImage(m_xBuilder->weld_image("ImgVW_mainImage")) + : GenericDialogController(pParent, u"cui/ui/imageviewer.ui"_ustr, u"ImageViewerDialog"_ustr) + , m_xDisplayImage(m_xBuilder->weld_image(u"ImgVW_mainImage"_ustr)) { m_xDialog->set_title(atitle); aBitmap.Scale(Size(300, 300), BmpScaleFlag::Fast); diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index d99290404629..ae712ed7a2ca 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -169,15 +169,15 @@ OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int aQRB QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel, bool bEditExisting) - : GenericDialogController(pParent, "cui/ui/qrcodegen.ui", "QrCodeGenDialog") + : GenericDialogController(pParent, u"cui/ui/qrcodegen.ui"_ustr, u"QrCodeGenDialog"_ustr) , m_xModel(std::move(xModel)) - , m_xEdittext(m_xBuilder->weld_text_view("edit_text")) - , m_xECC{ m_xBuilder->weld_radio_button("button_low"), - m_xBuilder->weld_radio_button("button_medium"), - m_xBuilder->weld_radio_button("button_quartile"), - m_xBuilder->weld_radio_button("button_high") } - , m_xSpinBorder(m_xBuilder->weld_spin_button("edit_margin")) - , m_xComboType(m_xBuilder->weld_combo_box("choose_type")) + , m_xEdittext(m_xBuilder->weld_text_view(u"edit_text"_ustr)) + , m_xECC{ m_xBuilder->weld_radio_button(u"button_low"_ustr), + m_xBuilder->weld_radio_button(u"button_medium"_ustr), + m_xBuilder->weld_radio_button(u"button_quartile"_ustr), + m_xBuilder->weld_radio_button(u"button_high"_ustr) } + , m_xSpinBorder(m_xBuilder->weld_spin_button(u"edit_margin"_ustr)) + , m_xComboType(m_xBuilder->weld_combo_box(u"choose_type"_ustr)) #if ENABLE_ZXING , mpParent(pParent) #endif @@ -203,7 +203,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel // Read properties from selected QR Code css::drawing::BarCode aBarCode; - xProps->getPropertyValue("BarCodeProperties") >>= aBarCode; + xProps->getPropertyValue(u"BarCodeProperties"_ustr) >>= aBarCode; m_xEdittext->set_text(aBarCode.Payload); @@ -320,7 +320,7 @@ void QrCodeGenDialog::Apply() Reference<XComponentContext> xContext(comphelper::getProcessComponentContext()); Reference<XGraphicProvider> xProvider = css::graphic::GraphicProvider::create(xContext); - Sequence<PropertyValue> aMediaProperties{ comphelper::makePropertyValue("InputStream", + Sequence<PropertyValue> aMediaProperties{ comphelper::makePropertyValue(u"InputStream"_ustr, xInputStream) }; Reference<XGraphic> xGraphic(xProvider->queryGraphic(aMediaProperties)); @@ -330,13 +330,13 @@ void QrCodeGenDialog::Apply() xShapeProps = m_xExistingShapeProperties; else xShapeProps.set(Reference<lang::XMultiServiceFactory>(m_xModel, UNO_QUERY_THROW) - ->createInstance("com.sun.star.drawing.GraphicObjectShape"), + ->createInstance(u"com.sun.star.drawing.GraphicObjectShape"_ustr), UNO_QUERY); - xShapeProps->setPropertyValue("Graphic", Any(xGraphic)); + xShapeProps->setPropertyValue(u"Graphic"_ustr, Any(xGraphic)); // Set QRCode properties - xShapeProps->setPropertyValue("BarCodeProperties", Any(aBarCode)); + xShapeProps->setPropertyValue(u"BarCodeProperties"_ustr, Any(aBarCode)); if (bIsExistingQRCode) return; @@ -349,12 +349,12 @@ void QrCodeGenDialog::Apply() xShape->setSize(aShapeSize); // Default anchoring - xShapeProps->setPropertyValue("AnchorType", Any(TextContentAnchorType_AT_PARAGRAPH)); + xShapeProps->setPropertyValue(u"AnchorType"_ustr, Any(TextContentAnchorType_AT_PARAGRAPH)); const Reference<XServiceInfo> xServiceInfo(m_xModel, UNO_QUERY_THROW); // Writer - if (xServiceInfo->supportsService("com.sun.star.text.TextDocument")) + if (xServiceInfo->supportsService(u"com.sun.star.text.TextDocument"_ustr)) { Reference<XTextContent> xTextContent(xShape, UNO_QUERY_THROW); Reference<XTextViewCursorSupplier> xViewCursorSupplier(m_xModel->getCurrentController(), @@ -368,11 +368,11 @@ void QrCodeGenDialog::Apply() } // Calc - else if (xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument")) + else if (xServiceInfo->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr)) { Reference<XPropertySet> xSheetCell(m_xModel->getCurrentSelection(), UNO_QUERY_THROW); awt::Point aCellPosition; - xSheetCell->getPropertyValue("Position") >>= aCellPosition; + xSheetCell->getPropertyValue(u"Position"_ustr) >>= aCellPosition; xShape->setPosition(aCellPosition); Reference<XSpreadsheetView> xView(m_xModel->getCurrentController(), UNO_QUERY_THROW); @@ -386,8 +386,8 @@ void QrCodeGenDialog::Apply() } //Impress and Draw - else if (xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") - || xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument")) + else if (xServiceInfo->supportsService(u"com.sun.star.presentation.PresentationDocument"_ustr) + || xServiceInfo->supportsService(u"com.sun.star.drawing.DrawingDocument"_ustr)) { Reference<XDrawView> xView(m_xModel->getCurrentController(), UNO_QUERY_THROW); Reference<XDrawPage> xPage(xView->getCurrentPage(), UNO_SET_THROW); @@ -400,7 +400,7 @@ void QrCodeGenDialog::Apply() else { //Not implemented for math,base and other apps. - throw uno::RuntimeException("Not implemented"); + throw uno::RuntimeException(u"Not implemented"_ustr); } #endif } diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index d3e0bfb5b65e..183fb04c82fb 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -48,17 +48,17 @@ using namespace css::security; using namespace css::ui::dialogs; SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel) - : SignatureLineDialogBase(pParent, std::move(xModel), "cui/ui/signsignatureline.ui", - "SignSignatureLineDialog") - , m_xEditName(m_xBuilder->weld_entry("edit_name")) - , m_xEditComment(m_xBuilder->weld_text_view("edit_comment")) - , m_xBtnLoadImage(m_xBuilder->weld_button("btn_load_image")) - , m_xBtnClearImage(m_xBuilder->weld_button("btn_clear_image")) - , m_xBtnChooseCertificate(m_xBuilder->weld_button("btn_select_certificate")) - , m_xBtnSign(m_xBuilder->weld_button("ok")) - , m_xLabelHint(m_xBuilder->weld_label("label_hint")) - , m_xLabelHintText(m_xBuilder->weld_label("label_hint_text")) - , m_xLabelAddComment(m_xBuilder->weld_label("label_add_comment")) + : SignatureLineDialogBase(pParent, std::move(xModel), u"cui/ui/signsignatureline.ui"_ustr, + u"SignSignatureLineDialog"_ustr) + , m_xEditName(m_xBuilder->weld_entry(u"edit_name"_ustr)) + , m_xEditComment(m_xBuilder->weld_text_view(u"edit_comment"_ustr)) + , m_xBtnLoadImage(m_xBuilder->weld_button(u"btn_load_image"_ustr)) + , m_xBtnClearImage(m_xBuilder->weld_button(u"btn_clear_image"_ustr)) + , m_xBtnChooseCertificate(m_xBuilder->weld_button(u"btn_select_certificate"_ustr)) + , m_xBtnSign(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xLabelHint(m_xBuilder->weld_label(u"label_hint"_ustr)) + , m_xLabelHintText(m_xBuilder->weld_label(u"label_hint_text"_ustr)) + , m_xLabelAddComment(m_xBuilder->weld_label(u"label_add_comment"_ustr)) , m_bShowSignDate(false) { Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(), @@ -66,7 +66,7 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc m_xShapeProperties.set(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); bool bIsSignatureLine(false); - m_xShapeProperties->getPropertyValue("IsSignatureLine") >>= bIsSignatureLine; + m_xShapeProperties->getPropertyValue(u"IsSignatureLine"_ustr) >>= bIsSignatureLine; if (!bIsSignatureLine) { SAL_WARN("cui.dialogs", "No signature line selected!"); @@ -80,17 +80,17 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc m_xEditName->connect_changed(LINK(this, SignSignatureLineDialog, entryChanged)); // Read properties from selected signature line - m_xShapeProperties->getPropertyValue("SignatureLineId") >>= m_aSignatureLineId; - m_xShapeProperties->getPropertyValue("SignatureLineSuggestedSignerName") + m_xShapeProperties->getPropertyValue(u"SignatureLineId"_ustr) >>= m_aSignatureLineId; + m_xShapeProperties->getPropertyValue(u"SignatureLineSuggestedSignerName"_ustr) >>= m_aSuggestedSignerName; - m_xShapeProperties->getPropertyValue("SignatureLineSuggestedSignerTitle") + m_xShapeProperties->getPropertyValue(u"SignatureLineSuggestedSignerTitle"_ustr) >>= m_aSuggestedSignerTitle; OUString aSigningInstructions; - m_xShapeProperties->getPropertyValue("SignatureLineSigningInstructions") + m_xShapeProperties->getPropertyValue(u"SignatureLineSigningInstructions"_ustr) >>= aSigningInstructions; - m_xShapeProperties->getPropertyValue("SignatureLineShowSignDate") >>= m_bShowSignDate; + m_xShapeProperties->getPropertyValue(u"SignatureLineShowSignDate"_ustr) >>= m_bShowSignDate; bool bCanAddComment(false); - m_xShapeProperties->getPropertyValue("SignatureLineCanAddComment") >>= bCanAddComment; + m_xShapeProperties->getPropertyValue(u"SignatureLineCanAddComment"_ustr) >>= bCanAddComment; if (aSigningInstructions.isEmpty()) { @@ -132,7 +132,7 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, loadImage, weld::Button&, void) return; Reference<XGraphicProvider> xProvider = GraphicProvider::create(xContext); - Sequence<PropertyValue> aMediaProperties{ comphelper::makePropertyValue("URL", + Sequence<PropertyValue> aMediaProperties{ comphelper::makePropertyValue(u"URL"_ustr, aSelectedFiles[0]) }; m_xSignatureImage = xProvider->queryGraphic(aMediaProperties); m_sOriginalImageBtnLabel = m_xBtnLoadImage->get_label(); @@ -232,10 +232,10 @@ css::uno::Reference<css::graphic::XGraphic> SignSignatureLineDialog::getSignedGr if (!XOutBitmap::GraphicToBase64(aGraphic, aGraphicInBase64, false)) SAL_WARN("cui.dialogs", "Could not convert graphic to base64"); - OUString aImagePart = "<image y=\"825\" x=\"1300\" " + OUString aImagePart = u"<image y=\"825\" x=\"1300\" " "xlink:href=\"data:[MIMETYPE];base64,[BASE64_IMG]>\" " "preserveAspectRatio=\"xMidYMid\" height=\"1520\" " - "width=\"7600\" />"; + "width=\"7600\" />"_ustr; aImagePart = aImagePart.replaceAll( "[MIMETYPE]", GraphicMimeTypeHelper::GetMimeTypeForXGraphic(m_xSignatureImage)); aImagePart = aImagePart.replaceAll("[BASE64_IMG]", aGraphicInBase64); diff --git a/cui/source/dialogs/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx index 224dcdecd4bb..aece41a3d89d 100644 --- a/cui/source/dialogs/SignatureLineDialog.cxx +++ b/cui/source/dialogs/SignatureLineDialog.cxx @@ -42,14 +42,14 @@ using namespace css::graphic; SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel, bool bEditExisting) - : SignatureLineDialogBase(pParent, std::move(xModel), "cui/ui/signatureline.ui", - "SignatureLineDialog") - , m_xEditName(m_xBuilder->weld_entry("edit_name")) - , m_xEditTitle(m_xBuilder->weld_entry("edit_title")) - , m_xEditEmail(m_xBuilder->weld_entry("edit_email")) - , m_xEditInstructions(m_xBuilder->weld_text_view("edit_instructions")) - , m_xCheckboxCanAddComments(m_xBuilder->weld_check_button("checkbox_can_add_comments")) - , m_xCheckboxShowSignDate(m_xBuilder->weld_check_button("checkbox_show_sign_date")) + : SignatureLineDialogBase(pParent, std::move(xModel), u"cui/ui/signatureline.ui"_ustr, + u"SignatureLineDialog"_ustr) + , m_xEditName(m_xBuilder->weld_entry(u"edit_name"_ustr)) + , m_xEditTitle(m_xBuilder->weld_entry(u"edit_title"_ustr)) + , m_xEditEmail(m_xBuilder->weld_entry(u"edit_email"_ustr)) + , m_xEditInstructions(m_xBuilder->weld_text_view(u"edit_instructions"_ustr)) + , m_xCheckboxCanAddComments(m_xBuilder->weld_check_button(u"checkbox_can_add_comments"_ustr)) + , m_xCheckboxShowSignDate(m_xBuilder->weld_check_button(u"checkbox_show_sign_date"_ustr)) { m_xEditInstructions->set_size_request(m_xEditInstructions->get_approximate_digit_width() * 48, m_xEditInstructions->get_text_height() * 5); @@ -67,24 +67,24 @@ SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel Reference<XPropertySet> xProps(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); // Read properties from selected signature line - xProps->getPropertyValue("SignatureLineId") >>= m_aSignatureLineId; + xProps->getPropertyValue(u"SignatureLineId"_ustr) >>= m_aSignatureLineId; OUString aSuggestedSignerName; - xProps->getPropertyValue("SignatureLineSuggestedSignerName") >>= aSuggestedSignerName; + xProps->getPropertyValue(u"SignatureLineSuggestedSignerName"_ustr) >>= aSuggestedSignerName; m_xEditName->set_text(aSuggestedSignerName); OUString aSuggestedSignerTitle; - xProps->getPropertyValue("SignatureLineSuggestedSignerTitle") >>= aSuggestedSignerTitle; + xProps->getPropertyValue(u"SignatureLineSuggestedSignerTitle"_ustr) >>= aSuggestedSignerTitle; m_xEditTitle->set_text(aSuggestedSignerTitle); OUString aSuggestedSignerEmail; - xProps->getPropertyValue("SignatureLineSuggestedSignerEmail") >>= aSuggestedSignerEmail; + xProps->getPropertyValue(u"SignatureLineSuggestedSignerEmail"_ustr) >>= aSuggestedSignerEmail; m_xEditEmail->set_text(aSuggestedSignerEmail); OUString aSigningInstructions; - xProps->getPropertyValue("SignatureLineSigningInstructions") >>= aSigningInstructions; + xProps->getPropertyValue(u"SignatureLineSigningInstructions"_ustr) >>= aSigningInstructions; m_xEditInstructions->set_text(aSigningInstructions); bool bCanAddComments = false; - xProps->getPropertyValue("SignatureLineCanAddComment") >>= bCanAddComments; + xProps->getPropertyValue(u"SignatureLineCanAddComment"_ustr) >>= bCanAddComments; m_xCheckboxCanAddComments->set_active(bCanAddComments); bool bShowSignDate = false; - xProps->getPropertyValue("SignatureLineShowSignDate") >>= bShowSignDate; + xProps->getPropertyValue(u"SignatureLineShowSignDate"_ustr) >>= bShowSignDate; m_xCheckboxShowSignDate->set_active(bShowSignDate); // Mark this as existing shape @@ -123,26 +123,26 @@ void SignatureLineDialog::Apply() xShapeProps = m_xExistingShapeProperties; else xShapeProps.set(Reference<lang::XMultiServiceFactory>(m_xModel, UNO_QUERY_THROW) - ->createInstance("com.sun.star.drawing.GraphicObjectShape"), + ->createInstance(u"com.sun.star.drawing.GraphicObjectShape"_ustr), UNO_QUERY); - xShapeProps->setPropertyValue("Graphic", Any(xGraphic)); - xShapeProps->setPropertyValue("SignatureLineUnsignedImage", Any(xGraphic)); + xShapeProps->setPropertyValue(u"Graphic"_ustr, Any(xGraphic)); + xShapeProps->setPropertyValue(u"SignatureLineUnsignedImage"_ustr, Any(xGraphic)); // Set signature line properties - xShapeProps->setPropertyValue("IsSignatureLine", Any(true)); - xShapeProps->setPropertyValue("SignatureLineId", Any(m_aSignatureLineId)); + xShapeProps->setPropertyValue(u"IsSignatureLine"_ustr, Any(true)); + xShapeProps->setPropertyValue(u"SignatureLineId"_ustr, Any(m_aSignatureLineId)); if (!aSignerName.isEmpty()) - xShapeProps->setPropertyValue("SignatureLineSuggestedSignerName", Any(aSignerName)); + xShapeProps->setPropertyValue(u"SignatureLineSuggestedSignerName"_ustr, Any(aSignerName)); if (!aSignerTitle.isEmpty()) - xShapeProps->setPropertyValue("SignatureLineSuggestedSignerTitle", Any(aSignerTitle)); + xShapeProps->setPropertyValue(u"SignatureLineSuggestedSignerTitle"_ustr, Any(aSignerTitle)); if (!aSignerEmail.isEmpty()) - xShapeProps->setPropertyValue("SignatureLineSuggestedSignerEmail", Any(aSignerEmail)); + xShapeProps->setPropertyValue(u"SignatureLineSuggestedSignerEmail"_ustr, Any(aSignerEmail)); if (!aSigningInstructions.isEmpty()) - xShapeProps->setPropertyValue("SignatureLineSigningInstructions", + xShapeProps->setPropertyValue(u"SignatureLineSigningInstructions"_ustr, Any(aSigningInstructions)); - xShapeProps->setPropertyValue("SignatureLineShowSignDate", Any(bShowSignDate)); - xShapeProps->setPropertyValue("SignatureLineCanAddComment", Any(bCanAddComments)); + xShapeProps->setPropertyValue(u"SignatureLineShowSignDate"_ustr, Any(bShowSignDate)); + xShapeProps->setPropertyValue(u"SignatureLineCanAddComment"_ustr, Any(bCanAddComments)); if (bIsExistingSignatureLine) return; @@ -155,7 +155,7 @@ void SignatureLineDialog::Apply() xShape->setSize(aShapeSize); // Default anchoring - xShapeProps->setPropertyValue("AnchorType", Any(TextContentAnchorType_AT_PARAGRAPH)); + xShapeProps->setPropertyValue(u"AnchorType"_ustr, Any(TextContentAnchorType_AT_PARAGRAPH)); // Writer const Reference<XTextDocument> xTextDocument(m_xModel, UNO_QUERY); @@ -179,7 +179,7 @@ void SignatureLineDialog::Apply() Reference<XPropertySet> xSheetCell(m_xModel->getCurrentSelection(), UNO_QUERY_THROW); awt::Point aCellPosition; - xSheetCell->getPropertyValue("Position") >>= aCellPosition; + xSheetCell->getPropertyValue(u"Position"_ustr) >>= aCellPosition; xShape->setPosition(aCellPosition); Reference<XSpreadsheetView> xView(m_xModel->getCurrentController(), UNO_QUERY_THROW); diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index bc45db96e25e..a0c9819f0485 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -160,37 +160,37 @@ sal_uInt16 SpellUndoAction_Impl::GetId()const SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow, weld::Window * pParent, SfxBindings* _pBindings) : SfxModelessDialogController (_pBindings, pChildWindow, - pParent, "cui/ui/spellingdialog.ui", "SpellingDialog") + pParent, u"cui/ui/spellingdialog.ui"_ustr, u"SpellingDialog"_ustr) , aDialogUndoLink(LINK (this, SpellDialog, DialogUndoHdl)) , m_pInitHdlEvent(nullptr) , bFocusLocked(true) , rParent(*pChildWindow) , pImpl( new SpellDialog_Impl ) - , m_xAltTitle(m_xBuilder->weld_label("alttitleft")) - , m_xResumeFT(m_xBuilder->weld_label("resumeft")) - , m_xNoSuggestionsFT(m_xBuilder->weld_label("nosuggestionsft")) - , m_xLanguageFT(m_xBuilder->weld_label("languageft")) - , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("languagelb"))) - , m_xExplainFT(m_xBuilder->weld_label("explain")) - , m_xExplainLink(m_xBuilder->weld_link_button("explainlink")) - , m_xNotInDictFT(m_xBuilder->weld_label("notindictft")) - , m_xSentenceED(new SentenceEditWindow_Impl(m_xBuilder->weld_scrolled_window("scrolledwindow", true))) - , m_xSuggestionFT(m_xBuilder->weld_label("suggestionsft")) - , m_xSuggestionLB(m_xBuilder->weld_tree_view("suggestionslb")) - , m_xIgnorePB(m_xBuilder->weld_button("ignore")) - , m_xIgnoreAllPB(m_xBuilder->weld_button("ignoreall")) - , m_xIgnoreRulePB(m_xBuilder->weld_button("ignorerule")) - , m_xAddToDictPB(m_xBuilder->weld_button("add")) - , m_xAddToDictMB(m_xBuilder->weld_menu_button("addmb")) - , m_xChangePB(m_xBuilder->weld_button("change")) - , m_xChangeAllPB(m_xBuilder->weld_button("changeall")) - , m_xAutoCorrPB(m_xBuilder->weld_button("autocorrect")) - , m_xCheckGrammarCB(m_xBuilder->weld_check_button("checkgrammar")) - , m_xOptionsPB(m_xBuilder->weld_button("options")) - , m_xUndoPB(m_xBuilder->weld_button("undo")) - , m_xClosePB(m_xBuilder->weld_button("close")) - , m_xToolbar(m_xBuilder->weld_toolbar("toolbar")) - , m_xSentenceEDWeld(new weld::CustomWeld(*m_xBuilder, "sentence", *m_xSentenceED)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitleft"_ustr)) + , m_xResumeFT(m_xBuilder->weld_label(u"resumeft"_ustr)) + , m_xNoSuggestionsFT(m_xBuilder->weld_label(u"nosuggestionsft"_ustr)) + , m_xLanguageFT(m_xBuilder->weld_label(u"languageft"_ustr)) + , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"languagelb"_ustr))) + , m_xExplainFT(m_xBuilder->weld_label(u"explain"_ustr)) + , m_xExplainLink(m_xBuilder->weld_link_button(u"explainlink"_ustr)) + , m_xNotInDictFT(m_xBuilder->weld_label(u"notindictft"_ustr)) + , m_xSentenceED(new SentenceEditWindow_Impl(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true))) + , m_xSuggestionFT(m_xBuilder->weld_label(u"suggestionsft"_ustr)) + , m_xSuggestionLB(m_xBuilder->weld_tree_view(u"suggestionslb"_ustr)) + , m_xIgnorePB(m_xBuilder->weld_button(u"ignore"_ustr)) + , m_xIgnoreAllPB(m_xBuilder->weld_button(u"ignoreall"_ustr)) + , m_xIgnoreRulePB(m_xBuilder->weld_button(u"ignorerule"_ustr)) + , m_xAddToDictPB(m_xBuilder->weld_button(u"add"_ustr)) + , m_xAddToDictMB(m_xBuilder->weld_menu_button(u"addmb"_ustr)) + , m_xChangePB(m_xBuilder->weld_button(u"change"_ustr)) + , m_xChangeAllPB(m_xBuilder->weld_button(u"changeall"_ustr)) + , m_xAutoCorrPB(m_xBuilder->weld_button(u"autocorrect"_ustr)) + , m_xCheckGrammarCB(m_xBuilder->weld_check_button(u"checkgrammar"_ustr)) + , m_xOptionsPB(m_xBuilder->weld_button(u"options"_ustr)) + , m_xUndoPB(m_xBuilder->weld_button(u"undo"_ustr)) + , m_xClosePB(m_xBuilder->weld_button(u"close"_ustr)) + , m_xToolbar(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) + , m_xSentenceEDWeld(new weld::CustomWeld(*m_xBuilder, u"sentence"_ustr, *m_xSentenceED)) { m_xSentenceED->SetSpellDialog(this); m_xSentenceED->Init(m_xToolbar.get()); @@ -1035,7 +1035,7 @@ bool SpellDialog::GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard>* pG SpellErrorDescription aDesc( false, elem.xAlternatives->getWord(), elem.xAlternatives->getLocale(), elem.xAlternatives->getAlternatives(), nullptr); SfxGrabBagItem aSpellErrorDescription(EE_CHAR_GRABBAG); - aSpellErrorDescription.GetGrabBag()["SpellErrorDescription"] <<= aDesc.toSequence(); + aSpellErrorDescription.GetGrabBag()[u"SpellErrorDescription"_ustr] <<= aDesc.toSequence(); m_xSentenceED->SetAttrib(aSpellErrorDescription, nStartPosition, nEndPosition); } else if(elem.bIsGrammarError ) @@ -1064,7 +1064,7 @@ bool SpellDialog::GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard>* pG &sFullCommentURL ); SfxGrabBagItem aSpellErrorDescriptionItem(EE_CHAR_GRABBAG); - aSpellErrorDescriptionItem.GetGrabBag()["SpellErrorDescription"] <<= aDesc.toSequence(); + aSpellErrorDescriptionItem.GetGrabBag()[u"SpellErrorDescription"_ustr] <<= aDesc.toSequence(); m_xSentenceED->SetAttrib(aSpellErrorDescriptionItem, nStartPosition, nEndPosition); } @@ -1249,7 +1249,7 @@ namespace { css::uno::Sequence<css::uno::Any> aSequence; const auto pGrabBag = static_cast<const SfxGrabBagItem*>(rEECharAttrib.pAttr)->GetGrabBag(); - const auto iter = pGrabBag.find("SpellErrorDescription"); + const auto iter = pGrabBag.find(u"SpellErrorDescription"_ustr); assert(iter != pGrabBag.end()); iter->second >>= aSequence; rSpellErrorDescription.fromSequence(aSequence); @@ -1856,7 +1856,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language if (bSpellErrorDescription) { SfxGrabBagItem aSpellErrorDescriptionItem(EE_CHAR_GRABBAG); - aSpellErrorDescriptionItem.GetGrabBag()["SpellErrorDescription"] <<= aSpellErrorDescription.toSequence(); + aSpellErrorDescriptionItem.GetGrabBag()[u"SpellErrorDescription"_ustr] <<= aSpellErrorDescription.toSequence(); SetAttrib(aSpellErrorDescriptionItem, m_nErrorStart, m_nErrorEnd); } SetAttrib(SvxLanguageItem(eLanguage, EE_CHAR_LANGUAGE), m_nErrorStart, m_nErrorEnd); @@ -1914,7 +1914,7 @@ void SentenceEditWindow_Impl::SetAlternatives( const Reference< XSpellAlternativ } SpellErrorDescription aDesc( false, aWord, std::move(aLocale), aAlts, nullptr); SfxGrabBagItem aSpellErrorDescription(EE_CHAR_GRABBAG); - aSpellErrorDescription.GetGrabBag()["SpellErrorDescription"] <<= aDesc.toSequence(); + aSpellErrorDescription.GetGrabBag()[u"SpellErrorDescription"_ustr] <<= aDesc.toSequence(); SetAttrib(aSpellErrorDescription, m_nErrorStart, m_nErrorEnd); } diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index ce82e418cf9e..353d23b16f07 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -55,22 +55,22 @@ using namespace ::com::sun::star::uno; AboutDialog::AboutDialog(weld::Window *pParent) - : GenericDialogController(pParent, "cui/ui/aboutdialog.ui", "AboutDialog"), - m_pCreditsButton(m_xBuilder->weld_link_button("btnCredits")), - m_pWebsiteButton(m_xBuilder->weld_link_button("btnWebsite")), - m_pReleaseNotesButton(m_xBuilder->weld_link_button("btnReleaseNotes")), - m_pCloseButton(m_xBuilder->weld_button("btnClose")), - m_pCopyButton(m_xBuilder->weld_button("btnCopyVersion")), - m_pBrandImage(m_xBuilder->weld_image("imBrand")), - m_pAboutImage(m_xBuilder->weld_image("imAbout")), - m_pVersionLabel(m_xBuilder->weld_label("lbVersionString")), - m_pBuildCaption(m_xBuilder->weld_label("lbBuild")), - m_pBuildLabel(m_xBuilder->weld_link_button("lbBuildString")), - m_pEnvLabel(m_xBuilder->weld_label("lbEnvString")), - m_pUILabel(m_xBuilder->weld_label("lbUIString")), - m_pLocaleLabel(m_xBuilder->weld_label("lbLocaleString")), - m_pMiscLabel(m_xBuilder->weld_label("lbMiscString")), - m_pCopyrightLabel(m_xBuilder->weld_label("lbCopyright")) { + : GenericDialogController(pParent, u"cui/ui/aboutdialog.ui"_ustr, u"AboutDialog"_ustr), + m_pCreditsButton(m_xBuilder->weld_link_button(u"btnCredits"_ustr)), + m_pWebsiteButton(m_xBuilder->weld_link_button(u"btnWebsite"_ustr)), + m_pReleaseNotesButton(m_xBuilder->weld_link_button(u"btnReleaseNotes"_ustr)), + m_pCloseButton(m_xBuilder->weld_button(u"btnClose"_ustr)), + m_pCopyButton(m_xBuilder->weld_button(u"btnCopyVersion"_ustr)), + m_pBrandImage(m_xBuilder->weld_image(u"imBrand"_ustr)), + m_pAboutImage(m_xBuilder->weld_image(u"imAbout"_ustr)), + m_pVersionLabel(m_xBuilder->weld_label(u"lbVersionString"_ustr)), + m_pBuildCaption(m_xBuilder->weld_label(u"lbBuild"_ustr)), + m_pBuildLabel(m_xBuilder->weld_link_button(u"lbBuildString"_ustr)), + m_pEnvLabel(m_xBuilder->weld_label(u"lbEnvString"_ustr)), + m_pUILabel(m_xBuilder->weld_label(u"lbUIString"_ustr)), + m_pLocaleLabel(m_xBuilder->weld_label(u"lbLocaleString"_ustr)), + m_pMiscLabel(m_xBuilder->weld_label(u"lbMiscString"_ustr)), + m_pCopyrightLabel(m_xBuilder->weld_label(u"lbCopyright"_ustr)) { // Labels m_pVersionLabel->set_label(GetVersionString()); @@ -148,7 +148,7 @@ bool AboutDialog::IsStringValidGitHash(std::u16string_view hash) { OUString AboutDialog::GetVersionString() { OUString arch; - auto const ok = rtl::Bootstrap::get("_ARCH", arch); + auto const ok = rtl::Bootstrap::get(u"_ARCH"_ustr, arch); assert(ok); (void) ok; OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX")) + " (" + arch + ")"; @@ -161,7 +161,7 @@ OUString AboutDialog::GetVersionString() { OUString AboutDialog::GetBuildString() { - OUString sBuildId(utl::Bootstrap::getBuildIdData("")); + OUString sBuildId(utl::Bootstrap::getBuildIdData(u""_ustr)); SAL_WARN_IF(sBuildId.isEmpty(), "cui.dialogs", "No BUILDID in bootstrap file"); return sBuildId; @@ -192,7 +192,7 @@ OUString AboutDialog::GetLocaleString(const bool bLocalized) { if (bLocalized) sUILocaleStr = CuiResId(RID_CUISTR_ABOUT_UILOCALE); else - sUILocaleStr = Translate::get(RID_CUISTR_ABOUT_UILOCALE, Translate::Create("cui", LanguageTag("en-US"))); + sUILocaleStr = Translate::get(RID_CUISTR_ABOUT_UILOCALE, Translate::Create("cui", LanguageTag(u"en-US"_ustr))); if (sUILocaleStr.indexOf("$LOCALE") == -1) { SAL_WARN("cui.dialogs", "translated uilocale string in translations " diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 290025929d5a..6ca351c883d4 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -802,30 +802,30 @@ private: } ColorPickerDialog::ColorPickerDialog(weld::Window* pParent, Color nColor, sal_Int16 nDialogMode) - : SfxDialogController(pParent, "cui/ui/colorpickerdialog.ui", "ColorPicker") - , m_xColorField(new weld::CustomWeld(*m_xBuilder, "colorField", m_aColorField)) - , m_xColorSlider(new weld::CustomWeld(*m_xBuilder, "colorSlider", m_aColorSlider)) - , m_xColorPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aColorPreview)) - , m_xColorPrevious(new weld::CustomWeld(*m_xBuilder, "previous", m_aColorPrevious)) - , m_xFISliderLeft(m_xBuilder->weld_widget("leftImage")) - , m_xFISliderRight(m_xBuilder->weld_widget("rightImage")) - , m_xRBRed(m_xBuilder->weld_radio_button("redRadiobutton")) - , m_xRBGreen(m_xBuilder->weld_radio_button("greenRadiobutton")) - , m_xRBBlue(m_xBuilder->weld_radio_button("blueRadiobutton")) - , m_xRBHue(m_xBuilder->weld_radio_button("hueRadiobutton")) - , m_xRBSaturation(m_xBuilder->weld_radio_button("satRadiobutton")) - , m_xRBBrightness(m_xBuilder->weld_radio_button("brightRadiobutton")) - , m_xMFRed(m_xBuilder->weld_spin_button("redSpinbutton")) - , m_xMFGreen(m_xBuilder->weld_spin_button("greenSpinbutton")) - , m_xMFBlue(m_xBuilder->weld_spin_button("blueSpinbutton")) - , m_xEDHex(new weld::HexColorControl(m_xBuilder->weld_entry("hexEntry"))) - , m_xMFHue(m_xBuilder->weld_metric_spin_button("hueSpinbutton", FieldUnit::DEGREE)) - , m_xMFSaturation(m_xBuilder->weld_metric_spin_button("satSpinbutton", FieldUnit::PERCENT)) - , m_xMFBrightness(m_xBuilder->weld_metric_spin_button("brightSpinbutton", FieldUnit::PERCENT)) - , m_xMFCyan(m_xBuilder->weld_metric_spin_button("cyanSpinbutton", FieldUnit::PERCENT)) - , m_xMFMagenta(m_xBuilder->weld_metric_spin_button("magSpinbutton", FieldUnit::PERCENT)) - , m_xMFYellow(m_xBuilder->weld_metric_spin_button("yellowSpinbutton", FieldUnit::PERCENT)) - , m_xMFKey(m_xBuilder->weld_metric_spin_button("keySpinbutton", FieldUnit::PERCENT)) + : SfxDialogController(pParent, u"cui/ui/colorpickerdialog.ui"_ustr, u"ColorPicker"_ustr) + , m_xColorField(new weld::CustomWeld(*m_xBuilder, u"colorField"_ustr, m_aColorField)) + , m_xColorSlider(new weld::CustomWeld(*m_xBuilder, u"colorSlider"_ustr, m_aColorSlider)) + , m_xColorPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aColorPreview)) + , m_xColorPrevious(new weld::CustomWeld(*m_xBuilder, u"previous"_ustr, m_aColorPrevious)) + , m_xFISliderLeft(m_xBuilder->weld_widget(u"leftImage"_ustr)) + , m_xFISliderRight(m_xBuilder->weld_widget(u"rightImage"_ustr)) + , m_xRBRed(m_xBuilder->weld_radio_button(u"redRadiobutton"_ustr)) + , m_xRBGreen(m_xBuilder->weld_radio_button(u"greenRadiobutton"_ustr)) + , m_xRBBlue(m_xBuilder->weld_radio_button(u"blueRadiobutton"_ustr)) + , m_xRBHue(m_xBuilder->weld_radio_button(u"hueRadiobutton"_ustr)) + , m_xRBSaturation(m_xBuilder->weld_radio_button(u"satRadiobutton"_ustr)) + , m_xRBBrightness(m_xBuilder->weld_radio_button(u"brightRadiobutton"_ustr)) + , m_xMFRed(m_xBuilder->weld_spin_button(u"redSpinbutton"_ustr)) + , m_xMFGreen(m_xBuilder->weld_spin_button(u"greenSpinbutton"_ustr)) + , m_xMFBlue(m_xBuilder->weld_spin_button(u"blueSpinbutton"_ustr)) + , m_xEDHex(new weld::HexColorControl(m_xBuilder->weld_entry(u"hexEntry"_ustr))) + , m_xMFHue(m_xBuilder->weld_metric_spin_button(u"hueSpinbutton"_ustr, FieldUnit::DEGREE)) + , m_xMFSaturation(m_xBuilder->weld_metric_spin_button(u"satSpinbutton"_ustr, FieldUnit::PERCENT)) + , m_xMFBrightness(m_xBuilder->weld_metric_spin_button(u"brightSpinbutton"_ustr, FieldUnit::PERCENT)) + , m_xMFCyan(m_xBuilder->weld_metric_spin_button(u"cyanSpinbutton"_ustr, FieldUnit::PERCENT)) + , m_xMFMagenta(m_xBuilder->weld_metric_spin_button(u"magSpinbutton"_ustr, FieldUnit::PERCENT)) + , m_xMFYellow(m_xBuilder->weld_metric_spin_button(u"yellowSpinbutton"_ustr, FieldUnit::PERCENT)) + , m_xMFKey(m_xBuilder->weld_metric_spin_button(u"keySpinbutton"_ustr, FieldUnit::PERCENT)) , meMode( DefaultMode ) { m_aColorField.SetModifyHdl( LINK( this, ColorPickerDialog, ColorFieldControlModifydl ) ); @@ -1287,7 +1287,7 @@ void SAL_CALL ColorPicker::initialize( const Sequence< Any >& aArguments ) // XInitialization OUString SAL_CALL ColorPicker::getImplementationName( ) { - return "com.sun.star.cui.ColorPicker"; + return u"com.sun.star.cui.ColorPicker"_ustr; } sal_Bool SAL_CALL ColorPicker::supportsService( const OUString& sServiceName ) @@ -1297,8 +1297,8 @@ sal_Bool SAL_CALL ColorPicker::supportsService( const OUString& sServiceName ) Sequence< OUString > SAL_CALL ColorPicker::getSupportedServiceNames( ) { - return { "com.sun.star.ui.dialogs.ColorPicker", - "com.sun.star.ui.dialogs.AsynchronousColorPicker" }; + return { u"com.sun.star.ui.dialogs.ColorPicker"_ustr, + u"com.sun.star.ui.dialogs.AsynchronousColorPicker"_ustr }; } // XPropertyAccess diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 0a7eb06783ab..89eee514e193 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -68,35 +68,35 @@ void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor ) FmSearchDialog::FmSearchDialog(weld::Window* pParent, const OUString& sInitialText, const std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) - : GenericDialogController(pParent, "cui/ui/fmsearchdialog.ui", "RecordSearchDialog") + : GenericDialogController(pParent, u"cui/ui/fmsearchdialog.ui"_ustr, u"RecordSearchDialog"_ustr) , m_sCancel( GetStandardText( StandardButtonType::Cancel ) ) , m_lnkContextSupplier(lnkContextSupplier) - , m_prbSearchForText(m_xBuilder->weld_radio_button("rbSearchForText")) - , m_prbSearchForNull(m_xBuilder->weld_radio_button("rbSearchForNull")) - , m_prbSearchForNotNull(m_xBuilder->weld_radio_button("rbSearchForNotNull")) - , m_pcmbSearchText(m_xBuilder->weld_combo_box("cmbSearchText")) - , m_pftForm(m_xBuilder->weld_label("ftForm")) - , m_plbForm(m_xBuilder->weld_combo_box("lbForm")) - , m_prbAllFields(m_xBuilder->weld_radio_button("rbAllFields")) - , m_prbSingleField(m_xBuilder->weld_radio_button("rbSingleField")) - , m_plbField(m_xBuilder->weld_combo_box("lbField")) - , m_pftPosition(m_xBuilder->weld_label("ftPosition")) - , m_plbPosition(m_xBuilder->weld_combo_box("lbPosition")) - , m_pcbUseFormat(m_xBuilder->weld_check_button("cbUseFormat")) - , m_pcbCase(m_xBuilder->weld_check_button("cbCase")) - , m_pcbBackwards(m_xBuilder->weld_check_button("cbBackwards")) - , m_pcbStartOver(m_xBuilder->weld_check_button("cbStartOver")) - , m_pcbWildCard(m_xBuilder->weld_check_button("cbWildCard")) - , m_pcbRegular(m_xBuilder->weld_check_button("cbRegular")) - , m_pcbApprox(m_xBuilder->weld_check_button("cbApprox")) - , m_ppbApproxSettings(m_xBuilder->weld_button("pbApproxSettings")) - , m_pHalfFullFormsCJK(m_xBuilder->weld_check_button("HalfFullFormsCJK")) - , m_pSoundsLikeCJK(m_xBuilder->weld_check_button("SoundsLikeCJK")) - , m_pSoundsLikeCJKSettings(m_xBuilder->weld_button("SoundsLikeCJKSettings")) - , m_pftRecord(m_xBuilder->weld_label("ftRecord")) - , m_pftHint(m_xBuilder->weld_label("ftHint")) - , m_pbSearchAgain(m_xBuilder->weld_button("pbSearchAgain")) - , m_pbClose(m_xBuilder->weld_button("close")) + , m_prbSearchForText(m_xBuilder->weld_radio_button(u"rbSearchForText"_ustr)) + , m_prbSearchForNull(m_xBuilder->weld_radio_button(u"rbSearchForNull"_ustr)) + , m_prbSearchForNotNull(m_xBuilder->weld_radio_button(u"rbSearchForNotNull"_ustr)) + , m_pcmbSearchText(m_xBuilder->weld_combo_box(u"cmbSearchText"_ustr)) + , m_pftForm(m_xBuilder->weld_label(u"ftForm"_ustr)) + , m_plbForm(m_xBuilder->weld_combo_box(u"lbForm"_ustr)) + , m_prbAllFields(m_xBuilder->weld_radio_button(u"rbAllFields"_ustr)) + , m_prbSingleField(m_xBuilder->weld_radio_button(u"rbSingleField"_ustr)) + , m_plbField(m_xBuilder->weld_combo_box(u"lbField"_ustr)) + , m_pftPosition(m_xBuilder->weld_label(u"ftPosition"_ustr)) + , m_plbPosition(m_xBuilder->weld_combo_box(u"lbPosition"_ustr)) + , m_pcbUseFormat(m_xBuilder->weld_check_button(u"cbUseFormat"_ustr)) + , m_pcbCase(m_xBuilder->weld_check_button(u"cbCase"_ustr)) + , m_pcbBackwards(m_xBuilder->weld_check_button(u"cbBackwards"_ustr)) + , m_pcbStartOver(m_xBuilder->weld_check_button(u"cbStartOver"_ustr)) + , m_pcbWildCard(m_xBuilder->weld_check_button(u"cbWildCard"_ustr)) + , m_pcbRegular(m_xBuilder->weld_check_button(u"cbRegular"_ustr)) + , m_pcbApprox(m_xBuilder->weld_check_button(u"cbApprox"_ustr)) + , m_ppbApproxSettings(m_xBuilder->weld_button(u"pbApproxSettings"_ustr)) + , m_pHalfFullFormsCJK(m_xBuilder->weld_check_button(u"HalfFullFormsCJK"_ustr)) + , m_pSoundsLikeCJK(m_xBuilder->weld_check_button(u"SoundsLikeCJK"_ustr)) + , m_pSoundsLikeCJKSettings(m_xBuilder->weld_button(u"SoundsLikeCJKSettings"_ustr)) + , m_pftRecord(m_xBuilder->weld_label(u"ftRecord"_ustr)) + , m_pftHint(m_xBuilder->weld_label(u"ftHint"_ustr)) + , m_pbSearchAgain(m_xBuilder->weld_button(u"pbSearchAgain"_ustr)) + , m_pbClose(m_xBuilder->weld_button(u"close"_ustr)) { m_pcmbSearchText->set_size_request(m_pcmbSearchText->get_approximate_digit_width() * 38, -1); m_plbForm->set_size_request(m_plbForm->get_approximate_digit_width() * 38, -1); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 9a1a2e26a4ed..fb2007532fc2 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -190,12 +190,12 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, } SearchProgress::SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, INetURLObject aStartURL) - : GenericDialogController(pParent, "cui/ui/gallerysearchprogress.ui", "GallerySearchProgress") + : GenericDialogController(pParent, u"cui/ui/gallerysearchprogress.ui"_ustr, u"GallerySearchProgress"_ustr) , startUrl_(std::move(aStartURL)) , m_pTabPage(pTabPage) - , m_xFtSearchDir(m_xBuilder->weld_label("dir")) - , m_xFtSearchType(m_xBuilder->weld_label("file")) - , m_xBtnCancel(m_xBuilder->weld_button("cancel")) + , m_xFtSearchDir(m_xBuilder->weld_label(u"dir"_ustr)) + , m_xFtSearchType(m_xBuilder->weld_label(u"file"_ustr)) + , m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xFtSearchType->set_size_request(m_xFtSearchType->get_preferred_size().Width(), -1); m_xBtnCancel->connect_clicked(LINK(this, SearchProgress, ClickCancelBtn)); @@ -291,12 +291,12 @@ void TakeThread::execute() } TakeProgress::TakeProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage) - : GenericDialogController(pParent, "cui/ui/galleryapplyprogress.ui", - "GalleryApplyProgress") + : GenericDialogController(pParent, u"cui/ui/galleryapplyprogress.ui"_ustr, + u"GalleryApplyProgress"_ustr) , m_pParent(pParent) , m_pTabPage(pTabPage) - , m_xFtTakeFile(m_xBuilder->weld_label("file")) - , m_xBtnCancel(m_xBuilder->weld_button("cancel")) + , m_xFtTakeFile(m_xBuilder->weld_label(u"file"_ustr)) + , m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xBtnCancel->connect_clicked(LINK(this, TakeProgress, ClickCancelBtn)); } @@ -365,12 +365,12 @@ void TakeProgress::LaunchThread() } ActualizeProgress::ActualizeProgress(weld::Widget* pWindow, GalleryTheme* pThm) - : GenericDialogController(pWindow, "cui/ui/galleryupdateprogress.ui", - "GalleryUpdateProgress") + : GenericDialogController(pWindow, u"cui/ui/galleryupdateprogress.ui"_ustr, + u"GalleryUpdateProgress"_ustr) , pIdle(nullptr) , pTheme(pThm) - , m_xFtActualizeFile(m_xBuilder->weld_label("file")) - , m_xBtnCancel(m_xBuilder->weld_button("cancel")) + , m_xFtActualizeFile(m_xBuilder->weld_label(u"file"_ustr)) + , m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xBtnCancel->connect_clicked(LINK(this, ActualizeProgress, ClickCancelBtn)); } @@ -414,8 +414,8 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, void ) } TitleDialog::TitleDialog(weld::Widget* pParent, const OUString& rOldTitle) - : GenericDialogController(pParent, "cui/ui/gallerytitledialog.ui", "GalleryTitleDialog") - , m_xEdit(m_xBuilder->weld_entry("entry")) + : GenericDialogController(pParent, u"cui/ui/gallerytitledialog.ui"_ustr, u"GalleryTitleDialog"_ustr) + , m_xEdit(m_xBuilder->weld_entry(u"entry"_ustr)) { m_xEdit->set_text(rOldTitle); m_xEdit->grab_focus(); @@ -426,12 +426,12 @@ TitleDialog::~TitleDialog() } GalleryIdDialog::GalleryIdDialog(weld::Widget* pParent, GalleryTheme* _pThm) - : GenericDialogController(pParent, "cui/ui/gallerythemeiddialog.ui", "GalleryThemeIDDialog") + : GenericDialogController(pParent, u"cui/ui/gallerythemeiddialog.ui"_ustr, u"GalleryThemeIDDialog"_ustr) , m_pThm(_pThm) - , m_xBtnOk(m_xBuilder->weld_button("ok")) - , m_xLbResName(m_xBuilder->weld_combo_box("entry")) + , m_xBtnOk(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xLbResName(m_xBuilder->weld_combo_box(u"entry"_ustr)) { - m_xLbResName->append_text("!!! No Id !!!"); + m_xLbResName->append_text(u"!!! No Id !!!"_ustr); GalleryTheme::InsertAllThemes(*m_xLbResName); @@ -475,14 +475,14 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, weld::Button&, void) GalleryThemeProperties::GalleryThemeProperties(weld::Widget* pParent, ExchangeData* _pData, SfxItemSet const * pItemSet) - : SfxTabDialogController(pParent, "cui/ui/gallerythemedialog.ui", - "GalleryThemeDialog", pItemSet) + : SfxTabDialogController(pParent, u"cui/ui/gallerythemedialog.ui"_ustr, + u"GalleryThemeDialog"_ustr, pItemSet) , pData(_pData) { - AddTabPage("general", TPGalleryThemeGeneral::Create, nullptr); - AddTabPage("files", TPGalleryThemeProperties::Create, nullptr); + AddTabPage(u"general"_ustr, TPGalleryThemeGeneral::Create, nullptr); + AddTabPage(u"files"_ustr, TPGalleryThemeProperties::Create, nullptr); if (pData->pTheme->IsReadOnly()) - RemoveTabPage("files"); + RemoveTabPage(u"files"_ustr); OUString aText = m_xDialog->get_title().replaceFirst( "%1", pData->pTheme->GetName() ); @@ -501,14 +501,14 @@ void GalleryThemeProperties::PageCreated(const OUString& rId, SfxTabPage &rPage) } TPGalleryThemeGeneral::TPGalleryThemeGeneral(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/gallerygeneralpage.ui", "GalleryGeneralPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/gallerygeneralpage.ui"_ustr, u"GalleryGeneralPage"_ustr, &rSet) , pData(nullptr) - , m_xFiMSImage(m_xBuilder->weld_image("image")) - , m_xEdtMSName(m_xBuilder->weld_entry("name")) - , m_xFtMSShowType(m_xBuilder->weld_label("type")) - , m_xFtMSShowPath(m_xBuilder->weld_label("location")) - , m_xFtMSShowContent(m_xBuilder->weld_label("contents")) - , m_xFtMSShowChangeDate(m_xBuilder->weld_label("modified")) + , m_xFiMSImage(m_xBuilder->weld_image(u"image"_ustr)) + , m_xEdtMSName(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xFtMSShowType(m_xBuilder->weld_label(u"type"_ustr)) + , m_xFtMSShowPath(m_xBuilder->weld_label(u"location"_ustr)) + , m_xFtMSShowContent(m_xBuilder->weld_label(u"contents"_ustr)) + , m_xFtMSShowChangeDate(m_xBuilder->weld_label(u"modified"_ustr)) { } @@ -576,7 +576,7 @@ std::unique_ptr<SfxTabPage> TPGalleryThemeGeneral::Create(weld::Container* pPage } TPGalleryThemeProperties::TPGalleryThemeProperties(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/galleryfilespage.ui", "GalleryFilesPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/galleryfilespage.ui"_ustr, u"GalleryFilesPage"_ustr, &rSet) , pData(nullptr) , aPreviewTimer("cui TPGalleryThemeProperties aPreviewTimer") , bEntriesFound(false) @@ -584,13 +584,13 @@ TPGalleryThemeProperties::TPGalleryThemeProperties(weld::Container* pPage, weld: , bTakeAll(false) , bSearchRecursive(false) , xDialogListener(new ::svt::DialogClosedListener()) - , m_xCbbFileType(m_xBuilder->weld_combo_box("filetype")) - , m_xLbxFound(m_xBuilder->weld_tree_view("files")) - , m_xBtnSearch(m_xBuilder->weld_button("findfiles")) - , m_xBtnTake(m_xBuilder->weld_button("add")) - , m_xBtnTakeAll(m_xBuilder->weld_button("addall")) - , m_xCbxPreview(m_xBuilder->weld_check_button("preview")) - , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, "image", m_aWndPreview)) + , m_xCbbFileType(m_xBuilder->weld_combo_box(u"filetype"_ustr)) + , m_xLbxFound(m_xBuilder->weld_tree_view(u"files"_ustr)) + , m_xBtnSearch(m_xBuilder->weld_button(u"findfiles"_ustr)) + , m_xBtnTake(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnTakeAll(m_xBuilder->weld_button(u"addall"_ustr)) + , m_xCbxPreview(m_xBuilder->weld_check_button(u"preview"_ustr)) + , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, u"image"_ustr, m_aWndPreview)) { m_xLbxFound->set_size_request(m_xLbxFound->get_approximate_digit_width() * 35, m_xLbxFound->get_height_rows(15)); @@ -782,8 +782,8 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFileTypeHdl, weld::ComboBox&, vo { aLastFilterName = aText; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryupdategalleryfilelistdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryUpdateFileListDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryupdategalleryfilelistdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"QueryUpdateFileListDialog"_ustr)); if (xQuery->run() == RET_YES) SearchFiles(); } @@ -889,9 +889,9 @@ void TPGalleryThemeProperties::DoPreview() ErrorHandler::HandleError(ERRCODE_IO_NOTEXISTSPATH, GetFrameWeld()); } #if HAVE_FEATURE_AVMEDIA - else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) ) + else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), u""_ustr ) ) { - xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" ); + xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), u""_ustr ); if( xMediaPlayer.is() ) xMediaPlayer->start(); } diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 69896cd53c0d..3522fa200e05 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -129,7 +129,7 @@ GraphicFilterDialog::GraphicFilterDialog(weld::Window* pParent, : GenericDialogController(pParent, rUIXMLDescription, rID) , maTimer("cui GraphicFilterDialog maTimer") , maModifyHdl(LINK(this, GraphicFilterDialog, ImplModifyHdl)) - , mxPreview(new weld::CustomWeld(*m_xBuilder, "preview", maPreview)) + , mxPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, maPreview)) { bIsBitmap = rGraphic.GetType() == GraphicType::Bitmap; @@ -157,10 +157,10 @@ IMPL_LINK_NOARG(GraphicFilterDialog, ImplModifyHdl, LinkParamNone*, void) GraphicFilterMosaic::GraphicFilterMosaic(weld::Window* pParent, const Graphic& rGraphic, sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges) - : GraphicFilterDialog(pParent, "cui/ui/mosaicdialog.ui", "MosaicDialog", rGraphic) - , mxMtrWidth(m_xBuilder->weld_metric_spin_button("width", FieldUnit::PIXEL)) - , mxMtrHeight(m_xBuilder->weld_metric_spin_button("height", FieldUnit::PIXEL)) - , mxCbxEdges(m_xBuilder->weld_check_button("edges")) + : GraphicFilterDialog(pParent, u"cui/ui/mosaicdialog.ui"_ustr, u"MosaicDialog"_ustr, rGraphic) + , mxMtrWidth(m_xBuilder->weld_metric_spin_button(u"width"_ustr, FieldUnit::PIXEL)) + , mxMtrHeight(m_xBuilder->weld_metric_spin_button(u"height"_ustr, FieldUnit::PIXEL)) + , mxCbxEdges(m_xBuilder->weld_check_button(u"edges"_ustr)) { mxMtrWidth->set_value(nTileWidth, FieldUnit::PIXEL); mxMtrWidth->set_max(GetGraphicSizePixel().Width(), FieldUnit::PIXEL); @@ -224,8 +224,8 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, } GraphicFilterSmooth::GraphicFilterSmooth(weld::Window* pParent, const Graphic& rGraphic, double nRadius) - : GraphicFilterDialog(pParent, "cui/ui/smoothdialog.ui", "SmoothDialog", rGraphic) - , mxMtrRadius(m_xBuilder->weld_spin_button("radius")) + : GraphicFilterDialog(pParent, u"cui/ui/smoothdialog.ui"_ustr, u"SmoothDialog"_ustr, rGraphic) + , mxMtrRadius(m_xBuilder->weld_spin_button(u"radius"_ustr)) { mxMtrRadius->set_value(nRadius * 10); mxMtrRadius->connect_value_changed(LINK(this, GraphicFilterSmooth, EditModifyHdl)); @@ -266,9 +266,9 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double GraphicFilterSolarize::GraphicFilterSolarize(weld::Window* pParent, const Graphic& rGraphic, sal_uInt8 cGreyThreshold, bool bInvert) - : GraphicFilterDialog(pParent, "cui/ui/solarizedialog.ui", "SolarizeDialog", rGraphic) - , mxMtrThreshold(m_xBuilder->weld_metric_spin_button("value", FieldUnit::PERCENT)) - , mxCbxInvert(m_xBuilder->weld_check_button("invert")) + : GraphicFilterDialog(pParent, u"cui/ui/solarizedialog.ui"_ustr, u"SolarizeDialog"_ustr, rGraphic) + , mxMtrThreshold(m_xBuilder->weld_metric_spin_button(u"value"_ustr, FieldUnit::PERCENT)) + , mxCbxInvert(m_xBuilder->weld_check_button(u"invert"_ustr)) { mxMtrThreshold->set_value(basegfx::fround(cGreyThreshold / 2.55), FieldUnit::PERCENT); mxMtrThreshold->connect_value_changed(LINK(this, GraphicFilterSolarize, EditModifyHdl)); @@ -322,8 +322,8 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, doub GraphicFilterSepia::GraphicFilterSepia(weld::Window* pParent, const Graphic& rGraphic, sal_uInt16 nSepiaPercent) - : GraphicFilterDialog(pParent, "cui/ui/agingdialog.ui", "AgingDialog", rGraphic) - , mxMtrSepia(m_xBuilder->weld_metric_spin_button("value", FieldUnit::PERCENT)) + : GraphicFilterDialog(pParent, u"cui/ui/agingdialog.ui"_ustr, u"AgingDialog"_ustr, rGraphic) + , mxMtrSepia(m_xBuilder->weld_metric_spin_button(u"value"_ustr, FieldUnit::PERCENT)) { mxMtrSepia->set_value(nSepiaPercent, FieldUnit::PERCENT); mxMtrSepia->connect_value_changed(LINK(this, GraphicFilterSepia, EditModifyHdl)); @@ -359,8 +359,8 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, double, GraphicFilterPoster::GraphicFilterPoster(weld::Window* pParent, const Graphic& rGraphic, sal_uInt16 nPosterCount) - : GraphicFilterDialog(pParent, "cui/ui/posterdialog.ui", "PosterDialog", rGraphic) - , mxNumPoster(m_xBuilder->weld_spin_button("value")) + : GraphicFilterDialog(pParent, u"cui/ui/posterdialog.ui"_ustr, u"PosterDialog"_ustr, rGraphic) + , mxNumPoster(m_xBuilder->weld_spin_button(u"value"_ustr)) { mxNumPoster->set_range(2, vcl::pixelFormatBitCount(rGraphic.GetBitmapEx().getPixelFormat())); mxNumPoster->set_value(nPosterCount); @@ -416,8 +416,8 @@ void EmbossControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) GraphicFilterEmboss::GraphicFilterEmboss(weld::Window* pParent, const Graphic& rGraphic, RectPoint eLightSource) - : GraphicFilterDialog(pParent, "cui/ui/embossdialog.ui", "EmbossDialog", rGraphic) - , mxCtlLight(new weld::CustomWeld(*m_xBuilder, "lightsource", maCtlLight)) + : GraphicFilterDialog(pParent, u"cui/ui/embossdialog.ui"_ustr, u"EmbossDialog"_ustr, rGraphic) + , mxCtlLight(new weld::CustomWeld(*m_xBuilder, u"lightsource"_ustr, maCtlLight)) { maCtlLight.SetActualRP(eLightSource); maCtlLight.SetModifyHdl( GetModifyHdl() ); diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 4fec600441fd..2270ab330f0b 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -80,22 +80,22 @@ void SvxHlinkCtrl::StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState e } // tdf#90496 - remember last used view in hyperlink dialog -OUString SvxHpLinkDlg::msRememberedPageId("internet"); +OUString SvxHpLinkDlg::msRememberedPageId(u"internet"_ustr); //# # //# Hyperlink - Dialog # //# # SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window* pParent) - : SfxModelessDialogController(pBindings, pChild, pParent, "cui/ui/hyperlinkdialog.ui", "HyperlinkDialog") + : SfxModelessDialogController(pBindings, pChild, pParent, u"cui/ui/hyperlinkdialog.ui"_ustr, u"HyperlinkDialog"_ustr) , pSet ( nullptr ) , maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this ) , mbIsHTMLDoc ( false ) - , m_xIconCtrl(m_xBuilder->weld_notebook("tabcontrol")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xApplyBtn(m_xBuilder->weld_button("apply")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) - , m_xHelpBtn(m_xBuilder->weld_button("help")) - , m_xResetBtn(m_xBuilder->weld_button("reset")) + , m_xIconCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xApplyBtn(m_xBuilder->weld_button(u"apply"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr)) + , m_xResetBtn(m_xBuilder->weld_button(u"reset"_ustr)) { m_xIconCtrl->connect_enter_page( LINK ( this, SvxHpLinkDlg, ChosePageHdl_Impl ) ); m_xIconCtrl->show(); @@ -139,12 +139,12 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld: SetInputSet (mpItemSet.get()); // insert pages - AddTabPage("internet", SvxHyperlinkInternetTp::Create); - AddTabPage("mail", SvxHyperlinkMailTp::Create); + AddTabPage(u"internet"_ustr, SvxHyperlinkInternetTp::Create); + AddTabPage(u"mail"_ustr, SvxHyperlinkMailTp::Create); if (!comphelper::LibreOfficeKit::isActive()) { - AddTabPage("document", SvxHyperlinkDocTp::Create); - AddTabPage("newdocument", SvxHyperlinkNewDocTp::Create); + AddTabPage(u"document"_ustr, SvxHyperlinkDocTp::Create); + AddTabPage(u"newdocument"_ustr, SvxHyperlinkNewDocTp::Create); } // tdf#90496 - remember last used view in hyperlink dialog @@ -236,7 +236,7 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ClickApplyHdl_Impl, weld::Button&, void) |************************************************************************/ void SvxHpLinkDlg::SetPage ( SvxHyperlinkItem const * pItem ) { - OUString sPageId("internet"); + OUString sPageId(u"internet"_ustr); OUString aStrURL(pItem->GetURL()); INetURLObject aURL(aStrURL); diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx index d613e1a804ee..f850210018bb 100644 --- a/cui/source/dialogs/cuiimapwnd.cxx +++ b/cui/source/dialogs/cuiimapwnd.cxx @@ -28,12 +28,12 @@ URLDlg::URLDlg(weld::Widget* pWindow, const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription, const OUString& rTarget, const OUString& rName, TargetList& rTargetList) - : GenericDialogController(pWindow, "cui/ui/cuiimapdlg.ui", "IMapDialog") - , m_xEdtURL(m_xBuilder->weld_entry("urlentry")) - , m_xCbbTargets(m_xBuilder->weld_combo_box("frameCB")) - , m_xEdtName(m_xBuilder->weld_entry("nameentry")) - , m_xEdtAlternativeText(m_xBuilder->weld_entry("textentry")) - , m_xEdtDescription(m_xBuilder->weld_text_view("descTV")) + : GenericDialogController(pWindow, u"cui/ui/cuiimapdlg.ui"_ustr, u"IMapDialog"_ustr) + , m_xEdtURL(m_xBuilder->weld_entry(u"urlentry"_ustr)) + , m_xCbbTargets(m_xBuilder->weld_combo_box(u"frameCB"_ustr)) + , m_xEdtName(m_xBuilder->weld_entry(u"nameentry"_ustr)) + , m_xEdtAlternativeText(m_xBuilder->weld_entry(u"textentry"_ustr)) + , m_xEdtDescription(m_xBuilder->weld_text_view(u"descTV"_ustr)) { m_xEdtDescription->set_size_request(m_xEdtDescription->get_approximate_digit_width() * 51, m_xEdtDescription->get_height_rows(5)); @@ -47,7 +47,7 @@ URLDlg::URLDlg(weld::Widget* pWindow, const OUString& rURL, const OUString& rAlt m_xCbbTargets->append_text(a); if (rTarget.isEmpty()) - m_xCbbTargets->set_entry_text("_self"); + m_xCbbTargets->set_entry_text(u"_self"_ustr); else m_xCbbTargets->set_entry_text(rTarget); } diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index 55d21325d5bc..a058acc1a877 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -20,8 +20,9 @@ #include <cuitbxform.hxx> FmInputRecordNoDialog::FmInputRecordNoDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/recordnumberdialog.ui", "RecordNumberDialog") - , m_xRecordNo(m_xBuilder->weld_spin_button("entry")) + : GenericDialogController(pParent, u"cui/ui/recordnumberdialog.ui"_ustr, + u"RecordNumberDialog"_ustr) + , m_xRecordNo(m_xBuilder->weld_spin_button(u"entry"_ustr)) { m_xRecordNo->set_range(1, 0x7FFFFFFF); } diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 09b6158fde00..8067e29bb7c7 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -29,10 +29,10 @@ SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, const OUString& rDesc, const OUString& rTitle) - : GenericDialogController(pParent, "cui/ui/namedialog.ui", "NameDialog") - , m_xEdtName(m_xBuilder->weld_entry("name_entry")) - , m_xFtDescription(m_xBuilder->weld_label("description_label")) - , m_xBtnOK(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/namedialog.ui"_ustr, u"NameDialog"_ustr) + , m_xEdtName(m_xBuilder->weld_entry(u"name_entry"_ustr)) + , m_xFtDescription(m_xBuilder->weld_label(u"description_label"_ustr)) + , m_xBtnOK(m_xBuilder->weld_button(u"ok"_ustr)) { m_xFtDescription->set_label(rDesc); m_xEdtName->set_text(rName); @@ -55,7 +55,7 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) // tdf#129032: feedback on reason to disabled controls m_xEdtName->set_message_type(bEnable ? weld::EntryMessageType::Normal : weld::EntryMessageType::Error); - OUString rTip = ""; + OUString rTip = u""_ustr; if (!bEnable && m_aCheckNameTooltipHdl.IsSet()) rTip = m_aCheckNameTooltipHdl.Call(*this); m_xBtnOK->set_tooltip_text(rTip); @@ -64,9 +64,9 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) SvxNumberDialog::SvxNumberDialog(weld::Window* pParent, const OUString& rDesc, sal_Int64 nValue, sal_Int64 nMin, sal_Int64 nMax) - : GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") - , m_xEdtNumber(m_xBuilder->weld_spin_button("number_spinbtn")) - , m_xFtDescription(m_xBuilder->weld_label("description_label")) + : GenericDialogController(pParent, u"cui/ui/numberdialog.ui"_ustr, u"NumberDialog"_ustr) + , m_xEdtNumber(m_xBuilder->weld_spin_button(u"number_spinbtn"_ustr)) + , m_xFtDescription(m_xBuilder->weld_label(u"description_label"_ustr)) { m_xFtDescription->set_label(rDesc); m_xEdtNumber->set_min(nMin); @@ -76,9 +76,9 @@ SvxNumberDialog::SvxNumberDialog(weld::Window* pParent, const OUString& rDesc, s SvxDecimalNumberDialog::SvxDecimalNumberDialog(weld::Window* pParent, const OUString& rDesc, double fValue) - : GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") - , m_xEdtNumber(m_xBuilder->weld_formatted_spin_button("number_spinbtn")) - , m_xFtDescription(m_xBuilder->weld_label("description_label")) + : GenericDialogController(pParent, u"cui/ui/numberdialog.ui"_ustr, u"NumberDialog"_ustr) + , m_xEdtNumber(m_xBuilder->weld_formatted_spin_button(u"number_spinbtn"_ustr)) + , m_xFtDescription(m_xBuilder->weld_label(u"description_label"_ustr)) { m_xFtDescription->set_label(rDesc); m_xEdtNumber->GetFormatter().SetValue(fValue); @@ -89,9 +89,9 @@ SvxDecimalNumberDialog::SvxDecimalNumberDialog(weld::Window* pParent, const OUSt // plus uniqueness-callback-linkHandler SvxObjectNameDialog::SvxObjectNameDialog(weld::Window* pParent, const OUString& rName) - : GenericDialogController(pParent, "cui/ui/objectnamedialog.ui", "ObjectNameDialog") - , m_xEdtName(m_xBuilder->weld_entry("object_name_entry")) - , m_xBtnOK(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/objectnamedialog.ui"_ustr, u"ObjectNameDialog"_ustr) + , m_xEdtName(m_xBuilder->weld_entry(u"object_name_entry"_ustr)) + , m_xBtnOK(m_xBuilder->weld_button(u"ok"_ustr)) { // set name m_xEdtName->set_text(rName); @@ -116,12 +116,13 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl, weld::Entry&, void) SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription, bool const isDecorative) - : GenericDialogController(pParent, "cui/ui/objecttitledescdialog.ui", "ObjectTitleDescDialog") - , m_xTitleFT(m_xBuilder->weld_label("object_title_label")) - , m_xEdtTitle(m_xBuilder->weld_entry("object_title_entry")) - , m_xDescriptionFT(m_xBuilder->weld_label("desc_label")) - , m_xEdtDescription(m_xBuilder->weld_text_view("desc_entry")) - , m_xDecorativeCB(m_xBuilder->weld_check_button("decorative")) + : GenericDialogController(pParent, u"cui/ui/objecttitledescdialog.ui"_ustr, + u"ObjectTitleDescDialog"_ustr) + , m_xTitleFT(m_xBuilder->weld_label(u"object_title_label"_ustr)) + , m_xEdtTitle(m_xBuilder->weld_entry(u"object_title_entry"_ustr)) + , m_xDescriptionFT(m_xBuilder->weld_label(u"desc_label"_ustr)) + , m_xEdtDescription(m_xBuilder->weld_text_view(u"desc_entry"_ustr)) + , m_xDecorativeCB(m_xBuilder->weld_check_button(u"decorative"_ustr)) { //lock height to initial height m_xEdtDescription->set_size_request(-1, m_xEdtDescription->get_text_height() * 5); @@ -147,12 +148,12 @@ IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, weld::Toggleable&, void } SvxListDialog::SvxListDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/listdialog.ui", "ListDialog") + : GenericDialogController(pParent, u"cui/ui/listdialog.ui"_ustr, u"ListDialog"_ustr) , m_aMode(ListMode::String) - , m_xList(m_xBuilder->weld_tree_view("assignlist")) - , m_xAddBtn(m_xBuilder->weld_button("addbtn")) - , m_xRemoveBtn(m_xBuilder->weld_button("removebtn")) - , m_xEditBtn(m_xBuilder->weld_button("editbtn")) + , m_xList(m_xBuilder->weld_tree_view(u"assignlist"_ustr)) + , m_xAddBtn(m_xBuilder->weld_button(u"addbtn"_ustr)) + , m_xRemoveBtn(m_xBuilder->weld_button(u"removebtn"_ustr)) + , m_xEditBtn(m_xBuilder->weld_button(u"editbtn"_ustr)) { m_xList->set_size_request(m_xList->get_approximate_digit_width() * 54, m_xList->get_height_rows(6)); @@ -169,7 +170,7 @@ SvxListDialog::~SvxListDialog() {} IMPL_LINK_NOARG(SvxListDialog, AddHdl_Impl, weld::Button&, void) { - SvxNameDialog aNameDlg(m_xDialog.get(), "", ""); + SvxNameDialog aNameDlg(m_xDialog.get(), u""_ustr, u""_ustr); if (!aNameDlg.run()) return; @@ -245,7 +246,7 @@ void SvxListDialog::EditEntry() if (m_aMode == ListMode::String) { - SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, ""); + SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, u""_ustr); if (!aNameDlg.run()) return; sNewText = comphelper::string::strip(aNameDlg.GetName(), ' '); @@ -258,14 +259,14 @@ void SvxListDialog::EditEntry() sal_Int64 nMax = m_aMode == ListMode::Int16 ? SAL_MAX_INT16 : m_aMode == ListMode::Int32 ? SAL_MAX_INT32 : SAL_MAX_INT64; - SvxNumberDialog aNumberDlg(m_xDialog.get(), "", sOldText.toInt64(), nMin, nMax); + SvxNumberDialog aNumberDlg(m_xDialog.get(), u""_ustr, sOldText.toInt64(), nMin, nMax); if (!aNumberDlg.run()) return; sNewText = OUString::number(aNumberDlg.GetNumber()); } else if (m_aMode == ListMode::Double) { - SvxDecimalNumberDialog aNumberDlg(m_xDialog.get(), "", sOldText.toDouble()); + SvxDecimalNumberDialog aNumberDlg(m_xDialog.get(), u""_ustr, sOldText.toDouble()); if (!aNumberDlg.run()) return; sNewText = OUString::number(aNumberDlg.GetNumber()); diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 537918ecb779..576055575751 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -289,9 +289,9 @@ namespace svx SuggestionDisplay::SuggestionDisplay(weld::Builder& rBuilder) : m_bDisplayListBox( true ) , m_bInSelectionUpdate( false ) - , m_xValueSet(new SuggestionSet(rBuilder.weld_scrolled_window("scrollwin", true))) - , m_xValueSetWin(new weld::CustomWeld(rBuilder, "valueset", *m_xValueSet)) - , m_xListBox(rBuilder.weld_tree_view("listbox")) + , m_xValueSet(new SuggestionSet(rBuilder.weld_scrolled_window(u"scrollwin"_ustr, true))) + , m_xValueSetWin(new weld::CustomWeld(rBuilder, u"valueset"_ustr, *m_xValueSet)) + , m_xListBox(rBuilder.weld_tree_view(u"listbox"_ustr)) { m_xValueSet->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionValueSetHdl ) ); m_xListBox->connect_changed( LINK( this, SuggestionDisplay, SelectSuggestionListBoxHdl ) ); @@ -299,7 +299,7 @@ namespace svx m_xValueSet->SetLineCount( LINE_CNT ); m_xValueSet->SetStyle( m_xValueSet->GetStyle() | WB_ITEMBORDER | WB_VSCROLL ); - auto nItemWidth = 2 * m_xListBox->get_pixel_size("AU").Width(); + auto nItemWidth = 2 * m_xListBox->get_pixel_size(u"AU"_ustr).Width(); m_xValueSet->SetItemWidth( nItemWidth ); Size aSize(m_xListBox->get_approximate_digit_width() * 42, m_xListBox->get_text_height() * 5); @@ -422,31 +422,31 @@ namespace svx } HangulHanjaConversionDialog::HangulHanjaConversionDialog(weld::Widget* pParent) - : GenericDialogController(pParent, "cui/ui/hangulhanjaconversiondialog.ui", "HangulHanjaConversionDialog") + : GenericDialogController(pParent, u"cui/ui/hangulhanjaconversiondialog.ui"_ustr, u"HangulHanjaConversionDialog"_ustr) , m_bDocumentMode( true ) - , m_xFind(m_xBuilder->weld_button("find")) - , m_xIgnore(m_xBuilder->weld_button("ignore")) - , m_xIgnoreAll(m_xBuilder->weld_button("ignoreall")) - , m_xReplace(m_xBuilder->weld_button("replace")) - , m_xReplaceAll(m_xBuilder->weld_button("replaceall")) - , m_xOptions(m_xBuilder->weld_button("options")) + , m_xFind(m_xBuilder->weld_button(u"find"_ustr)) + , m_xIgnore(m_xBuilder->weld_button(u"ignore"_ustr)) + , m_xIgnoreAll(m_xBuilder->weld_button(u"ignoreall"_ustr)) + , m_xReplace(m_xBuilder->weld_button(u"replace"_ustr)) + , m_xReplaceAll(m_xBuilder->weld_button(u"replaceall"_ustr)) + , m_xOptions(m_xBuilder->weld_button(u"options"_ustr)) , m_xSuggestions(new SuggestionDisplay(*m_xBuilder)) - , m_xSimpleConversion(m_xBuilder->weld_radio_button("simpleconversion")) - , m_xHangulBracketed(m_xBuilder->weld_radio_button("hangulbracket")) - , m_xHanjaBracketed(m_xBuilder->weld_radio_button("hanjabracket")) - , m_xWordInput(m_xBuilder->weld_entry("wordinput")) - , m_xOriginalWord(m_xBuilder->weld_label("originalword")) - , m_xHanjaAbove(new RubyRadioButton(m_xBuilder->weld_radio_button("hanja_above"), - m_xBuilder->weld_image("hanja_above_img"))) - , m_xHanjaBelow(new RubyRadioButton(m_xBuilder->weld_radio_button("hanja_below"), - m_xBuilder->weld_image("hanja_below_img"))) - , m_xHangulAbove(new RubyRadioButton(m_xBuilder->weld_radio_button("hangul_above"), - m_xBuilder->weld_image("hangul_above_img"))) - , m_xHangulBelow(new RubyRadioButton(m_xBuilder->weld_radio_button("hangul_below"), - m_xBuilder->weld_image("hangul_below_img"))) - , m_xHangulOnly(m_xBuilder->weld_check_button("hangulonly")) - , m_xHanjaOnly(m_xBuilder->weld_check_button("hanjaonly")) - , m_xReplaceByChar(m_xBuilder->weld_check_button("replacebychar")) + , m_xSimpleConversion(m_xBuilder->weld_radio_button(u"simpleconversion"_ustr)) + , m_xHangulBracketed(m_xBuilder->weld_radio_button(u"hangulbracket"_ustr)) + , m_xHanjaBracketed(m_xBuilder->weld_radio_button(u"hanjabracket"_ustr)) + , m_xWordInput(m_xBuilder->weld_entry(u"wordinput"_ustr)) + , m_xOriginalWord(m_xBuilder->weld_label(u"originalword"_ustr)) + , m_xHanjaAbove(new RubyRadioButton(m_xBuilder->weld_radio_button(u"hanja_above"_ustr), + m_xBuilder->weld_image(u"hanja_above_img"_ustr))) + , m_xHanjaBelow(new RubyRadioButton(m_xBuilder->weld_radio_button(u"hanja_below"_ustr), + m_xBuilder->weld_image(u"hanja_below_img"_ustr))) + , m_xHangulAbove(new RubyRadioButton(m_xBuilder->weld_radio_button(u"hangul_above"_ustr), + m_xBuilder->weld_image(u"hangul_above_img"_ustr))) + , m_xHangulBelow(new RubyRadioButton(m_xBuilder->weld_radio_button(u"hangul_below"_ustr), + m_xBuilder->weld_image(u"hangul_below_img"_ustr))) + , m_xHangulOnly(m_xBuilder->weld_check_button(u"hangulonly"_ustr)) + , m_xHanjaOnly(m_xBuilder->weld_check_button(u"hanjaonly"_ustr)) + , m_xReplaceByChar(m_xBuilder->weld_check_button(u"replacebychar"_ustr)) { m_xSuggestions->set_size_request(m_xOriginalWord->get_approximate_digit_width() * 42, m_xOriginalWord->get_text_height() * 5); @@ -879,15 +879,15 @@ namespace svx } HangulHanjaOptionsDialog::HangulHanjaOptionsDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/hangulhanjaoptdialog.ui", "HangulHanjaOptDialog") - , m_xDictsLB(m_xBuilder->weld_tree_view("dicts")) - , m_xIgnorepostCB(m_xBuilder->weld_check_button("ignorepost")) - , m_xShowrecentlyfirstCB(m_xBuilder->weld_check_button("showrecentfirst")) - , m_xAutoreplaceuniqueCB(m_xBuilder->weld_check_button("autoreplaceunique")) - , m_xNewPB(m_xBuilder->weld_button("new")) - , m_xEditPB(m_xBuilder->weld_button("edit")) - , m_xDeletePB(m_xBuilder->weld_button("delete")) - , m_xOkPB(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/hangulhanjaoptdialog.ui"_ustr, u"HangulHanjaOptDialog"_ustr) + , m_xDictsLB(m_xBuilder->weld_tree_view(u"dicts"_ustr)) + , m_xIgnorepostCB(m_xBuilder->weld_check_button(u"ignorepost"_ustr)) + , m_xShowrecentlyfirstCB(m_xBuilder->weld_check_button(u"showrecentfirst"_ustr)) + , m_xAutoreplaceuniqueCB(m_xBuilder->weld_check_button(u"autoreplaceunique"_ustr)) + , m_xNewPB(m_xBuilder->weld_button(u"new"_ustr)) + , m_xEditPB(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xDeletePB(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xOkPB(m_xBuilder->weld_button(u"ok"_ustr)) { m_xDictsLB->set_size_request(m_xDictsLB->get_approximate_digit_width() * 32, m_xDictsLB->get_height_rows(5)); @@ -951,10 +951,10 @@ namespace svx } HangulHanjaNewDictDialog::HangulHanjaNewDictDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/hangulhanjaadddialog.ui", "HangulHanjaAddDialog") + : GenericDialogController(pParent, u"cui/ui/hangulhanjaadddialog.ui"_ustr, u"HangulHanjaAddDialog"_ustr) , m_bEntered(false) - , m_xOkBtn(m_xBuilder->weld_button("ok")) - , m_xDictNameED(m_xBuilder->weld_entry("entry")) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xDictNameED(m_xBuilder->weld_entry(u"entry"_ustr)) { m_xOkBtn->connect_clicked( LINK( this, HangulHanjaNewDictDialog, OKHdl ) ); m_xDictNameED->connect_changed( LINK( this, HangulHanjaNewDictDialog, ModifyHdl ) ); @@ -1416,23 +1416,23 @@ namespace svx } HangulHanjaEditDictDialog::HangulHanjaEditDictDialog(weld::Window* pParent, HHDictList& _rDictList, sal_uInt32 nSelDict) - : GenericDialogController(pParent, "cui/ui/hangulhanjaeditdictdialog.ui", "HangulHanjaEditDictDialog") + : GenericDialogController(pParent, u"cui/ui/hangulhanjaeditdictdialog.ui"_ustr, u"HangulHanjaEditDictDialog"_ustr) , m_aEditHintText ( CuiResId(RID_CUISTR_EDITHINT) ) , m_rDictList ( _rDictList ) , m_nCurrentDict ( 0xFFFFFFFF ) , m_nTopPos ( 0 ) , m_bModifiedSuggestions ( false ) , m_bModifiedOriginal ( false ) - , m_xBookLB(m_xBuilder->weld_combo_box("book")) - , m_xOriginalLB(m_xBuilder->weld_combo_box("original")) - , m_xEdit1(new SuggestionEdit(m_xBuilder->weld_entry("edit1"), this)) - , m_xEdit2(new SuggestionEdit(m_xBuilder->weld_entry("edit2"), this)) - , m_xEdit3(new SuggestionEdit(m_xBuilder->weld_entry("edit3"), this)) - , m_xEdit4(new SuggestionEdit(m_xBuilder->weld_entry("edit4"), this)) - , m_xContents(m_xBuilder->weld_widget("box")) - , m_xScrollSB(m_xBuilder->weld_scrolled_window("scrollbar", true)) - , m_xNewPB(m_xBuilder->weld_button("new")) - , m_xDeletePB(m_xBuilder->weld_button("delete")) + , m_xBookLB(m_xBuilder->weld_combo_box(u"book"_ustr)) + , m_xOriginalLB(m_xBuilder->weld_combo_box(u"original"_ustr)) + , m_xEdit1(new SuggestionEdit(m_xBuilder->weld_entry(u"edit1"_ustr), this)) + , m_xEdit2(new SuggestionEdit(m_xBuilder->weld_entry(u"edit2"_ustr), this)) + , m_xEdit3(new SuggestionEdit(m_xBuilder->weld_entry(u"edit3"_ustr), this)) + , m_xEdit4(new SuggestionEdit(m_xBuilder->weld_entry(u"edit4"_ustr), this)) + , m_xContents(m_xBuilder->weld_widget(u"box"_ustr)) + , m_xScrollSB(m_xBuilder->weld_scrolled_window(u"scrollbar"_ustr, true)) + , m_xNewPB(m_xBuilder->weld_button(u"new"_ustr)) + , m_xDeletePB(m_xBuilder->weld_button(u"delete"_ustr)) { Size aSize(m_xContents->get_preferred_size()); m_xScrollSB->set_size_request(-1, aSize.Height()); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index d58077a431f4..b09fbafe9764 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -106,12 +106,12 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, std::u16stri |************************************************************************/ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet) - : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinknewdocpage.ui", "HyperlinkNewDocPage", pItemSet) - , m_xRbtEditNow(xBuilder->weld_radio_button("editnow")) - , m_xRbtEditLater(xBuilder->weld_radio_button("editlater")) - , m_xCbbPath(new SvxHyperURLBox(xBuilder->weld_combo_box("path"))) - , m_xBtCreate(xBuilder->weld_button("create")) - , m_xLbDocTypes(xBuilder->weld_tree_view("types")) + : SvxHyperlinkTabPageBase(pParent, pDlg, u"cui/ui/hyperlinknewdocpage.ui"_ustr, u"HyperlinkNewDocPage"_ustr, pItemSet) + , m_xRbtEditNow(xBuilder->weld_radio_button(u"editnow"_ustr)) + , m_xRbtEditLater(xBuilder->weld_radio_button(u"editlater"_ustr)) + , m_xCbbPath(new SvxHyperURLBox(xBuilder->weld_combo_box(u"path"_ustr))) + , m_xBtCreate(xBuilder->weld_button(u"create"_ustr)) + , m_xLbDocTypes(xBuilder->weld_tree_view(u"types"_ustr)) { m_xCbbPath->SetSmartProtocol(INetProtocol::File); m_xLbDocTypes->set_size_request(-1, m_xLbDocTypes->get_height_rows(5)); @@ -262,8 +262,8 @@ IMPL_STATIC_LINK(SvxHyperlinkNewDocTp, DispatchDocument, void*, p, void) // create items SfxStringItem aName( SID_FILE_NAME, xExecuteInfo->aStrDocName ); - SfxStringItem aReferer( SID_REFERER, "private:user" ); - SfxStringItem aFrame( SID_TARGETNAME, "_blank"); + SfxStringItem aReferer( SID_REFERER, u"private:user"_ustr ); + SfxStringItem aFrame( SID_TARGETNAME, u"_blank"_ustr); OUString aStrFlags('S'); if (xExecuteInfo->bRbtEditLater) diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index a1c1454b69de..b414309bea0b 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -34,12 +34,12 @@ char const sHash[] = "#"; |************************************************************************/ SvxHyperlinkDocTp::SvxHyperlinkDocTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet) - : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinkdocpage.ui", "HyperlinkDocPage", pItemSet) - , m_xCbbPath(new SvxHyperURLBox(xBuilder->weld_combo_box("path"))) - , m_xBtFileopen(xBuilder->weld_button("fileopen")) - , m_xEdTarget(xBuilder->weld_entry("target")) - , m_xFtFullURL(xBuilder->weld_label("url")) - , m_xBtBrowse(xBuilder->weld_button("browse")) + : SvxHyperlinkTabPageBase(pParent, pDlg, u"cui/ui/hyperlinkdocpage.ui"_ustr, u"HyperlinkDocPage"_ustr, pItemSet) + , m_xCbbPath(new SvxHyperURLBox(xBuilder->weld_combo_box(u"path"_ustr))) + , m_xBtFileopen(xBuilder->weld_button(u"fileopen"_ustr)) + , m_xEdTarget(xBuilder->weld_entry(u"target"_ustr)) + , m_xFtFullURL(xBuilder->weld_label(u"url"_ustr)) + , m_xBtBrowse(xBuilder->weld_button(u"browse"_ustr)) , m_bMarkWndOpen(false) { m_xCbbPath->SetSmartProtocol(INetProtocol::File); @@ -217,7 +217,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) weld::WaitObject aWait(mpDialog->getDialog()); if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) - mxMarkWnd->RefreshTree ( "" ); + mxMarkWnd->RefreshTree ( u""_ustr ); else mxMarkWnd->RefreshTree ( maStrURL ); } @@ -254,7 +254,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, void) weld::WaitObject aWait(mpDialog->getDialog()); if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) - mxMarkWnd->RefreshTree ( "" ); + mxMarkWnd->RefreshTree ( u""_ustr ); else mxMarkWnd->RefreshTree ( maStrURL ); } diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 610cdd8aea5e..90348fe3f508 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -33,11 +33,11 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet) - : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinkinternetpage.ui", "HyperlinkInternetPage", + : SvxHyperlinkTabPageBase(pParent, pDlg, u"cui/ui/hyperlinkinternetpage.ui"_ustr, u"HyperlinkInternetPage"_ustr, pItemSet) , m_bMarkWndOpen(false) - , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target"))) - , m_xFtTarget(xBuilder->weld_label("target_label")) + , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box(u"target"_ustr))) + , m_xFtTarget(xBuilder->weld_label(u"target_label"_ustr)) { // gtk_size_group_set_ignore_hidden, "Measuring the size of hidden widgets // ... they will report a size of 0 nowadays, and thus, their size will diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 2d25bed91747..73904ed34258 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -34,10 +34,10 @@ using namespace ::com::sun::star; |* |************************************************************************/ SvxHyperlinkMailTp::SvxHyperlinkMailTp(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pItemSet) - : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinkmailpage.ui", "HyperlinkMailPage", pItemSet) - , m_xCbbReceiver(new SvxHyperURLBox(xBuilder->weld_combo_box("receiver"))) - , m_xBtAdrBook(xBuilder->weld_button("addressbook")) - , m_xEdSubject(xBuilder->weld_entry("subject")) + : SvxHyperlinkTabPageBase(pParent, pDlg, u"cui/ui/hyperlinkmailpage.ui"_ustr, u"HyperlinkMailPage"_ustr, pItemSet) + , m_xCbbReceiver(new SvxHyperURLBox(xBuilder->weld_combo_box(u"receiver"_ustr))) + , m_xBtAdrBook(xBuilder->weld_button(u"addressbook"_ustr)) + , m_xEdSubject(xBuilder->weld_entry(u"subject"_ustr)) { m_xCbbReceiver->SetSmartProtocol(INetProtocol::Mailto); @@ -95,7 +95,7 @@ void SvxHyperlinkMailTp::FillDlgFields(const OUString& rStrURL) } else { - m_xEdSubject->set_text(""); + m_xEdSubject->set_text(u""_ustr); } m_xCbbReceiver->set_entry_text(aStrURLc); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 918fc7cab3f7..0f45cfe9680a 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -66,13 +66,13 @@ struct TargetData //*** Window-Class *** // Constructor / Destructor SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd(weld::Window* pParentDialog, SvxHyperlinkTabPageBase *pParentPage) - : GenericDialogController(pParentDialog, "cui/ui/hyperlinkmarkdialog.ui", "HyperlinkMark") + : GenericDialogController(pParentDialog, u"cui/ui/hyperlinkmarkdialog.ui"_ustr, u"HyperlinkMark"_ustr) , mpParent(pParentPage) , mnError(LERR_NOERROR) - , mxBtApply(m_xBuilder->weld_button("ok")) - , mxBtClose(m_xBuilder->weld_button("close")) - , mxLbTree(m_xBuilder->weld_tree_view("TreeListBox")) - , mxError(m_xBuilder->weld_label("error")) + , mxBtApply(m_xBuilder->weld_button(u"ok"_ustr)) + , mxBtClose(m_xBuilder->weld_button(u"close"_ustr)) + , mxLbTree(m_xBuilder->weld_tree_view(u"TreeListBox"_ustr)) + , mxError(m_xBuilder->weld_label(u"error"_ustr)) { mxLbTree->set_size_request(mxLbTree->get_approximate_digit_width() * 25, mxLbTree->get_height_rows(12)); @@ -253,8 +253,8 @@ bool SvxHlinkDlgMarkWnd::RefreshFromDoc(const OUString& aURL) { try { - uno::Sequence< beans::PropertyValue > aArg { comphelper::makePropertyValue("Hidden", true) }; - xComp = xDesktop->loadComponentFromURL( aURL, "_blank", 0, aArg ); + uno::Sequence< beans::PropertyValue > aArg { comphelper::makePropertyValue(u"Hidden"_ustr, true) }; + xComp = xDesktop->loadComponentFromURL( aURL, u"_blank"_ustr, 0, aArg ); } catch( const io::IOException& ) { @@ -352,12 +352,12 @@ int SvxHlinkDlgMarkWnd::FillTree( const uno::Reference< container::XNameAccess > std::pair(mxLbTree->make_iterator(pParentEntry), -1)); // get the headings name to display - aAny = xTarget->getPropertyValue("ActualOutlineName"); + aAny = xTarget->getPropertyValue(u"ActualOutlineName"_ustr); OUString sActualOutlineName; aAny >>= sActualOutlineName; // get the headings outline level - aAny = xTarget->getPropertyValue("OutlineLevel"); + aAny = xTarget->getPropertyValue(u"OutlineLevel"_ustr); sal_Int32 nOutlineLevel = *o3tl::doAccess<sal_Int32>(aAny); // pop until the top of stack entry has an outline level less than diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 7f2230e1d87a..9ac9be2baf8b 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -107,13 +107,13 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase(weld::Container* pParent, const OUString& rID, const SfxItemSet* pItemSet) : IconChoicePage(pParent, rUIXMLDescription, rID, pItemSet) - , mxCbbFrame(xBuilder->weld_combo_box("frame")) - , mxLbForm(xBuilder->weld_combo_box("form")) - , mxEdIndication(xBuilder->weld_entry("indication")) - , mxEdText(xBuilder->weld_entry("name")) - , mxBtScript(xBuilder->weld_button("script")) - , mxFormLabel(xBuilder->weld_label("form_label")) - , mxFrameLabel(xBuilder->weld_label("frame_label")) + , mxCbbFrame(xBuilder->weld_combo_box(u"frame"_ustr)) + , mxLbForm(xBuilder->weld_combo_box(u"form"_ustr)) + , mxEdIndication(xBuilder->weld_entry(u"indication"_ustr)) + , mxEdText(xBuilder->weld_entry(u"name"_ustr)) + , mxBtScript(xBuilder->weld_button(u"script"_ustr)) + , mxFormLabel(xBuilder->weld_label(u"form_label"_ustr)) + , mxFrameLabel(xBuilder->weld_label(u"frame_label"_ustr)) , mbIsCloseDisabled( false ) , mpDialog( pDlg ) , mbStdControlsInit( false ) diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index c06ecab9661f..afaf415468e8 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -393,7 +393,7 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( weld::Widget* pParent, uno::Reference< linguistic2::XHyphenator > const &xHyphen, SvxSpellWrapper* pWrapper) - : SfxDialogController(pParent, "cui/ui/hyphenate.ui", "HyphenateDialog") + : SfxDialogController(pParent, u"cui/ui/hyphenate.ui"_ustr, u"HyphenateDialog"_ustr) , m_pHyphWrapper(pWrapper) , m_aActWord(std::move(aWord)) , m_nActLanguage(nLang) @@ -401,14 +401,14 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( , m_nOldPos(0) , m_nHyphenationPositionsOffset(0) , m_bBusy(false) - , m_xWordEdit(m_xBuilder->weld_entry("worded")) - , m_xLeftBtn(m_xBuilder->weld_button("left")) - , m_xRightBtn(m_xBuilder->weld_button("right")) - , m_xOkBtn(m_xBuilder->weld_button("ok")) - , m_xContBtn(m_xBuilder->weld_button("continue")) - , m_xDelBtn(m_xBuilder->weld_button("delete")) - , m_xHyphAll(m_xBuilder->weld_button("hyphall")) - , m_xCloseBtn(m_xBuilder->weld_button("close")) + , m_xWordEdit(m_xBuilder->weld_entry(u"worded"_ustr)) + , m_xLeftBtn(m_xBuilder->weld_button(u"left"_ustr)) + , m_xRightBtn(m_xBuilder->weld_button(u"right"_ustr)) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xContBtn(m_xBuilder->weld_button(u"continue"_ustr)) + , m_xDelBtn(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xHyphAll(m_xBuilder->weld_button(u"hyphall"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_button(u"close"_ustr)) { m_nWordEditWidth = m_xWordEdit->get_width_chars(); m_aLabel = m_xDialog->get_title(); diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index e4c1c6687768..814732173598 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -94,7 +94,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl, weld::Button&, void) // add filter try { - xFilePicker->appendFilter(CuiResId(RID_CUISTR_FILTER_ALL), "*.*"); + xFilePicker->appendFilter(CuiResId(RID_CUISTR_FILTER_ALL), u"*.*"_ustr); } catch( const IllegalArgumentException& ) { @@ -128,17 +128,17 @@ IMPL_LINK(SvInsertOleDlg, RadioHdl, weld::Toggleable&, rButton, void) SvInsertOleDlg::SvInsertOleDlg(weld::Window* pParent, const Reference<embed::XStorage>& xStorage, const SvObjectServerList* pServers) - : InsertObjectDialog_Impl( pParent, "cui/ui/insertoleobject.ui", "InsertOLEObjectDialog", xStorage) + : InsertObjectDialog_Impl( pParent, u"cui/ui/insertoleobject.ui"_ustr, u"InsertOLEObjectDialog"_ustr, xStorage) , m_pServers( pServers ) - , m_xRbNewObject(m_xBuilder->weld_radio_button("createnew")) - , m_xRbObjectFromfile(m_xBuilder->weld_radio_button("createfromfile")) - , m_xObjectTypeFrame(m_xBuilder->weld_frame("objecttypeframe")) - , m_xLbObjecttype(m_xBuilder->weld_tree_view("types")) - , m_xFileFrame(m_xBuilder->weld_frame("fileframe")) - , m_xEdFilepath(m_xBuilder->weld_entry("urled")) - , m_xBtnFilepath(m_xBuilder->weld_button("urlbtn")) - , m_xCbFilelink(m_xBuilder->weld_check_button("linktofile")) - , m_xCbAsIcon(m_xBuilder->weld_check_button("asicon")) + , m_xRbNewObject(m_xBuilder->weld_radio_button(u"createnew"_ustr)) + , m_xRbObjectFromfile(m_xBuilder->weld_radio_button(u"createfromfile"_ustr)) + , m_xObjectTypeFrame(m_xBuilder->weld_frame(u"objecttypeframe"_ustr)) + , m_xLbObjecttype(m_xBuilder->weld_tree_view(u"types"_ustr)) + , m_xFileFrame(m_xBuilder->weld_frame(u"fileframe"_ustr)) + , m_xEdFilepath(m_xBuilder->weld_entry(u"urled"_ustr)) + , m_xBtnFilepath(m_xBuilder->weld_button(u"urlbtn"_ustr)) + , m_xCbFilelink(m_xBuilder->weld_check_button(u"linktofile"_ustr)) + , m_xCbAsIcon(m_xBuilder->weld_check_button(u"asicon"_ustr)) { m_xLbObjecttype->set_size_request(m_xLbObjecttype->get_approximate_digit_width() * 32, m_xLbObjecttype->get_height_rows(6)); @@ -215,8 +215,8 @@ short SvInsertOleDlg::run() const embed::InsertedObjectInfo aNewInf = xDialogCreator->createInstanceByDialog( m_xStorage, aName, - {comphelper::makePropertyValue("StatusIndicator", xProgress), - comphelper::makePropertyValue("StatusIndicatorText", aProgressText)} ); + {comphelper::makePropertyValue(u"StatusIndicator"_ustr, xProgress), + comphelper::makePropertyValue(u"StatusIndicatorText"_ustr, aProgressText)} ); OSL_ENSURE( aNewInf.Object.is(), "The object must be created or an exception must be thrown!" ); m_xObj = aNewInf.Object; @@ -293,8 +293,8 @@ short SvInsertOleDlg::run() // create MediaDescriptor for file to create object from uno::Sequence < beans::PropertyValue > aMedium{ - comphelper::makePropertyValue("URL", aFileName), - comphelper::makePropertyValue("InteractionHandler", xInteraction) + comphelper::makePropertyValue(u"URL"_ustr, aFileName), + comphelper::makePropertyValue(u"InteractionHandler"_ustr, xInteraction) }; // create object from media descriptor @@ -374,7 +374,7 @@ uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( OUString* SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog(weld::Window *pParent, const css::uno::Reference < css::embed::XStorage >& xStorage) - : InsertObjectDialog_Impl(pParent, "cui/ui/insertfloatingframe.ui", "InsertFloatingFrameDialog", + : InsertObjectDialog_Impl(pParent, u"cui/ui/insertfloatingframe.ui"_ustr, u"InsertFloatingFrameDialog"_ustr, xStorage) { Init(); @@ -382,7 +382,7 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog(weld::Window *pParent SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog(weld::Window *pParent, const uno::Reference < embed::XEmbeddedObject >& xObj) - : InsertObjectDialog_Impl(pParent, "cui/ui/insertfloatingframe.ui", "InsertFloatingFrameDialog", + : InsertObjectDialog_Impl(pParent, u"cui/ui/insertfloatingframe.ui"_ustr, u"InsertFloatingFrameDialog"_ustr, uno::Reference<embed::XStorage>()) { m_xObj = xObj; @@ -392,20 +392,20 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog(weld::Window *pParent void SfxInsertFloatingFrameDialog::Init() { - m_xEDName = m_xBuilder->weld_entry("edname"); - m_xEDURL = m_xBuilder->weld_entry("edurl"); - m_xBTOpen = m_xBuilder->weld_button("buttonbrowse"); - m_xRBScrollingOn = m_xBuilder->weld_radio_button("scrollbaron"); - m_xRBScrollingOff = m_xBuilder->weld_radio_button("scrollbaroff"); - m_xRBScrollingAuto = m_xBuilder->weld_radio_button("scrollbarauto"); - m_xRBFrameBorderOn = m_xBuilder->weld_radio_button("borderon"); - m_xRBFrameBorderOff = m_xBuilder->weld_radio_button("borderoff"); - m_xFTMarginWidth = m_xBuilder->weld_label("widthlabel"); - m_xNMMarginWidth = m_xBuilder->weld_spin_button("width"); - m_xCBMarginWidthDefault = m_xBuilder->weld_check_button("defaultwidth"); - m_xFTMarginHeight = m_xBuilder->weld_label("heightlabel"); - m_xNMMarginHeight = m_xBuilder->weld_spin_button("height"); - m_xCBMarginHeightDefault = m_xBuilder->weld_check_button("defaultheight"); + m_xEDName = m_xBuilder->weld_entry(u"edname"_ustr); + m_xEDURL = m_xBuilder->weld_entry(u"edurl"_ustr); + m_xBTOpen = m_xBuilder->weld_button(u"buttonbrowse"_ustr); + m_xRBScrollingOn = m_xBuilder->weld_radio_button(u"scrollbaron"_ustr); + m_xRBScrollingOff = m_xBuilder->weld_radio_button(u"scrollbaroff"_ustr); + m_xRBScrollingAuto = m_xBuilder->weld_radio_button(u"scrollbarauto"_ustr); + m_xRBFrameBorderOn = m_xBuilder->weld_radio_button(u"borderon"_ustr); + m_xRBFrameBorderOff = m_xBuilder->weld_radio_button(u"borderoff"_ustr); + m_xFTMarginWidth = m_xBuilder->weld_label(u"widthlabel"_ustr); + m_xNMMarginWidth = m_xBuilder->weld_spin_button(u"width"_ustr); + m_xCBMarginWidthDefault = m_xBuilder->weld_check_button(u"defaultwidth"_ustr); + m_xFTMarginHeight = m_xBuilder->weld_label(u"heightlabel"_ustr); + m_xNMMarginHeight = m_xBuilder->weld_spin_button(u"height"_ustr); + m_xCBMarginHeightDefault = m_xBuilder->weld_check_button(u"defaultheight"_ustr); Link<weld::Toggleable&, void> aLink(LINK(this, SfxInsertFloatingFrameDialog, CheckHdl)); m_xCBMarginWidthDefault->connect_toggled(aLink); @@ -432,15 +432,15 @@ short SfxInsertFloatingFrameDialog::run() m_xObj->changeState( embed::EmbedStates::RUNNING ); xSet.set( m_xObj->getComponent(), uno::UNO_QUERY ); OUString aStr; - uno::Any aAny = xSet->getPropertyValue( "FrameURL" ); + uno::Any aAny = xSet->getPropertyValue( u"FrameURL"_ustr ); if ( aAny >>= aStr ) m_xEDURL->set_text( aStr ); - aAny = xSet->getPropertyValue( "FrameName" ); + aAny = xSet->getPropertyValue( u"FrameName"_ustr ); if ( aAny >>= aStr ) m_xEDName->set_text(aStr); sal_Int32 nSize = SIZE_NOT_SET; - aAny = xSet->getPropertyValue( "FrameMarginWidth" ); + aAny = xSet->getPropertyValue( u"FrameMarginWidth"_ustr ); aAny >>= nSize; if ( nSize == SIZE_NOT_SET ) @@ -453,7 +453,7 @@ short SfxInsertFloatingFrameDialog::run() else m_xNMMarginWidth->set_text(OUString::number(nSize)); - aAny = xSet->getPropertyValue( "FrameMarginHeight" ); + aAny = xSet->getPropertyValue( u"FrameMarginHeight"_ustr ); aAny >>= nSize; if ( nSize == SIZE_NOT_SET ) @@ -471,11 +471,11 @@ short SfxInsertFloatingFrameDialog::run() bool bScrollAuto = false; bool bSet = false; - aAny = xSet->getPropertyValue( "FrameIsAutoScroll" ); + aAny = xSet->getPropertyValue( u"FrameIsAutoScroll"_ustr ); aAny >>= bSet; if ( !bSet ) { - aAny = xSet->getPropertyValue( "FrameIsScrollingMode" ); + aAny = xSet->getPropertyValue( u"FrameIsScrollingMode"_ustr ); aAny >>= bSet; bScrollOn = bSet; bScrollOff = !bSet; @@ -488,11 +488,11 @@ short SfxInsertFloatingFrameDialog::run() m_xRBScrollingAuto->set_sensitive(bScrollAuto); bSet = false; - aAny = xSet->getPropertyValue( "FrameIsAutoBorder" ); + aAny = xSet->getPropertyValue( u"FrameIsAutoBorder"_ustr ); aAny >>= bSet; if ( !bSet ) { - aAny = xSet->getPropertyValue( "FrameIsBorder" ); + aAny = xSet->getPropertyValue( u"FrameIsBorder"_ustr ); aAny >>= bSet; m_xRBFrameBorderOn->set_active(bSet); m_xRBFrameBorderOff->set_active(!bSet); @@ -569,17 +569,17 @@ short SfxInsertFloatingFrameDialog::run() else lMarginHeight = SIZE_NOT_SET; - xSet->setPropertyValue( "FrameURL", Any( aURL ) ); - xSet->setPropertyValue( "FrameName", Any( aName ) ); + xSet->setPropertyValue( u"FrameURL"_ustr, Any( aURL ) ); + xSet->setPropertyValue( u"FrameName"_ustr, Any( aName ) ); if ( eScroll == ScrollingMode::Auto ) - xSet->setPropertyValue( "FrameIsAutoScroll", Any( true ) ); + xSet->setPropertyValue( u"FrameIsAutoScroll"_ustr, Any( true ) ); else - xSet->setPropertyValue( "FrameIsScrollingMode", Any( eScroll == ScrollingMode::Yes ) ); + xSet->setPropertyValue( u"FrameIsScrollingMode"_ustr, Any( eScroll == ScrollingMode::Yes ) ); - xSet->setPropertyValue( "FrameIsBorder", Any( bHasBorder ) ); - xSet->setPropertyValue( "FrameMarginWidth", Any( sal_Int32( lMarginWidth ) ) ); - xSet->setPropertyValue( "FrameMarginHeight", Any( sal_Int32( lMarginHeight ) ) ); + xSet->setPropertyValue( u"FrameIsBorder"_ustr, Any( bHasBorder ) ); + xSet->setPropertyValue( u"FrameMarginWidth"_ustr, Any( sal_Int32( lMarginWidth ) ) ); + xSet->setPropertyValue( u"FrameMarginHeight"_ustr, Any( sal_Int32( lMarginHeight ) ) ); if ( bIPActive ) m_xObj->changeState( embed::EmbedStates::INPLACE_ACTIVE ); diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index 6c09c8ce4560..c26e713181f9 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -32,10 +32,10 @@ sal_uInt16 SvxInsRowColDlg::getInsertCount() const } SvxInsRowColDlg::SvxInsRowColDlg(weld::Window* pParent, bool bColumn, const OUString& rHelpId) - : GenericDialogController(pParent, "cui/ui/insertrowcolumn.ui", "InsertRowColumnDialog") - , m_xCountEdit(m_xBuilder->weld_spin_button("insert_number")) - , m_xBeforeBtn(m_xBuilder->weld_radio_button("insert_before")) - , m_xAfterBtn(m_xBuilder->weld_radio_button("insert_after")) + : GenericDialogController(pParent, u"cui/ui/insertrowcolumn.ui"_ustr, u"InsertRowColumnDialog"_ustr) + , m_xCountEdit(m_xBuilder->weld_spin_button(u"insert_number"_ustr)) + , m_xBeforeBtn(m_xBuilder->weld_radio_button(u"insert_before"_ustr)) + , m_xAfterBtn(m_xBuilder->weld_radio_button(u"insert_after"_ustr)) { m_xDialog->set_title(bColumn ? CuiResId(RID_CUISTR_COL) : CuiResId(RID_CUISTR_ROW)); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index b31c5d74a783..e0ff180e1235 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -76,7 +76,7 @@ public: } SvBaseLinksDlg::SvBaseLinksDlg(weld::Window * pParent, LinkManager* pMgr, bool bHtmlMode) - : GenericDialogController(pParent, "cui/ui/baselinksdialog.ui", "BaseLinksDialog") + : GenericDialogController(pParent, u"cui/ui/baselinksdialog.ui"_ustr, u"BaseLinksDialog"_ustr) , aStrAutolink( CuiResId( STR_AUTOLINK ) ) , aStrManuallink( CuiResId( STR_MANUALLINK ) ) , aStrBrokenlink( CuiResId( STR_BROKENLINK ) ) @@ -85,15 +85,15 @@ SvBaseLinksDlg::SvBaseLinksDlg(weld::Window * pParent, LinkManager* pMgr, bool b , aStrWaitinglink( CuiResId( STR_WAITINGLINK ) ) , pLinkMgr( nullptr ) , aUpdateIdle("cui SvBaseLinksDlg UpdateIdle") - , m_xTbLinks(m_xBuilder->weld_tree_view("TB_LINKS")) - , m_xFtFullFileName(m_xBuilder->weld_link_button("FULL_FILE_NAME")) - , m_xFtFullSourceName(m_xBuilder->weld_label("FULL_SOURCE_NAME")) - , m_xFtFullTypeName(m_xBuilder->weld_label("FULL_TYPE_NAME")) - , m_xRbAutomatic(m_xBuilder->weld_radio_button("AUTOMATIC")) - , m_xRbManual(m_xBuilder->weld_radio_button("MANUAL")) - , m_xPbUpdateNow(m_xBuilder->weld_button("UPDATE_NOW")) - , m_xPbChangeSource(m_xBuilder->weld_button("CHANGE_SOURCE")) - , m_xPbBreakLink(m_xBuilder->weld_button("BREAK_LINK")) + , m_xTbLinks(m_xBuilder->weld_tree_view(u"TB_LINKS"_ustr)) + , m_xFtFullFileName(m_xBuilder->weld_link_button(u"FULL_FILE_NAME"_ustr)) + , m_xFtFullSourceName(m_xBuilder->weld_label(u"FULL_SOURCE_NAME"_ustr)) + , m_xFtFullTypeName(m_xBuilder->weld_label(u"FULL_TYPE_NAME"_ustr)) + , m_xRbAutomatic(m_xBuilder->weld_radio_button(u"AUTOMATIC"_ustr)) + , m_xRbManual(m_xBuilder->weld_radio_button(u"MANUAL"_ustr)) + , m_xPbUpdateNow(m_xBuilder->weld_button(u"UPDATE_NOW"_ustr)) + , m_xPbChangeSource(m_xBuilder->weld_button(u"CHANGE_SOURCE"_ustr)) + , m_xPbBreakLink(m_xBuilder->weld_button(u"BREAK_LINK"_ustr)) , m_xVirDev(VclPtr<VirtualDevice>::Create()) { // expand the point size of the desired font to the equivalent pixel size @@ -440,8 +440,8 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, weld::Button&, void ) m_xPbChangeSource->set_sensitive(false); m_xPbBreakLink->set_sensitive(false); - m_xFtFullSourceName->set_label( "" ); - m_xFtFullTypeName->set_label( "" ); + m_xFtFullSourceName->set_label( u""_ustr ); + m_xFtFullTypeName->set_label( u""_ustr ); } if( pLinkMgr && pLinkMgr->GetPersist() ) pLinkMgr->GetPersist()->SetModified(); diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index e385a6ccface..383c2ee1ab0b 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -187,10 +187,10 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, DelHdl_Impl, weld::Button&, void) } SvxMultiPathDialog::SvxMultiPathDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/multipathdialog.ui", "MultiPathDialog") - , m_xRadioLB(m_xBuilder->weld_tree_view("paths")) - , m_xAddBtn(m_xBuilder->weld_button("add")) - , m_xDelBtn(m_xBuilder->weld_button("delete")) + : GenericDialogController(pParent, u"cui/ui/multipathdialog.ui"_ustr, u"MultiPathDialog"_ustr) + , m_xRadioLB(m_xBuilder->weld_tree_view(u"paths"_ustr)) + , m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr)) + , m_xDelBtn(m_xBuilder->weld_button(u"delete"_ustr)) { m_xRadioLB->set_size_request(m_xRadioLB->get_approximate_digit_width() * 60, m_xRadioLB->get_text_height() * 10); @@ -205,10 +205,10 @@ SvxMultiPathDialog::SvxMultiPathDialog(weld::Window* pParent) } SvxPathSelectDialog::SvxPathSelectDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/selectpathdialog.ui", "SelectPathDialog") - , m_xPathLB(m_xBuilder->weld_tree_view("paths")) - , m_xAddBtn(m_xBuilder->weld_button("add")) - , m_xDelBtn(m_xBuilder->weld_button("delete")) + : GenericDialogController(pParent, u"cui/ui/selectpathdialog.ui"_ustr, u"SelectPathDialog"_ustr) + , m_xPathLB(m_xBuilder->weld_tree_view(u"paths"_ustr)) + , m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr)) + , m_xDelBtn(m_xBuilder->weld_button(u"delete"_ustr)) { m_xPathLB->set_size_request(m_xPathLB->get_approximate_digit_width() * 60, m_xPathLB->get_text_height() * 10); diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx index 9eb50987ea9a..123cc7b7f3c4 100644 --- a/cui/source/dialogs/newtabledlg.cxx +++ b/cui/source/dialogs/newtabledlg.cxx @@ -20,9 +20,9 @@ #include <newtabledlg.hxx> SvxNewTableDialog::SvxNewTableDialog(weld::Window* pWindow) - : GenericDialogController(pWindow, "cui/ui/newtabledialog.ui", "NewTableDialog") - , mxNumColumns(m_xBuilder->weld_spin_button("columns")) - , mxNumRows(m_xBuilder->weld_spin_button("rows")) + : GenericDialogController(pWindow, u"cui/ui/newtabledialog.ui"_ustr, u"NewTableDialog"_ustr) + , mxNumColumns(m_xBuilder->weld_spin_button(u"columns"_ustr)) + , mxNumRows(m_xBuilder->weld_spin_button(u"rows"_ustr)) { } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index a7e95a29f3b4..5e90fc88725d 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -71,15 +71,15 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get(); if (nMismatch == 1) { - pEdit->set_text( "" ); - pRepeatEdit->set_text( "" ); + pEdit->set_text( u""_ustr ); + pRepeatEdit->set_text( u""_ustr ); } else if (nMismatch == 2) { - m_xPasswdToOpenED->set_text( "" ); - m_xReenterPasswdToOpenED->set_text( "" ); - m_xPasswdToModifyED->set_text( "" ); - m_xReenterPasswdToModifyED->set_text( "" ); + m_xPasswdToOpenED->set_text( u""_ustr ); + m_xReenterPasswdToOpenED->set_text( u""_ustr ); + m_xPasswdToModifyED->set_text( u""_ustr ); + m_xReenterPasswdToModifyED->set_text( u""_ustr ); } pEdit->grab_focus(); }); @@ -140,22 +140,22 @@ IMPL_LINK(PasswordToOpenModifyDialog, ChangeHdl, weld::Entry&, rEntry, void) } PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) - : SfxDialogController(pParent, "cui/ui/password.ui", "PasswordDialog") - , m_xPasswdToOpenED(m_xBuilder->weld_entry("newpassEntry")) - , m_xPasswdToOpenInd(m_xBuilder->weld_label("newpassIndicator")) - , m_xPasswdToOpenBar(m_xBuilder->weld_level_bar("passlevelbar")) - , m_xReenterPasswdToOpenED(m_xBuilder->weld_entry("confirmpassEntry")) - , m_xReenterPasswdToOpenInd(m_xBuilder->weld_label("confirmpassIndicator")) - , m_xOptionsExpander(m_xBuilder->weld_expander("expander")) - , m_xOk(m_xBuilder->weld_button("ok")) - , m_xOpenReadonlyCB(m_xBuilder->weld_check_button("readonly")) - , m_xPasswdToModifyFT(m_xBuilder->weld_label("label7")) - , m_xPasswdToModifyED(m_xBuilder->weld_entry("newpassroEntry")) - , m_xPasswdToModifyInd(m_xBuilder->weld_label("newpassroIndicator")) - , m_xPasswdToModifyBar(m_xBuilder->weld_level_bar("ropasslevelbar")) - , m_xReenterPasswdToModifyFT(m_xBuilder->weld_label("label8")) - , m_xReenterPasswdToModifyED(m_xBuilder->weld_entry("confirmropassEntry")) - , m_xReenterPasswdToModifyInd(m_xBuilder->weld_label("confirmropassIndicator")) + : SfxDialogController(pParent, u"cui/ui/password.ui"_ustr, u"PasswordDialog"_ustr) + , m_xPasswdToOpenED(m_xBuilder->weld_entry(u"newpassEntry"_ustr)) + , m_xPasswdToOpenInd(m_xBuilder->weld_label(u"newpassIndicator"_ustr)) + , m_xPasswdToOpenBar(m_xBuilder->weld_level_bar(u"passlevelbar"_ustr)) + , m_xReenterPasswdToOpenED(m_xBuilder->weld_entry(u"confirmpassEntry"_ustr)) + , m_xReenterPasswdToOpenInd(m_xBuilder->weld_label(u"confirmpassIndicator"_ustr)) + , m_xOptionsExpander(m_xBuilder->weld_expander(u"expander"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xOpenReadonlyCB(m_xBuilder->weld_check_button(u"readonly"_ustr)) + , m_xPasswdToModifyFT(m_xBuilder->weld_label(u"label7"_ustr)) + , m_xPasswdToModifyED(m_xBuilder->weld_entry(u"newpassroEntry"_ustr)) + , m_xPasswdToModifyInd(m_xBuilder->weld_label(u"newpassroIndicator"_ustr)) + , m_xPasswdToModifyBar(m_xBuilder->weld_level_bar(u"ropasslevelbar"_ustr)) + , m_xReenterPasswdToModifyFT(m_xBuilder->weld_label(u"label8"_ustr)) + , m_xReenterPasswdToModifyED(m_xBuilder->weld_entry(u"confirmropassEntry"_ustr)) + , m_xReenterPasswdToModifyInd(m_xBuilder->weld_label(u"confirmropassIndicator"_ustr)) , m_aOneMismatch( CuiResId( RID_CUISTR_ONE_PASSWORD_MISMATCH ) ) , m_aTwoMismatch( CuiResId( RID_CUISTR_TWO_PASSWORDS_MISMATCH ) ) , m_aInvalidStateForOkButton( CuiResId( RID_CUISTR_INVALID_STATE_FOR_OK_BUTTON ) ) diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 423637e9d9e9..91e91bf0dcec 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -30,10 +30,10 @@ #include <com/sun/star/beans/PropertyValue.hpp> SvPasteObjectDialog::SvPasteObjectDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/pastespecial.ui", "PasteSpecialDialog") - , m_xFtObjectSource(m_xBuilder->weld_label("source")) - , m_xLbInsertList(m_xBuilder->weld_tree_view("list")) - , m_xOKButton(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/pastespecial.ui"_ustr, u"PasteSpecialDialog"_ustr) + , m_xFtObjectSource(m_xBuilder->weld_label(u"source"_ustr)) + , m_xLbInsertList(m_xBuilder->weld_tree_view(u"list"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) { m_xLbInsertList->set_size_request(m_xLbInsertList->get_approximate_digit_width() * 40, m_xLbInsertList->get_height_rows(6)); diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 1bcb6b7a0156..f7c251055e18 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -35,16 +35,16 @@ SvxPostItDialog::SvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext) - : SfxDialogController(pParent, "cui/ui/comment.ui", "CommentDialog") + : SfxDialogController(pParent, u"cui/ui/comment.ui"_ustr, u"CommentDialog"_ustr) , m_rSet(rCoreSet) - , m_xLastEditFT(m_xBuilder->weld_label("lastedit")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) - , m_xEditED(m_xBuilder->weld_text_view("edit")) - , m_xInsertAuthor(m_xBuilder->weld_widget("insertauthor")) - , m_xAuthorBtn(m_xBuilder->weld_button("author")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xPrevBtn(m_xBuilder->weld_button("previous")) - , m_xNextBtn(m_xBuilder->weld_button("next")) + , m_xLastEditFT(m_xBuilder->weld_label(u"lastedit"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) + , m_xEditED(m_xBuilder->weld_text_view(u"edit"_ustr)) + , m_xInsertAuthor(m_xBuilder->weld_widget(u"insertauthor"_ustr)) + , m_xAuthorBtn(m_xBuilder->weld_button(u"author"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xPrevBtn(m_xBuilder->weld_button(u"previous"_ustr)) + , m_xNextBtn(m_xBuilder->weld_button(u"next"_ustr)) { m_xPrevBtn->connect_clicked( LINK( this, SvxPostItDialog, PrevHdl ) ); m_xNextBtn->connect_clicked( LINK( this, SvxPostItDialog, NextHdl ) ); diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index fca03c02d42d..8fc2ea362b32 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -59,9 +59,9 @@ namespace OUString lcl_AltDescr() { - OUString aTempl("<alt id=\"%1\">" + OUString aTempl(u"<alt id=\"%1\">" " " //FIXME real dialog title or something - "</alt>"); + "</alt>"_ustr); aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"alt_id") ); return aTempl; @@ -69,10 +69,10 @@ namespace OUString lcl_Image( std::u16string_view rScreenshotId, const Size& rSize ) { - OUString aTempl("<image id=\"%1\" src=\"media/screenshots/%2.png\"" + OUString aTempl(u"<image id=\"%1\" src=\"media/screenshots/%2.png\"" " width=\"%3cm\" height=\"%4cm\">" "%5" - "</image>"); + "</image>"_ustr); aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"img_id") ); aTempl = aTempl.replaceFirst( "%2", rScreenshotId ); aTempl = aTempl.replaceFirst( "%3", OUString::number( rSize.Width() ) ); @@ -84,8 +84,8 @@ namespace OUString lcl_ParagraphWithImage( std::u16string_view rScreenshotId, const Size& rSize ) { - OUString aTempl( "<paragraph id=\"%1\" role=\"paragraph\">%2" - "</paragraph>" SAL_NEWLINE_STRING ); + OUString aTempl( u"<paragraph id=\"%1\" role=\"paragraph\">%2" + "</paragraph>" SAL_NEWLINE_STRING ""_ustr ); aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"par_id") ); aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) ); @@ -94,8 +94,8 @@ namespace OUString lcl_Bookmark( std::u16string_view rWidgetId ) { - OUString aTempl = "<!-- Bookmark for widget %1 -->" SAL_NEWLINE_STRING - "<bookmark branch=\"hid/%2\" id=\"%3\" localize=\"false\"/>" SAL_NEWLINE_STRING; + OUString aTempl = u"<!-- Bookmark for widget %1 -->" SAL_NEWLINE_STRING + "<bookmark branch=\"hid/%2\" id=\"%3\" localize=\"false\"/>" SAL_NEWLINE_STRING ""_ustr; aTempl = aTempl.replaceFirst( "%1", rWidgetId ); aTempl = aTempl.replaceFirst( "%2", rWidgetId ); aTempl = aTempl.replaceFirst( "%3", lcl_genRandom(u"bm_id") ); @@ -215,11 +215,11 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl( assert(0 != maParentDialogBitmap.GetSizePixel().Height()); // get needed widgets - mxPicture.reset(new weld::CustomWeld(rParentBuilder, "picture", maPicture)); + mxPicture.reset(new weld::CustomWeld(rParentBuilder, u"picture"_ustr, maPicture)); assert(mxPicture); - mxText = rParentBuilder.weld_text_view("text"); + mxText = rParentBuilder.weld_text_view(u"text"_ustr); assert(mxText); - mxSave = rParentBuilder.weld_button("save"); + mxSave = rParentBuilder.weld_button(u"save"_ustr); assert(mxSave); // set screenshot image at DrawingArea, resize, set event listener @@ -291,8 +291,8 @@ IMPL_LINK_NOARG(ScreenshotAnnotationDlg_Impl, saveButtonHandler, weld::Button&, xFilePicker->setDisplayDirectory(maLastFolderURL); } - xFilePicker->appendFilter("*.png", "*.png"); - xFilePicker->setCurrentFilter("*.png"); + xFilePicker->appendFilter(u"*.png"_ustr, u"*.png"_ustr); + xFilePicker->setCurrentFilter(u"*.png"_ustr); xFilePicker->setDefaultName(aDerivedFileName); xFilePicker->setMultiSelectionMode(false); @@ -566,7 +566,7 @@ bool Picture::MouseButtonUp(const MouseEvent&) } ScreenshotAnnotationDlg::ScreenshotAnnotationDlg(weld::Dialog& rParentDialog) - : GenericDialogController(&rParentDialog, "cui/ui/screenshotannotationdialog.ui", "ScreenshotAnnotationDialog") + : GenericDialogController(&rParentDialog, u"cui/ui/screenshotannotationdialog.ui"_ustr, u"ScreenshotAnnotationDialog"_ustr) { m_pImpl.reset(new ScreenshotAnnotationDlg_Impl(m_xDialog.get(), *m_xBuilder, rParentDialog)); } diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 67bb456b7d61..017f1178be8b 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -339,27 +339,27 @@ IMPL_LINK(SvxScriptOrgDialog, ExpandingHdl, const weld::TreeIter&, rIter, bool) // CuiInputDialog ------------------------------------------------------------ CuiInputDialog::CuiInputDialog(weld::Window * pParent, InputDialogMode nMode) - : GenericDialogController(pParent, "cui/ui/newlibdialog.ui", "NewLibDialog") - , m_xEdit(m_xBuilder->weld_entry("entry")) + : GenericDialogController(pParent, u"cui/ui/newlibdialog.ui"_ustr, u"NewLibDialog"_ustr) + , m_xEdit(m_xBuilder->weld_entry(u"entry"_ustr)) { m_xEdit->grab_focus(); - std::unique_ptr<weld::Label> xNewLibFT(m_xBuilder->weld_label("newlibft")); + std::unique_ptr<weld::Label> xNewLibFT(m_xBuilder->weld_label(u"newlibft"_ustr)); if ( nMode == InputDialogMode::NEWMACRO ) { xNewLibFT->hide(); - std::unique_ptr<weld::Label> xNewMacroFT(m_xBuilder->weld_label("newmacroft")); + std::unique_ptr<weld::Label> xNewMacroFT(m_xBuilder->weld_label(u"newmacroft"_ustr)); xNewMacroFT->show(); - std::unique_ptr<weld::Label> xAltTitle(m_xBuilder->weld_label("altmacrotitle")); + std::unique_ptr<weld::Label> xAltTitle(m_xBuilder->weld_label(u"altmacrotitle"_ustr)); m_xDialog->set_title(xAltTitle->get_label()); } else if ( nMode == InputDialogMode::RENAME ) { xNewLibFT->hide(); - std::unique_ptr<weld::Label> xRenameFT(m_xBuilder->weld_label("renameft")); + std::unique_ptr<weld::Label> xRenameFT(m_xBuilder->weld_label(u"renameft"_ustr)); xRenameFT->show(); - std::unique_ptr<weld::Label> xAltTitle(m_xBuilder->weld_label("altrenametitle")); + std::unique_ptr<weld::Label> xAltTitle(m_xBuilder->weld_label(u"altrenametitle"_ustr)); m_xDialog->set_title(xAltTitle->get_label()); } } @@ -367,7 +367,7 @@ CuiInputDialog::CuiInputDialog(weld::Window * pParent, InputDialogMode nMode) // ScriptOrgDialog ------------------------------------------------------------ SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, OUString language) - : SfxDialogController(pParent, "cui/ui/scriptorganizer.ui", "ScriptOrganizerDialog") + : SfxDialogController(pParent, u"cui/ui/scriptorganizer.ui"_ustr, u"ScriptOrganizerDialog"_ustr) , m_pParent(pParent) , m_sLanguage(std::move(language)) , m_delErrStr(CuiResId(RID_CUISTR_DELFAILED)) @@ -381,14 +381,14 @@ SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, OUString language) , m_renameErrTitleStr(CuiResId(RID_CUISTR_RENAMEFAILED_TITLE)) , m_sMyMacros(CuiResId(RID_CUISTR_MYMACROS)) , m_sProdMacros(CuiResId(RID_CUISTR_PRODMACROS)) - , m_xScriptsBox(m_xBuilder->weld_tree_view("scripts")) + , m_xScriptsBox(m_xBuilder->weld_tree_view(u"scripts"_ustr)) , m_xScratchIter(m_xScriptsBox->make_iterator()) - , m_xRunButton(m_xBuilder->weld_button("ok")) - , m_xCloseButton(m_xBuilder->weld_button("close")) - , m_xCreateButton(m_xBuilder->weld_button("create")) - , m_xEditButton(m_xBuilder->weld_button("edit")) - , m_xRenameButton(m_xBuilder->weld_button("rename")) - , m_xDelButton(m_xBuilder->weld_button("delete")) + , m_xRunButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCloseButton(m_xBuilder->weld_button(u"close"_ustr)) + , m_xCreateButton(m_xBuilder->weld_button(u"create"_ustr)) + , m_xEditButton(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xRenameButton(m_xBuilder->weld_button(u"rename"_ustr)) + , m_xDelButton(m_xBuilder->weld_button(u"delete"_ustr)) { // must be a neater way to deal with the strings than as above // append the language to the dialog title @@ -465,7 +465,7 @@ void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode > const & return; } - OUString sName("Editable"); + OUString sName(u"Editable"_ustr); if ( getBoolProperty( xProps, sName ) ) { @@ -602,7 +602,7 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void) mspNode.set( mspUserData->GetNode() , UNO_QUERY ); bParent = m_xScriptsBox->iter_parent(*xParentIter); } - xProp->getPropertyValue("URI") >>= tmpString; + xProp->getPropertyValue(u"URI"_ustr) >>= tmpString; const OUString scriptURL( tmpString ); if ( mspNode.is() ) @@ -650,7 +650,7 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void) try { // ISSUE need code to run script here - xInv->invoke( "Editable", args, outIndex, outArgs ); + xInv->invoke( u"Editable"_ustr, args, outIndex, outArgs ); } catch( Exception const & ) { @@ -813,7 +813,7 @@ void SvxScriptOrgDialog::createEntry(const weld::TreeIter& rEntry) Sequence< sal_Int16 > outIndex; try { - Any aResult = xInv->invoke( "Creatable", args, outIndex, outArgs ); + Any aResult = xInv->invoke( u"Creatable"_ustr, args, outIndex, outArgs ); aChildNode.set(aResult, UNO_QUERY); } @@ -893,7 +893,7 @@ void SvxScriptOrgDialog::renameEntry(const weld::TreeIter& rEntry) Sequence< sal_Int16 > outIndex; try { - Any aResult = xInv->invoke( "Renamable", args, outIndex, outArgs ); + Any aResult = xInv->invoke( u"Renamable"_ustr, args, outIndex, outArgs ); aChildNode.set(aResult, UNO_QUERY); } @@ -942,7 +942,7 @@ void SvxScriptOrgDialog::deleteEntry(const weld::TreeIter& rEntry) Sequence< sal_Int16 > outIndex; try { - Any aResult = xInv->invoke( "Deletable", args, outIndex, outArgs ); + Any aResult = xInv->invoke( u"Deletable"_ustr, args, outIndex, outArgs ); aResult >>= result; // or do we just assume true if no exception ? } catch( Exception const & ) @@ -1130,7 +1130,7 @@ OUString GetErrorMessage( { OUString unformatted = CuiResId( RID_CUISTR_ERROR_AT_LINE ); - OUString unknown("UNKNOWN"); + OUString unknown(u"UNKNOWN"_ustr); OUString language = unknown; OUString script = unknown; OUString line = unknown; @@ -1169,7 +1169,7 @@ OUString GetErrorMessage( { OUString unformatted = CuiResId( RID_CUISTR_EXCEPTION_AT_LINE ); - OUString unknown("UNKNOWN"); + OUString unknown(u"UNKNOWN"_ustr); OUString language = unknown; OUString script = unknown; OUString line = unknown; @@ -1214,9 +1214,9 @@ OUString GetErrorMessage( { OUString unformatted = CuiResId( RID_CUISTR_FRAMEWORK_ERROR_RUNNING ); - OUString language("UNKNOWN"); + OUString language(u"UNKNOWN"_ustr); - OUString script("UNKNOWN"); + OUString script(u"UNKNOWN"_ustr); OUString message; diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 6b10e5c688e3..dce598ec961d 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -29,7 +29,7 @@ #include <svx/dialogs.hrc> SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle) - : SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", "FormatCellsDialog", &rAttr, bStyle) + : SfxTabDialogController(pParent, u"cui/ui/formatcellsdialog.ui"_ustr, u"FormatCellsDialog"_ustr, &rAttr, bStyle) , mrOutAttrs(rAttr) , mpColorTab(rModel.GetColorList()) , mnColorTabState ( ChangeType::NONE ) @@ -38,33 +38,33 @@ SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const SfxItemS , mpBitmapList(rModel.GetBitmapList()) , mpPatternList(rModel.GetPatternList()) { - AddTabPage("name", RID_SVXPAGE_CHAR_NAME); - AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage("border", RID_SVXPAGE_BORDER ); - AddTabPage("area", RID_SVXPAGE_AREA); + AddTabPage(u"name"_ustr, RID_SVXPAGE_CHAR_NAME); + AddTabPage(u"effects"_ustr, RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage(u"border"_ustr, RID_SVXPAGE_BORDER ); + AddTabPage(u"area"_ustr, RID_SVXPAGE_AREA); if (bStyle) { - AddTabPage("position", RID_SVXPAGE_CHAR_POSITION); - AddTabPage("highlight", RID_SVXPAGE_BKG); - AddTabPage("indentspacing", RID_SVXPAGE_STD_PARAGRAPH); - AddTabPage("alignment", SvxParaAlignTabPage::Create, SvxParaAlignTabPage::GetSdrRanges); - RemoveTabPage("shadow"); + AddTabPage(u"position"_ustr, RID_SVXPAGE_CHAR_POSITION); + AddTabPage(u"highlight"_ustr, RID_SVXPAGE_BKG); + AddTabPage(u"indentspacing"_ustr, RID_SVXPAGE_STD_PARAGRAPH); + AddTabPage(u"alignment"_ustr, SvxParaAlignTabPage::Create, SvxParaAlignTabPage::GetSdrRanges); + RemoveTabPage(u"shadow"_ustr); } else { - RemoveTabPage("position"); - RemoveTabPage("highlight"); - RemoveTabPage("indentspacing"); - RemoveTabPage("alignment"); - AddTabPage("shadow", SvxShadowTabPage::Create, nullptr); + RemoveTabPage(u"position"_ustr); + RemoveTabPage(u"highlight"_ustr); + RemoveTabPage(u"indentspacing"_ustr); + RemoveTabPage(u"alignment"_ustr); + AddTabPage(u"shadow"_ustr, SvxShadowTabPage::Create, nullptr); RemoveStandardButton(); } if (bStyle && SvtCJKOptions::IsAsianTypographyEnabled()) - AddTabPage("asian", RID_SVXPAGE_PARA_ASIAN); + AddTabPage(u"asian"_ustr, RID_SVXPAGE_PARA_ASIAN); else - RemoveTabPage("asian"); + RemoveTabPage(u"asian"_ustr); } void SvxFormatCellsDialog::PageCreated(const OUString& rId, SfxTabPage &rPage) diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index ae468b02009a..e7f1ae746727 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -28,9 +28,9 @@ constexpr OUString CUIFM_PROP_HIDDEN = u"Hidden"_ustr; constexpr OUStringLiteral CUIFM_PROP_LABEL = u"Label"; FmShowColsDialog::FmShowColsDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/showcoldialog.ui", "ShowColDialog") - , m_xList(m_xBuilder->weld_tree_view("treeview")) - , m_xOK(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/showcoldialog.ui"_ustr, u"ShowColDialog"_ustr) + , m_xList(m_xBuilder->weld_tree_view(u"treeview"_ustr)) + , m_xOK(m_xBuilder->weld_button(u"ok"_ustr)) { m_xList->set_size_request(m_xList->get_approximate_digit_width() * 40, m_xList->get_height_rows(8)); diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 14146b44c373..a734b69e732a 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -20,11 +20,11 @@ #include <splitcelldlg.hxx> SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical, tools::Long nMaxHorizontal) - : GenericDialogController(pParent, "cui/ui/splitcellsdialog.ui", "SplitCellsDialog") - , m_xCountEdit(m_xBuilder->weld_spin_button("countnf")) - , m_xHorzBox(!bIsTableVertical ? m_xBuilder->weld_radio_button("hori") : m_xBuilder->weld_radio_button("vert")) - , m_xVertBox(!bIsTableVertical ? m_xBuilder->weld_radio_button("vert") : m_xBuilder->weld_radio_button("hori")) - , m_xPropCB(m_xBuilder->weld_check_button("prop")) + : GenericDialogController(pParent, u"cui/ui/splitcellsdialog.ui"_ustr, u"SplitCellsDialog"_ustr) + , m_xCountEdit(m_xBuilder->weld_spin_button(u"countnf"_ustr)) + , m_xHorzBox(!bIsTableVertical ? m_xBuilder->weld_radio_button(u"hori"_ustr) : m_xBuilder->weld_radio_button(u"vert"_ustr)) + , m_xVertBox(!bIsTableVertical ? m_xBuilder->weld_radio_button(u"vert"_ustr) : m_xBuilder->weld_radio_button(u"hori"_ustr)) + , m_xPropCB(m_xBuilder->weld_check_button(u"prop"_ustr)) , mnMaxVertical(nMaxVertical) , mnMaxHorizontal(nMaxHorizontal) { diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 9364680f62b2..efa37ecb945c 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -36,23 +36,23 @@ #include <vcl/svapp.hxx> SvxSearchFormatDialog::SvxSearchFormatDialog(weld::Window* pParent, const SfxItemSet& rSet) - : SfxTabDialogController(pParent, "cui/ui/searchformatdialog.ui", "SearchFormatDialog", &rSet) + : SfxTabDialogController(pParent, u"cui/ui/searchformatdialog.ui"_ustr, u"SearchFormatDialog"_ustr, &rSet) { - AddTabPage("font", SvxCharNamePage::Create, nullptr); - AddTabPage("fonteffects", SvxCharEffectsPage::Create, nullptr); - AddTabPage("position", SvxCharPositionPage::Create, nullptr); - AddTabPage("asianlayout", SvxCharTwoLinesPage::Create, nullptr); - AddTabPage("labelTP_PARA_STD", SvxStdParagraphTabPage::Create, nullptr); - AddTabPage("labelTP_PARA_ALIGN", SvxParaAlignTabPage::Create, nullptr); - AddTabPage("labelTP_PARA_EXT", SvxExtParagraphTabPage::Create, nullptr); - AddTabPage("labelTP_PARA_ASIAN", SvxAsianTabPage::Create, nullptr ); - AddTabPage("background", SvxBkgTabPage::Create, nullptr); + AddTabPage(u"font"_ustr, SvxCharNamePage::Create, nullptr); + AddTabPage(u"fonteffects"_ustr, SvxCharEffectsPage::Create, nullptr); + AddTabPage(u"position"_ustr, SvxCharPositionPage::Create, nullptr); + AddTabPage(u"asianlayout"_ustr, SvxCharTwoLinesPage::Create, nullptr); + AddTabPage(u"labelTP_PARA_STD"_ustr, SvxStdParagraphTabPage::Create, nullptr); + AddTabPage(u"labelTP_PARA_ALIGN"_ustr, SvxParaAlignTabPage::Create, nullptr); + AddTabPage(u"labelTP_PARA_EXT"_ustr, SvxExtParagraphTabPage::Create, nullptr); + AddTabPage(u"labelTP_PARA_ASIAN"_ustr, SvxAsianTabPage::Create, nullptr ); + AddTabPage(u"background"_ustr, SvxBkgTabPage::Create, nullptr); // remove asian tabpages if necessary if ( !SvtCJKOptions::IsDoubleLinesEnabled() ) - RemoveTabPage("asianlayout"); + RemoveTabPage(u"asianlayout"_ustr); if ( !SvtCJKOptions::IsAsianTypographyEnabled() ) - RemoveTabPage("labelTP_PARA_ASIAN"); + RemoveTabPage(u"labelTP_PARA_ASIAN"_ustr); } SvxSearchFormatDialog::~SvxSearchFormatDialog() @@ -103,10 +103,10 @@ void SvxSearchFormatDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, SearchAttrItemList& rLst, const WhichRangesContainer& pWhRanges) - : GenericDialogController(pParent, "cui/ui/searchattrdialog.ui", "SearchAttrDialog") + : GenericDialogController(pParent, u"cui/ui/searchattrdialog.ui"_ustr, u"SearchAttrDialog"_ustr) , rList(rLst) - , m_xAttrLB(m_xBuilder->weld_tree_view("treeview")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xAttrLB(m_xBuilder->weld_tree_view(u"treeview"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { m_xAttrLB->set_size_request(m_xAttrLB->get_approximate_digit_width() * 50, m_xAttrLB->get_height_rows(12)); @@ -211,11 +211,11 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) SvxSearchSimilarityDialog::SvxSearchSimilarityDialog(weld::Window* pParent, bool bRelax, sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger) - : GenericDialogController(pParent, "cui/ui/similaritysearchdialog.ui", "SimilaritySearchDialog") - , m_xOtherFld(m_xBuilder->weld_spin_button("otherfld")) - , m_xLongerFld(m_xBuilder->weld_spin_button("longerfld")) - , m_xShorterFld(m_xBuilder->weld_spin_button("shorterfld")) - , m_xRelaxBox(m_xBuilder->weld_check_button("relaxbox")) + : GenericDialogController(pParent, u"cui/ui/similaritysearchdialog.ui"_ustr, u"SimilaritySearchDialog"_ustr) + , m_xOtherFld(m_xBuilder->weld_spin_button(u"otherfld"_ustr)) + , m_xLongerFld(m_xBuilder->weld_spin_button(u"longerfld"_ustr)) + , m_xShorterFld(m_xBuilder->weld_spin_button(u"shorterfld"_ustr)) + , m_xRelaxBox(m_xBuilder->weld_check_button(u"relaxbox"_ustr)) { m_xOtherFld->set_value(nOther); m_xShorterFld->set_value(nShorter); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index f1795ddd684d..d1c284b65b82 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -237,17 +237,17 @@ SvxThesaurusDialog::SvxThesaurusDialog( uno::Reference< linguistic2::XThesaurus > const & xThes, const OUString &rWord, LanguageType nLanguage) - : SfxDialogController(pParent, "cui/ui/thesaurus.ui", "ThesaurusDialog") + : SfxDialogController(pParent, u"cui/ui/thesaurus.ui"_ustr, u"ThesaurusDialog"_ustr) , m_aModifyIdle("cui SvxThesaurusDialog LookUp Modify") , nLookUpLanguage(LANGUAGE_NONE) , m_bWordFound(false) - , m_xLeftBtn(m_xBuilder->weld_button("left")) - , m_xWordCB(m_xBuilder->weld_combo_box("wordcb")) - , m_xAlternativesCT(m_xBuilder->weld_tree_view("alternatives")) - , m_xNotFound(m_xBuilder->weld_label("notfound")) - , m_xReplaceEdit(m_xBuilder->weld_entry("replaceed")) - , m_xLangLB(m_xBuilder->weld_combo_box("langcb")) - , m_xReplaceBtn(m_xBuilder->weld_button("ok")) + , m_xLeftBtn(m_xBuilder->weld_button(u"left"_ustr)) + , m_xWordCB(m_xBuilder->weld_combo_box(u"wordcb"_ustr)) + , m_xAlternativesCT(m_xBuilder->weld_tree_view(u"alternatives"_ustr)) + , m_xNotFound(m_xBuilder->weld_label(u"notfound"_ustr)) + , m_xReplaceEdit(m_xBuilder->weld_entry(u"replaceed"_ustr)) + , m_xLangLB(m_xBuilder->weld_combo_box(u"langcb"_ustr)) + , m_xReplaceBtn(m_xBuilder->weld_button(u"ok"_ustr)) , m_nSelectFirstEvent(nullptr) { m_aModifyIdle.SetInvokeHandler( LINK( this, SvxThesaurusDialog, ModifyTimer_Hdl ) ); diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index 40bb606130f2..22b669ccae75 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -49,13 +49,14 @@ const Size ThumbSize(150, 150); TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", "TipOfTheDayDialog") + : GenericDialogController(pParent, u"cui/ui/tipofthedaydialog.ui"_ustr, + u"TipOfTheDayDialog"_ustr) , m_xParent(pParent ? pParent->GetXWindow() : nullptr) - , m_pText(m_xBuilder->weld_label("lbText")) - , m_pShowTip(m_xBuilder->weld_check_button("cbShowTip")) - , m_pNext(m_xBuilder->weld_button("btnNext")) - , m_pLink(m_xBuilder->weld_link_button("btnLink")) - , m_pPreview(new weld::CustomWeld(*m_xBuilder, "imPreview", m_aPreview)) + , m_pText(m_xBuilder->weld_label(u"lbText"_ustr)) + , m_pShowTip(m_xBuilder->weld_check_button(u"cbShowTip"_ustr)) + , m_pNext(m_xBuilder->weld_button(u"btnNext"_ustr)) + , m_pLink(m_xBuilder->weld_link_button(u"btnLink"_ustr)) + , m_pPreview(new weld::CustomWeld(*m_xBuilder, u"imPreview"_ustr, m_aPreview)) { m_pShowTip->set_active(officecfg::Office::Common::Misc::ShowTipOfTheDay::get()); m_pNext->connect_clicked(LINK(this, TipOfTheDayDialog, OnNextClick)); @@ -218,7 +219,7 @@ void TipOfTheDayDialog::UpdateTip() m_pLink->connect_activate_link(LINK(this, TipOfTheDayDialog, OnLinkClick)); } // image - OUString aURL("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/tipoftheday/"); + OUString aURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/tipoftheday/"_ustr); rtl::Bootstrap::expandMacros(aURL); OUString aImageName = sImage; Graphic aGraphic; diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx index 54918e7fdcd4..61754e614ed5 100644 --- a/cui/source/dialogs/toolbarmodedlg.cxx +++ b/cui/source/dialogs/toolbarmodedlg.cxx @@ -79,20 +79,21 @@ static OUString GetCurrentMode() } ToolbarmodeDialog::ToolbarmodeDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/toolbarmodedialog.ui", "ToolbarmodeDialog") - , m_pImage(m_xBuilder->weld_image("imImage")) - , m_pApply(m_xBuilder->weld_button("btnApply")) - , m_pApplyAll(m_xBuilder->weld_button("btnApplyAll")) - , m_pRadioButtons{ (m_xBuilder->weld_radio_button("rbButton1")), - (m_xBuilder->weld_radio_button("rbButton2")), - (m_xBuilder->weld_radio_button("rbButton3")), - (m_xBuilder->weld_radio_button("rbButton4")), - (m_xBuilder->weld_radio_button("rbButton5")), - (m_xBuilder->weld_radio_button("rbButton6")), - (m_xBuilder->weld_radio_button("rbButton7")), - (m_xBuilder->weld_radio_button("rbButton8")), - (m_xBuilder->weld_radio_button("rbButton9")) } - , m_pInfoLabel(m_xBuilder->weld_label("lbInfo")) + : GenericDialogController(pParent, u"cui/ui/toolbarmodedialog.ui"_ustr, + u"ToolbarmodeDialog"_ustr) + , m_pImage(m_xBuilder->weld_image(u"imImage"_ustr)) + , m_pApply(m_xBuilder->weld_button(u"btnApply"_ustr)) + , m_pApplyAll(m_xBuilder->weld_button(u"btnApplyAll"_ustr)) + , m_pRadioButtons{ (m_xBuilder->weld_radio_button(u"rbButton1"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton2"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton3"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton4"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton5"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton6"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton7"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton8"_ustr)), + (m_xBuilder->weld_radio_button(u"rbButton9"_ustr)) } + , m_pInfoLabel(m_xBuilder->weld_label(u"lbInfo"_ustr)) { static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == std::size(TOOLBARMODES_ARRAY)); @@ -142,7 +143,7 @@ int ToolbarmodeDialog::GetActiveRadioButton() void ToolbarmodeDialog::UpdateImage(std::u16string_view sFileName) { // load image - OUString aURL("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/toolbarmode/"); + OUString aURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/toolbarmode/"_ustr); rtl::Bootstrap::expandMacros(aURL); aURL += sFileName; if (sFileName.empty() || !file_exists(aURL)) @@ -191,7 +192,7 @@ IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, rButton, void) { const auto xContext = comphelper::getProcessComponentContext(); const utl::OConfigurationTreeRoot aAppNode( - xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/", true); + xContext, u"org.openoffice.Office.UI.ToolbarMode/Applications/"_ustr, true); if (sCurrentApp != "Writer") aAppNode.setNodeValue("Writer/Active", css::uno::Any(sCmd)); if (sCurrentApp != "Calc") diff --git a/cui/source/dialogs/whatsnew.cxx b/cui/source/dialogs/whatsnew.cxx index 31ad380d8cf9..6092b7e4af50 100644 --- a/cui/source/dialogs/whatsnew.cxx +++ b/cui/source/dialogs/whatsnew.cxx @@ -22,14 +22,14 @@ constexpr tools::Long PROGRESS_DOTSIZE(24); constexpr tools::Long PROGRESS_DOTSPACING(4); WhatsNewDialog::WhatsNewDialog(weld::Window* pParent, const bool bWelcome) - : GenericDialogController(pParent, "cui/ui/whatsnewdialog.ui", "WhatsNewDialog") + : GenericDialogController(pParent, u"cui/ui/whatsnewdialog.ui"_ustr, u"WhatsNewDialog"_ustr) , m_bWelcome(bWelcome) , m_aPreview() , m_aProgress() - , m_pPrevBtn(m_xBuilder->weld_button("btnPrev")) - , m_pNextBtn(m_xBuilder->weld_button("btnNext")) - , m_pProgress(new weld::CustomWeld(*m_xBuilder, "imProgress", m_aProgress)) - , m_pImage(new weld::CustomWeld(*m_xBuilder, "imNews", m_aPreview)) + , m_pPrevBtn(m_xBuilder->weld_button(u"btnPrev"_ustr)) + , m_pNextBtn(m_xBuilder->weld_button(u"btnNext"_ustr)) + , m_pProgress(new weld::CustomWeld(*m_xBuilder, u"imProgress"_ustr, m_aProgress)) + , m_pImage(new weld::CustomWeld(*m_xBuilder, u"imNews"_ustr, m_aPreview)) { if (m_bWelcome) m_xDialog->set_title(CuiResId(STR_WELCOME)); @@ -55,7 +55,7 @@ void WhatsNewDialog::LoadImage() { auto[sText, sImage] = m_bWelcome ? WELCOME_STRINGARRAY[m_nCurrentNews] : WHATSNEW_STRINGARRAY[m_nCurrentNews]; - OUString aURL("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/whatsnew/"); + OUString aURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/whatsnew/"_ustr); rtl::Bootstrap::expandMacros(aURL); const bool bFileExists = comphelper::DirectoryHelper::fileExists(aURL + sImage); diff --git a/cui/source/dialogs/widgettestdlg.cxx b/cui/source/dialogs/widgettestdlg.cxx index 51ecef3105d0..0de81751d35d 100644 --- a/cui/source/dialogs/widgettestdlg.cxx +++ b/cui/source/dialogs/widgettestdlg.cxx @@ -11,12 +11,12 @@ #include <bitmaps.hlst> WidgetTestDialog::WidgetTestDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/widgettestdialog.ui", "WidgetTestDialog") + : GenericDialogController(pParent, u"cui/ui/widgettestdialog.ui"_ustr, u"WidgetTestDialog"_ustr) { - m_xOKButton = m_xBuilder->weld_button("ok_btn"); - m_xCancelButton = m_xBuilder->weld_button("cancel_btn"); - m_xTreeView = m_xBuilder->weld_tree_view("contenttree"); - m_xTreeView2 = m_xBuilder->weld_tree_view("contenttree2"); + m_xOKButton = m_xBuilder->weld_button(u"ok_btn"_ustr); + m_xCancelButton = m_xBuilder->weld_button(u"cancel_btn"_ustr); + m_xTreeView = m_xBuilder->weld_tree_view(u"contenttree"_ustr); + m_xTreeView2 = m_xBuilder->weld_tree_view(u"contenttree2"_ustr); m_xOKButton->connect_clicked(LINK(this, WidgetTestDialog, OkHdl)); m_xCancelButton->connect_clicked(LINK(this, WidgetTestDialog, CancelHdl)); @@ -47,7 +47,7 @@ void WidgetTestDialog::FillTreeView() m_xTreeView2->append(); m_xTreeView2->set_image(nCount, (nCount % 2 == 0) ? aImage1 : aImage2); - m_xTreeView2->set_text(nCount, "First Column", 0); + m_xTreeView2->set_text(nCount, u"First Column"_ustr, 0); m_xTreeView2->set_text( nCount, OUString::Concat("Row ") + OUString::Concat(OUString::number(nCount)), 1); m_xTreeView2->set_id(nCount, OUString::number(nCount)); diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 7bef6a5b9860..0fe135d3c49c 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -121,22 +121,22 @@ void SvxZoomDialog::SetLimits(sal_uInt16 nMin, sal_uInt16 nMax) const SfxItemSet* SvxZoomDialog::GetOutputItemSet() const { return m_pOutSet.get(); } SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) - : SfxDialogController(pParent, "cui/ui/zoomdialog.ui", "ZoomDialog") + : SfxDialogController(pParent, u"cui/ui/zoomdialog.ui"_ustr, u"ZoomDialog"_ustr) , m_rSet(rCoreSet) , m_bModified(false) - , m_xOptimalBtn(m_xBuilder->weld_radio_button("optimal")) - , m_xWholePageBtn(m_xBuilder->weld_radio_button("fitwandh")) - , m_xPageWidthBtn(m_xBuilder->weld_radio_button("fitw")) - , m_x100Btn(m_xBuilder->weld_radio_button("100pc")) - , m_xUserBtn(m_xBuilder->weld_radio_button("variable")) - , m_xUserEdit(m_xBuilder->weld_metric_spin_button("zoomsb", FieldUnit::PERCENT)) - , m_xViewFrame(m_xBuilder->weld_widget("viewframe")) - , m_xAutomaticBtn(m_xBuilder->weld_radio_button("automatic")) - , m_xSingleBtn(m_xBuilder->weld_radio_button("singlepage")) - , m_xColumnsBtn(m_xBuilder->weld_radio_button("columns")) - , m_xColumnsEdit(m_xBuilder->weld_spin_button("columnssb")) - , m_xBookModeChk(m_xBuilder->weld_check_button("bookmode")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xOptimalBtn(m_xBuilder->weld_radio_button(u"optimal"_ustr)) + , m_xWholePageBtn(m_xBuilder->weld_radio_button(u"fitwandh"_ustr)) + , m_xPageWidthBtn(m_xBuilder->weld_radio_button(u"fitw"_ustr)) + , m_x100Btn(m_xBuilder->weld_radio_button(u"100pc"_ustr)) + , m_xUserBtn(m_xBuilder->weld_radio_button(u"variable"_ustr)) + , m_xUserEdit(m_xBuilder->weld_metric_spin_button(u"zoomsb"_ustr, FieldUnit::PERCENT)) + , m_xViewFrame(m_xBuilder->weld_widget(u"viewframe"_ustr)) + , m_xAutomaticBtn(m_xBuilder->weld_radio_button(u"automatic"_ustr)) + , m_xSingleBtn(m_xBuilder->weld_radio_button(u"singlepage"_ustr)) + , m_xColumnsBtn(m_xBuilder->weld_radio_button(u"columns"_ustr)) + , m_xColumnsEdit(m_xBuilder->weld_spin_button(u"columnssb"_ustr)) + , m_xBookModeChk(m_xBuilder->weld_check_button(u"bookmode"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { Link<weld::Toggleable&, void> aLink = LINK(this, SvxZoomDialog, UserHdl); m_x100Btn->connect_toggled(aLink); diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index 28b83f6a8780..788304de2e3e 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -32,7 +32,7 @@ public: // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.cui.GetCreateDialogFactoryService"; + return u"com.sun.star.cui.GetCreateDialogFactoryService"_ustr; } virtual sal_Bool SAL_CALL supportsService(const OUString& serviceName) override { @@ -40,7 +40,7 @@ public: } virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.cui.GetCreateDialogFactoryService" }; + return { u"com.sun.star.cui.GetCreateDialogFactoryService"_ustr }; } // XUnoTunnel diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 9c422c4f71a6..afd9f41b1616 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1077,8 +1077,8 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDi { auto pDlg = std::make_shared<SvxTransformTabDialog>(pParent, pAttr, pSdrView, bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize); - pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" ); - pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" ); + pDlg->RemoveTabPage( u"RID_SVXPAGE_ANGLE"_ustr ); + pDlg->RemoveTabPage( u"RID_SVXPAGE_SLANT"_ustr ); return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(pDlg)); } diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 6b4a548fe3fc..a10837f6cd48 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -528,7 +528,7 @@ public: virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) override; virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) override; virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent, - const OUString& rName, const OUString& rDesc, const OUString& rTitle = "") override; + const OUString& rName, const OUString& rDesc, const OUString& rTitle = u""_ustr) override; // #i68101# virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override; virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription, bool isDecorative) override; diff --git a/cui/source/inc/FontFeaturesDialog.hxx b/cui/source/inc/FontFeaturesDialog.hxx index 93ba0cb9f80d..e1c8d9d97163 100644 --- a/cui/source/inc/FontFeaturesDialog.hxx +++ b/cui/source/inc/FontFeaturesDialog.hxx @@ -23,11 +23,11 @@ struct FontFeatureItem FontFeatureItem(weld::Widget* pParent) : m_aFeatureCode(0) , m_nDefault(-1) - , m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/fontfragment.ui")) - , m_xContainer(m_xBuilder->weld_widget("fontentry")) - , m_xText(m_xBuilder->weld_label("label")) - , m_xCombo(m_xBuilder->weld_combo_box("combo")) - , m_xCheck(m_xBuilder->weld_check_button("check")) + , m_xBuilder(Application::CreateBuilder(pParent, u"cui/ui/fontfragment.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_widget(u"fontentry"_ustr)) + , m_xText(m_xBuilder->weld_label(u"label"_ustr)) + , m_xCombo(m_xBuilder->weld_combo_box(u"combo"_ustr)) + , m_xCheck(m_xBuilder->weld_check_button(u"check"_ustr)) { m_xCheck->connect_toggled(LINK(this, FontFeatureItem, CheckBoxToggledHdl)); } diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 5cccccf1995c..cbc5e8af2676 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -22,12 +22,12 @@ using namespace ::com::sun::star; CertPathDialog::CertPathDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/certdialog.ui", "CertDialog") - , m_xManualButton(m_xBuilder->weld_button("add")) - , m_xOKButton(m_xBuilder->weld_button("ok")) - , m_xCertPathList(m_xBuilder->weld_tree_view("paths")) - , m_sAddDialogText(m_xBuilder->weld_label("certdir")->get_label()) - , m_sManualLabel(m_xBuilder->weld_label("manual")->get_label()) + : GenericDialogController(pParent, u"cui/ui/certdialog.ui"_ustr, u"CertDialog"_ustr) + , m_xManualButton(m_xBuilder->weld_button(u"add"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCertPathList(m_xBuilder->weld_tree_view(u"paths"_ustr)) + , m_sAddDialogText(m_xBuilder->weld_label(u"certdir"_ustr)->get_label()) + , m_sManualLabel(m_xBuilder->weld_label(u"manual"_ustr)->get_label()) { m_xCertPathList->set_size_request(m_xCertPathList->get_approximate_digit_width() * 70, m_xCertPathList->get_height_rows(6)); @@ -66,7 +66,7 @@ void CertPathDialog::Init() { if (rNSSProfile.Name == "MOZILLA_CERTIFICATE_FOLDER" && !rNSSProfile.Path.isEmpty()) { - AddCertPath("$MOZILLA_CERTIFICATE_FOLDER", rNSSProfile.Path); + AddCertPath(u"$MOZILLA_CERTIFICATE_FOLDER"_ustr, rNSSProfile.Path); m_xCertPathList->set_sensitive(false); } else if (rNSSProfile.Name == "MANUAL") diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index f6321f2252b1..32c5cd7033e0 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -47,20 +47,20 @@ namespace offapp } ConnectionPoolOptionsPage::ConnectionPoolOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) - : SfxTabPage(pPage, pController, "cui/ui/connpooloptions.ui", "ConnPoolPage", &_rAttrSet) + : SfxTabPage(pPage, pController, u"cui/ui/connpooloptions.ui"_ustr, u"ConnPoolPage"_ustr, &_rAttrSet) , m_sYes(CuiResId(RID_CUISTR_YES)) , m_sNo(CuiResId(RID_CUISTR_NO)) - , m_xEnablePooling(m_xBuilder->weld_check_button("connectionpooling")) - , m_xEnablePoolingImg(m_xBuilder->weld_widget("lockconnectionpooling")) - , m_xDriversLabel(m_xBuilder->weld_label("driverslabel")) - , m_xDriverList(m_xBuilder->weld_tree_view("driverlist")) - , m_xDriverLabel(m_xBuilder->weld_label("driverlabel")) - , m_xDriver(m_xBuilder->weld_label("driver")) - , m_xDriverPoolingEnabled(m_xBuilder->weld_check_button("enablepooling")) - , m_xDriverPoolingEnabledImg(m_xBuilder->weld_widget("lockenablepooling")) - , m_xTimeoutLabel(m_xBuilder->weld_label("timeoutlabel")) - , m_xTimeout(m_xBuilder->weld_spin_button("timeout")) - , m_xTimeoutImg(m_xBuilder->weld_widget("locktimeout")) + , m_xEnablePooling(m_xBuilder->weld_check_button(u"connectionpooling"_ustr)) + , m_xEnablePoolingImg(m_xBuilder->weld_widget(u"lockconnectionpooling"_ustr)) + , m_xDriversLabel(m_xBuilder->weld_label(u"driverslabel"_ustr)) + , m_xDriverList(m_xBuilder->weld_tree_view(u"driverlist"_ustr)) + , m_xDriverLabel(m_xBuilder->weld_label(u"driverlabel"_ustr)) + , m_xDriver(m_xBuilder->weld_label(u"driver"_ustr)) + , m_xDriverPoolingEnabled(m_xBuilder->weld_check_button(u"enablepooling"_ustr)) + , m_xDriverPoolingEnabledImg(m_xBuilder->weld_widget(u"lockenablepooling"_ustr)) + , m_xTimeoutLabel(m_xBuilder->weld_label(u"timeoutlabel"_ustr)) + , m_xTimeout(m_xBuilder->weld_spin_button(u"timeout"_ustr)) + , m_xTimeoutImg(m_xBuilder->weld_widget(u"locktimeout"_ustr)) { m_xDriverList->set_size_request(m_xDriverList->get_approximate_digit_width() * 60, m_xDriverList->get_height_rows(15)); @@ -74,7 +74,7 @@ namespace offapp m_xDriverList->set_column_fixed_widths(aWidths); css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); - m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xEnablePooling->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) ); m_xDriverPoolingEnabled->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) ); @@ -95,7 +95,7 @@ namespace offapp else { m_xDriverList->set_text(nRow, m_sNo, 1); - m_xDriverList->set_text(nRow, "-", 2); + m_xDriverList->set_text(nRow, u"-"_ustr, 2); } } @@ -172,7 +172,7 @@ namespace offapp OUString ConnectionPoolOptionsPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "driverslabel", "driverlabel", "timeoutlabel", "driver" }; + OUString labels[] = { u"label1"_ustr, u"driverslabel"_ustr, u"driverlabel"_ustr, u"timeoutlabel"_ustr, u"driver"_ustr }; for (const auto& label : labels) { @@ -180,7 +180,7 @@ namespace offapp sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "connectionpooling", "enablepooling" }; + OUString checkButton[] = { u"connectionpooling"_ustr, u"enablepooling"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 6aa9213efd92..91781be7f0df 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -85,13 +85,13 @@ short DatabaseRegistrationDialog::run() // class DbRegistrationOptionsPage -------------------------------------------------- DbRegistrationOptionsPage::DbRegistrationOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/dbregisterpage.ui", "DbRegisterPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/dbregisterpage.ui"_ustr, u"DbRegisterPage"_ustr, &rSet) , m_nOldCount(0) , m_bModified(false) - , m_xNew(m_xBuilder->weld_button("new")) - , m_xEdit(m_xBuilder->weld_button("edit")) - , m_xDelete(m_xBuilder->weld_button("delete")) - , m_xPathBox(m_xBuilder->weld_tree_view("pathctrl")) + , m_xNew(m_xBuilder->weld_button(u"new"_ustr)) + , m_xEdit(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xDelete(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xPathBox(m_xBuilder->weld_tree_view(u"pathctrl"_ustr)) , m_xIter(m_xPathBox->make_iterator()) { Size aControlSize(m_xPathBox->get_approximate_digit_width() * 60, @@ -133,7 +133,7 @@ OUString DbRegistrationOptionsPage::GetAllStrings() { OUString sAllStrings; - if (const auto& pString = m_xBuilder->weld_label("label1")) + if (const auto& pString = m_xBuilder->weld_label(u"label1"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index f938399140ab..4d4c17c2a409 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -43,12 +43,12 @@ namespace svx using namespace ::svt; ODocumentLinkDialog::ODocumentLinkDialog(weld::Window* pParent, bool _bCreateNew) - : GenericDialogController(pParent, "cui/ui/databaselinkdialog.ui", "DatabaseLinkDialog") - , m_xBrowseFile(m_xBuilder->weld_button("browse")) - , m_xName(m_xBuilder->weld_entry("name")) - , m_xOK(m_xBuilder->weld_button("ok")) - , m_xAltTitle(m_xBuilder->weld_label("alttitle")) - , m_xURL(new SvtURLBox(m_xBuilder->weld_combo_box("url"))) + : GenericDialogController(pParent, u"cui/ui/databaselinkdialog.ui"_ustr, u"DatabaseLinkDialog"_ustr) + , m_xBrowseFile(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xName(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xOK(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xAltTitle(m_xBuilder->weld_label(u"alttitle"_ustr)) + , m_xURL(new SvtURLBox(m_xBuilder->weld_combo_box(u"url"_ustr))) { if (!_bCreateNew) m_xDialog->set_title(m_xAltTitle->get_label()); @@ -58,7 +58,7 @@ namespace svx m_xURL->SetFilter(u"*.odb"); css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); - m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xName->connect_changed( LINK(this, ODocumentLinkDialog, OnEntryModified) ); m_xURL->connect_changed( LINK(this, ODocumentLinkDialog, OnComboBoxModified) ); @@ -100,8 +100,8 @@ namespace svx xItemList->getByName(sNodeName) >>= xSet; OUString aDatabaseName; - if (xSet->getPropertySetInfo()->hasPropertyByName("Name")) - xSet->getPropertyValue("Name") >>= aDatabaseName; + if (xSet->getPropertySetInfo()->hasPropertyByName(u"Name"_ustr)) + xSet->getPropertyValue(u"Name"_ustr) >>= aDatabaseName; if (!aDatabaseName.isEmpty() && m_xName->get_text() == aDatabaseName) { @@ -191,7 +191,7 @@ namespace svx { ::sfx2::FileDialogHelper aFileDlg( ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE, m_xDialog.get()); - std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)"); + std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName(u"StarOffice XML (Base)"_ustr); if ( pFilter ) { aFileDlg.AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension()); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 4d61a873e264..89b217fa8d6e 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -33,22 +33,22 @@ /*********************************************************************/ SvxFontSubstTabPage::SvxFontSubstTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optfontspage.ui", "OptFontsPage", &rSet) - , m_xUseTableCB(m_xBuilder->weld_check_button("usetable")) - , m_xUseTableImg(m_xBuilder->weld_widget("lockusetable")) - , m_xFont1CB(m_xBuilder->weld_combo_box("font1")) - , m_xFont2CB(m_xBuilder->weld_combo_box("font2")) - , m_xApply(m_xBuilder->weld_button("apply")) - , m_xDelete(m_xBuilder->weld_button("delete")) - , m_xCheckLB(m_xBuilder->weld_tree_view("checklb")) - , m_xFontNameLB(m_xBuilder->weld_combo_box("fontname")) - , m_xFontNameLabel(m_xBuilder->weld_label("label8")) - , m_xFontNameImg(m_xBuilder->weld_widget("lockfontname")) - , m_xNonPropFontsOnlyCB(m_xBuilder->weld_check_button("nonpropfontonly")) - , m_xNonPropFontsOnlyImg(m_xBuilder->weld_widget("locknonpropfontonly")) - , m_xFontHeightLB(m_xBuilder->weld_combo_box("fontheight")) - , m_xFontHeightLabel(m_xBuilder->weld_label("label9")) - , m_xFontHeightImg(m_xBuilder->weld_widget("lockfontheight")) + : SfxTabPage(pPage, pController, u"cui/ui/optfontspage.ui"_ustr, u"OptFontsPage"_ustr, &rSet) + , m_xUseTableCB(m_xBuilder->weld_check_button(u"usetable"_ustr)) + , m_xUseTableImg(m_xBuilder->weld_widget(u"lockusetable"_ustr)) + , m_xFont1CB(m_xBuilder->weld_combo_box(u"font1"_ustr)) + , m_xFont2CB(m_xBuilder->weld_combo_box(u"font2"_ustr)) + , m_xApply(m_xBuilder->weld_button(u"apply"_ustr)) + , m_xDelete(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xCheckLB(m_xBuilder->weld_tree_view(u"checklb"_ustr)) + , m_xFontNameLB(m_xBuilder->weld_combo_box(u"fontname"_ustr)) + , m_xFontNameLabel(m_xBuilder->weld_label(u"label8"_ustr)) + , m_xFontNameImg(m_xBuilder->weld_widget(u"lockfontname"_ustr)) + , m_xNonPropFontsOnlyCB(m_xBuilder->weld_check_button(u"nonpropfontonly"_ustr)) + , m_xNonPropFontsOnlyImg(m_xBuilder->weld_widget(u"locknonpropfontonly"_ustr)) + , m_xFontHeightLB(m_xBuilder->weld_combo_box(u"fontheight"_ustr)) + , m_xFontHeightLabel(m_xBuilder->weld_label(u"label9"_ustr)) + , m_xFontHeightImg(m_xBuilder->weld_widget(u"lockfontheight"_ustr)) { m_xFont1CB->make_sorted(); m_xFont1CB->set_size_request(1, -1); @@ -149,7 +149,7 @@ std::unique_ptr<SfxTabPage> SvxFontSubstTabPage::Create( weld::Container* pPage, OUString SvxFontSubstTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label4", "label2", "label3", "label1", "label8", "label9" }; + OUString labels[] = { u"label4"_ustr, u"label2"_ustr, u"label3"_ustr, u"label1"_ustr, u"label8"_ustr, u"label9"_ustr }; for (const auto& label : labels) { @@ -157,7 +157,7 @@ OUString SvxFontSubstTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "usetable", "nonpropfontonly" }; + OUString checkButton[] = { u"usetable"_ustr, u"nonpropfontonly"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index de64f45b4260..d7eeed7f3a56 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -98,13 +98,13 @@ struct UserData }; CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/aboutconfigdialog.ui", "AboutConfig") - , m_xResetBtn(m_xBuilder->weld_button("reset")) - , m_xEditBtn(m_xBuilder->weld_button("edit")) - , m_xSearchBtn(m_xBuilder->weld_button("searchButton")) - , m_xModifiedCheckBtn(m_xBuilder->weld_check_button("modifiedButton")) - , m_xSearchEdit(m_xBuilder->weld_entry("searchEntry")) - , m_xPrefBox(m_xBuilder->weld_tree_view("preferences")) + : GenericDialogController(pParent, u"cui/ui/aboutconfigdialog.ui"_ustr, u"AboutConfig"_ustr) + , m_xResetBtn(m_xBuilder->weld_button(u"reset"_ustr)) + , m_xEditBtn(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xSearchBtn(m_xBuilder->weld_button(u"searchButton"_ustr)) + , m_xModifiedCheckBtn(m_xBuilder->weld_check_button(u"modifiedButton"_ustr)) + , m_xSearchEdit(m_xBuilder->weld_entry(u"searchEntry"_ustr)) + , m_xPrefBox(m_xBuilder->weld_tree_view(u"preferences"_ustr)) , m_xScratchIter(m_xPrefBox->make_iterator()) , m_bSorted(false) { @@ -234,7 +234,7 @@ void CuiAboutConfigTabPage::InputChanged() if (m_xSearchEdit->get_text().isEmpty()) { m_xPrefBox->clear(); - Reference<XNameAccess> xConfigAccess = getConfigAccess("/", false); + Reference<XNameAccess> xConfigAccess = getConfigAccess(u"/"_ustr, false); FillItems(xConfigAccess); } else @@ -297,7 +297,7 @@ void CuiAboutConfigTabPage::Reset() m_modifiedPrefBoxEntries.clear(); m_xPrefBox->freeze(); - Reference<XNameAccess> xConfigAccess = getConfigAccess("/", false); + Reference<XNameAccess> xConfigAccess = getConfigAccess(u"/"_ustr, false); //Load all XNameAccess to m_prefBoxEntries FillItems(xConfigAccess, nullptr, 0, true); //Load xConfigAccess' children to m_prefBox @@ -421,9 +421,9 @@ void CuiAboutConfigTabPage::FillItems(const Reference<XNameAccess>& xNameAccess, m_xPrefBox->insert(pParentEntry, -1, &item, &sId, nullptr, nullptr, true, m_xScratchIter.get()); // Necessary, without this the selection line will be truncated. - m_xPrefBox->set_text(*m_xScratchIter, "", 1); - m_xPrefBox->set_text(*m_xScratchIter, "", 2); - m_xPrefBox->set_text(*m_xScratchIter, "", 3); + m_xPrefBox->set_text(*m_xScratchIter, u""_ustr, 1); + m_xPrefBox->set_text(*m_xScratchIter, u""_ustr, 2); + m_xPrefBox->set_text(*m_xScratchIter, u""_ustr, 3); m_xPrefBox->set_sensitive(*m_xScratchIter, true); } } @@ -439,7 +439,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference<XNameAccess>& xNameAccess, css::uno::Reference<css::configuration::XReadWriteAccess> m_xReadWriteAccess; m_xReadWriteAccess = css::configuration::ReadWriteAccess::create( - ::comphelper::getProcessComponentContext(), "*"); + ::comphelper::getProcessComponentContext(), u"*"_ustr); beans::Property aProperty; bool bReadOnly = false; OUString sFullPath(sPath + "/" + sPropertyName); @@ -1073,9 +1073,9 @@ void CuiAboutConfigTabPage::InsertEntry(const prefBoxEntry& rEntry) m_xPrefBox->insert(xGrandParentEntry.get(), -1, &sParentName, nullptr, nullptr, nullptr, false, xParentEntry.get()); //It is needed, without this the selection line will be truncated. - m_xPrefBox->set_text(*xParentEntry, "", 1); - m_xPrefBox->set_text(*xParentEntry, "", 2); - m_xPrefBox->set_text(*xParentEntry, "", 3); + m_xPrefBox->set_text(*xParentEntry, u""_ustr, 1); + m_xPrefBox->set_text(*xParentEntry, u""_ustr, 2); + m_xPrefBox->set_text(*xParentEntry, u""_ustr, 3); m_xPrefBox->set_sensitive(*xParentEntry, true); } diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index 008a4a273502..dfb9d386bed8 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -24,21 +24,21 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optaccessibilitypage.ui", "OptAccessibilityPage", &rSet) - , m_xAccessibilityTool(m_xBuilder->weld_check_button("acctool")) - , m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly")) - , m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget("locktextselinreadonly")) - , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics")) - , m_xAnimatedGraphicsImg(m_xBuilder->weld_widget("lockanimatedgraphics")) - , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext")) - , m_xAnimatedTextsImg(m_xBuilder->weld_widget("lockanimatedtext")) - , m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast")) - , m_xHighContrastImg(m_xBuilder->weld_widget("lockhighcontrast")) - , m_xHighContrastLabel(m_xBuilder->weld_label("label13")) - , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor")) - , m_xAutomaticFontColorImg(m_xBuilder->weld_widget("lockautofontcolor")) - , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor")) - , m_xPagePreviewsImg(m_xBuilder->weld_widget("locksystempagepreviewcolor")) + : SfxTabPage(pPage, pController, u"cui/ui/optaccessibilitypage.ui"_ustr, u"OptAccessibilityPage"_ustr, &rSet) + , m_xAccessibilityTool(m_xBuilder->weld_check_button(u"acctool"_ustr)) + , m_xTextSelectionInReadonly(m_xBuilder->weld_check_button(u"textselinreadonly"_ustr)) + , m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget(u"locktextselinreadonly"_ustr)) + , m_xAnimatedGraphics(m_xBuilder->weld_check_button(u"animatedgraphics"_ustr)) + , m_xAnimatedGraphicsImg(m_xBuilder->weld_widget(u"lockanimatedgraphics"_ustr)) + , m_xAnimatedTexts(m_xBuilder->weld_check_button(u"animatedtext"_ustr)) + , m_xAnimatedTextsImg(m_xBuilder->weld_widget(u"lockanimatedtext"_ustr)) + , m_xHighContrast(m_xBuilder->weld_combo_box(u"highcontrast"_ustr)) + , m_xHighContrastImg(m_xBuilder->weld_widget(u"lockhighcontrast"_ustr)) + , m_xHighContrastLabel(m_xBuilder->weld_label(u"label13"_ustr)) + , m_xAutomaticFontColor(m_xBuilder->weld_check_button(u"autofontcolor"_ustr)) + , m_xAutomaticFontColorImg(m_xBuilder->weld_widget(u"lockautofontcolor"_ustr)) + , m_xPagePreviews(m_xBuilder->weld_check_button(u"systempagepreviewcolor"_ustr)) + , m_xPagePreviewsImg(m_xBuilder->weld_widget(u"locksystempagepreviewcolor"_ustr)) { #ifdef UNX // UNIX: read the gconf2 setting instead to use the checkbox @@ -58,7 +58,7 @@ std::unique_ptr<SfxTabPage> SvxAccessibilityOptionsTabPage::Create(weld::Contain OUString SvxAccessibilityOptionsTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label13" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label13"_ustr }; for (const auto& label : labels) { @@ -66,8 +66,8 @@ OUString SvxAccessibilityOptionsTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "acctool", "textselinreadonly", "animatedgraphics", - "animatedtext", "autofontcolor", "systempagepreviewcolor" }; + OUString checkButton[] = { u"acctool"_ustr, u"textselinreadonly"_ustr, u"animatedgraphics"_ustr, + u"animatedtext"_ustr, u"autofontcolor"_ustr, u"systempagepreviewcolor"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 390621a0cdd9..66f7f9818851 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -106,21 +106,21 @@ void SvxAsianLayoutPage_Impl::addForbiddenCharacters( static LanguageType eLastUsedLanguageTypeForForbiddenCharacters(USHRT_MAX); SvxAsianLayoutPage::SvxAsianLayoutPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optasianpage.ui", "OptAsianPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optasianpage.ui"_ustr, u"OptAsianPage"_ustr, &rSet) , pImpl(new SvxAsianLayoutPage_Impl) - , m_xCharKerningRB(m_xBuilder->weld_radio_button("charkerning")) - , m_xCharPunctKerningRB(m_xBuilder->weld_radio_button("charpunctkerning")) - , m_xNoCompressionRB(m_xBuilder->weld_radio_button("nocompression")) - , m_xPunctCompressionRB(m_xBuilder->weld_radio_button("punctcompression")) - , m_xPunctKanaCompressionRB(m_xBuilder->weld_radio_button("punctkanacompression")) - , m_xLanguageFT(m_xBuilder->weld_label("languageft")) - , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("language"))) - , m_xStandardCB(m_xBuilder->weld_check_button("standard")) - , m_xStartFT(m_xBuilder->weld_label("startft")) - , m_xStartED(m_xBuilder->weld_entry("start")) - , m_xEndFT(m_xBuilder->weld_label("endft")) - , m_xEndED(m_xBuilder->weld_entry("end")) - , m_xHintFT(m_xBuilder->weld_label("hintft")) + , m_xCharKerningRB(m_xBuilder->weld_radio_button(u"charkerning"_ustr)) + , m_xCharPunctKerningRB(m_xBuilder->weld_radio_button(u"charpunctkerning"_ustr)) + , m_xNoCompressionRB(m_xBuilder->weld_radio_button(u"nocompression"_ustr)) + , m_xPunctCompressionRB(m_xBuilder->weld_radio_button(u"punctcompression"_ustr)) + , m_xPunctKanaCompressionRB(m_xBuilder->weld_radio_button(u"punctkanacompression"_ustr)) + , m_xLanguageFT(m_xBuilder->weld_label(u"languageft"_ustr)) + , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"language"_ustr))) + , m_xStandardCB(m_xBuilder->weld_check_button(u"standard"_ustr)) + , m_xStartFT(m_xBuilder->weld_label(u"startft"_ustr)) + , m_xStartED(m_xBuilder->weld_entry(u"start"_ustr)) + , m_xEndFT(m_xBuilder->weld_label(u"endft"_ustr)) + , m_xEndED(m_xBuilder->weld_entry(u"end"_ustr)) + , m_xHintFT(m_xBuilder->weld_label(u"hintft"_ustr)) { LanguageHdl(*m_xLanguageLB->get_widget()); m_xLanguageLB->connect_changed(LINK(this, SvxAsianLayoutPage, LanguageHdl)); @@ -145,7 +145,7 @@ OUString SvxAsianLayoutPage::GetAllStrings() { OUString sAllStrings; OUString labels[] - = { "label1", "label2", "label3", "languageft", "startft", "endft", "hintft" }; + = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr, u"languageft"_ustr, u"startft"_ustr, u"endft"_ustr, u"hintft"_ustr }; for (const auto& label : labels) { @@ -153,8 +153,8 @@ OUString SvxAsianLayoutPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString radioButton[] = { "charkerning", "charpunctkerning", "nocompression", - "punctcompression", "punctkanacompression" }; + OUString radioButton[] = { u"charkerning"_ustr, u"charpunctkerning"_ustr, u"nocompression"_ustr, + u"punctcompression"_ustr, u"punctkanacompression"_ustr }; for (const auto& radio : radioButton) { @@ -227,7 +227,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* ) Reference<XMultiServiceFactory> xFact(xModel, UNO_QUERY); if(xFact.is()) { - pImpl->xPrSet.set(xFact->createInstance("com.sun.star.document.Settings"), UNO_QUERY); + pImpl->xPrSet.set(xFact->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY); } if( pImpl->xPrSet.is() ) pImpl->xPrSetInfo = pImpl->xPrSet->getPropertySetInfo(); @@ -235,7 +235,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* ) CharCompressType nCompress = SvxAsianConfig::GetCharDistanceCompression(); if(pImpl->xPrSetInfo.is()) { - OUString sForbidden("ForbiddenCharacters"); + OUString sForbidden(u"ForbiddenCharacters"_ustr); if(pImpl->xPrSetInfo->hasPropertyByName(sForbidden)) { Any aForbidden = pImpl->xPrSet->getPropertyValue(sForbidden); diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx index bbe20fd01eee..d7bd06d94626 100644 --- a/cui/source/options/optbasic.cxx +++ b/cui/source/options/optbasic.cxx @@ -22,13 +22,13 @@ #include <officecfg/Office/BasicIDE.hxx> SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optbasicidepage.ui", "OptBasicIDEPage", &rSet) - , m_xCodeCompleteChk(m_xBuilder->weld_check_button("codecomplete_enable")) - , m_xAutocloseProcChk(m_xBuilder->weld_check_button("autoclose_proc")) - , m_xAutocloseParenChk(m_xBuilder->weld_check_button("autoclose_paren")) - , m_xAutocloseQuotesChk(m_xBuilder->weld_check_button("autoclose_quotes")) - , m_xAutoCorrectChk(m_xBuilder->weld_check_button("autocorrect")) - , m_xUseExtendedTypesChk(m_xBuilder->weld_check_button("extendedtypes_enable")) + : SfxTabPage(pPage, pController, u"cui/ui/optbasicidepage.ui"_ustr, u"OptBasicIDEPage"_ustr, &rSet) + , m_xCodeCompleteChk(m_xBuilder->weld_check_button(u"codecomplete_enable"_ustr)) + , m_xAutocloseProcChk(m_xBuilder->weld_check_button(u"autoclose_proc"_ustr)) + , m_xAutocloseParenChk(m_xBuilder->weld_check_button(u"autoclose_paren"_ustr)) + , m_xAutocloseQuotesChk(m_xBuilder->weld_check_button(u"autoclose_quotes"_ustr)) + , m_xAutoCorrectChk(m_xBuilder->weld_check_button(u"autocorrect"_ustr)) + , m_xUseExtendedTypesChk(m_xBuilder->weld_check_button(u"extendedtypes_enable"_ustr)) { LoadConfig(); } @@ -56,7 +56,7 @@ void SvxBasicIDEOptionsPage::LoadConfig() OUString SvxBasicIDEOptionsPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr }; for (const auto& label : labels) { @@ -64,8 +64,8 @@ OUString SvxBasicIDEOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "codecomplete_enable", "autocorrect", "autoclose_quotes", - "autoclose_paren", "autoclose_proc", "extendedtypes_enable" }; + OUString checkButton[] = { u"codecomplete_enable"_ustr, u"autocorrect"_ustr, u"autoclose_quotes"_ustr, + u"autoclose_paren"_ustr, u"autoclose_proc"_ustr, u"extendedtypes_enable"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index eef87d2cd324..ec5c92c4a1c8 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -90,14 +90,14 @@ void SvxDefaultColorOptPage::FillBoxChartColorLB() } SvxDefaultColorOptPage::SvxDefaultColorOptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/optchartcolorspage.ui", "OptChartColorsPage", &rInAttrs) - , m_xLbChartColors(m_xBuilder->weld_tree_view("colors")) - , m_xLbPaletteSelector(m_xBuilder->weld_combo_box("paletteselector")) - , m_xPBDefault(m_xBuilder->weld_button("default")) - , m_xPBAdd(m_xBuilder->weld_button("add")) - , m_xPBRemove(m_xBuilder->weld_button("delete")) - , m_xValSetColorBox(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("tablewin", true))) - , m_xValSetColorBoxWin(new weld::CustomWeld(*m_xBuilder, "table", *m_xValSetColorBox)) + : SfxTabPage(pPage, pController, u"cui/ui/optchartcolorspage.ui"_ustr, u"OptChartColorsPage"_ustr, &rInAttrs) + , m_xLbChartColors(m_xBuilder->weld_tree_view(u"colors"_ustr)) + , m_xLbPaletteSelector(m_xBuilder->weld_combo_box(u"paletteselector"_ustr)) + , m_xPBDefault(m_xBuilder->weld_button(u"default"_ustr)) + , m_xPBAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xPBRemove(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xValSetColorBox(new SvxColorValueSet(m_xBuilder->weld_scrolled_window(u"tablewin"_ustr, true))) + , m_xValSetColorBoxWin(new weld::CustomWeld(*m_xBuilder, u"table"_ustr, *m_xValSetColorBox)) { m_xLbChartColors->set_size_request(-1, m_xLbChartColors->get_height_rows(16)); @@ -155,7 +155,7 @@ std::unique_ptr<SfxTabPage> SvxDefaultColorOptPage::Create( weld::Container* pPa OUString SvxDefaultColorOptPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label20", "label1" }; + OUString labels[] = { u"label20"_ustr, u"label1"_ustr }; for (const auto& label : labels) { @@ -163,7 +163,7 @@ OUString SvxDefaultColorOptPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString buttons[] = { "add", "delete", "default" }; + OUString buttons[] = { u"add"_ustr, u"delete"_ustr, u"default"_ustr }; for (const auto& btn : buttons) { @@ -255,8 +255,8 @@ IMPL_LINK_NOARG( SvxDefaultColorOptPage, RemoveChartColor, weld::Button&, void ) OSL_ENSURE(m_SvxChartColorTableUniquePtr->size() > 1, "don't delete the last chart color"); - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletechartcolordialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryDeleteChartColorDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletechartcolordialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"QueryDeleteChartColorDialog"_ustr)); if (RET_YES != xQuery->run()) return; diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index d2c94669fa9f..0987e25ca923 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -71,13 +71,13 @@ struct const vGroupInfo[] = { // the groups are in the same order as in enum Group above - { Group_General, "general" }, - { Group_Writer, "writer" }, - { Group_Html, "html" }, - { Group_Calc, "calc" }, - { Group_Draw, "draw" }, - { Group_Basic, "basic" }, - { Group_Sql, "sql" } + { Group_General, u"general"_ustr }, + { Group_Writer, u"writer"_ustr }, + { Group_Html, u"html"_ustr }, + { Group_Calc, u"calc"_ustr }, + { Group_Draw, u"draw"_ustr }, + { Group_Basic, u"basic"_ustr }, + { Group_Sql, u"sql"_ustr } }; // color config entry data (see ColorConfigWindow_Impl::Entry below) @@ -97,10 +97,10 @@ struct const vEntryInfo[] = { #define IDS(Name) \ - SAL_STRINGIFY(Name), SAL_STRINGIFY(Name##_lb), false + u"" SAL_STRINGIFY(Name) ""_ustr, u"" SAL_STRINGIFY(Name##_lb) ""_ustr, false #define IDS_CB(Name) \ - SAL_STRINGIFY(Name), SAL_STRINGIFY(Name##_lb), true + u"" SAL_STRINGIFY(Name) ""_ustr, u"" SAL_STRINGIFY(Name##_lb) ""_ustr, true // The list of these entries (enum ColorConfigEntry) are in colorcfg.hxx. @@ -445,13 +445,13 @@ void ColorConfigWindow_Impl::Entry::ColorChanged(ExtendedColorConfigValue& rValu // ColorConfigWindow_Impl ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Container* pParent) : m_pTopLevel(pTopLevel) - , m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/colorconfigwin.ui")) - , m_xBox(m_xBuilder->weld_box("ColorConfigWindow")) - , m_xWidget1(m_xBuilder->weld_widget("docboundaries")) - , m_xWidget2(m_xBuilder->weld_widget("docboundaries_lb")) + , m_xBuilder(Application::CreateBuilder(pParent, u"cui/ui/colorconfigwin.ui"_ustr)) + , m_xBox(m_xBuilder->weld_box(u"ColorConfigWindow"_ustr)) + , m_xWidget1(m_xBuilder->weld_widget(u"docboundaries"_ustr)) + , m_xWidget2(m_xBuilder->weld_widget(u"docboundaries_lb"_ustr)) { css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); - m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); CreateEntries(); } @@ -470,9 +470,9 @@ void ColorConfigWindow_Impl::CreateEntries() // Here we want to get the amount to add to the position of a FixedText to // get it to align its contents with that of a CheckBox { - OUString sSampleText("XXXXXX"); - std::unique_ptr<weld::CheckButton> xCheckBox(m_xBuilder->weld_check_button("docboundaries")); - std::unique_ptr<weld::Label> xFixedText(m_xBuilder->weld_label("doccolor")); + OUString sSampleText(u"XXXXXX"_ustr); + std::unique_ptr<weld::CheckButton> xCheckBox(m_xBuilder->weld_check_button(u"docboundaries"_ustr)); + std::unique_ptr<weld::Label> xFixedText(m_xBuilder->weld_label(u"doccolor"_ustr)); OUString sOrigCheck(xCheckBox->get_label()); OUString sOrigFixed(xFixedText->get_label()); xCheckBox->set_label(sSampleText); @@ -508,22 +508,22 @@ void ColorConfigWindow_Impl::CreateEntries() for (unsigned j = 0; j != nExtGroupCount; ++j) { - vExtBuilders.emplace_back(Application::CreateBuilder(m_xBox.get(), "cui/ui/chapterfragment.ui")); - vExtContainers.emplace_back(vExtBuilders.back()->weld_frame("ChapterFragment")); + vExtBuilders.emplace_back(Application::CreateBuilder(m_xBox.get(), u"cui/ui/chapterfragment.ui"_ustr)); + vExtContainers.emplace_back(vExtBuilders.back()->weld_frame(u"ChapterFragment"_ustr)); OUString const sComponentName = aExtConfig.GetComponentName(j); vChapters.push_back(std::make_shared<Chapter>( *vExtBuilders.back(), "chapter", true)); vChapters.back()->SetText(aExtConfig.GetComponentDisplayName(sComponentName)); - vExtContainers.emplace_back(vExtBuilders.back()->weld_box("contents")); + vExtContainers.emplace_back(vExtBuilders.back()->weld_box(u"contents"_ustr)); weld::Container* pChapterBox = vExtContainers.back().get(); unsigned nColorCount = aExtConfig.GetComponentColorCount(sComponentName); for (unsigned i = 0; i != nColorCount; ++i) { - vExtBuilders.emplace_back(Application::CreateBuilder(pChapterBox, "cui/ui/colorfragment.ui")); - vExtContainers.emplace_back(vExtBuilders.back()->weld_container("ColorFragment")); + vExtBuilders.emplace_back(Application::CreateBuilder(pChapterBox, u"cui/ui/colorfragment.ui"_ustr)); + vExtContainers.emplace_back(vExtBuilders.back()->weld_container(u"ColorFragment"_ustr)); ExtendedColorConfigValue const aColorEntry = aExtConfig.GetComponentColorConfigValue(sComponentName, i); @@ -720,8 +720,8 @@ public: }; ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(weld::Window* pTopLevel, weld::Builder& rBuilder) - : m_xVScroll(rBuilder.weld_scrolled_window("scroll")) - , m_xBody(rBuilder.weld_container("colorconfig")) + : m_xVScroll(rBuilder.weld_scrolled_window(u"scroll"_ustr)) + , m_xBody(rBuilder.weld_container(u"colorconfig"_ustr)) , m_xScrollWindow(std::make_unique<ColorConfigWindow_Impl>(pTopLevel, m_xBody.get())) , pColorConfig(nullptr) , pExtColorConfig(nullptr) @@ -798,19 +798,19 @@ IMPL_LINK(ColorConfigCtrl_Impl, ControlFocusHdl, weld::Widget&, rCtrl, void) // SvxColorOptionsTabPage SvxColorOptionsTabPage::SvxColorOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) - : SfxTabPage(pPage, pController, "cui/ui/optappearancepage.ui", "OptAppearancePage", &rCoreSet) + : SfxTabPage(pPage, pController, u"cui/ui/optappearancepage.ui"_ustr, u"OptAppearancePage"_ustr, &rCoreSet) , bFillItemSetCalled(false) , m_nSizeAllocEventId(nullptr) - , m_xAutoColorLB(m_xBuilder->weld_combo_box("autocolorlb")) - , m_xAutoColorImg(m_xBuilder->weld_widget("lockautocolorlb")) - , m_xColorSchemeLB(m_xBuilder->weld_combo_box("colorschemelb")) - , m_xColorSchemeImg(m_xBuilder->weld_widget("lockcolorschemelb")) - , m_xSaveSchemePB(m_xBuilder->weld_button("save")) - , m_xDeleteSchemePB(m_xBuilder->weld_button("delete")) + , m_xAutoColorLB(m_xBuilder->weld_combo_box(u"autocolorlb"_ustr)) + , m_xAutoColorImg(m_xBuilder->weld_widget(u"lockautocolorlb"_ustr)) + , m_xColorSchemeLB(m_xBuilder->weld_combo_box(u"colorschemelb"_ustr)) + , m_xColorSchemeImg(m_xBuilder->weld_widget(u"lockcolorschemelb"_ustr)) + , m_xSaveSchemePB(m_xBuilder->weld_button(u"save"_ustr)) + , m_xDeleteSchemePB(m_xBuilder->weld_button(u"delete"_ustr)) , m_xColorConfigCT(new ColorConfigCtrl_Impl(pController->getDialog(), *m_xBuilder)) - , m_xTable(m_xBuilder->weld_widget("table")) - , m_xOnFT(m_xBuilder->weld_label("on")) - , m_xColorFT(m_xBuilder->weld_label("colorsetting")) + , m_xTable(m_xBuilder->weld_widget(u"table"_ustr)) + , m_xOnFT(m_xBuilder->weld_label(u"on"_ustr)) + , m_xColorFT(m_xBuilder->weld_label(u"colorsetting"_ustr)) , m_rWidget1(m_xColorConfigCT->GetWidget1()) , m_rWidget2(m_xColorConfigCT->GetWidget2()) { @@ -862,7 +862,7 @@ OUString SvxColorOptionsTabPage::GetAllStrings() { // buttons are excluded OUString sAllStrings; - OUString labels[] = { "label2", "label3", "autocolor", "uielements", "colorsetting" }; + OUString labels[] = { u"label2"_ustr, u"label3"_ustr, u"autocolor"_ustr, u"uielements"_ustr, u"colorsetting"_ustr }; for (const auto& label : labels) { diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index 10140c2eab50..df2cfbd3b538 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -38,13 +38,13 @@ IMPL_LINK_NOARG(SvxCTLOptionsPage, SequenceCheckingCB_Hdl, weld::Toggleable&, vo } SvxCTLOptionsPage::SvxCTLOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optctlpage.ui", "OptCTLPage", &rSet) - , m_xSequenceCheckingCB(m_xBuilder->weld_check_button("sequencechecking")) - , m_xRestrictedCB(m_xBuilder->weld_check_button("restricted")) - , m_xTypeReplaceCB(m_xBuilder->weld_check_button("typeandreplace")) - , m_xMovementLogicalRB(m_xBuilder->weld_radio_button("movementlogical")) - , m_xMovementVisualRB(m_xBuilder->weld_radio_button("movementvisual")) - , m_xNumeralsLB(m_xBuilder->weld_combo_box("numerals")) + : SfxTabPage(pPage, pController, u"cui/ui/optctlpage.ui"_ustr, u"OptCTLPage"_ustr, &rSet) + , m_xSequenceCheckingCB(m_xBuilder->weld_check_button(u"sequencechecking"_ustr)) + , m_xRestrictedCB(m_xBuilder->weld_check_button(u"restricted"_ustr)) + , m_xTypeReplaceCB(m_xBuilder->weld_check_button(u"typeandreplace"_ustr)) + , m_xMovementLogicalRB(m_xBuilder->weld_radio_button(u"movementlogical"_ustr)) + , m_xMovementVisualRB(m_xBuilder->weld_radio_button(u"movementvisual"_ustr)) + , m_xNumeralsLB(m_xBuilder->weld_combo_box(u"numerals"_ustr)) { m_xSequenceCheckingCB->connect_toggled(LINK(this, SvxCTLOptionsPage, SequenceCheckingCB_Hdl)); } @@ -61,7 +61,7 @@ std::unique_ptr<SfxTabPage> SvxCTLOptionsPage::Create( weld::Container* pPage, w OUString SvxCTLOptionsPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3", "label4", "label5" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr, u"label4"_ustr, u"label5"_ustr }; for (const auto& label : labels) { @@ -69,7 +69,7 @@ OUString SvxCTLOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "sequencechecking", "restricted", "typeandreplace" }; + OUString checkButton[] = { u"sequencechecking"_ustr, u"restricted"_ustr, u"typeandreplace"_ustr }; for (const auto& check : checkButton) { @@ -77,7 +77,7 @@ OUString SvxCTLOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString radioButton[] = { "movementlogical", "movementvisual" }; + OUString radioButton[] = { u"movementlogical"_ustr, u"movementvisual"_ustr }; for (const auto& radio : radioButton) { diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx index ba068fe28af7..0028ab22d49e 100644 --- a/cui/source/options/optdeepl.cxx +++ b/cui/source/options/optdeepl.cxx @@ -22,9 +22,9 @@ OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optdeeplpage.ui", "OptDeeplPage", &rSet) - , m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) - , m_xAuthKey(m_xBuilder->weld_entry("authkey")) + : SfxTabPage(pPage, pController, u"cui/ui/optdeeplpage.ui"_ustr, u"OptDeeplPage"_ustr, &rSet) + , m_xAPIUrl(m_xBuilder->weld_entry(u"apiurl"_ustr)) + , m_xAuthKey(m_xBuilder->weld_entry(u"authkey"_ustr)) { } @@ -46,7 +46,7 @@ void OptDeeplTabPage::Reset(const SfxItemSet*) OUString OptDeeplTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr }; for (const auto& label : labels) { @@ -54,7 +54,7 @@ OUString OptDeeplTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - if (const auto& pString = m_xBuilder->weld_link_button("privacy")) + if (const auto& pString = m_xBuilder->weld_link_button(u"privacy"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index a9f4720419a7..f190a587a170 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -110,11 +110,11 @@ static CDE_RESULT cmpDicEntry_Impl( std::u16string_view rText1, std::u16string_v // class SvxNewDictionaryDialog ------------------------------------------- SvxNewDictionaryDialog::SvxNewDictionaryDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/optnewdictionarydialog.ui", "OptNewDictionaryDialog") - , m_xNameEdit(m_xBuilder->weld_entry("nameedit")) - , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("language"))) - , m_xExceptBtn(m_xBuilder->weld_check_button("except")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"cui/ui/optnewdictionarydialog.ui"_ustr, u"OptNewDictionaryDialog"_ustr) + , m_xNameEdit(m_xBuilder->weld_entry(u"nameedit"_ustr)) + , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"language"_ustr))) + , m_xExceptBtn(m_xBuilder->weld_check_button(u"except"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { // Prevent creation of dictionary without a name. m_xOKBtn->set_sensitive(false); @@ -210,21 +210,21 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, ModifyHdl_Impl, weld::Entry&, void) // class SvxEditDictionaryDialog ------------------------------------------- SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view rName) - : GenericDialogController(pParent, "cui/ui/editdictionarydialog.ui", "EditDictionaryDialog") + : GenericDialogController(pParent, u"cui/ui/editdictionarydialog.ui"_ustr, u"EditDictionaryDialog"_ustr) , sModify(CuiResId(STR_MODIFY)) , bFirstSelect(false) , bDoNothing(false) , bDicIsReadonly(false) - , m_xAllDictsLB(m_xBuilder->weld_combo_box("book")) - , m_xLangFT(m_xBuilder->weld_label("lang_label")) - , m_xLangLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("lang"))) - , m_xWordED(m_xBuilder->weld_entry("word")) - , m_xReplaceFT(m_xBuilder->weld_label("replace_label")) - , m_xReplaceED(m_xBuilder->weld_entry("replace")) - , m_xSingleColumnLB(m_xBuilder->weld_tree_view("words")) - , m_xDoubleColumnLB(m_xBuilder->weld_tree_view("replaces")) - , m_xNewReplacePB(m_xBuilder->weld_button("newreplace")) - , m_xDeletePB(m_xBuilder->weld_button("delete")) + , m_xAllDictsLB(m_xBuilder->weld_combo_box(u"book"_ustr)) + , m_xLangFT(m_xBuilder->weld_label(u"lang_label"_ustr)) + , m_xLangLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"lang"_ustr))) + , m_xWordED(m_xBuilder->weld_entry(u"word"_ustr)) + , m_xReplaceFT(m_xBuilder->weld_label(u"replace_label"_ustr)) + , m_xReplaceED(m_xBuilder->weld_entry(u"replace"_ustr)) + , m_xSingleColumnLB(m_xBuilder->weld_tree_view(u"words"_ustr)) + , m_xDoubleColumnLB(m_xBuilder->weld_tree_view(u"replaces"_ustr)) + , m_xNewReplacePB(m_xBuilder->weld_button(u"newreplace"_ustr)) + , m_xDeletePB(m_xBuilder->weld_button(u"delete"_ustr)) { sReplaceFT_Text = m_xReplaceFT->get_label(); m_xSingleColumnLB->set_size_request(-1, m_xSingleColumnLB->get_height_rows(8)); @@ -589,8 +589,8 @@ bool SvxEditDictionaryDialog::NewDelHdl(const weld::Widget* pBtn) { if (pBtn == m_xDeletePB.get()) { - m_xWordED->set_text(""); - m_xReplaceED->set_text(""); + m_xWordED->set_text(u""_ustr); + m_xReplaceED->set_text(u""_ustr); m_xDeletePB->set_sensitive(false); int nEntry = m_pWordsLB->get_selected_index(); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 0ecd2215716d..29d83596ab01 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -39,23 +39,23 @@ enum class MSFltrPg2_CheckBoxEntries { OfaMSFilterTabPage::OfaMSFilterTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optfltrpage.ui", "OptFltrPage", &rSet) - , m_xWBasicCodeCB(m_xBuilder->weld_check_button("wo_basic")) - , m_xWBasicCodeImg(m_xBuilder->weld_widget("lockwo_basic")) - , m_xWBasicWbctblCB(m_xBuilder->weld_check_button("wo_exec")) - , m_xWBasicWbctblImg(m_xBuilder->weld_widget("lockwo_exec")) - , m_xWBasicStgCB(m_xBuilder->weld_check_button("wo_saveorig")) - , m_xWBasicStgImg(m_xBuilder->weld_widget("lockwo_saveorig")) - , m_xEBasicCodeCB(m_xBuilder->weld_check_button("ex_basic")) - , m_xEBasicCodeImg(m_xBuilder->weld_widget("lockex_basic")) - , m_xEBasicExectblCB(m_xBuilder->weld_check_button("ex_exec")) - , m_xEBasicExectblImg(m_xBuilder->weld_widget("lockex_exec")) - , m_xEBasicStgCB(m_xBuilder->weld_check_button("ex_saveorig")) - , m_xEBasicStgImg(m_xBuilder->weld_widget("lockex_saveorig")) - , m_xPBasicCodeCB(m_xBuilder->weld_check_button("pp_basic")) - , m_xPBasicCodeImg(m_xBuilder->weld_widget("lockpp_basic")) - , m_xPBasicStgCB(m_xBuilder->weld_check_button("pp_saveorig")) - , m_xPBasicStgImg(m_xBuilder->weld_widget("lockpp_saveorig")) + : SfxTabPage(pPage, pController, u"cui/ui/optfltrpage.ui"_ustr, u"OptFltrPage"_ustr, &rSet) + , m_xWBasicCodeCB(m_xBuilder->weld_check_button(u"wo_basic"_ustr)) + , m_xWBasicCodeImg(m_xBuilder->weld_widget(u"lockwo_basic"_ustr)) + , m_xWBasicWbctblCB(m_xBuilder->weld_check_button(u"wo_exec"_ustr)) + , m_xWBasicWbctblImg(m_xBuilder->weld_widget(u"lockwo_exec"_ustr)) + , m_xWBasicStgCB(m_xBuilder->weld_check_button(u"wo_saveorig"_ustr)) + , m_xWBasicStgImg(m_xBuilder->weld_widget(u"lockwo_saveorig"_ustr)) + , m_xEBasicCodeCB(m_xBuilder->weld_check_button(u"ex_basic"_ustr)) + , m_xEBasicCodeImg(m_xBuilder->weld_widget(u"lockex_basic"_ustr)) + , m_xEBasicExectblCB(m_xBuilder->weld_check_button(u"ex_exec"_ustr)) + , m_xEBasicExectblImg(m_xBuilder->weld_widget(u"lockex_exec"_ustr)) + , m_xEBasicStgCB(m_xBuilder->weld_check_button(u"ex_saveorig"_ustr)) + , m_xEBasicStgImg(m_xBuilder->weld_widget(u"lockex_saveorig"_ustr)) + , m_xPBasicCodeCB(m_xBuilder->weld_check_button(u"pp_basic"_ustr)) + , m_xPBasicCodeImg(m_xBuilder->weld_widget(u"lockpp_basic"_ustr)) + , m_xPBasicStgCB(m_xBuilder->weld_check_button(u"pp_saveorig"_ustr)) + , m_xPBasicStgImg(m_xBuilder->weld_widget(u"lockpp_saveorig"_ustr)) { m_xWBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl ) ); m_xEBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) ); @@ -86,7 +86,7 @@ std::unique_ptr<SfxTabPage> OfaMSFilterTabPage::Create( weld::Container* pPage, OUString OfaMSFilterTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr }; for (const auto& label : labels) { @@ -94,8 +94,8 @@ OUString OfaMSFilterTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "wo_basic", "wo_exec", "wo_saveorig", "ex_basic", - "ex_exec", "ex_saveorig", "pp_basic", "pp_saveorig" }; + OUString checkButton[] = { u"wo_basic"_ustr, u"wo_exec"_ustr, u"wo_saveorig"_ustr, u"ex_basic"_ustr, + u"ex_exec"_ustr, u"ex_saveorig"_ustr, u"pp_basic"_ustr, u"pp_saveorig"_ustr }; for (const auto& check : checkButton) { @@ -175,7 +175,7 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet* ) } OfaMSFilterTabPage2::OfaMSFilterTabPage2(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optfltrembedpage.ui", "OptFilterPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optfltrembedpage.ui"_ustr, u"OptFilterPage"_ustr, &rSet) , sChgToFromMath(CuiResId(RID_CUISTR_CHG_MATH)) , sChgToFromWriter(CuiResId(RID_CUISTR_CHG_WRITER)) , sChgToFromCalc(CuiResId(RID_CUISTR_CHG_CALC)) @@ -183,13 +183,13 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2(weld::Container* pPage, weld::DialogCon , sChgToFromSmartArt(CuiResId(RID_CUISTR_CHG_SMARTART)) , sChgToFromVisio(CuiResId(RID_CUISTR_CHG_VISIO)) , sChgToFromPDF(CuiResId(RID_CUISTR_CHG_PDF)) - , m_xCheckLB(m_xBuilder->weld_tree_view("checklbcontainer")) - , m_xHighlightingFT(m_xBuilder->weld_label("label5")) - , m_xHighlightingRB(m_xBuilder->weld_radio_button("highlighting")) - , m_xShadingRB(m_xBuilder->weld_radio_button("shading")) - , m_xShadingImg(m_xBuilder->weld_widget("lockbuttonbox1")) - , m_xMSOLockFileCB(m_xBuilder->weld_check_button("mso_lockfile")) - , m_xMSOLockFileImg(m_xBuilder->weld_widget("lockmso_lockfile")) + , m_xCheckLB(m_xBuilder->weld_tree_view(u"checklbcontainer"_ustr)) + , m_xHighlightingFT(m_xBuilder->weld_label(u"label5"_ustr)) + , m_xHighlightingRB(m_xBuilder->weld_radio_button(u"highlighting"_ustr)) + , m_xShadingRB(m_xBuilder->weld_radio_button(u"shading"_ustr)) + , m_xShadingImg(m_xBuilder->weld_widget(u"lockbuttonbox1"_ustr)) + , m_xMSOLockFileCB(m_xBuilder->weld_check_button(u"mso_lockfile"_ustr)) + , m_xMSOLockFileImg(m_xBuilder->weld_widget(u"lockmso_lockfile"_ustr)) { std::vector<int> aWidths { @@ -212,7 +212,7 @@ std::unique_ptr<SfxTabPage> OfaMSFilterTabPage2::Create( weld::Container* pPage, OUString OfaMSFilterTabPage2::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3", "label4", "label5", "label6" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr, u"label4"_ustr, u"label5"_ustr, u"label6"_ustr }; for (const auto& label : labels) { @@ -220,7 +220,7 @@ OUString OfaMSFilterTabPage2::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString radioButton[] = { "highlighting", "shading" }; + OUString radioButton[] = { u"highlighting"_ustr, u"shading"_ustr }; for (const auto& radio : radioButton) { diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index c449bc4a652e..7364ba963896 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -158,23 +158,23 @@ bool lcl_HasSystemFilePicker() } OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optgeneralpage.ui", "OptGeneralPage", &rSet) - , m_xExtHelpCB(m_xBuilder->weld_check_button("exthelp")) - , m_xExtHelpImg(m_xBuilder->weld_widget("lockexthelp")) - , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button("popupnohelp")) - , m_xPopUpNoHelpImg(m_xBuilder->weld_widget("lockpopupnohelp")) - , m_xShowTipOfTheDay(m_xBuilder->weld_check_button("cbShowTipOfTheDay")) - , m_xShowTipOfTheDayImg(m_xBuilder->weld_widget("lockcbShowTipOfTheDay")) - , m_xFileDlgFrame(m_xBuilder->weld_widget("filedlgframe")) - , m_xFileDlgROImage(m_xBuilder->weld_widget("lockimage")) - , m_xFileDlgCB(m_xBuilder->weld_check_button("filedlg")) - , m_xDocStatusCB(m_xBuilder->weld_check_button("docstatus")) - , m_xDocStatusImg(m_xBuilder->weld_widget("lockdocstatus")) - , m_xYearFrame(m_xBuilder->weld_widget("yearframe")) - , m_xYearLabel(m_xBuilder->weld_label("yearslabel")) - , m_xYearValueField(m_xBuilder->weld_spin_button("year")) - , m_xToYearFT(m_xBuilder->weld_label("toyear")) - , m_xYearFrameImg(m_xBuilder->weld_widget("lockyears")) + : SfxTabPage(pPage, pController, u"cui/ui/optgeneralpage.ui"_ustr, u"OptGeneralPage"_ustr, &rSet) + , m_xExtHelpCB(m_xBuilder->weld_check_button(u"exthelp"_ustr)) + , m_xExtHelpImg(m_xBuilder->weld_widget(u"lockexthelp"_ustr)) + , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button(u"popupnohelp"_ustr)) + , m_xPopUpNoHelpImg(m_xBuilder->weld_widget(u"lockpopupnohelp"_ustr)) + , m_xShowTipOfTheDay(m_xBuilder->weld_check_button(u"cbShowTipOfTheDay"_ustr)) + , m_xShowTipOfTheDayImg(m_xBuilder->weld_widget(u"lockcbShowTipOfTheDay"_ustr)) + , m_xFileDlgFrame(m_xBuilder->weld_widget(u"filedlgframe"_ustr)) + , m_xFileDlgROImage(m_xBuilder->weld_widget(u"lockimage"_ustr)) + , m_xFileDlgCB(m_xBuilder->weld_check_button(u"filedlg"_ustr)) + , m_xDocStatusCB(m_xBuilder->weld_check_button(u"docstatus"_ustr)) + , m_xDocStatusImg(m_xBuilder->weld_widget(u"lockdocstatus"_ustr)) + , m_xYearFrame(m_xBuilder->weld_widget(u"yearframe"_ustr)) + , m_xYearLabel(m_xBuilder->weld_label(u"yearslabel"_ustr)) + , m_xYearValueField(m_xBuilder->weld_spin_button(u"year"_ustr)) + , m_xToYearFT(m_xBuilder->weld_label(u"toyear"_ustr)) + , m_xYearFrameImg(m_xBuilder->weld_widget(u"lockyears"_ustr)) #if HAVE_FEATURE_BREAKPAD , m_xPrivacyFrame(m_xBuilder->weld_widget("privacyframe")) , m_xCrashReport(m_xBuilder->weld_check_button("crashreport")) @@ -222,8 +222,8 @@ std::unique_ptr<SfxTabPage> OfaMiscTabPage::Create( weld::Container* pPage, weld OUString OfaMiscTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label4", "label5", "yearslabel", - "toyear", "label7", "label8", "label9" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label4"_ustr, u"label5"_ustr, u"yearslabel"_ustr, + u"toyear"_ustr, u"label7"_ustr, u"label8"_ustr, u"label9"_ustr }; for (const auto& label : labels) { @@ -232,8 +232,8 @@ OUString OfaMiscTabPage::GetAllStrings() } OUString checkButton[] - = { "exthelp", "popupnohelp", "cbShowTipOfTheDay", "filedlg", - "docstatus", "crashreport", "quicklaunch", "cbPerformFileExtCheck" }; + = { u"exthelp"_ustr, u"popupnohelp"_ustr, u"cbShowTipOfTheDay"_ustr, u"filedlg"_ustr, + u"docstatus"_ustr, u"crashreport"_ustr, u"quicklaunch"_ustr, u"cbPerformFileExtCheck"_ustr }; for (const auto& check : checkButton) { @@ -241,7 +241,7 @@ OUString OfaMiscTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - if (const auto& pString = m_xBuilder->weld_button("assocfiles")) + if (const auto& pString = m_xBuilder->weld_button(u"assocfiles"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); @@ -445,21 +445,21 @@ CanvasSettings::CanvasSettings() : Sequence<Any> aArgs1(comphelper::InitAnyPropertySequence( { - {"nodepath", Any(OUString("/org.openoffice.Office.Canvas"))} + {"nodepath", Any(u"/org.openoffice.Office.Canvas"_ustr)} })); mxForceFlagNameAccess.set( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgs1 ), UNO_QUERY_THROW ); Sequence<Any> aArgs2(comphelper::InitAnyPropertySequence( { - {"nodepath", Any(OUString("/org.openoffice.Office.Canvas/CanvasServiceList"))} + {"nodepath", Any(u"/org.openoffice.Office.Canvas/CanvasServiceList"_ustr)} })); Reference<XNameAccess> xNameAccess( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs2 ), UNO_QUERY_THROW ); Reference<XHierarchicalNameAccess> xHierarchicalNameAccess( xNameAccess, UNO_QUERY_THROW); @@ -473,7 +473,7 @@ CanvasSettings::CanvasSettings() : if( xEntryNameAccess.is() ) { Sequence<OUString> preferredImplementations; - if( xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations ) + if( xEntryNameAccess->getByName(u"PreferredImplementations"_ustr) >>= preferredImplementations ) maAvailableImplementations.emplace_back(serviceName, preferredImplementations); } } @@ -503,7 +503,7 @@ bool CanvasSettings::IsHardwareAccelerationAvailable() const currImpl.trim() ), UNO_QUERY_THROW ); bool bHasAccel(false); - if( xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel ) + if( xPropSet->getPropertyValue(u"HardwareAcceleration"_ustr) >>= bHasAccel ) if( bHasAccel ) { mbHWAccelAvailable = true; @@ -526,7 +526,7 @@ bool CanvasSettings::IsHardwareAccelerationEnabled() const if( !mxForceFlagNameAccess.is() ) return true; - if( !(mxForceFlagNameAccess->getByName("ForceSafeServiceImpl") >>= bForceLastEntry) ) + if( !(mxForceFlagNameAccess->getByName(u"ForceSafeServiceImpl"_ustr) >>= bForceLastEntry) ) return true; return !bForceLastEntry; @@ -539,7 +539,7 @@ bool CanvasSettings::IsHardwareAccelerationRO() const return true; Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); - Property aProp = xInfo->getPropertyByName("ForceSafeServiceImpl"); + Property aProp = xInfo->getPropertyByName(u"ForceSafeServiceImpl"_ustr); return ((aProp.Attributes & css::beans::PropertyAttribute::READONLY ) == css::beans::PropertyAttribute::READONLY); } @@ -551,7 +551,7 @@ void CanvasSettings::EnabledHardwareAcceleration( bool _bEnabled ) const if( !xNameReplace.is() ) return; - xNameReplace->replaceByName( "ForceSafeServiceImpl", Any(!_bEnabled) ); + xNameReplace->replaceByName( u"ForceSafeServiceImpl"_ustr, Any(!_bEnabled) ); Reference< XChangesBatch > xChangesBatch( mxForceFlagNameAccess, UNO_QUERY ); @@ -570,51 +570,51 @@ static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, const v } OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optviewpage.ui", "OptViewPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optviewpage.ui"_ustr, u"OptViewPage"_ustr, &rSet) , nSizeLB_InitialSelection(0) , nSidebarSizeLB_InitialSelection(0) , nNotebookbarSizeLB_InitialSelection(0) , nStyleLB_InitialSelection(0) , pCanvasSettings(new CanvasSettings) - , m_xIconSizeLabel(m_xBuilder->weld_label("label14")) - , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize")) - , m_xIconSizeImg(m_xBuilder->weld_widget("lockiconsize")) - , m_xSidebarIconSizeLabel(m_xBuilder->weld_label("label9")) - , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize")) - , m_xSidebarIconSizeImg(m_xBuilder->weld_widget("locksidebariconsize")) - , m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label("label8")) - , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize")) - , m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget("locknotebookbariconsize")) - , m_xDarkModeFrame(m_xBuilder->weld_widget("darkmode")) - , m_xAppearanceStyleLabel(m_xBuilder->weld_label("label7")) - , m_xAppearanceStyleLB(m_xBuilder->weld_combo_box("appearance")) - , m_xAppearanceStyleImg(m_xBuilder->weld_widget("lockappearance")) - , m_xIconStyleLabel(m_xBuilder->weld_label("label6")) - , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle")) - , m_xIconStyleImg(m_xBuilder->weld_widget("lockiconstyle")) - , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont")) - , m_xFontAntiAliasingImg(m_xBuilder->weld_widget("lockaafont")) - , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom")) - , m_xAAPointLimitLabelImg(m_xBuilder->weld_widget("lockaafrom")) - , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", FieldUnit::PIXEL)) - , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview")) - , m_xFontShowImg(m_xBuilder->weld_widget("lockshowfontpreview")) - , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel")) - , m_xUseHardwareAccellImg(m_xBuilder->weld_widget("lockuseaccel")) - , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa")) - , m_xUseAntiAliaseImg(m_xBuilder->weld_widget("lockuseaa")) - , m_xUseSkia(m_xBuilder->weld_check_button("useskia")) - , m_xUseSkiaImg(m_xBuilder->weld_widget("lockuseskia")) - , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster")) - , m_xForceSkiaRasterImg(m_xBuilder->weld_widget("lockforceskiaraster")) - , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled")) - , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled")) - , m_xSkiaLog(m_xBuilder->weld_button("btnSkialog")) - , m_xMouseMiddleLabel(m_xBuilder->weld_label("label12")) - , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) - , m_xMouseMiddleImg(m_xBuilder->weld_widget("lockmousemiddle")) - , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) - , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) + , m_xIconSizeLabel(m_xBuilder->weld_label(u"label14"_ustr)) + , m_xIconSizeLB(m_xBuilder->weld_combo_box(u"iconsize"_ustr)) + , m_xIconSizeImg(m_xBuilder->weld_widget(u"lockiconsize"_ustr)) + , m_xSidebarIconSizeLabel(m_xBuilder->weld_label(u"label9"_ustr)) + , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box(u"sidebariconsize"_ustr)) + , m_xSidebarIconSizeImg(m_xBuilder->weld_widget(u"locksidebariconsize"_ustr)) + , m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label(u"label8"_ustr)) + , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box(u"notebookbariconsize"_ustr)) + , m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget(u"locknotebookbariconsize"_ustr)) + , m_xDarkModeFrame(m_xBuilder->weld_widget(u"darkmode"_ustr)) + , m_xAppearanceStyleLabel(m_xBuilder->weld_label(u"label7"_ustr)) + , m_xAppearanceStyleLB(m_xBuilder->weld_combo_box(u"appearance"_ustr)) + , m_xAppearanceStyleImg(m_xBuilder->weld_widget(u"lockappearance"_ustr)) + , m_xIconStyleLabel(m_xBuilder->weld_label(u"label6"_ustr)) + , m_xIconStyleLB(m_xBuilder->weld_combo_box(u"iconstyle"_ustr)) + , m_xIconStyleImg(m_xBuilder->weld_widget(u"lockiconstyle"_ustr)) + , m_xFontAntiAliasing(m_xBuilder->weld_check_button(u"aafont"_ustr)) + , m_xFontAntiAliasingImg(m_xBuilder->weld_widget(u"lockaafont"_ustr)) + , m_xAAPointLimitLabel(m_xBuilder->weld_label(u"aafrom"_ustr)) + , m_xAAPointLimitLabelImg(m_xBuilder->weld_widget(u"lockaafrom"_ustr)) + , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button(u"aanf"_ustr, FieldUnit::PIXEL)) + , m_xFontShowCB(m_xBuilder->weld_check_button(u"showfontpreview"_ustr)) + , m_xFontShowImg(m_xBuilder->weld_widget(u"lockshowfontpreview"_ustr)) + , m_xUseHardwareAccell(m_xBuilder->weld_check_button(u"useaccel"_ustr)) + , m_xUseHardwareAccellImg(m_xBuilder->weld_widget(u"lockuseaccel"_ustr)) + , m_xUseAntiAliase(m_xBuilder->weld_check_button(u"useaa"_ustr)) + , m_xUseAntiAliaseImg(m_xBuilder->weld_widget(u"lockuseaa"_ustr)) + , m_xUseSkia(m_xBuilder->weld_check_button(u"useskia"_ustr)) + , m_xUseSkiaImg(m_xBuilder->weld_widget(u"lockuseskia"_ustr)) + , m_xForceSkiaRaster(m_xBuilder->weld_check_button(u"forceskiaraster"_ustr)) + , m_xForceSkiaRasterImg(m_xBuilder->weld_widget(u"lockforceskiaraster"_ustr)) + , m_xSkiaStatusEnabled(m_xBuilder->weld_label(u"skiaenabled"_ustr)) + , m_xSkiaStatusDisabled(m_xBuilder->weld_label(u"skiadisabled"_ustr)) + , m_xSkiaLog(m_xBuilder->weld_button(u"btnSkialog"_ustr)) + , m_xMouseMiddleLabel(m_xBuilder->weld_label(u"label12"_ustr)) + , m_xMouseMiddleLB(m_xBuilder->weld_combo_box(u"mousemiddle"_ustr)) + , m_xMouseMiddleImg(m_xBuilder->weld_widget(u"lockmousemiddle"_ustr)) + , m_xMoreIcons(m_xBuilder->weld_button(u"btnMoreIcons"_ustr)) + , m_xRunGPTests(m_xBuilder->weld_button(u"btn_rungptest"_ustr)) , m_sAutoStr(m_xIconStyleLB->get_text(0)) { OUString sToolKitName(Application::GetToolkitName()); @@ -648,10 +648,10 @@ void OfaViewTabPage::UpdateIconThemes() const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; - m_xIconStyleLB->append("auto", entryForAuto); // index 0 means choose style automatically + m_xIconStyleLB->append(u"auto"_ustr, entryForAuto); // index 0 means choose style automatically // separate auto and other icon themes - m_xIconStyleLB->append_separator(""); + m_xIconStyleLB->append_separator(u""_ustr); for (auto const& installIconTheme : mInstalledIconThemes) m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); @@ -670,8 +670,8 @@ IMPL_LINK_NOARG(OfaViewTabPage, OnRunGPTestClick, weld::Button&, void) IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void) { css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue( - "AdditionsTag", OUString("Icons")) }; - comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); + u"AdditionsTag"_ustr, u"Icons"_ustr) }; + comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); } IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::Toggleable&, void ) @@ -756,9 +756,9 @@ std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld OUString OfaViewTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label16", "label7", "label1", "label6", "label15", - "label14", "label8", "label9", "label4", "label12", - "label2", "skiaenabled", "skiadisabled", "label5", "aafrom" }; + OUString labels[] = { u"label16"_ustr, u"label7"_ustr, u"label1"_ustr, u"label6"_ustr, u"label15"_ustr, + u"label14"_ustr, u"label8"_ustr, u"label9"_ustr, u"label4"_ustr, u"label12"_ustr, + u"label2"_ustr, u"skiaenabled"_ustr, u"skiadisabled"_ustr, u"label5"_ustr, u"aafrom"_ustr }; for (const auto& label : labels) { @@ -767,7 +767,7 @@ OUString OfaViewTabPage::GetAllStrings() } OUString checkButton[] - = { "useaccel", "useaa", "useskia", "forceskiaraster", "showfontpreview", "aafont" }; + = { u"useaccel"_ustr, u"useaa"_ustr, u"useskia"_ustr, u"forceskiaraster"_ustr, u"showfontpreview"_ustr, u"aafont"_ustr }; for (const auto& check : checkButton) { @@ -1152,34 +1152,34 @@ namespace } OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optlanguagespage.ui", "OptLanguagesPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optlanguagespage.ui"_ustr, u"OptLanguagesPage"_ustr, &rSet) , pLangConfig(new LanguageConfig_Impl) , m_bDatePatternsValid(false) - , m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface")) - , m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT")) - , m_xLocaleSettingLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("localesetting"))) - , m_xLocaleSettingImg(m_xBuilder->weld_widget("locklocalesetting")) - , m_xDecimalSeparatorFT(m_xBuilder->weld_label("label6")) - , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator")) - , m_xDecimalSeparatorImg(m_xBuilder->weld_widget("lockdecimalseparator")) - , m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency")) - , m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb")) - , m_xCurrencyImg(m_xBuilder->weld_widget("lockcurrencylb")) - , m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns")) - , m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns")) - , m_xDatePatternsImg(m_xBuilder->weld_widget("lockdatepatterns")) - , m_xWesternLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("westernlanguage"))) - , m_xWesternLanguageFT(m_xBuilder->weld_label("western")) - , m_xWesternLanguageImg(m_xBuilder->weld_widget("lockwesternlanguage")) - , m_xAsianLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("asianlanguage"))) - , m_xComplexLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("complexlanguage"))) - , m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc")) - , m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport")) - , m_xAsianSupportImg(m_xBuilder->weld_widget("lockasiansupport")) - , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport")) - , m_xCTLSupportImg(m_xBuilder->weld_widget("lockctlsupport")) - , m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange")) - , m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget("lockignorelanguagechange")) + , m_xUserInterfaceLB(m_xBuilder->weld_combo_box(u"userinterface"_ustr)) + , m_xLocaleSettingFT(m_xBuilder->weld_label(u"localesettingFT"_ustr)) + , m_xLocaleSettingLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"localesetting"_ustr))) + , m_xLocaleSettingImg(m_xBuilder->weld_widget(u"locklocalesetting"_ustr)) + , m_xDecimalSeparatorFT(m_xBuilder->weld_label(u"label6"_ustr)) + , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button(u"decimalseparator"_ustr)) + , m_xDecimalSeparatorImg(m_xBuilder->weld_widget(u"lockdecimalseparator"_ustr)) + , m_xCurrencyFT(m_xBuilder->weld_label(u"defaultcurrency"_ustr)) + , m_xCurrencyLB(m_xBuilder->weld_combo_box(u"currencylb"_ustr)) + , m_xCurrencyImg(m_xBuilder->weld_widget(u"lockcurrencylb"_ustr)) + , m_xDatePatternsFT(m_xBuilder->weld_label(u"dataaccpatterns"_ustr)) + , m_xDatePatternsED(m_xBuilder->weld_entry(u"datepatterns"_ustr)) + , m_xDatePatternsImg(m_xBuilder->weld_widget(u"lockdatepatterns"_ustr)) + , m_xWesternLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"westernlanguage"_ustr))) + , m_xWesternLanguageFT(m_xBuilder->weld_label(u"western"_ustr)) + , m_xWesternLanguageImg(m_xBuilder->weld_widget(u"lockwesternlanguage"_ustr)) + , m_xAsianLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"asianlanguage"_ustr))) + , m_xComplexLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"complexlanguage"_ustr))) + , m_xCurrentDocCB(m_xBuilder->weld_check_button(u"currentdoc"_ustr)) + , m_xAsianSupportCB(m_xBuilder->weld_check_button(u"asiansupport"_ustr)) + , m_xAsianSupportImg(m_xBuilder->weld_widget(u"lockasiansupport"_ustr)) + , m_xCTLSupportCB(m_xBuilder->weld_check_button(u"ctlsupport"_ustr)) + , m_xCTLSupportImg(m_xBuilder->weld_widget(u"lockctlsupport"_ustr)) + , m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button(u"ignorelanguagechange"_ustr)) + , m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget(u"lockignorelanguagechange"_ustr)) { // tdf#125483 save original default label m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label(); @@ -1191,15 +1191,15 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon " - " + SvtLanguageTable::GetLanguageString(GetInstalledLocaleForSystemUILanguage().getLanguageType()); - m_xUserInterfaceLB->append("0", aUILang); - m_xUserInterfaceLB->append_separator(""); + m_xUserInterfaceLB->append(u"0"_ustr, aUILang); + m_xUserInterfaceLB->append_separator(u""_ustr); try { Reference< XMultiServiceFactory > theConfigProvider( css::configuration::theDefaultProvider::get( comphelper::getProcessComponentContext())); // find out which locales are currently installed and add them to the listbox - Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(sInstalledLocalesPath))) }; + Sequence< Any > theArgs{ Any(NamedValue(u"nodepath"_ustr, Any(sInstalledLocalesPath))) }; Reference< XNameAccess > theNameAccess( theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW ); seqInstalledLanguages = theNameAccess->getElementNames(); @@ -1231,7 +1231,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon m_xUserInterfaceLB->set_active(0); // find out whether the user has a specific locale specified - Sequence< Any > theArgs2{ Any(NamedValue("nodepath", Any(sUserLocalePath))) }; + Sequence< Any > theArgs2{ Any(NamedValue(u"nodepath"_ustr, Any(sUserLocalePath))) }; theNameAccess.set( theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW ); if (theNameAccess->hasByName(sUserLocaleKey)) @@ -1275,12 +1275,12 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM ); // insert SYSTEM entry OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol(); - m_xCurrencyLB->append("default", aDefaultCurr); - m_xCurrencyLB->append_separator(""); + m_xCurrencyLB->append(u"default"_ustr, aDefaultCurr); + m_xCurrencyLB->append_separator(u""_ustr); - assert(m_xCurrencyLB->find_id("default") != -1); + assert(m_xCurrencyLB->find_id(u"default"_ustr) != -1); // all currencies - OUString aTwoSpace( " " ); + OUString aTwoSpace( u" "_ustr ); sal_uInt16 nCurrCount = rCurrTab.size(); std::vector< const NfCurrencyEntry* > aCurrencies; // first entry is SYSTEM, skip it @@ -1363,8 +1363,8 @@ OUString OfaLanguagesTabPage::GetAllStrings() { OUString sAllStrings; OUString labels[] - = { "label1", "label4", "label7", "localesettingFT", "defaultcurrency", - "label6", "dataaccpatterns", "label2", "western", "label3" }; + = { u"label1"_ustr, u"label4"_ustr, u"label7"_ustr, u"localesettingFT"_ustr, u"defaultcurrency"_ustr, + u"label6"_ustr, u"dataaccpatterns"_ustr, u"label2"_ustr, u"western"_ustr, u"label3"_ustr }; for (const auto& label : labels) { @@ -1372,8 +1372,8 @@ OUString OfaLanguagesTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "decimalseparator", "asiansupport", "ctlsupport", "currentdoc", - "ignorelanguagechange" }; + OUString checkButton[] = { u"decimalseparator"_ustr, u"asiansupport"_ustr, u"ctlsupport"_ustr, u"currentdoc"_ustr, + u"ignorelanguagechange"_ustr }; for (const auto& check : checkButton) { @@ -1427,7 +1427,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) Reference< XMultiServiceFactory > theConfigProvider( css::configuration::theDefaultProvider::get( comphelper::getProcessComponentContext())); - Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(sUserLocalePath))) }; + Sequence< Any > theArgs{ Any(NamedValue(u"nodepath"_ustr, Any(sUserLocalePath))) }; Reference< XPropertySet >xProp( theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW ); if ( m_sUserLocaleValue != aLangString) @@ -1666,7 +1666,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) pCurr = SvNumberFormatter::GetCurrencyEntry( aAbbrev, eLang ); } // if pCurr==nullptr the SYSTEM entry is selected - OUString sId = !pCurr ? OUString("default") : weld::toId(pCurr); + OUString sId = !pCurr ? u"default"_ustr : weld::toId(pCurr); m_xCurrencyLB->set_active_id(sId); bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Currency); m_xCurrencyLB->set_sensitive(!bReadonly); diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index d2cf40244d85..54963bb86c97 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -89,18 +89,18 @@ struct } const vRowInfo[] = { - { "lockcompanyft", "companyft", Lang::All }, - { "locknameft", "nameft", Lang::All & ~Lang::Russian & ~Lang::Eastern }, - { "lockrusnameft", "rusnameft", Lang::Russian }, - { "lockeastnameft", "eastnameft", Lang::Eastern }, - { "lockstreetft", "streetft", Lang::All & ~Lang::Russian }, - { "lockrusstreetft","russtreetft", Lang::Russian }, - { "lockicityft", "icityft", Lang::All & ~Lang::US }, - { "lockcityft", "cityft", Lang::US }, - { "lockcountryft", "countryft", Lang::All }, - { "locktitleft", "titleft", Lang::All }, - { "lockphoneft", "phoneft", Lang::All }, - { "lockfaxft", "faxft", Lang::All }, + { u"lockcompanyft"_ustr, u"companyft"_ustr, Lang::All }, + { u"locknameft"_ustr, u"nameft"_ustr, Lang::All & ~Lang::Russian & ~Lang::Eastern }, + { u"lockrusnameft"_ustr, u"rusnameft"_ustr, Lang::Russian }, + { u"lockeastnameft"_ustr, u"eastnameft"_ustr, Lang::Eastern }, + { u"lockstreetft"_ustr, u"streetft"_ustr, Lang::All & ~Lang::Russian }, + { u"lockrusstreetft"_ustr,u"russtreetft"_ustr, Lang::Russian }, + { u"lockicityft"_ustr, u"icityft"_ustr, Lang::All & ~Lang::US }, + { u"lockcityft"_ustr, u"cityft"_ustr, Lang::US }, + { u"lockcountryft"_ustr, u"countryft"_ustr, Lang::All }, + { u"locktitleft"_ustr, u"titleft"_ustr, Lang::All }, + { u"lockphoneft"_ustr, u"phoneft"_ustr, Lang::All }, + { u"lockfaxft"_ustr, u"faxft"_ustr, Lang::All }, }; @@ -121,43 +121,43 @@ struct const vFieldInfo[] = { // Company - { Row_Company, "company", UserOptToken::Company, EditPosition::COMPANY }, + { Row_Company, u"company"_ustr, UserOptToken::Company, EditPosition::COMPANY }, // Name - { Row_Name, "firstname", UserOptToken::FirstName, EditPosition::FIRSTNAME }, - { Row_Name, "lastname", UserOptToken::LastName, EditPosition::LASTNAME }, - { Row_Name, "shortname", UserOptToken::ID, EditPosition::SHORTNAME }, + { Row_Name, u"firstname"_ustr, UserOptToken::FirstName, EditPosition::FIRSTNAME }, + { Row_Name, u"lastname"_ustr, UserOptToken::LastName, EditPosition::LASTNAME }, + { Row_Name, u"shortname"_ustr, UserOptToken::ID, EditPosition::SHORTNAME }, // Name (russian) - { Row_Name_Russian, "ruslastname", UserOptToken::LastName, EditPosition::LASTNAME }, - { Row_Name_Russian, "rusfirstname", UserOptToken::FirstName, EditPosition::FIRSTNAME }, - { Row_Name_Russian, "rusfathersname", UserOptToken::FathersName, EditPosition::UNKNOWN }, - { Row_Name_Russian, "russhortname", UserOptToken::ID, EditPosition::SHORTNAME }, + { Row_Name_Russian, u"ruslastname"_ustr, UserOptToken::LastName, EditPosition::LASTNAME }, + { Row_Name_Russian, u"rusfirstname"_ustr, UserOptToken::FirstName, EditPosition::FIRSTNAME }, + { Row_Name_Russian, u"rusfathersname"_ustr, UserOptToken::FathersName, EditPosition::UNKNOWN }, + { Row_Name_Russian, u"russhortname"_ustr, UserOptToken::ID, EditPosition::SHORTNAME }, // Name (eastern: reversed name ord - { Row_Name_Eastern, "eastlastname", UserOptToken::LastName, EditPosition::LASTNAME }, - { Row_Name_Eastern, "eastfirstname", UserOptToken::FirstName, EditPosition::FIRSTNAME }, - { Row_Name_Eastern, "eastshortname", UserOptToken::ID, EditPosition::SHORTNAME }, + { Row_Name_Eastern, u"eastlastname"_ustr, UserOptToken::LastName, EditPosition::LASTNAME }, + { Row_Name_Eastern, u"eastfirstname"_ustr, UserOptToken::FirstName, EditPosition::FIRSTNAME }, + { Row_Name_Eastern, u"eastshortname"_ustr, UserOptToken::ID, EditPosition::SHORTNAME }, // Street - { Row_Street, "street", UserOptToken::Street, EditPosition::STREET }, + { Row_Street, u"street"_ustr, UserOptToken::Street, EditPosition::STREET }, // Street (russian) - { Row_Street_Russian, "russtreet", UserOptToken::Street, EditPosition::STREET }, - { Row_Street_Russian, "apartnum", UserOptToken::Apartment, EditPosition::UNKNOWN }, + { Row_Street_Russian, u"russtreet"_ustr, UserOptToken::Street, EditPosition::STREET }, + { Row_Street_Russian, u"apartnum"_ustr, UserOptToken::Apartment, EditPosition::UNKNOWN }, // City - { Row_City, "izip", UserOptToken::Zip, EditPosition::PLZ }, - { Row_City, "icity", UserOptToken::City, EditPosition::CITY }, + { Row_City, u"izip"_ustr, UserOptToken::Zip, EditPosition::PLZ }, + { Row_City, u"icity"_ustr, UserOptToken::City, EditPosition::CITY }, // City (US) - { Row_City_US, "city", UserOptToken::City, EditPosition::CITY }, - { Row_City_US, "state", UserOptToken::State, EditPosition::STATE }, - { Row_City_US, "zip", UserOptToken::Zip, EditPosition::PLZ }, + { Row_City_US, u"city"_ustr, UserOptToken::City, EditPosition::CITY }, + { Row_City_US, u"state"_ustr, UserOptToken::State, EditPosition::STATE }, + { Row_City_US, u"zip"_ustr, UserOptToken::Zip, EditPosition::PLZ }, // Country - { Row_Country, "country", UserOptToken::Country, EditPosition::COUNTRY }, + { Row_Country, u"country"_ustr, UserOptToken::Country, EditPosition::COUNTRY }, // Title/Position - { Row_TitlePos, "title", UserOptToken::Title, EditPosition::TITLE }, - { Row_TitlePos, "position", UserOptToken::Position, EditPosition::POSITION }, + { Row_TitlePos, u"title"_ustr, UserOptToken::Title, EditPosition::TITLE }, + { Row_TitlePos, u"position"_ustr, UserOptToken::Position, EditPosition::POSITION }, // Phone - { Row_Phone, "home", UserOptToken::TelephoneHome, EditPosition::TELPRIV }, - { Row_Phone, "work", UserOptToken::TelephoneWork, EditPosition::TELCOMPANY }, + { Row_Phone, u"home"_ustr, UserOptToken::TelephoneHome, EditPosition::TELPRIV }, + { Row_Phone, u"work"_ustr, UserOptToken::TelephoneWork, EditPosition::TELCOMPANY }, // Fax/Mail - { Row_FaxMail, "fax", UserOptToken::Fax, EditPosition::FAX }, - { Row_FaxMail, "email", UserOptToken::Email, EditPosition::EMAIL }, + { Row_FaxMail, u"fax"_ustr, UserOptToken::Fax, EditPosition::FAX }, + { Row_FaxMail, u"email"_ustr, UserOptToken::Email, EditPosition::EMAIL }, }; @@ -213,18 +213,18 @@ public: }; SvxGeneralTabPage::SvxGeneralTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) - : SfxTabPage(pPage, pController, "cui/ui/optuserpage.ui", "OptUserPage", &rCoreSet) - , m_xUseDataCB(m_xBuilder->weld_check_button("usefordocprop")) - , m_xUseDataImg(m_xBuilder->weld_widget("lockusefordocprop")) - , m_xCryptoFrame(m_xBuilder->weld_widget( "cryptography")) - , m_xSigningKeyLB(m_xBuilder->weld_combo_box("signingkey")) - , m_xSigningKeyFT(m_xBuilder->weld_label("signingkeylabel")) - , m_xSigningKeyImg(m_xBuilder->weld_widget("locksigningkey")) - , m_xEncryptionKeyLB(m_xBuilder->weld_combo_box("encryptionkey")) - , m_xEncryptionKeyFT(m_xBuilder->weld_label("encryptionkeylabel")) - , m_xEncryptionKeyImg(m_xBuilder->weld_widget("lockencryptionkey")) - , m_xEncryptToSelfCB(m_xBuilder->weld_check_button("encrypttoself")) - , m_xEncryptToSelfImg(m_xBuilder->weld_widget("lockencrypttoself")) + : SfxTabPage(pPage, pController, u"cui/ui/optuserpage.ui"_ustr, u"OptUserPage"_ustr, &rCoreSet) + , m_xUseDataCB(m_xBuilder->weld_check_button(u"usefordocprop"_ustr)) + , m_xUseDataImg(m_xBuilder->weld_widget(u"lockusefordocprop"_ustr)) + , m_xCryptoFrame(m_xBuilder->weld_widget( u"cryptography"_ustr)) + , m_xSigningKeyLB(m_xBuilder->weld_combo_box(u"signingkey"_ustr)) + , m_xSigningKeyFT(m_xBuilder->weld_label(u"signingkeylabel"_ustr)) + , m_xSigningKeyImg(m_xBuilder->weld_widget(u"locksigningkey"_ustr)) + , m_xEncryptionKeyLB(m_xBuilder->weld_combo_box(u"encryptionkey"_ustr)) + , m_xEncryptionKeyFT(m_xBuilder->weld_label(u"encryptionkeylabel"_ustr)) + , m_xEncryptionKeyImg(m_xBuilder->weld_widget(u"lockencryptionkey"_ustr)) + , m_xEncryptToSelfCB(m_xBuilder->weld_check_button(u"encrypttoself"_ustr)) + , m_xEncryptToSelfImg(m_xBuilder->weld_widget(u"lockencrypttoself"_ustr)) { InitControls(); #if HAVE_FEATURE_GPGME @@ -356,10 +356,10 @@ OUString SvxGeneralTabPage::GetAllStrings() { OUString sAllStrings; OUString labels[] - = { "label1", "companyft", "nameft", "rusnameft", - "eastnameft", "streetft", "russtreetft", "icityft", - "cityft", "countryft", "titleft", "phoneft", - "faxft", "cryptographylabel", "signingkeylabel", "encryptionkeylabel" }; + = { u"label1"_ustr, u"companyft"_ustr, u"nameft"_ustr, u"rusnameft"_ustr, + u"eastnameft"_ustr, u"streetft"_ustr, u"russtreetft"_ustr, u"icityft"_ustr, + u"cityft"_ustr, u"countryft"_ustr, u"titleft"_ustr, u"phoneft"_ustr, + u"faxft"_ustr, u"cryptographylabel"_ustr, u"signingkeylabel"_ustr, u"encryptionkeylabel"_ustr }; for (const auto& label : labels) { diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 6880ec4b2e33..f8d9619b1faf 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -24,39 +24,39 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/opthtmlpage.ui", "OptHtmlPage", &rSet) - , m_xSize1NF(m_xBuilder->weld_spin_button("size1")) - , m_xSize1Img(m_xBuilder->weld_widget("locksize1")) - , m_xSize2NF(m_xBuilder->weld_spin_button("size2")) - , m_xSize2Img(m_xBuilder->weld_widget("locksize2")) - , m_xSize3NF(m_xBuilder->weld_spin_button("size3")) - , m_xSize3Img(m_xBuilder->weld_widget("locksize3")) - , m_xSize4NF(m_xBuilder->weld_spin_button("size4")) - , m_xSize4Img(m_xBuilder->weld_widget("locksize4")) - , m_xSize5NF(m_xBuilder->weld_spin_button("size5")) - , m_xSize5Img(m_xBuilder->weld_widget("locksize5")) - , m_xSize6NF(m_xBuilder->weld_spin_button("size6")) - , m_xSize6Img(m_xBuilder->weld_widget("locksize6")) - , m_xSize7NF(m_xBuilder->weld_spin_button("size7")) - , m_xSize7Img(m_xBuilder->weld_widget("locksize7")) - , m_xNumbersEnglishUSCB(m_xBuilder->weld_check_button("numbersenglishus")) - , m_xNumbersEnglishUSImg(m_xBuilder->weld_widget("locknumbersenglishus")) - , m_xUnknownTagCB(m_xBuilder->weld_check_button("unknowntag")) - , m_xUnknownTagImg(m_xBuilder->weld_widget("lockunknowntag")) - , m_xIgnoreFontNamesCB(m_xBuilder->weld_check_button("ignorefontnames")) - , m_xIgnoreFontNamesImg(m_xBuilder->weld_widget("lockignorefontnames")) - , m_xStarBasicCB(m_xBuilder->weld_check_button("starbasic")) - , m_xStarBasicImg(m_xBuilder->weld_widget("lockstarbasic")) - , m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning")) - , m_xStarBasicWarningImg(m_xBuilder->weld_widget("lockstarbasicwarning")) - , m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension")) - , m_xPrintExtensionImg(m_xBuilder->weld_widget("lockprintextension")) - , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal")) - , m_xSaveGrfLocalImg(m_xBuilder->weld_widget("locksavegrflocal")) + : SfxTabPage(pPage, pController, u"cui/ui/opthtmlpage.ui"_ustr, u"OptHtmlPage"_ustr, &rSet) + , m_xSize1NF(m_xBuilder->weld_spin_button(u"size1"_ustr)) + , m_xSize1Img(m_xBuilder->weld_widget(u"locksize1"_ustr)) + , m_xSize2NF(m_xBuilder->weld_spin_button(u"size2"_ustr)) + , m_xSize2Img(m_xBuilder->weld_widget(u"locksize2"_ustr)) + , m_xSize3NF(m_xBuilder->weld_spin_button(u"size3"_ustr)) + , m_xSize3Img(m_xBuilder->weld_widget(u"locksize3"_ustr)) + , m_xSize4NF(m_xBuilder->weld_spin_button(u"size4"_ustr)) + , m_xSize4Img(m_xBuilder->weld_widget(u"locksize4"_ustr)) + , m_xSize5NF(m_xBuilder->weld_spin_button(u"size5"_ustr)) + , m_xSize5Img(m_xBuilder->weld_widget(u"locksize5"_ustr)) + , m_xSize6NF(m_xBuilder->weld_spin_button(u"size6"_ustr)) + , m_xSize6Img(m_xBuilder->weld_widget(u"locksize6"_ustr)) + , m_xSize7NF(m_xBuilder->weld_spin_button(u"size7"_ustr)) + , m_xSize7Img(m_xBuilder->weld_widget(u"locksize7"_ustr)) + , m_xNumbersEnglishUSCB(m_xBuilder->weld_check_button(u"numbersenglishus"_ustr)) + , m_xNumbersEnglishUSImg(m_xBuilder->weld_widget(u"locknumbersenglishus"_ustr)) + , m_xUnknownTagCB(m_xBuilder->weld_check_button(u"unknowntag"_ustr)) + , m_xUnknownTagImg(m_xBuilder->weld_widget(u"lockunknowntag"_ustr)) + , m_xIgnoreFontNamesCB(m_xBuilder->weld_check_button(u"ignorefontnames"_ustr)) + , m_xIgnoreFontNamesImg(m_xBuilder->weld_widget(u"lockignorefontnames"_ustr)) + , m_xStarBasicCB(m_xBuilder->weld_check_button(u"starbasic"_ustr)) + , m_xStarBasicImg(m_xBuilder->weld_widget(u"lockstarbasic"_ustr)) + , m_xStarBasicWarningCB(m_xBuilder->weld_check_button(u"starbasicwarning"_ustr)) + , m_xStarBasicWarningImg(m_xBuilder->weld_widget(u"lockstarbasicwarning"_ustr)) + , m_xPrintExtensionCB(m_xBuilder->weld_check_button(u"printextension"_ustr)) + , m_xPrintExtensionImg(m_xBuilder->weld_widget(u"lockprintextension"_ustr)) + , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button(u"savegrflocal"_ustr)) + , m_xSaveGrfLocalImg(m_xBuilder->weld_widget(u"locksavegrflocal"_ustr)) { // replace placeholder with UI string from language list OUString aText(m_xNumbersEnglishUSCB->get_label()); - OUString aPlaceholder("%ENGLISHUSLOCALE"); + OUString aPlaceholder(u"%ENGLISHUSLOCALE"_ustr); sal_Int32 nPos; if ((nPos = aText.indexOf( aPlaceholder)) != -1) { @@ -84,8 +84,8 @@ std::unique_ptr<SfxTabPage> OfaHtmlTabPage::Create( weld::Container* pPage, weld OUString OfaHtmlTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "label3", "size1FT", "size2FT", - "size3FT", "size4FT", "size5FT", "size6FT", "size7FT" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"label3"_ustr, u"size1FT"_ustr, u"size2FT"_ustr, + u"size3FT"_ustr, u"size4FT"_ustr, u"size5FT"_ustr, u"size6FT"_ustr, u"size7FT"_ustr }; for (const auto& label : labels) { @@ -93,8 +93,8 @@ OUString OfaHtmlTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "numbersenglishus", "unknowntag", "ignorefontnames", "starbasic", - "starbasicwarning", "printextension", "savegrflocal" }; + OUString checkButton[] = { u"numbersenglishus"_ustr, u"unknowntag"_ustr, u"ignorefontnames"_ustr, u"starbasic"_ustr, + u"starbasicwarning"_ustr, u"printextension"_ustr, u"savegrflocal"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index eaf0e8616bfd..3d16985a8c40 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -123,26 +123,26 @@ IMPL_STATIC_LINK(SvxProxyTabPage, NoSpaceTextFilterHdl, OUString&, rTest, bool) /* */ /********************************************************************/ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optproxypage.ui", "OptProxyPage", &rSet) - , m_xProxyModeFT(m_xBuilder->weld_label("label2")) - , m_xProxyModeLB(m_xBuilder->weld_combo_box("proxymode")) - , m_xProxyModeImg(m_xBuilder->weld_widget("lockproxymode")) - , m_xHttpProxyFT(m_xBuilder->weld_label("httpft")) - , m_xHttpProxyED(m_xBuilder->weld_entry("http")) - , m_xHttpProxyImg(m_xBuilder->weld_widget("lockhttp")) - , m_xHttpPortFT(m_xBuilder->weld_label("httpportft")) - , m_xHttpPortED(m_xBuilder->weld_entry("httpport")) - , m_xHttpPortImg(m_xBuilder->weld_widget("lockhttpport")) - , m_xHttpsProxyFT(m_xBuilder->weld_label("httpsft")) - , m_xHttpsProxyED(m_xBuilder->weld_entry("https")) - , m_xHttpsProxyImg(m_xBuilder->weld_widget("lockhttps")) - , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft")) - , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport")) - , m_xHttpsPortImg(m_xBuilder->weld_widget("lockhttpsport")) - , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft")) - , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy")) - , m_xNoProxyForImg(m_xBuilder->weld_widget("locknoproxy")) - , m_xNoProxyDescFT(m_xBuilder->weld_label("noproxydesc")) + : SfxTabPage(pPage, pController, u"cui/ui/optproxypage.ui"_ustr, u"OptProxyPage"_ustr, &rSet) + , m_xProxyModeFT(m_xBuilder->weld_label(u"label2"_ustr)) + , m_xProxyModeLB(m_xBuilder->weld_combo_box(u"proxymode"_ustr)) + , m_xProxyModeImg(m_xBuilder->weld_widget(u"lockproxymode"_ustr)) + , m_xHttpProxyFT(m_xBuilder->weld_label(u"httpft"_ustr)) + , m_xHttpProxyED(m_xBuilder->weld_entry(u"http"_ustr)) + , m_xHttpProxyImg(m_xBuilder->weld_widget(u"lockhttp"_ustr)) + , m_xHttpPortFT(m_xBuilder->weld_label(u"httpportft"_ustr)) + , m_xHttpPortED(m_xBuilder->weld_entry(u"httpport"_ustr)) + , m_xHttpPortImg(m_xBuilder->weld_widget(u"lockhttpport"_ustr)) + , m_xHttpsProxyFT(m_xBuilder->weld_label(u"httpsft"_ustr)) + , m_xHttpsProxyED(m_xBuilder->weld_entry(u"https"_ustr)) + , m_xHttpsProxyImg(m_xBuilder->weld_widget(u"lockhttps"_ustr)) + , m_xHttpsPortFT(m_xBuilder->weld_label(u"httpsportft"_ustr)) + , m_xHttpsPortED(m_xBuilder->weld_entry(u"httpsport"_ustr)) + , m_xHttpsPortImg(m_xBuilder->weld_widget(u"lockhttpsport"_ustr)) + , m_xNoProxyForFT(m_xBuilder->weld_label(u"noproxyft"_ustr)) + , m_xNoProxyForED(m_xBuilder->weld_entry(u"noproxy"_ustr)) + , m_xNoProxyForImg(m_xBuilder->weld_widget(u"locknoproxy"_ustr)) + , m_xNoProxyDescFT(m_xBuilder->weld_label(u"noproxydesc"_ustr)) { m_xHttpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl)); m_xHttpPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl)); @@ -164,12 +164,12 @@ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, weld::DialogController* beans::NamedValue aProperty; aProperty.Name = "nodepath"; - aProperty.Value <<= OUString( "org.openoffice.Inet/Settings" ); + aProperty.Value <<= u"org.openoffice.Inet/Settings"_ustr; Sequence< Any > aArgumentList{ Any(aProperty) }; m_xConfigurationUpdateAccess = xConfigurationProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgumentList ); } @@ -201,7 +201,7 @@ void SvxProxyTabPage::ReadConfigData_Impl() m_xHttpPortED->set_text( OUString::number( nIntValue )); } else - m_xHttpPortED->set_text( "" ); + m_xHttpPortED->set_text( u""_ustr ); m_xHttpsProxyED->set_text( officecfg::Inet::Settings::ooInetHTTPSProxyName::get() ); x = officecfg::Inet::Settings::ooInetHTTPSProxyPort::get(); @@ -211,7 +211,7 @@ void SvxProxyTabPage::ReadConfigData_Impl() m_xHttpsPortED->set_text( OUString::number( nIntValue )); } else - m_xHttpsPortED->set_text( "" ); + m_xHttpsPortED->set_text( u""_ustr ); m_xNoProxyForED->set_text( officecfg::Inet::Settings::ooInetNoProxy::get() ); } @@ -311,8 +311,8 @@ void SvxProxyTabPage::Reset(const SfxItemSet*) OUString SvxProxyTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "httpft", "httpsft", - "noproxyft", "httpportft", "httpsportft", "noproxydesc" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"httpft"_ustr, u"httpsft"_ustr, + u"noproxyft"_ustr, u"httpportft"_ustr, u"httpsportft"_ustr, u"noproxydesc"_ustr }; for (const auto& label : labels) { @@ -458,30 +458,30 @@ IMPL_STATIC_LINK(SvxProxyTabPage, LoseFocusHdl_Impl, weld::Widget&, rControl, vo /* */ /********************************************************************/ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optsecuritypage.ui", "OptSecurityPage", &rSet) - , m_xSecurityOptionsPB(m_xBuilder->weld_button("options")) - , m_xSavePasswordsCB(m_xBuilder->weld_check_button("savepassword")) - , m_xSavePasswordsImg(m_xBuilder->weld_widget("locksavepassword")) - , m_xShowConnectionsPB(m_xBuilder->weld_button("connections")) - , m_xMasterPasswordCB(m_xBuilder->weld_check_button("usemasterpassword")) - , m_xMasterPasswordImg(m_xBuilder->weld_widget("lockusemasterpassword")) - , m_xMasterPasswordFT(m_xBuilder->weld_label("masterpasswordtext")) - , m_xMasterPasswordPB(m_xBuilder->weld_button("masterpassword")) - , m_xMacroSecFrame(m_xBuilder->weld_container("macrosecurity")) - , m_xMacroSecPB(m_xBuilder->weld_button("macro")) - , m_xCertFrame(m_xBuilder->weld_container("certificatepath")) - , m_xCertPathPB(m_xBuilder->weld_button("cert")) - , m_xCertPathImg(m_xBuilder->weld_widget("lockcertipath")) - , m_xCertPathLabel(m_xBuilder->weld_label("label7")) - , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls")) - , m_xTSAURLsPB(m_xBuilder->weld_button("tsas")) - , m_xTSAURLsImg(m_xBuilder->weld_widget("locktsas")) - , m_xTSAURLsLabel(m_xBuilder->weld_label("label9")) - , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave")) - , m_xCertMgrPathLB(m_xBuilder->weld_button("browse")) - , m_xParameterEdit(m_xBuilder->weld_entry("parameterfield")) - , m_xCertMgrPathImg(m_xBuilder->weld_widget("lockcertimanager")) - , m_xCertMgrPathLabel(m_xBuilder->weld_label("label11")) + : SfxTabPage(pPage, pController, u"cui/ui/optsecuritypage.ui"_ustr, u"OptSecurityPage"_ustr, &rSet) + , m_xSecurityOptionsPB(m_xBuilder->weld_button(u"options"_ustr)) + , m_xSavePasswordsCB(m_xBuilder->weld_check_button(u"savepassword"_ustr)) + , m_xSavePasswordsImg(m_xBuilder->weld_widget(u"locksavepassword"_ustr)) + , m_xShowConnectionsPB(m_xBuilder->weld_button(u"connections"_ustr)) + , m_xMasterPasswordCB(m_xBuilder->weld_check_button(u"usemasterpassword"_ustr)) + , m_xMasterPasswordImg(m_xBuilder->weld_widget(u"lockusemasterpassword"_ustr)) + , m_xMasterPasswordFT(m_xBuilder->weld_label(u"masterpasswordtext"_ustr)) + , m_xMasterPasswordPB(m_xBuilder->weld_button(u"masterpassword"_ustr)) + , m_xMacroSecFrame(m_xBuilder->weld_container(u"macrosecurity"_ustr)) + , m_xMacroSecPB(m_xBuilder->weld_button(u"macro"_ustr)) + , m_xCertFrame(m_xBuilder->weld_container(u"certificatepath"_ustr)) + , m_xCertPathPB(m_xBuilder->weld_button(u"cert"_ustr)) + , m_xCertPathImg(m_xBuilder->weld_widget(u"lockcertipath"_ustr)) + , m_xCertPathLabel(m_xBuilder->weld_label(u"label7"_ustr)) + , m_xTSAURLsFrame(m_xBuilder->weld_container(u"tsaurls"_ustr)) + , m_xTSAURLsPB(m_xBuilder->weld_button(u"tsas"_ustr)) + , m_xTSAURLsImg(m_xBuilder->weld_widget(u"locktsas"_ustr)) + , m_xTSAURLsLabel(m_xBuilder->weld_label(u"label9"_ustr)) + , m_xNoPasswordSaveFT(m_xBuilder->weld_label(u"nopasswordsave"_ustr)) + , m_xCertMgrPathLB(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xParameterEdit(m_xBuilder->weld_entry(u"parameterfield"_ustr)) + , m_xCertMgrPathImg(m_xBuilder->weld_widget(u"lockcertimanager"_ustr)) + , m_xCertMgrPathLabel(m_xBuilder->weld_label(u"label11"_ustr)) { //fdo#65595, we need height-for-width support here, but for now we can //bodge it @@ -836,10 +836,10 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet ) OUString SvxSecurityTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label4", "label2", "masterpasswordtext", - "nopasswordsave", "label3", "label5", "label8", - "label7", "label10", "label9", "label12", - "label11" }; + OUString labels[] = { u"label1"_ustr, u"label4"_ustr, u"label2"_ustr, u"masterpasswordtext"_ustr, + u"nopasswordsave"_ustr, u"label3"_ustr, u"label5"_ustr, u"label8"_ustr, + u"label7"_ustr, u"label10"_ustr, u"label9"_ustr, u"label12"_ustr, + u"label11"_ustr }; for (const auto& label : labels) { @@ -847,7 +847,7 @@ OUString SvxSecurityTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "savepassword", "usemasterpassword" }; + OUString checkButton[] = { u"savepassword"_ustr, u"usemasterpassword"_ustr }; for (const auto& check : checkButton) { @@ -857,7 +857,7 @@ OUString SvxSecurityTabPage::GetAllStrings() // TODO: Should we exclude button strings from the search? // button id: "browse" is excluded - OUString buttons[] = { "options", "connections", "masterpassword", "macro", "cert", "tsas" }; + OUString buttons[] = { u"options"_ustr, u"connections"_ustr, u"masterpassword"_ustr, u"macro"_ustr, u"cert"_ustr, u"tsas"_ustr }; for (const auto& btn : buttons) { @@ -913,16 +913,16 @@ struct SvxEMailTabPage_Impl }; SvxEMailTabPage::SvxEMailTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage( pPage, pController, "cui/ui/optemailpage.ui", "OptEmailPage", &rSet) + : SfxTabPage( pPage, pController, u"cui/ui/optemailpage.ui"_ustr, u"OptEmailPage"_ustr, &rSet) , pImpl(new SvxEMailTabPage_Impl) - , m_xMailContainer(m_xBuilder->weld_container("program")) - , m_xMailerURLFI(m_xBuilder->weld_image("lockemail")) - , m_xMailerURLED(m_xBuilder->weld_entry("url")) - , m_xMailerURLPB(m_xBuilder->weld_button("browse")) - , m_xSuppressHiddenContainer(m_xBuilder->weld_container("suppressHiddenCont")) - , m_xSuppressHiddenFI(m_xBuilder->weld_image("lockSuppressHidden")) - , m_xSuppressHidden(m_xBuilder->weld_check_button("suppressHidden")) - , m_xDefaultFilterFT(m_xBuilder->weld_label("browsetitle")) + , m_xMailContainer(m_xBuilder->weld_container(u"program"_ustr)) + , m_xMailerURLFI(m_xBuilder->weld_image(u"lockemail"_ustr)) + , m_xMailerURLED(m_xBuilder->weld_entry(u"url"_ustr)) + , m_xMailerURLPB(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xSuppressHiddenContainer(m_xBuilder->weld_container(u"suppressHiddenCont"_ustr)) + , m_xSuppressHiddenFI(m_xBuilder->weld_image(u"lockSuppressHidden"_ustr)) + , m_xSuppressHidden(m_xBuilder->weld_check_button(u"suppressHidden"_ustr)) + , m_xDefaultFilterFT(m_xBuilder->weld_label(u"browsetitle"_ustr)) { m_sDefaultFilterName = m_xDefaultFilterFT->get_label(); m_xMailerURLPB->connect_clicked( LINK( this, SvxEMailTabPage, FileDialogHdl_Impl ) ); @@ -946,7 +946,7 @@ std::unique_ptr<SfxTabPage> SvxEMailTabPage::Create( weld::Container* pPage, wel OUString SvxEMailTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "browsetitle", "suppress" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"browsetitle"_ustr, u"suppress"_ustr }; for (const auto& label : labels) { @@ -1018,7 +1018,7 @@ IMPL_LINK_NOARG(SvxEMailTabPage, FileDialogHdl_Impl, weld::Button&, void) OUString sUrl; osl::FileBase::getFileURLFromSystemPath(sPath, sUrl); aHelper.SetDisplayDirectory(sUrl); - aHelper.AddFilter( m_sDefaultFilterName, "*"); + aHelper.AddFilter( m_sDefaultFilterName, u"*"_ustr); if ( ERRCODE_NONE == aHelper.Execute() ) { diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index cc89865bdd28..323fb34d3b6b 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -64,22 +64,22 @@ using namespace ::com::sun::star::uno; // class SvxJavaOptionsPage ---------------------------------------------- SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optadvancedpage.ui", "OptAdvancedPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optadvancedpage.ui"_ustr, u"OptAdvancedPage"_ustr, &rSet) , m_aResetIdle("cui options SvxJavaOptionsPage Reset") , xDialogListener(new ::svt::DialogClosedListener()) - , m_xJavaEnableCB(m_xBuilder->weld_check_button("javaenabled")) - , m_xJavaList(m_xBuilder->weld_tree_view("javas")) - , m_xJavaPathText(m_xBuilder->weld_label("javapath")) - , m_xAddBtn(m_xBuilder->weld_button("add")) - , m_xParameterBtn(m_xBuilder->weld_button("parameters")) - , m_xClassPathBtn(m_xBuilder->weld_button("classpath")) - , m_xExpertConfigBtn(m_xBuilder->weld_button("expertconfig")) - , m_xExperimentalCB(m_xBuilder->weld_check_button("experimental")) - , m_xExperimentalImg(m_xBuilder->weld_widget("lockexperimental")) - , m_xMacroCB(m_xBuilder->weld_check_button("macrorecording")) - , m_xMacroImg(m_xBuilder->weld_widget("lockmacrorecording")) - , m_xAddDialogText(m_xBuilder->weld_label("selectruntime")) - , m_xJavaFrame(m_xBuilder->weld_widget("javaframe")) + , m_xJavaEnableCB(m_xBuilder->weld_check_button(u"javaenabled"_ustr)) + , m_xJavaList(m_xBuilder->weld_tree_view(u"javas"_ustr)) + , m_xJavaPathText(m_xBuilder->weld_label(u"javapath"_ustr)) + , m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr)) + , m_xParameterBtn(m_xBuilder->weld_button(u"parameters"_ustr)) + , m_xClassPathBtn(m_xBuilder->weld_button(u"classpath"_ustr)) + , m_xExpertConfigBtn(m_xBuilder->weld_button(u"expertconfig"_ustr)) + , m_xExperimentalCB(m_xBuilder->weld_check_button(u"experimental"_ustr)) + , m_xExperimentalImg(m_xBuilder->weld_widget(u"lockexperimental"_ustr)) + , m_xMacroCB(m_xBuilder->weld_check_button(u"macrorecording"_ustr)) + , m_xMacroImg(m_xBuilder->weld_widget(u"lockmacrorecording"_ustr)) + , m_xAddDialogText(m_xBuilder->weld_label(u"selectruntime"_ustr)) + , m_xJavaFrame(m_xBuilder->weld_widget(u"javaframe"_ustr)) { m_sInstallText = m_xJavaPathText->get_label(); m_sAddDialogText = m_xAddDialogText->get_label(); @@ -94,7 +94,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* pPage, weld::DialogContr std::vector<int> aWidths { m_xJavaList->get_checkbox_column_width(), - o3tl::narrowing<int>(m_xJavaList->get_pixel_size("Sun Microsystems Inc.").Width()) + o3tl::narrowing<int>(m_xJavaList->get_pixel_size(u"Sun Microsystems Inc."_ustr).Width()) }; m_xJavaList->set_column_fixed_widths(aWidths); @@ -476,7 +476,7 @@ std::unique_ptr<SfxTabPage> SvxJavaOptionsPage::Create(weld::Container* pPage, w OUString SvxJavaOptionsPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "javapath", "selectruntime", "label12" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"javapath"_ustr, u"selectruntime"_ustr, u"label12"_ustr }; for (const auto& label : labels) { @@ -484,7 +484,7 @@ OUString SvxJavaOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "javaenabled", "experimental", "macrorecording" }; + OUString checkButton[] = { u"javaenabled"_ustr, u"experimental"_ustr, u"macrorecording"_ustr }; for (const auto& check : checkButton) { @@ -492,7 +492,7 @@ OUString SvxJavaOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString buttons[] = { "add", "parameters", "classpath", "expertconfig" }; + OUString buttons[] = { u"add"_ustr, u"parameters"_ustr, u"classpath"_ustr, u"expertconfig"_ustr }; for (const auto& btn : buttons) { @@ -638,13 +638,13 @@ void SvxJavaOptionsPage::FillUserData() // class SvxJavaParameterDlg --------------------------------------------- SvxJavaParameterDlg::SvxJavaParameterDlg(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/javastartparametersdialog.ui", - "JavaStartParameters") - , m_xParameterEdit(m_xBuilder->weld_entry("parameterfield")) - , m_xAssignBtn(m_xBuilder->weld_button("assignbtn")) - , m_xAssignedList(m_xBuilder->weld_tree_view("assignlist")) - , m_xRemoveBtn(m_xBuilder->weld_button("removebtn")) - , m_xEditBtn(m_xBuilder->weld_button("editbtn")) + : GenericDialogController(pParent, u"cui/ui/javastartparametersdialog.ui"_ustr, + u"JavaStartParameters"_ustr) + , m_xParameterEdit(m_xBuilder->weld_entry(u"parameterfield"_ustr)) + , m_xAssignBtn(m_xBuilder->weld_button(u"assignbtn"_ustr)) + , m_xAssignedList(m_xBuilder->weld_tree_view(u"assignlist"_ustr)) + , m_xRemoveBtn(m_xBuilder->weld_button(u"removebtn"_ustr)) + , m_xEditBtn(m_xBuilder->weld_button(u"editbtn"_ustr)) { m_xAssignedList->set_size_request(m_xAssignedList->get_approximate_digit_width() * 54, m_xAssignedList->get_height_rows(6)); @@ -803,11 +803,11 @@ void SvxJavaParameterDlg::SetParameters( std::vector< OUString > const & rParams // class SvxJavaClassPathDlg --------------------------------------------- SvxJavaClassPathDlg::SvxJavaClassPathDlg(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/javaclasspathdialog.ui", "JavaClassPath") - , m_xPathList(m_xBuilder->weld_tree_view("paths")) - , m_xAddArchiveBtn(m_xBuilder->weld_button("archive")) - , m_xAddPathBtn(m_xBuilder->weld_button("folder")) - , m_xRemoveBtn(m_xBuilder->weld_button("remove")) + : GenericDialogController(pParent, u"cui/ui/javaclasspathdialog.ui"_ustr, u"JavaClassPath"_ustr) + , m_xPathList(m_xBuilder->weld_tree_view(u"paths"_ustr)) + , m_xAddArchiveBtn(m_xBuilder->weld_button(u"archive"_ustr)) + , m_xAddPathBtn(m_xBuilder->weld_button(u"folder"_ustr)) + , m_xRemoveBtn(m_xBuilder->weld_button(u"remove"_ustr)) { m_xPathList->set_size_request(m_xPathList->get_approximate_digit_width() * 54, m_xPathList->get_height_rows(8)); @@ -828,7 +828,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, weld::Button&, void) { sfx2::FileDialogHelper aDlg(TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, m_xDialog.get()); aDlg.SetTitle( CuiResId( RID_CUISTR_ARCHIVE_TITLE ) ); - aDlg.AddFilter( CuiResId( RID_CUISTR_ARCHIVE_HEADLINE ), "*.jar;*.zip" ); + aDlg.AddFilter( CuiResId( RID_CUISTR_ARCHIVE_HEADLINE ), u"*.jar;*.zip"_ustr ); aDlg.SetContext(sfx2::FileDialogHelper::JavaClassPath); OUString sFolder; if (m_xPathList->count_selected_rows() > 0) @@ -847,7 +847,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, weld::Button&, void) INetURLObject aURL( sURL ); if ( !IsPathDuplicate( sFile ) ) { - m_xPathList->append("", sFile, SvFileInformationManager::GetImageId(aURL)); + m_xPathList->append(u""_ustr, sFile, SvFileInformationManager::GetImageId(aURL)); m_xPathList->select(m_xPathList->n_children() - 1); } else @@ -895,7 +895,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, weld::Button&, void) { if ( !IsPathDuplicate( sNewFolder ) ) { - m_xPathList->append("", sNewFolder, SvFileInformationManager::GetImageId(aURL)); + m_xPathList->append(u""_ustr, sNewFolder, SvFileInformationManager::GetImageId(aURL)); m_xPathList->select(m_xPathList->n_children() - 1); } else @@ -993,7 +993,7 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath ) osl::FileBase::getFileURLFromSystemPath(path, sURL); } INetURLObject aURL( sURL ); - m_xPathList->append("", path, SvFileInformationManager::GetImageId(aURL)); + m_xPathList->append(u""_ustr, path, SvFileInformationManager::GetImageId(aURL)); } // select first entry m_xPathList->select(0); diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index 3c313338a021..34c4faf149c6 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -24,26 +24,26 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optjsearchpage.ui", "OptJSearchPage", &rSet) - , m_xMatchCase(m_xBuilder->weld_check_button("matchcase")) - , m_xMatchFullHalfWidth(m_xBuilder->weld_check_button("matchfullhalfwidth")) - , m_xMatchHiraganaKatakana(m_xBuilder->weld_check_button("matchhiraganakatakana")) - , m_xMatchContractions(m_xBuilder->weld_check_button("matchcontractions")) - , m_xMatchMinusDashChoon(m_xBuilder->weld_check_button("matchminusdashchoon")) - , m_xMatchRepeatCharMarks(m_xBuilder->weld_check_button("matchrepeatcharmarks")) - , m_xMatchVariantFormKanji(m_xBuilder->weld_check_button("matchvariantformkanji")) - , m_xMatchOldKanaForms(m_xBuilder->weld_check_button("matcholdkanaforms")) - , m_xMatchDiziDuzu(m_xBuilder->weld_check_button("matchdiziduzu")) - , m_xMatchBavaHafa(m_xBuilder->weld_check_button("matchbavahafa")) - , m_xMatchTsithichiDhizi(m_xBuilder->weld_check_button("matchtsithichidhizi")) - , m_xMatchHyuiyuByuvyu(m_xBuilder->weld_check_button("matchhyuiyubyuvyu")) - , m_xMatchSesheZeje(m_xBuilder->weld_check_button("matchseshezeje")) - , m_xMatchIaiya(m_xBuilder->weld_check_button("matchiaiya")) - , m_xMatchKiku(m_xBuilder->weld_check_button("matchkiku")) - , m_xMatchProlongedSoundMark(m_xBuilder->weld_check_button("matchprolongedsoundmark")) - , m_xIgnorePunctuation(m_xBuilder->weld_check_button("ignorepunctuation")) - , m_xIgnoreWhitespace(m_xBuilder->weld_check_button("ignorewhitespace")) - , m_xIgnoreMiddleDot(m_xBuilder->weld_check_button("ignoremiddledot")) + : SfxTabPage(pPage, pController, u"cui/ui/optjsearchpage.ui"_ustr, u"OptJSearchPage"_ustr, &rSet) + , m_xMatchCase(m_xBuilder->weld_check_button(u"matchcase"_ustr)) + , m_xMatchFullHalfWidth(m_xBuilder->weld_check_button(u"matchfullhalfwidth"_ustr)) + , m_xMatchHiraganaKatakana(m_xBuilder->weld_check_button(u"matchhiraganakatakana"_ustr)) + , m_xMatchContractions(m_xBuilder->weld_check_button(u"matchcontractions"_ustr)) + , m_xMatchMinusDashChoon(m_xBuilder->weld_check_button(u"matchminusdashchoon"_ustr)) + , m_xMatchRepeatCharMarks(m_xBuilder->weld_check_button(u"matchrepeatcharmarks"_ustr)) + , m_xMatchVariantFormKanji(m_xBuilder->weld_check_button(u"matchvariantformkanji"_ustr)) + , m_xMatchOldKanaForms(m_xBuilder->weld_check_button(u"matcholdkanaforms"_ustr)) + , m_xMatchDiziDuzu(m_xBuilder->weld_check_button(u"matchdiziduzu"_ustr)) + , m_xMatchBavaHafa(m_xBuilder->weld_check_button(u"matchbavahafa"_ustr)) + , m_xMatchTsithichiDhizi(m_xBuilder->weld_check_button(u"matchtsithichidhizi"_ustr)) + , m_xMatchHyuiyuByuvyu(m_xBuilder->weld_check_button(u"matchhyuiyubyuvyu"_ustr)) + , m_xMatchSesheZeje(m_xBuilder->weld_check_button(u"matchseshezeje"_ustr)) + , m_xMatchIaiya(m_xBuilder->weld_check_button(u"matchiaiya"_ustr)) + , m_xMatchKiku(m_xBuilder->weld_check_button(u"matchkiku"_ustr)) + , m_xMatchProlongedSoundMark(m_xBuilder->weld_check_button(u"matchprolongedsoundmark"_ustr)) + , m_xIgnorePunctuation(m_xBuilder->weld_check_button(u"ignorepunctuation"_ustr)) + , m_xIgnoreWhitespace(m_xBuilder->weld_check_button(u"ignorewhitespace"_ustr)) + , m_xIgnoreMiddleDot(m_xBuilder->weld_check_button(u"ignoremiddledot"_ustr)) , nTransliterationFlags(TransliterationFlags::NONE) , bSaveOptions(true) { @@ -202,7 +202,7 @@ void SvxJSearchOptionsPage::Reset( const SfxItemSet* ) OUString SvxJSearchOptionsPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr }; for (const auto& label : labels) { @@ -210,25 +210,25 @@ OUString SvxJSearchOptionsPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "matchcase", - "matchfullhalfwidth", - "matchhiraganakatakana", - "matchcontractions", - "matchminusdashchoon", - "matchrepeatcharmarks", - "matchvariantformkanji", - "matcholdkanaforms", - "ignorepunctuation", - "ignorewhitespace", - "matchdiziduzu", - "matchbavahafa", - "matchtsithichidhizi", - "matchhyuiyubyuvyu", - "matchseshezeje", - "matchiaiya", - "matchkiku", - "matchprolongedsoundmark", - "ignoremiddledot" }; + OUString checkButton[] = { u"matchcase"_ustr, + u"matchfullhalfwidth"_ustr, + u"matchhiraganakatakana"_ustr, + u"matchcontractions"_ustr, + u"matchminusdashchoon"_ustr, + u"matchrepeatcharmarks"_ustr, + u"matchvariantformkanji"_ustr, + u"matcholdkanaforms"_ustr, + u"ignorepunctuation"_ustr, + u"ignorewhitespace"_ustr, + u"matchdiziduzu"_ustr, + u"matchbavahafa"_ustr, + u"matchtsithichidhizi"_ustr, + u"matchhyuiyubyuvyu"_ustr, + u"matchseshezeje"_ustr, + u"matchiaiya"_ustr, + u"matchkiku"_ustr, + u"matchprolongedsoundmark"_ustr, + u"ignoremiddledot"_ustr }; for (const auto& check : checkButton) { diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 3979b42c0521..0f3636ebec46 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -30,20 +30,21 @@ constexpr OUString LANGUAGETOOLPLUS_DEFAULT_URL = u"https://api.languagetoolplus OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/langtoolconfigpage.ui", "OptLangToolPage", &rSet) - , m_xBaseURLED(m_xBuilder->weld_entry("baseurl")) - , m_xBaseURLImg(m_xBuilder->weld_widget("lockbaseurl")) - , m_xUsernameED(m_xBuilder->weld_entry("username")) - , m_xUsernameImg(m_xBuilder->weld_widget("lockusername")) - , m_xApiKeyED(m_xBuilder->weld_entry("apikey")) - , m_xApiKeyImg(m_xBuilder->weld_widget("lockapikey")) - , m_xRestProtocol(m_xBuilder->weld_entry("restprotocol")) - , m_xRestProtocolImg(m_xBuilder->weld_widget("lockrestprotocol")) - , m_xActivateBox(m_xBuilder->weld_check_button("activate")) - , m_xActivateBoxImg(m_xBuilder->weld_widget("lockactivate")) - , m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl")) - , m_xSSLDisableVerificationBoxImg(m_xBuilder->weld_widget("lockverifyssl")) - , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings")) + : SfxTabPage(pPage, pController, u"cui/ui/langtoolconfigpage.ui"_ustr, u"OptLangToolPage"_ustr, + &rSet) + , m_xBaseURLED(m_xBuilder->weld_entry(u"baseurl"_ustr)) + , m_xBaseURLImg(m_xBuilder->weld_widget(u"lockbaseurl"_ustr)) + , m_xUsernameED(m_xBuilder->weld_entry(u"username"_ustr)) + , m_xUsernameImg(m_xBuilder->weld_widget(u"lockusername"_ustr)) + , m_xApiKeyED(m_xBuilder->weld_entry(u"apikey"_ustr)) + , m_xApiKeyImg(m_xBuilder->weld_widget(u"lockapikey"_ustr)) + , m_xRestProtocol(m_xBuilder->weld_entry(u"restprotocol"_ustr)) + , m_xRestProtocolImg(m_xBuilder->weld_widget(u"lockrestprotocol"_ustr)) + , m_xActivateBox(m_xBuilder->weld_check_button(u"activate"_ustr)) + , m_xActivateBoxImg(m_xBuilder->weld_widget(u"lockactivate"_ustr)) + , m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button(u"verifyssl"_ustr)) + , m_xSSLDisableVerificationBoxImg(m_xBuilder->weld_widget(u"lockverifyssl"_ustr)) + , m_xApiSettingsFrame(m_xBuilder->weld_frame(u"apisettings"_ustr)) { m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, CheckHdl)); EnableControls(LanguageToolCfg::IsEnabled::get()); @@ -112,9 +113,11 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*) OUString OptLanguageToolTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "langtoolsettings", "disclaimer", "apisettingsheader", "base", - "urldesc", "usernamelbl", "usernamedesc", "apikeylbl", - "apikeydesc", "restlbl", "restdesc" }; + OUString labels[] = { + u"langtoolsettings"_ustr, u"disclaimer"_ustr, u"apisettingsheader"_ustr, u"base"_ustr, + u"urldesc"_ustr, u"usernamelbl"_ustr, u"usernamedesc"_ustr, u"apikeylbl"_ustr, + u"apikeydesc"_ustr, u"restlbl"_ustr, u"restdesc"_ustr + }; for (const auto& label : labels) { @@ -122,7 +125,7 @@ OUString OptLanguageToolTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "activate", "verifyssl" }; + OUString checkButton[] = { u"activate"_ustr, u"verifyssl"_ustr }; for (const auto& check : checkButton) { @@ -130,7 +133,7 @@ OUString OptLanguageToolTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - if (const auto& pString = m_xBuilder->weld_link_button("policy")) + if (const auto& pString = m_xBuilder->weld_link_button(u"policy"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 960fd62e1ebf..8cdc7997531b 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -94,7 +94,7 @@ static bool KillFile_Impl( const OUString& rURL ) try { Content aCnt( rURL, uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aCnt.executeCommand( "delete", Any( true ) ); + aCnt.executeCommand( u"delete"_ustr, Any( true ) ); } catch( ... ) { @@ -229,27 +229,27 @@ class OptionsBreakSet : public weld::GenericDialogController public: OptionsBreakSet(weld::Window* pParent, sal_uInt16 nRID) - : GenericDialogController(pParent, "cui/ui/breaknumberoption.ui", "BreakNumberOption") - , m_xBeforeFrame(m_xBuilder->weld_widget("beforeframe")) - , m_xAfterFrame(m_xBuilder->weld_widget("afterframe")) - , m_xMinimalFrame(m_xBuilder->weld_widget("miniframe")) + : GenericDialogController(pParent, u"cui/ui/breaknumberoption.ui"_ustr, u"BreakNumberOption"_ustr) + , m_xBeforeFrame(m_xBuilder->weld_widget(u"beforeframe"_ustr)) + , m_xAfterFrame(m_xBuilder->weld_widget(u"afterframe"_ustr)) + , m_xMinimalFrame(m_xBuilder->weld_widget(u"miniframe"_ustr)) { assert(EID_NUM_PRE_BREAK == nRID || EID_NUM_POST_BREAK == nRID || EID_NUM_MIN_WORDLEN == nRID); //unexpected ID if (nRID == EID_NUM_PRE_BREAK) { m_xBeforeFrame->show(); - m_xBreakNF = m_xBuilder->weld_spin_button("beforebreak"); + m_xBreakNF = m_xBuilder->weld_spin_button(u"beforebreak"_ustr); } else if(nRID == EID_NUM_POST_BREAK) { m_xAfterFrame->show(); - m_xBreakNF = m_xBuilder->weld_spin_button("afterbreak"); + m_xBreakNF = m_xBuilder->weld_spin_button(u"afterbreak"_ustr); } else if(nRID == EID_NUM_MIN_WORDLEN) { m_xMinimalFrame->show(); - m_xBreakNF = m_xBuilder->weld_spin_button("wordlength"); + m_xBreakNF = m_xBuilder->weld_spin_button(u"wordlength"_ustr); } } @@ -781,7 +781,7 @@ void SvxLinguData_Impl::Reconfigure( std::u16string_view rDisplayName, bool bEna // class SvxLinguTabPage ------------------------------------------------- SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optlingupage.ui", "OptLinguPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optlingupage.ui"_ustr, u"OptLinguPage"_ustr, &rSet) , sCapitalWords (CuiResId(RID_CUISTR_CAPITAL_WORDS)) , sWordsWithDigits(CuiResId(RID_CUISTR_WORDS_WITH_DIGITS)) , sSpellSpecial (CuiResId(RID_CUISTR_SPELL_SPECIAL)) @@ -798,18 +798,18 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* , nUPN_HYPH_MIN_LEADING(-1) , nUPN_HYPH_MIN_TRAILING(-1) , m_nDlbClickEventId(nullptr) - , m_xLinguModulesFT(m_xBuilder->weld_label("lingumodulesft")) - , m_xLinguModulesCLB(m_xBuilder->weld_tree_view("lingumodules")) - , m_xLinguModulesEditPB(m_xBuilder->weld_button("lingumodulesedit")) - , m_xLinguDicsFT(m_xBuilder->weld_label("lingudictsft")) - , m_xLinguDicsCLB(m_xBuilder->weld_tree_view("lingudicts")) - , m_xLinguDicsNewPB(m_xBuilder->weld_button("lingudictsnew")) - , m_xLinguDicsEditPB(m_xBuilder->weld_button("lingudictsedit")) - , m_xLinguDicsDelPB(m_xBuilder->weld_button("lingudictsdelete")) - , m_xLinguOptionsCLB(m_xBuilder->weld_tree_view("linguoptions")) - , m_xLinguOptionsEditPB(m_xBuilder->weld_button("linguoptionsedit")) - , m_xMoreDictsBox(m_xBuilder->weld_box("moredictsbox")) - , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink")) + , m_xLinguModulesFT(m_xBuilder->weld_label(u"lingumodulesft"_ustr)) + , m_xLinguModulesCLB(m_xBuilder->weld_tree_view(u"lingumodules"_ustr)) + , m_xLinguModulesEditPB(m_xBuilder->weld_button(u"lingumodulesedit"_ustr)) + , m_xLinguDicsFT(m_xBuilder->weld_label(u"lingudictsft"_ustr)) + , m_xLinguDicsCLB(m_xBuilder->weld_tree_view(u"lingudicts"_ustr)) + , m_xLinguDicsNewPB(m_xBuilder->weld_button(u"lingudictsnew"_ustr)) + , m_xLinguDicsEditPB(m_xBuilder->weld_button(u"lingudictsedit"_ustr)) + , m_xLinguDicsDelPB(m_xBuilder->weld_button(u"lingudictsdelete"_ustr)) + , m_xLinguOptionsCLB(m_xBuilder->weld_tree_view(u"linguoptions"_ustr)) + , m_xLinguOptionsEditPB(m_xBuilder->weld_button(u"linguoptionsedit"_ustr)) + , m_xMoreDictsBox(m_xBuilder->weld_box(u"moredictsbox"_ustr)) + , m_xMoreDictsLink(m_xBuilder->weld_link_button(u"moredictslink"_ustr)) { m_xLinguModulesCLB->enable_toggle_buttons(weld::ColumnToggleType::Check); m_xLinguDicsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check); @@ -839,7 +839,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* if (comphelper::LibreOfficeKit::isActive()) { // hide User-defined Dictionaries part - m_xBuilder->weld_frame("dictsframe")->hide(); + m_xBuilder->weld_frame(u"dictsframe"_ustr)->hide(); // hide Get more dictionaries URL + icon m_xMoreDictsBox->hide(); } @@ -889,7 +889,7 @@ std::unique_ptr<SfxTabPage> SvxLinguTabPage::Create( weld::Container* pPage, wel OUString SvxLinguTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "lingumodulesft", "lingudictsft", "label4" }; + OUString labels[] = { u"lingumodulesft"_ustr, u"lingudictsft"_ustr, u"label4"_ustr }; for (const auto& label : labels) { @@ -1410,8 +1410,8 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void) } else if (m_xLinguDicsDelPB.get() == &rBtn) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletedictionarydialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("QueryDeleteDictionaryDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletedictionarydialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"QueryDeleteDictionaryDialog"_ustr)); if (RET_NO == xQuery->run()) return; @@ -1553,24 +1553,24 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp ) IMPL_STATIC_LINK_NOARG(SvxLinguTabPage, OnLinkClick, weld::LinkButton&, bool) { - comphelper::dispatchCommand(".uno:MoreDictionaries", {}); + comphelper::dispatchCommand(u".uno:MoreDictionaries"_ustr, {}); return true; } SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& rData) - : GenericDialogController(pParent, "cui/ui/editmodulesdialog.ui", "EditModulesDialog") + : GenericDialogController(pParent, u"cui/ui/editmodulesdialog.ui"_ustr, u"EditModulesDialog"_ustr) , sSpell(CuiResId(RID_CUISTR_SPELL)) , sHyph(CuiResId(RID_CUISTR_HYPH)) , sThes(CuiResId(RID_CUISTR_THES)) , sGrammar(CuiResId(RID_CUISTR_GRAMMAR)) , rLinguData(rData) - , m_xModulesCLB(m_xBuilder->weld_tree_view("lingudicts")) - , m_xPrioUpPB(m_xBuilder->weld_button("up")) - , m_xPrioDownPB(m_xBuilder->weld_button("down")) - , m_xBackPB(m_xBuilder->weld_button("back")) - , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink")) - , m_xClosePB(m_xBuilder->weld_button("close")) - , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("language"))) + , m_xModulesCLB(m_xBuilder->weld_tree_view(u"lingudicts"_ustr)) + , m_xPrioUpPB(m_xBuilder->weld_button(u"up"_ustr)) + , m_xPrioDownPB(m_xBuilder->weld_button(u"down"_ustr)) + , m_xBackPB(m_xBuilder->weld_button(u"back"_ustr)) + , m_xMoreDictsLink(m_xBuilder->weld_link_button(u"moredictslink"_ustr)) + , m_xClosePB(m_xBuilder->weld_button(u"close"_ustr)) + , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"language"_ustr))) { m_xModulesCLB->set_size_request(m_xModulesCLB->get_approximate_digit_width() * 40, m_xModulesCLB->get_height_rows(12)); @@ -1610,7 +1610,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& r m_xLanguageLB->set_active(0); css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); - m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xLanguageLB->connect_changed( LINK( this, SvxEditModulesDlg, LangSelectListBoxHdl_Impl )); LangSelectHdl_Impl(m_xLanguageLB.get()); @@ -2009,7 +2009,7 @@ IMPL_LINK_NOARG(SvxEditModulesDlg, BackHdl_Impl, weld::Button&, void) IMPL_STATIC_LINK_NOARG(SvxEditModulesDlg, OnLinkClick, weld::LinkButton&, bool) { - comphelper::dispatchCommand(".uno:MoreDictionaries", {}); + comphelper::dispatchCommand(u".uno:MoreDictionaries"_ustr, {}); return true; } diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 129cbc1b01b7..207f2b924a0c 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -27,12 +27,12 @@ #include "optopencl.hxx" SvxOpenCLTabPage::SvxOpenCLTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optopenclpage.ui", "OptOpenCLPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optopenclpage.ui"_ustr, u"OptOpenCLPage"_ustr, &rSet) , maConfig(OpenCLConfig::get()) - , mxUseOpenCL(m_xBuilder->weld_check_button("useopencl")) - , mxUseOpenImg(m_xBuilder->weld_widget("lockuseopencl")) - , mxOclUsed(m_xBuilder->weld_label("openclused")) - , mxOclNotUsed(m_xBuilder->weld_label("openclnotused")) + , mxUseOpenCL(m_xBuilder->weld_check_button(u"useopencl"_ustr)) + , mxUseOpenImg(m_xBuilder->weld_widget(u"lockuseopencl"_ustr)) + , mxOclUsed(m_xBuilder->weld_label(u"openclused"_ustr)) + , mxOclNotUsed(m_xBuilder->weld_label(u"openclnotused"_ustr)) { mxUseOpenCL->set_active(maConfig.mbUseOpenCL); mxUseOpenCL->set_sensitive(!officecfg::Office::Common::Misc::UseOpenCL::isReadOnly()); @@ -55,7 +55,7 @@ std::unique_ptr<SfxTabPage> SvxOpenCLTabPage::Create(weld::Container* pPage, wel OUString SvxOpenCLTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "openclnotused", "openclused" }; + OUString labels[] = { u"label1"_ustr, u"openclnotused"_ustr, u"openclused"_ustr }; for (const auto& label : labels) { diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index f75f354c9c6f..e81d12043ed2 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -180,12 +180,12 @@ static bool IsMultiPath_Impl( const SvtPathOptions::Paths nIndex ) // class SvxPathTabPage -------------------------------------------------- SvxPathTabPage::SvxPathTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage( pPage, pController, "cui/ui/optpathspage.ui", "OptPathsPage", &rSet) + : SfxTabPage( pPage, pController, u"cui/ui/optpathspage.ui"_ustr, u"OptPathsPage"_ustr, &rSet) , pImpl(new OptPath_Impl) , xDialogListener ( new ::svt::DialogClosedListener() ) - , m_xStandardBtn(m_xBuilder->weld_button("default")) - , m_xPathBtn(m_xBuilder->weld_button("edit")) - , m_xPathBox(m_xBuilder->weld_tree_view("paths")) + , m_xStandardBtn(m_xBuilder->weld_button(u"default"_ustr)) + , m_xPathBtn(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xPathBox(m_xBuilder->weld_tree_view(u"paths"_ustr)) { m_xStandardBtn->connect_clicked(LINK(this, SvxPathTabPage, StandardHdl_Impl)); m_xPathBtn->connect_clicked( LINK( this, SvxPathTabPage, PathHdl_Impl ) ); @@ -223,7 +223,7 @@ std::unique_ptr<SfxTabPage> SvxPathTabPage::Create( weld::Container* pPage, weld OUString SvxPathTabPage::GetAllStrings() { OUString sAllStrings; - if (const auto& pString = m_xBuilder->weld_label("label1")) + if (const auto& pString = m_xBuilder->weld_label(u"label1"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); } @@ -576,7 +576,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void) { sfx2::FileDialogHelper aHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld()); uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = aHelper.GetFilePicker(); - xFilePicker->appendFilter(OUString(), "*.xml"); + xFilePicker->appendFilter(OUString(), u"*.xml"_ustr); if (xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK) { uno::Sequence<OUString> aPathSeq(xFilePicker->getSelectedFiles()); diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 368a6d425186..dac57c660295 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -74,40 +74,40 @@ SvxSaveTabPage_Impl::SvxSaveTabPage_Impl() : bInitialized( false ) // class SvxSaveTabPage -------------------------------------------------- SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) - : SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", &rCoreSet ) + : SfxTabPage( pPage, pController, u"cui/ui/optsavepage.ui"_ustr, u"OptSavePage"_ustr, &rCoreSet ) , pImpl(new SvxSaveTabPage_Impl) - , m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button("load_anyuser")) - , m_xLoadViewPosAnyUserImg(m_xBuilder->weld_widget("lockload_anyuser")) - , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings")) - , m_xLoadUserSettingsImg(m_xBuilder->weld_widget("lockload_settings")) - , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter")) - , m_xLoadDocPrinterImg(m_xBuilder->weld_widget("lockload_docprinter")) - , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo")) - , m_xDocInfoImg(m_xBuilder->weld_widget("lockdocinfo")) - , m_xBackupCB(m_xBuilder->weld_check_button("backup")) - , m_xBackupImg(m_xBuilder->weld_widget("lockbackup")) - , m_xBackupIntoDocumentFolderCB(m_xBuilder->weld_check_button("backupintodocumentfolder")) - , m_xBackupIntoDocumentFolderImg(m_xBuilder->weld_widget("lockbackupintodoc")) - , m_xAutoSaveCB(m_xBuilder->weld_check_button("autosave")) - , m_xAutoSaveImg(m_xBuilder->weld_widget("lockautosave")) - , m_xAutoSaveEdit(m_xBuilder->weld_spin_button("autosave_spin")) - , m_xMinuteFT(m_xBuilder->weld_label("autosave_mins")) - , m_xUserAutoSaveCB(m_xBuilder->weld_check_button("userautosave")) - , m_xUserAutoSaveImg(m_xBuilder->weld_widget("lockuserautosave")) - , m_xRelativeFsysCB(m_xBuilder->weld_check_button("relative_fsys")) - , m_xRelativeFsysImg(m_xBuilder->weld_widget("lockrelative_fsys")) - , m_xRelativeInetCB(m_xBuilder->weld_check_button("relative_inet")) - , m_xRelativeInetImg(m_xBuilder->weld_widget("lockrelative_inet")) - , m_xODFVersionLB(m_xBuilder->weld_combo_box("odfversion")) - , m_xODFVersionFT(m_xBuilder->weld_label("label5")) - , m_xODFVersionImg(m_xBuilder->weld_widget("lockodfversion")) - , m_xWarnAlienFormatCB(m_xBuilder->weld_check_button("warnalienformat")) - , m_xWarnAlienFormatImg(m_xBuilder->weld_widget("lockwarnalienformat")) - , m_xDocTypeLB(m_xBuilder->weld_combo_box("doctype")) - , m_xSaveAsFT(m_xBuilder->weld_label("saveas_label")) - , m_xSaveAsLB(m_xBuilder->weld_combo_box("saveas")) - , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image")) - , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label")) + , m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button(u"load_anyuser"_ustr)) + , m_xLoadViewPosAnyUserImg(m_xBuilder->weld_widget(u"lockload_anyuser"_ustr)) + , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button(u"load_settings"_ustr)) + , m_xLoadUserSettingsImg(m_xBuilder->weld_widget(u"lockload_settings"_ustr)) + , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button(u"load_docprinter"_ustr)) + , m_xLoadDocPrinterImg(m_xBuilder->weld_widget(u"lockload_docprinter"_ustr)) + , m_xDocInfoCB(m_xBuilder->weld_check_button(u"docinfo"_ustr)) + , m_xDocInfoImg(m_xBuilder->weld_widget(u"lockdocinfo"_ustr)) + , m_xBackupCB(m_xBuilder->weld_check_button(u"backup"_ustr)) + , m_xBackupImg(m_xBuilder->weld_widget(u"lockbackup"_ustr)) + , m_xBackupIntoDocumentFolderCB(m_xBuilder->weld_check_button(u"backupintodocumentfolder"_ustr)) + , m_xBackupIntoDocumentFolderImg(m_xBuilder->weld_widget(u"lockbackupintodoc"_ustr)) + , m_xAutoSaveCB(m_xBuilder->weld_check_button(u"autosave"_ustr)) + , m_xAutoSaveImg(m_xBuilder->weld_widget(u"lockautosave"_ustr)) + , m_xAutoSaveEdit(m_xBuilder->weld_spin_button(u"autosave_spin"_ustr)) + , m_xMinuteFT(m_xBuilder->weld_label(u"autosave_mins"_ustr)) + , m_xUserAutoSaveCB(m_xBuilder->weld_check_button(u"userautosave"_ustr)) + , m_xUserAutoSaveImg(m_xBuilder->weld_widget(u"lockuserautosave"_ustr)) + , m_xRelativeFsysCB(m_xBuilder->weld_check_button(u"relative_fsys"_ustr)) + , m_xRelativeFsysImg(m_xBuilder->weld_widget(u"lockrelative_fsys"_ustr)) + , m_xRelativeInetCB(m_xBuilder->weld_check_button(u"relative_inet"_ustr)) + , m_xRelativeInetImg(m_xBuilder->weld_widget(u"lockrelative_inet"_ustr)) + , m_xODFVersionLB(m_xBuilder->weld_combo_box(u"odfversion"_ustr)) + , m_xODFVersionFT(m_xBuilder->weld_label(u"label5"_ustr)) + , m_xODFVersionImg(m_xBuilder->weld_widget(u"lockodfversion"_ustr)) + , m_xWarnAlienFormatCB(m_xBuilder->weld_check_button(u"warnalienformat"_ustr)) + , m_xWarnAlienFormatImg(m_xBuilder->weld_widget(u"lockwarnalienformat"_ustr)) + , m_xDocTypeLB(m_xBuilder->weld_combo_box(u"doctype"_ustr)) + , m_xSaveAsFT(m_xBuilder->weld_label(u"saveas_label"_ustr)) + , m_xSaveAsLB(m_xBuilder->weld_combo_box(u"saveas"_ustr)) + , m_xODFWarningFI(m_xBuilder->weld_widget(u"odfwarning_image"_ustr)) + , m_xODFWarningFT(m_xBuilder->weld_label(u"odfwarning_label"_ustr)) { m_xAutoSaveEdit->set_max_length(2); m_xBackupIntoDocumentFolderCB->set_accessible_description(CuiResId(RID_CUISTR_A11Y_DESC_BACKUP)); @@ -121,7 +121,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* p auto aFilterClassesNode = utl::OConfigurationTreeRoot::createWithComponentContext( comphelper::getProcessComponentContext(), - "org.openoffice.Office.UI/FilterClassification/GlobalFilters/Classes", + u"org.openoffice.Office.UI/FilterClassification/GlobalFilters/Classes"_ustr, -1, utl::OConfigurationTreeRoot::CM_READONLY ); @@ -221,8 +221,8 @@ std::unique_ptr<SfxTabPage> SvxSaveTabPage::Create(weld::Container* pPage, weld: OUString SvxSaveTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "label2", "autosave_mins", "label3", - "label5", "label6", "saveas_label", "odfwarning_label" }; + OUString labels[] = { u"label1"_ustr, u"label2"_ustr, u"autosave_mins"_ustr, u"label3"_ustr, + u"label5"_ustr, u"label6"_ustr, u"saveas_label"_ustr, u"odfwarning_label"_ustr }; for (const auto& label : labels) { @@ -231,9 +231,9 @@ OUString SvxSaveTabPage::GetAllStrings() } OUString checkButton[] - = { "load_settings", "load_docprinter", "load_anyuser", "autosave", - "userautosave", "docinfo", "backup", "backupintodocumentfolder", - "relative_fsys", "relative_inet", "warnalienformat" }; + = { u"load_settings"_ustr, u"load_docprinter"_ustr, u"load_anyuser"_ustr, u"autosave"_ustr, + u"userautosave"_ustr, u"docinfo"_ustr, u"backup"_ustr, u"backupintodocumentfolder"_ustr, + u"relative_fsys"_ustr, u"relative_inet"_ustr, u"warnalienformat"_ustr }; for (const auto& check : checkButton) { @@ -415,7 +415,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) try { Reference< XMultiServiceFactory > xMSF = comphelper::getProcessServiceFactory(); - pImpl->xFact.set(xMSF->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY); + pImpl->xFact.set(xMSF->createInstance(u"com.sun.star.document.FilterFactory"_ustr), UNO_QUERY); DBG_ASSERT(pImpl->xFact.is(), "service com.sun.star.document.FilterFactory unavailable"); Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY); @@ -447,7 +447,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) while(xList->hasMoreElements()) { SequenceAsHashMap aFilter(xList->nextElement()); - OUString sFilter = aFilter.getUnpackedValueOrDefault("Name",OUString()); + OUString sFilter = aFilter.getUnpackedValueOrDefault(u"Name"_ustr,OUString()); if (!sFilter.isEmpty()) { lList.push_back(sFilter); diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 2686f8dfb277..71433ab2258f 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -51,32 +51,32 @@ using namespace ::css; SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/optonlineupdatepage.ui", "OptOnlineUpdatePage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/optonlineupdatepage.ui"_ustr, u"OptOnlineUpdatePage"_ustr, &rSet) , m_showTraditionalOnlineUpdate(isTraditionalOnlineUpdateAvailable()) , m_showMarOnlineUpdate(isMarOnlineUpdateAvailable()) - , m_xNeverChecked(m_xBuilder->weld_label("neverchecked")) - , m_xAutoCheckCheckBox(m_xBuilder->weld_check_button("autocheck")) - , m_xAutoCheckImg(m_xBuilder->weld_widget("lockautocheck")) - , m_xEveryDayButton(m_xBuilder->weld_radio_button("everyday")) - , m_xEveryWeekButton(m_xBuilder->weld_radio_button("everyweek")) - , m_xEveryMonthButton(m_xBuilder->weld_radio_button("everymonth")) - , m_xCheckIntervalImg(m_xBuilder->weld_widget("lockcheckinterval")) - , m_xCheckNowButton(m_xBuilder->weld_button("checknow")) - , m_xAutoDownloadCheckBox(m_xBuilder->weld_check_button("autodownload")) - , m_xAutoDownloadImg(m_xBuilder->weld_widget("lockautodownload")) - , m_xDestPathLabel(m_xBuilder->weld_label("destpathlabel")) - , m_xDestPath(m_xBuilder->weld_label("destpath")) - , m_xChangePathButton(m_xBuilder->weld_button("changepath")) - , m_xLastChecked(m_xBuilder->weld_label("lastchecked")) - , m_xExtrasCheckBox(m_xBuilder->weld_check_button("extrabits")) - , m_xExtrasImg(m_xBuilder->weld_widget("lockextrabits")) - , m_xUserAgentLabel(m_xBuilder->weld_label("useragent")) - , m_xPrivacyPolicyButton(m_xBuilder->weld_link_button("btnPrivacyPolicy")) - , m_xBox2(m_xBuilder->weld_box("box2")) - , m_xFrameDest(m_xBuilder->weld_frame("frameDest")) - , m_xFrameAgent(m_xBuilder->weld_frame("frameAgent")) - , m_xMar(m_xBuilder->weld_frame("frameMar")) - , m_xEnableMar(m_xBuilder->weld_check_button("enableMar")) + , m_xNeverChecked(m_xBuilder->weld_label(u"neverchecked"_ustr)) + , m_xAutoCheckCheckBox(m_xBuilder->weld_check_button(u"autocheck"_ustr)) + , m_xAutoCheckImg(m_xBuilder->weld_widget(u"lockautocheck"_ustr)) + , m_xEveryDayButton(m_xBuilder->weld_radio_button(u"everyday"_ustr)) + , m_xEveryWeekButton(m_xBuilder->weld_radio_button(u"everyweek"_ustr)) + , m_xEveryMonthButton(m_xBuilder->weld_radio_button(u"everymonth"_ustr)) + , m_xCheckIntervalImg(m_xBuilder->weld_widget(u"lockcheckinterval"_ustr)) + , m_xCheckNowButton(m_xBuilder->weld_button(u"checknow"_ustr)) + , m_xAutoDownloadCheckBox(m_xBuilder->weld_check_button(u"autodownload"_ustr)) + , m_xAutoDownloadImg(m_xBuilder->weld_widget(u"lockautodownload"_ustr)) + , m_xDestPathLabel(m_xBuilder->weld_label(u"destpathlabel"_ustr)) + , m_xDestPath(m_xBuilder->weld_label(u"destpath"_ustr)) + , m_xChangePathButton(m_xBuilder->weld_button(u"changepath"_ustr)) + , m_xLastChecked(m_xBuilder->weld_label(u"lastchecked"_ustr)) + , m_xExtrasCheckBox(m_xBuilder->weld_check_button(u"extrabits"_ustr)) + , m_xExtrasImg(m_xBuilder->weld_widget(u"lockextrabits"_ustr)) + , m_xUserAgentLabel(m_xBuilder->weld_label(u"useragent"_ustr)) + , m_xPrivacyPolicyButton(m_xBuilder->weld_link_button(u"btnPrivacyPolicy"_ustr)) + , m_xBox2(m_xBuilder->weld_box(u"box2"_ustr)) + , m_xFrameDest(m_xBuilder->weld_frame(u"frameDest"_ustr)) + , m_xFrameAgent(m_xBuilder->weld_frame(u"frameAgent"_ustr)) + , m_xMar(m_xBuilder->weld_frame(u"frameMar"_ustr)) + , m_xEnableMar(m_xBuilder->weld_check_button(u"enableMar"_ustr)) { if (m_showTraditionalOnlineUpdate) { m_aNeverChecked = m_xNeverChecked->get_label(); @@ -94,10 +94,10 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); m_xUpdateAccess = setup::UpdateCheckConfig::create( xContext ); - m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); bool bDownloadSupported = false; - m_xUpdateAccess->getByName( "DownloadSupported" ) >>= bDownloadSupported; + m_xUpdateAccess->getByName( u"DownloadSupported"_ustr ) >>= bDownloadSupported; m_xAutoDownloadCheckBox->set_visible(bDownloadSupported); m_xDestPathLabel->set_visible(bDownloadSupported); @@ -139,7 +139,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() OUString aText; sal_Int64 lastChecked = 0; - m_xUpdateAccess->getByName("LastCheck") >>= lastChecked; + m_xUpdateAccess->getByName(u"LastCheck"_ustr) >>= lastChecked; if( lastChecked == 0 ) // never checked { @@ -198,7 +198,7 @@ void SvxOnlineUpdateTabPage::UpdateUserAgent() ::comphelper::getProcessComponentContext() ), css::uno::UNO_QUERY_THROW ); - OUString aPseudoURL = "useragent:normal"; + OUString aPseudoURL = u"useragent:normal"_ustr; if( m_xExtrasCheckBox->get_active() ) aPseudoURL = "useragent:extended"; const uno::Sequence< beans::StringPair > aHeaders @@ -228,8 +228,8 @@ std::unique_ptr<SfxTabPage> SvxOnlineUpdateTabPage::Create( weld::Container* pPa OUString SvxOnlineUpdateTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label1", "lastchecked", "neverchecked", "labeldest", - "destpathlabel", "labelagent", "useragent_label", "useragent_changed" }; + OUString labels[] = { u"label1"_ustr, u"lastchecked"_ustr, u"neverchecked"_ustr, u"labeldest"_ustr, + u"destpathlabel"_ustr, u"labelagent"_ustr, u"useragent_label"_ustr, u"useragent_changed"_ustr }; for (const auto& label : labels) { @@ -237,7 +237,7 @@ OUString SvxOnlineUpdateTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "autocheck", "autodownload", "extrabits" }; + OUString checkButton[] = { u"autocheck"_ustr, u"autodownload"_ustr, u"extrabits"_ustr }; for (const auto& check : checkButton) { @@ -245,7 +245,7 @@ OUString SvxOnlineUpdateTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString radioButton[] = { "everyday", "everyweek", "everymonth" }; + OUString radioButton[] = { u"everyday"_ustr, u"everyweek"_ustr, u"everymonth"_ustr }; for (const auto& radio : radioButton) { @@ -270,7 +270,7 @@ bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* ) if( m_xAutoCheckCheckBox->get_state_changed_from_saved() ) { bValue = m_xAutoCheckCheckBox->get_active(); - m_xUpdateAccess->replaceByName( "AutoCheckEnabled", uno::Any( bValue ) ); + m_xUpdateAccess->replaceByName( u"AutoCheckEnabled"_ustr, uno::Any( bValue ) ); bModified = true; } @@ -293,31 +293,31 @@ bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* ) if( nValue > 0 ) { - m_xUpdateAccess->replaceByName( "CheckInterval", uno::Any( nValue ) ); + m_xUpdateAccess->replaceByName( u"CheckInterval"_ustr, uno::Any( nValue ) ); bModified = true; } if( m_xAutoDownloadCheckBox->get_state_changed_from_saved() ) { bValue = m_xAutoDownloadCheckBox->get_active(); - m_xUpdateAccess->replaceByName( "AutoDownloadEnabled", uno::Any( bValue ) ); + m_xUpdateAccess->replaceByName( u"AutoDownloadEnabled"_ustr, uno::Any( bValue ) ); bModified = true; } OUString sValue, aURL; - m_xUpdateAccess->getByName( "DownloadDestination" ) >>= sValue; + m_xUpdateAccess->getByName( u"DownloadDestination"_ustr ) >>= sValue; if( ( osl::FileBase::E_None == osl::FileBase::getFileURLFromSystemPath(m_xDestPath->get_label(), aURL) ) && ( aURL != sValue ) ) { - m_xUpdateAccess->replaceByName( "DownloadDestination", uno::Any( aURL ) ); + m_xUpdateAccess->replaceByName( u"DownloadDestination"_ustr, uno::Any( aURL ) ); bModified = true; } if( m_xExtrasCheckBox->get_state_changed_from_saved() ) { bValue = m_xExtrasCheckBox->get_active(); - m_xUpdateAccess->replaceByName( "ExtendedUserAgent", uno::Any( bValue ) ); + m_xUpdateAccess->replaceByName( u"ExtendedUserAgent"_ustr, uno::Any( bValue ) ); bModified = true; } @@ -340,8 +340,8 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* ) { if (m_showTraditionalOnlineUpdate) { bool bValue = false; - m_xUpdateAccess->getByName( "AutoCheckEnabled" ) >>= bValue; - beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoCheckEnabled"); + m_xUpdateAccess->getByName( u"AutoCheckEnabled"_ustr ) >>= bValue; + beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoCheckEnabled"_ustr); bool bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xAutoCheckCheckBox->set_active(bValue); @@ -349,8 +349,8 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* ) m_xAutoCheckImg->set_visible(bReadOnly); sal_Int64 nValue = 0; - m_xUpdateAccess->getByName( "CheckInterval" ) >>= nValue; - aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/CheckInterval"); + m_xUpdateAccess->getByName( u"CheckInterval"_ustr ) >>= nValue; + aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/CheckInterval"_ustr); bool bReadOnly2 = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xEveryDayButton->set_sensitive(bValue && !(bReadOnly || bReadOnly2)); m_xEveryWeekButton->set_sensitive(bValue && !(bReadOnly || bReadOnly2)); @@ -369,8 +369,8 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* ) m_xEveryWeekButton->save_state(); m_xEveryMonthButton->save_state(); - m_xUpdateAccess->getByName( "AutoDownloadEnabled" ) >>= bValue; - aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoDownloadEnabled"); + m_xUpdateAccess->getByName( u"AutoDownloadEnabled"_ustr ) >>= bValue; + aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/AutoDownloadEnabled"_ustr); bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xAutoDownloadCheckBox->set_active(bValue); m_xAutoDownloadCheckBox->set_sensitive(!bReadOnly); @@ -379,16 +379,16 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* ) m_xDestPath->set_sensitive(true); OUString sValue, aPath; - m_xUpdateAccess->getByName( "DownloadDestination" ) >>= sValue; - aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/DownloadDestination"); + m_xUpdateAccess->getByName( u"DownloadDestination"_ustr ) >>= sValue; + aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/DownloadDestination"_ustr); bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xChangePathButton->set_sensitive(!bReadOnly); if( osl::FileBase::E_None == osl::FileBase::getSystemPathFromFileURL(sValue, aPath) ) m_xDestPath->set_label(aPath); - m_xUpdateAccess->getByName( "ExtendedUserAgent" ) >>= bValue; - aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/ExtendedUserAgent"); + m_xUpdateAccess->getByName( u"ExtendedUserAgent"_ustr ) >>= bValue; + aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/ExtendedUserAgent"_ustr); bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xExtrasCheckBox->set_active(bValue); m_xExtrasCheckBox->set_sensitive(!bReadOnly); @@ -412,7 +412,7 @@ void SvxOnlineUpdateTabPage::FillUserData() IMPL_LINK(SvxOnlineUpdateTabPage, AutoCheckHdl_Impl, weld::Toggleable&, rBox, void) { bool bEnabled = rBox.get_active(); - beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName("/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/CheckInterval"); + beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(u"/org.openoffice.Office.Jobs/Jobs/org.openoffice.Office.Jobs:Job['UpdateCheck']/Arguments/CheckInterval"_ustr); bool bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0; m_xEveryDayButton->set_sensitive(bEnabled && !bReadOnly); m_xEveryWeekButton->set_sensitive(bEnabled && !bReadOnly); @@ -456,17 +456,17 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, weld::Button&, void) beans::NamedValue aProperty; aProperty.Name = "nodepath"; - aProperty.Value <<= OUString("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob"); + aProperty.Value <<= u"org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob"_ustr; uno::Sequence< uno::Any > aArgumentList{ uno::Any(aProperty) }; uno::Reference< container::XNameAccess > xNameAccess( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgumentList ), + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); util::URL aURL; - xNameAccess->getByName("URL") >>= aURL.Complete; + xNameAccess->getByName(u"URL"_ustr) >>= aURL.Complete; uno::Reference < util::XURLTransformer > xTransformer( util::URLTransformer::create( xContext ) ); diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 3328760a9855..a4223d73d7e8 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -32,12 +32,12 @@ using namespace ::com::sun::star::beans; SvxPersonalizationTabPage::SvxPersonalizationTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/personalization_tab.ui", "PersonalizationTabPage", - &rSet) - , m_xNoPersona(m_xBuilder->weld_radio_button("no_persona")) - , m_xPersonaImg(m_xBuilder->weld_widget("lockpersona")) - , m_xDefaultPersona(m_xBuilder->weld_radio_button("default_persona")) - , m_xContentGrid(m_xBuilder->weld_container("gridpersonasetting")) + : SfxTabPage(pPage, pController, u"cui/ui/personalization_tab.ui"_ustr, + u"PersonalizationTabPage"_ustr, &rSet) + , m_xNoPersona(m_xBuilder->weld_radio_button(u"no_persona"_ustr)) + , m_xPersonaImg(m_xBuilder->weld_widget(u"lockpersona"_ustr)) + , m_xDefaultPersona(m_xBuilder->weld_radio_button(u"default_persona"_ustr)) + , m_xContentGrid(m_xBuilder->weld_container(u"gridpersonasetting"_ustr)) { for (sal_uInt32 i = 0; i < MAX_DEFAULT_PERSONAS; ++i) { @@ -62,7 +62,7 @@ std::unique_ptr<SfxTabPage> SvxPersonalizationTabPage::Create(weld::Container* p OUString SvxPersonalizationTabPage::GetAllStrings() { OUString sAllStrings; - OUString radioButton[] = { "no_persona", "default_persona" }; + OUString radioButton[] = { u"no_persona"_ustr, u"default_persona"_ustr }; for (const auto& radio : radioButton) { @@ -70,7 +70,7 @@ OUString SvxPersonalizationTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - if (const auto& pString = m_xBuilder->weld_label("personas_label")) + if (const auto& pString = m_xBuilder->weld_label(u"personas_label"_ustr)) sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); @@ -79,7 +79,7 @@ OUString SvxPersonalizationTabPage::GetAllStrings() bool SvxPersonalizationTabPage::FillItemSet(SfxItemSet*) { // persona - OUString aPersona("default"); + OUString aPersona(u"default"_ustr); if (m_xNoPersona->get_active()) aPersona = "no"; @@ -136,7 +136,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages() { // Load the pre saved personas - OUString gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/"; + OUString gallery = u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/"_ustr; rtl::Bootstrap::expandMacros(gallery); OUString aPersonasList = gallery + "personas_list.txt"; SvFileStream aStream(aPersonasList, StreamMode::READ); diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx index d99ad64e545e..02fab4bfdeee 100644 --- a/cui/source/options/securityoptions.cxx +++ b/cui/source/options/securityoptions.cxx @@ -46,35 +46,35 @@ namespace svx { SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/securityoptionsdialog.ui", "SecurityOptionsDialog") - , m_xSaveOrSendDocsCB(m_xBuilder->weld_check_button("savesenddocs")) - , m_xSaveOrSendDocsImg(m_xBuilder->weld_widget("locksavesenddocs")) - , m_xSignDocsCB(m_xBuilder->weld_check_button("whensigning")) - , m_xSignDocsImg(m_xBuilder->weld_widget("lockwhensigning")) - , m_xPrintDocsCB(m_xBuilder->weld_check_button("whenprinting")) - , m_xPrintDocsImg(m_xBuilder->weld_widget("lockwhenprinting")) - , m_xCreatePdfCB(m_xBuilder->weld_check_button("whenpdf")) - , m_xCreatePdfImg(m_xBuilder->weld_widget("lockwhenpdf")) - , m_xRemovePersInfoCB(m_xBuilder->weld_check_button("removepersonal")) - , m_xRemovePersInfoImg(m_xBuilder->weld_widget("lockremovepersonal")) - , m_xRecommPasswdCB(m_xBuilder->weld_check_button("password")) - , m_xRecommPasswdImg(m_xBuilder->weld_widget("lockpassword")) - , m_xCtrlHyperlinkCB(m_xBuilder->weld_check_button("ctrlclick")) - , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick")) - , m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted")) - , m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted")) - , m_xDisableActiveContentCB(m_xBuilder->weld_check_button("disableactivecontent")) - , m_xDisableActiveContentImg(m_xBuilder->weld_widget("lockdisableactivecontent")) - , m_xRedlineinfoCB(m_xBuilder->weld_check_button("redlineinfo")) - , m_xRedlineinfoImg(m_xBuilder->weld_widget("lockredlineinfo")) - , m_xDocPropertiesCB(m_xBuilder->weld_check_button("docproperties")) - , m_xDocPropertiesImg(m_xBuilder->weld_widget("lockdocproperties")) - , m_xNoteAuthorCB(m_xBuilder->weld_check_button("noteauthor")) - , m_xNoteAuthorImg(m_xBuilder->weld_widget("locknoteauthor")) - , m_xDocumentVersionCB(m_xBuilder->weld_check_button("documentversion")) - , m_xDocumentVersionImg(m_xBuilder->weld_widget("lockdocumentversion")) - , m_xPrinterSettingsCB(m_xBuilder->weld_check_button("printersettings")) - , m_xPrinterSettingsImg(m_xBuilder->weld_widget("lockprintersettings")) + : GenericDialogController(pParent, u"cui/ui/securityoptionsdialog.ui"_ustr, u"SecurityOptionsDialog"_ustr) + , m_xSaveOrSendDocsCB(m_xBuilder->weld_check_button(u"savesenddocs"_ustr)) + , m_xSaveOrSendDocsImg(m_xBuilder->weld_widget(u"locksavesenddocs"_ustr)) + , m_xSignDocsCB(m_xBuilder->weld_check_button(u"whensigning"_ustr)) + , m_xSignDocsImg(m_xBuilder->weld_widget(u"lockwhensigning"_ustr)) + , m_xPrintDocsCB(m_xBuilder->weld_check_button(u"whenprinting"_ustr)) + , m_xPrintDocsImg(m_xBuilder->weld_widget(u"lockwhenprinting"_ustr)) + , m_xCreatePdfCB(m_xBuilder->weld_check_button(u"whenpdf"_ustr)) + , m_xCreatePdfImg(m_xBuilder->weld_widget(u"lockwhenpdf"_ustr)) + , m_xRemovePersInfoCB(m_xBuilder->weld_check_button(u"removepersonal"_ustr)) + , m_xRemovePersInfoImg(m_xBuilder->weld_widget(u"lockremovepersonal"_ustr)) + , m_xRecommPasswdCB(m_xBuilder->weld_check_button(u"password"_ustr)) + , m_xRecommPasswdImg(m_xBuilder->weld_widget(u"lockpassword"_ustr)) + , m_xCtrlHyperlinkCB(m_xBuilder->weld_check_button(u"ctrlclick"_ustr)) + , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget(u"lockctrlclick"_ustr)) + , m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button(u"blockuntrusted"_ustr)) + , m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget(u"lockblockuntrusted"_ustr)) + , m_xDisableActiveContentCB(m_xBuilder->weld_check_button(u"disableactivecontent"_ustr)) + , m_xDisableActiveContentImg(m_xBuilder->weld_widget(u"lockdisableactivecontent"_ustr)) + , m_xRedlineinfoCB(m_xBuilder->weld_check_button(u"redlineinfo"_ustr)) + , m_xRedlineinfoImg(m_xBuilder->weld_widget(u"lockredlineinfo"_ustr)) + , m_xDocPropertiesCB(m_xBuilder->weld_check_button(u"docproperties"_ustr)) + , m_xDocPropertiesImg(m_xBuilder->weld_widget(u"lockdocproperties"_ustr)) + , m_xNoteAuthorCB(m_xBuilder->weld_check_button(u"noteauthor"_ustr)) + , m_xNoteAuthorImg(m_xBuilder->weld_widget(u"locknoteauthor"_ustr)) + , m_xDocumentVersionCB(m_xBuilder->weld_check_button(u"documentversion"_ustr)) + , m_xDocumentVersionImg(m_xBuilder->weld_widget(u"lockdocumentversion"_ustr)) + , m_xPrinterSettingsCB(m_xBuilder->weld_check_button(u"printersettings"_ustr)) + , m_xPrinterSettingsImg(m_xBuilder->weld_widget(u"lockprintersettings"_ustr)) { m_xRemovePersInfoCB->connect_toggled(LINK(this, SecurityOptionsDialog, ShowPersonalInfosToggle)); init(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index cf9cecfcb101..646b3bdee917 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -461,13 +461,13 @@ struct OptionsPageIdInfo // Basic ctor with common initialization OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, bool fromExtensionManager) - : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog") - , xOkPB(m_xBuilder->weld_button("ok")) - , xApplyPB(m_xBuilder->weld_button("apply")) - , xBackPB(m_xBuilder->weld_button("revert")) - , xTreeLB(m_xBuilder->weld_tree_view("pages")) - , xTabBox(m_xBuilder->weld_container("box")) - , m_xSearchEdit(m_xBuilder->weld_entry("searchEntry")) + : SfxOkDialogController(pParent, u"cui/ui/optionsdialog.ui"_ustr, u"OptionsDialog"_ustr) + , xOkPB(m_xBuilder->weld_button(u"ok"_ustr)) + , xApplyPB(m_xBuilder->weld_button(u"apply"_ustr)) + , xBackPB(m_xBuilder->weld_button(u"revert"_ustr)) + , xTreeLB(m_xBuilder->weld_tree_view(u"pages"_ustr)) + , xTabBox(m_xBuilder->weld_container(u"box"_ustr)) + , m_xSearchEdit(m_xBuilder->weld_entry(u"searchEntry"_ustr)) , m_pParent(pParent) , m_aUpdateDataTimer("OfaTreeOptionsDialog UpdateDataTimer") , bIsFirtsInitialize(true) @@ -1868,10 +1868,10 @@ void OfaTreeOptionsDialog::writerOptions(const std::vector<sal_uInt16>& vPageId) { if (std::find(vPageId.begin(), vPageId.end(), RID_SW_TP_OPTTEST_PAGE) != vPageId.end()) - AddTabPage(RID_SW_TP_OPTTEST_PAGE, "Internal Test", nGroup); + AddTabPage(RID_SW_TP_OPTTEST_PAGE, u"Internal Test"_ustr, nGroup); } else - AddTabPage(RID_SW_TP_OPTTEST_PAGE, "Internal Test", nGroup); + AddTabPage(RID_SW_TP_OPTTEST_PAGE, u"Internal Test"_ustr, nGroup); #endif } } @@ -1922,10 +1922,10 @@ void OfaTreeOptionsDialog::writerWebOptions(const std::vector<sal_uInt16>& vPage { if (std::find(vPageId.begin(), vPageId.end(), RID_SW_TP_OPTTEST_PAGE) != vPageId.end()) - AddTabPage(RID_SW_TP_OPTTEST_PAGE, "Internal Test", nGroup); + AddTabPage(RID_SW_TP_OPTTEST_PAGE, u"Internal Test"_ustr, nGroup); } else - AddTabPage(RID_SW_TP_OPTTEST_PAGE, "Internal Test", nGroup); + AddTabPage(RID_SW_TP_OPTTEST_PAGE, u"Internal Test"_ustr, nGroup); #endif } } @@ -2323,7 +2323,7 @@ std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule( { // load the nodes of this module Reference< XNameAccess > xNodeAccess; - xModAccess->getByName( "Nodes" ) >>= xNodeAccess; + xModAccess->getByName( u"Nodes"_ustr ) >>= xNodeAccess; if ( xNodeAccess.is() ) { const Sequence< OUString > xTemp = xNodeAccess->getElementNames(); @@ -2334,7 +2334,7 @@ std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule( xNodeAccess->getByName( rNode ) >>= xAccess; if ( xAccess.is() ) { - xAccess->getByName( "Index" ) >>= nIndex; + xAccess->getByName( u"Index"_ustr ) >>= nIndex; if ( nIndex < 0 ) // append nodes with index < 0 pModule->m_aNodeList.push_back( @@ -2385,9 +2385,9 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( bool bAllModules = false; sNodeId = sGroupName; - xNodeAccess->getByName( "Label" ) >>= sLabel; - xNodeAccess->getByName( "OptionsPage" ) >>= sPageURL; - xNodeAccess->getByName( "AllModules" ) >>= bAllModules; + xNodeAccess->getByName( u"Label"_ustr ) >>= sLabel; + xNodeAccess->getByName( u"OptionsPage"_ustr ) >>= sPageURL; + xNodeAccess->getByName( u"AllModules"_ustr ) >>= bAllModules; if ( sLabel.isEmpty() ) sLabel = sGroupName; @@ -2402,7 +2402,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( } Reference< XNameAccess > xLeavesSet; - xNodeAccess->getByName( "Leaves" ) >>= xLeavesSet; + xNodeAccess->getByName( u"Leaves"_ustr ) >>= xLeavesSet; if ( xLeavesSet.is() ) { const Sequence< OUString > seqLeaves = xLeavesSet->getElementNames(); @@ -2416,12 +2416,12 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( OUString sId, sLeafLabel, sEventHdl, sLeafURL, sLeafGrpId; sal_Int32 nLeafGrpIdx = 0; - xLeaveAccess->getByName( "Id" ) >>= sId; - xLeaveAccess->getByName( "Label" ) >>= sLeafLabel; - xLeaveAccess->getByName( "OptionsPage" ) >>= sLeafURL; - xLeaveAccess->getByName( "EventHandlerService" ) >>= sEventHdl; - xLeaveAccess->getByName( "GroupId" ) >>= sLeafGrpId; - xLeaveAccess->getByName( "GroupIndex" ) >>= nLeafGrpIdx; + xLeaveAccess->getByName( u"Id"_ustr ) >>= sId; + xLeaveAccess->getByName( u"Label"_ustr ) >>= sLeafLabel; + xLeaveAccess->getByName( u"OptionsPage"_ustr ) >>= sLeafURL; + xLeaveAccess->getByName( u"EventHandlerService"_ustr ) >>= sEventHdl; + xLeaveAccess->getByName( u"GroupId"_ustr ) >>= sLeafGrpId; + xLeaveAccess->getByName( u"GroupIndex"_ustr ) >>= nLeafGrpIdx; if ( rExtensionId.empty() || sId == rExtensionId ) { @@ -2655,7 +2655,7 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction ) { try { - bRet = m_xEventHdl->callHandlerMethod( m_xPage, Any( rAction ), "external_event" ); + bRet = m_xEventHdl->callHandlerMethod( m_xPage, Any( rAction ), u"external_event"_ustr ); } catch ( Exception const & ) { @@ -2699,7 +2699,7 @@ void ExtensionsTabPage::ActivatePage() auto aWindowRect = m_xPageParent->getPosSize(); m_xPage->setPosSize(0, 0, aWindowRect.Width, aWindowRect.Height, awt::PosSize::POSSIZE); if ( !m_sEventHdl.isEmpty() ) - DispatchAction( "initialize" ); + DispatchAction( u"initialize"_ustr ); } } @@ -2717,13 +2717,13 @@ void ExtensionsTabPage::DeactivatePage() void ExtensionsTabPage::ResetPage() { - DispatchAction( "back" ); + DispatchAction( u"back"_ustr ); ActivatePage(); } void ExtensionsTabPage::SavePage() { - DispatchAction( "ok" ); + DispatchAction( u"ok"_ustr ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/treeopthelper.cxx b/cui/source/options/treeopthelper.cxx index e486dbb5ea30..b644a96da14c 100644 --- a/cui/source/options/treeopthelper.cxx +++ b/cui/source/options/treeopthelper.cxx @@ -39,106 +39,106 @@ static PageIdToFileNameMap_Impl FileMap_Impl[] = { // { PAGE-ID, CONTENT }, // ProductName, SID_GENERAL_OPTIONS - { RID_SFXPAGE_GENERAL, "" }, // UserData + { RID_SFXPAGE_GENERAL, u""_ustr }, // UserData - { OFA_TP_MISC, "" }, // General + { OFA_TP_MISC, u""_ustr }, // General - { OFA_TP_VIEW, "" }, // View + { OFA_TP_VIEW, u""_ustr }, // View - { RID_SFXPAGE_PRINTOPTIONS, "" }, // Print + { RID_SFXPAGE_PRINTOPTIONS, u""_ustr }, // Print - { RID_SFXPAGE_PATH, "" }, // Paths + { RID_SFXPAGE_PATH, u""_ustr }, // Paths - { RID_SVX_FONT_SUBSTITUTION, "" }, // Fonts + { RID_SVX_FONT_SUBSTITUTION, u""_ustr }, // Fonts - { RID_SVXPAGE_INET_SECURITY, "" }, // Security + { RID_SVXPAGE_INET_SECURITY, u""_ustr }, // Security - { RID_SVXPAGE_PERSONALIZATION, "" }, // Personalization - { RID_SVXPAGE_COLORCONFIG, "" }, // ApplicationColors - { RID_SVXPAGE_ACCESSIBILITYCONFIG, "" }, // Accessibility - { RID_SVXPAGE_OPTIONS_JAVA, "" }, // Java - { RID_SVXPAGE_BASICIDE_OPTIONS, "" }, // BasicIDEOptions - { RID_SVXPAGE_ONLINEUPDATE, "" }, // OnlineUpdate - { RID_SVXPAGE_OPENCL, "" }, // OpenCL + { RID_SVXPAGE_PERSONALIZATION, u""_ustr }, // Personalization + { RID_SVXPAGE_COLORCONFIG, u""_ustr }, // ApplicationColors + { RID_SVXPAGE_ACCESSIBILITYCONFIG, u""_ustr }, // Accessibility + { RID_SVXPAGE_OPTIONS_JAVA, u""_ustr }, // Java + { RID_SVXPAGE_BASICIDE_OPTIONS, u""_ustr }, // BasicIDEOptions + { RID_SVXPAGE_ONLINEUPDATE, u""_ustr }, // OnlineUpdate + { RID_SVXPAGE_OPENCL, u""_ustr }, // OpenCL // LanguageSettings, SID_LANGUAGE_OPTIONS - { OFA_TP_LANGUAGES, "" }, // Languages - { RID_SFXPAGE_LINGU, "" }, // WritingAids - { RID_SVXPAGE_JSEARCH_OPTIONS, "" }, // SearchingInJapanese - { RID_SVXPAGE_ASIAN_LAYOUT, "" }, // AsianLayout - { RID_SVXPAGE_OPTIONS_CTL, "" }, // ComplexTextLayout - { RID_SVXPAGE_LANGTOOL_OPTIONS, "" }, // LanguageTool Server - { RID_SVXPAGE_DEEPL_OPTIONS, "" }, // DeepL Server + { OFA_TP_LANGUAGES, u""_ustr }, // Languages + { RID_SFXPAGE_LINGU, u""_ustr }, // WritingAids + { RID_SVXPAGE_JSEARCH_OPTIONS, u""_ustr }, // SearchingInJapanese + { RID_SVXPAGE_ASIAN_LAYOUT, u""_ustr }, // AsianLayout + { RID_SVXPAGE_OPTIONS_CTL, u""_ustr }, // ComplexTextLayout + { RID_SVXPAGE_LANGTOOL_OPTIONS, u""_ustr }, // LanguageTool Server + { RID_SVXPAGE_DEEPL_OPTIONS, u""_ustr }, // DeepL Server // Internet, SID_INET_DLG - { RID_SVXPAGE_INET_PROXY, "" }, // Proxy - { RID_SVXPAGE_INET_MAIL, "" }, // Email + { RID_SVXPAGE_INET_PROXY, u""_ustr }, // Proxy + { RID_SVXPAGE_INET_MAIL, u""_ustr }, // Email // Load/Save, SID_FILTER_DLG - { RID_SFXPAGE_SAVE, "" }, // General - { SID_OPTFILTER_MSOFFICE, "" }, // VBA Properties - { RID_OFAPAGE_MSFILTEROPT2, "" }, // Microsoft Office - { RID_OFAPAGE_HTMLOPT, "" }, // HTML Compatibility + { RID_SFXPAGE_SAVE, u""_ustr }, // General + { SID_OPTFILTER_MSOFFICE, u""_ustr }, // VBA Properties + { RID_OFAPAGE_MSFILTEROPT2, u""_ustr }, // Microsoft Office + { RID_OFAPAGE_HTMLOPT, u""_ustr }, // HTML Compatibility // Writer, SID_SW_EDITOPTIONS - { RID_SW_TP_OPTLOAD_PAGE, "" }, // General - { RID_SW_TP_CONTENT_OPT, "" }, // View - { RID_SW_TP_OPTSHDWCRSR, "" }, // FormattingAids - { RID_SVXPAGE_GRID, "" }, // Grid - { RID_SW_TP_STD_FONT, "" }, // BasicFontsWestern - { RID_SW_TP_STD_FONT_CJK, "" }, // BasicFontsAsian - { RID_SW_TP_STD_FONT_CTL, "" }, // BasicFontsCTL - { RID_SW_TP_OPTPRINT_PAGE, "" }, // Print - { RID_SW_TP_OPTTABLE_PAGE, "" }, // Table - { RID_SW_TP_REDLINE_OPT, "" }, // Changes - { RID_SW_TP_COMPARISON_OPT, "" }, // Comparison - { RID_SW_TP_OPTCOMPATIBILITY_PAGE, "" }, // Compatibility - { RID_SW_TP_OPTCAPTION_PAGE, "" }, // AutoCaption - { RID_SW_TP_MAILCONFIG, "" }, // MailMerge - { RID_SW_TP_OPTTEST_PAGE, "" }, // Internal Test (only in dev build) + { RID_SW_TP_OPTLOAD_PAGE, u""_ustr }, // General + { RID_SW_TP_CONTENT_OPT, u""_ustr }, // View + { RID_SW_TP_OPTSHDWCRSR, u""_ustr }, // FormattingAids + { RID_SVXPAGE_GRID, u""_ustr }, // Grid + { RID_SW_TP_STD_FONT, u""_ustr }, // BasicFontsWestern + { RID_SW_TP_STD_FONT_CJK, u""_ustr }, // BasicFontsAsian + { RID_SW_TP_STD_FONT_CTL, u""_ustr }, // BasicFontsCTL + { RID_SW_TP_OPTPRINT_PAGE, u""_ustr }, // Print + { RID_SW_TP_OPTTABLE_PAGE, u""_ustr }, // Table + { RID_SW_TP_REDLINE_OPT, u""_ustr }, // Changes + { RID_SW_TP_COMPARISON_OPT, u""_ustr }, // Comparison + { RID_SW_TP_OPTCOMPATIBILITY_PAGE, u""_ustr }, // Compatibility + { RID_SW_TP_OPTCAPTION_PAGE, u""_ustr }, // AutoCaption + { RID_SW_TP_MAILCONFIG, u""_ustr }, // MailMerge + { RID_SW_TP_OPTTEST_PAGE, u""_ustr }, // Internal Test (only in dev build) // WriterWeb, SID_SW_ONLINEOPTIONS - { RID_SW_TP_HTML_CONTENT_OPT, "" }, // View - { RID_SW_TP_HTML_OPTSHDWCRSR, "" }, // FormattingAids - { RID_SW_TP_HTML_OPTGRID_PAGE, "" }, // Grid - { RID_SW_TP_HTML_OPTPRINT_PAGE, "" }, // Print - { RID_SW_TP_HTML_OPTTABLE_PAGE, "" }, // Table - { RID_SW_TP_BACKGROUND, "" }, // Background - { RID_SW_TP_OPTTEST_PAGE, "" }, // Internal Test (only in dev build) + { RID_SW_TP_HTML_CONTENT_OPT, u""_ustr }, // View + { RID_SW_TP_HTML_OPTSHDWCRSR, u""_ustr }, // FormattingAids + { RID_SW_TP_HTML_OPTGRID_PAGE, u""_ustr }, // Grid + { RID_SW_TP_HTML_OPTPRINT_PAGE, u""_ustr }, // Print + { RID_SW_TP_HTML_OPTTABLE_PAGE, u""_ustr }, // Table + { RID_SW_TP_BACKGROUND, u""_ustr }, // Background + { RID_SW_TP_OPTTEST_PAGE, u""_ustr }, // Internal Test (only in dev build) // Math, SID_SM_EDITOPTIONS - { SID_SM_TP_PRINTOPTIONS, "" }, // Settings + { SID_SM_TP_PRINTOPTIONS, u""_ustr }, // Settings // Calc, SID_SC_EDITOPTIONS - { SID_SC_TP_LAYOUT, "" }, // General - { RID_SC_TP_DEFAULTS, "" }, // Defaults - { SID_SC_TP_CONTENT, "" }, // View - { SID_SC_TP_CALC, "" }, // Calculate - { SID_SC_TP_FORMULA, "" }, // Formula - { SID_SC_TP_USERLISTS, "" }, // SortLists - { SID_SC_TP_CHANGES, "" }, // Changes - { SID_SC_TP_COMPATIBILITY, "" }, // Compatibility - { SID_SC_TP_GRID, "" }, // Grid - { RID_SC_TP_PRINT, "" }, // Print + { SID_SC_TP_LAYOUT, u""_ustr }, // General + { RID_SC_TP_DEFAULTS, u""_ustr }, // Defaults + { SID_SC_TP_CONTENT, u""_ustr }, // View + { SID_SC_TP_CALC, u""_ustr }, // Calculate + { SID_SC_TP_FORMULA, u""_ustr }, // Formula + { SID_SC_TP_USERLISTS, u""_ustr }, // SortLists + { SID_SC_TP_CHANGES, u""_ustr }, // Changes + { SID_SC_TP_COMPATIBILITY, u""_ustr }, // Compatibility + { SID_SC_TP_GRID, u""_ustr }, // Grid + { RID_SC_TP_PRINT, u""_ustr }, // Print // Impress, SID_SD_EDITOPTIONS - { SID_SI_TP_MISC, "" }, // General - { SID_SI_TP_CONTENTS, "" }, // View - { SID_SI_TP_SNAP, "" }, // Grid - { SID_SI_TP_PRINT, "" }, // Print + { SID_SI_TP_MISC, u""_ustr }, // General + { SID_SI_TP_CONTENTS, u""_ustr }, // View + { SID_SI_TP_SNAP, u""_ustr }, // Grid + { SID_SI_TP_PRINT, u""_ustr }, // Print // Draw, SID_SD_GRAPHIC_OPTIONS - { SID_SD_TP_MISC, "" }, // General - { SID_SD_TP_CONTENTS, "" }, // View - { SID_SD_TP_SNAP, "" }, // Grid - { SID_SD_TP_PRINT, "" }, // Print + { SID_SD_TP_MISC, u""_ustr }, // General + { SID_SD_TP_CONTENTS, u""_ustr }, // View + { SID_SD_TP_SNAP, u""_ustr }, // Grid + { SID_SD_TP_PRINT, u""_ustr }, // Print // Charts, SID_SCH_EDITOPTIONS - { RID_OPTPAGE_CHART_DEFCOLORS, "" }, // DefaultColor + { RID_OPTPAGE_CHART_DEFCOLORS, u""_ustr }, // DefaultColor // Base, SID_SB_STARBASEOPTIONS - { SID_SB_CONNECTIONPOOLING, "" }, // Connections - { SID_SB_DBREGISTEROPTIONS, "" } // Databases + { SID_SB_CONNECTIONPOOLING, u""_ustr }, // Connections + { SID_SB_DBREGISTEROPTIONS, u""_ustr } // Databases }; void TreeOptHelper::storeStringsOfDialog(sal_uInt16 nPageId, const OUString& sPageStrings) diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx index d0d9ef1c1c6c..925dafbccf21 100644 --- a/cui/source/options/tsaurls.cxx +++ b/cui/source/options/tsaurls.cxx @@ -17,12 +17,12 @@ using namespace ::com::sun::star; TSAURLsDialog::TSAURLsDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/tsaurldialog.ui", "TSAURLDialog") - , m_xAddBtn(m_xBuilder->weld_button("add")) - , m_xDeleteBtn(m_xBuilder->weld_button("delete")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xURLListBox(m_xBuilder->weld_tree_view("urls")) - , m_xEnterAUrl(m_xBuilder->weld_label("enteraurl")) + : GenericDialogController(pParent, u"cui/ui/tsaurldialog.ui"_ustr, u"TSAURLDialog"_ustr) + , m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr)) + , m_xDeleteBtn(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xURLListBox(m_xBuilder->weld_tree_view(u"urls"_ustr)) + , m_xEnterAUrl(m_xBuilder->weld_label(u"enteraurl"_ustr)) { m_xURLListBox->set_size_request(m_xURLListBox->get_approximate_digit_width() * 28, m_xURLListBox->get_height_rows(8)); diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 4ab84e4320ed..4ad32400ebe5 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -35,12 +35,12 @@ namespace svx // class WebConnectionInfoDialog ----------------------------------------- WebConnectionInfoDialog::WebConnectionInfoDialog(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/storedwebconnectiondialog.ui", "StoredWebConnectionDialog") + : GenericDialogController(pParent, u"cui/ui/storedwebconnectiondialog.ui"_ustr, u"StoredWebConnectionDialog"_ustr) , m_nPos( -1 ) - , m_xRemoveBtn(m_xBuilder->weld_button("remove")) - , m_xRemoveAllBtn(m_xBuilder->weld_button("removeall")) - , m_xChangeBtn(m_xBuilder->weld_button("change")) - , m_xPasswordsLB(m_xBuilder->weld_tree_view("logins")) + , m_xRemoveBtn(m_xBuilder->weld_button(u"remove"_ustr)) + , m_xRemoveAllBtn(m_xBuilder->weld_button(u"removeall"_ustr)) + , m_xChangeBtn(m_xBuilder->weld_button(u"change"_ustr)) + , m_xPasswordsLB(m_xBuilder->weld_tree_view(u"logins"_ustr)) { std::vector<int> aWidths { @@ -110,7 +110,7 @@ void WebConnectionInfoDialog::FillPasswordList() for ( OUString const & url : aUrls ) { m_xPasswordsLB->append(OUString::number(nCount), url); - m_xPasswordsLB->set_text(nCount, "*"); + m_xPasswordsLB->set_text(nCount, u"*"_ustr); ++nCount; } } diff --git a/cui/source/tabpages/TextColumnsPage.cxx b/cui/source/tabpages/TextColumnsPage.cxx index 2e39995083f3..5723258ad8ee 100644 --- a/cui/source/tabpages/TextColumnsPage.cxx +++ b/cui/source/tabpages/TextColumnsPage.cxx @@ -21,10 +21,11 @@ const WhichRangesContainer SvxTextColumnsPage::SvxTextColumnsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/textcolumnstabpage.ui", "TextColumnsPage", &rInAttrs) - , m_xColumnsNumber(m_xBuilder->weld_spin_button("FLD_COL_NUMBER")) - , m_xColumnsSpacing( - m_xBuilder->weld_metric_spin_button("MTR_FLD_COL_SPACING", GetModuleFieldUnit(rInAttrs))) + : SfxTabPage(pPage, pController, u"cui/ui/textcolumnstabpage.ui"_ustr, u"TextColumnsPage"_ustr, + &rInAttrs) + , m_xColumnsNumber(m_xBuilder->weld_spin_button(u"FLD_COL_NUMBER"_ustr)) + , m_xColumnsSpacing(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_COL_SPACING"_ustr, + GetModuleFieldUnit(rInAttrs))) { } diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index d5816158d70b..33ea17f11f4a 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -107,37 +107,37 @@ void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, const SfxItemSet& rOldSet, }//namespace AlignmentTabPage::AlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) - : SfxTabPage(pPage, pController, "cui/ui/cellalignment.ui", "CellAlignPage", &rCoreAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/cellalignment.ui"_ustr, u"CellAlignPage"_ustr, &rCoreAttrs) , m_aVsRefEdge(nullptr) // text alignment - , m_xLbHorAlign(m_xBuilder->weld_combo_box("comboboxHorzAlign")) - , m_xFtIndent(m_xBuilder->weld_label("labelIndent")) - , m_xEdIndent(m_xBuilder->weld_metric_spin_button("spinIndentFrom", FieldUnit::POINT)) - , m_xFtVerAlign(m_xBuilder->weld_label("labelVertAlign")) - , m_xLbVerAlign(m_xBuilder->weld_combo_box("comboboxVertAlign")) + , m_xLbHorAlign(m_xBuilder->weld_combo_box(u"comboboxHorzAlign"_ustr)) + , m_xFtIndent(m_xBuilder->weld_label(u"labelIndent"_ustr)) + , m_xEdIndent(m_xBuilder->weld_metric_spin_button(u"spinIndentFrom"_ustr, FieldUnit::POINT)) + , m_xFtVerAlign(m_xBuilder->weld_label(u"labelVertAlign"_ustr)) + , m_xLbVerAlign(m_xBuilder->weld_combo_box(u"comboboxVertAlign"_ustr)) //text rotation - , m_xFtRotate(m_xBuilder->weld_label("labelDegrees")) - , m_xNfRotate(m_xBuilder->weld_metric_spin_button("spinDegrees", FieldUnit::DEGREE)) - , m_xFtRefEdge(m_xBuilder->weld_label("labelRefEdge")) + , m_xFtRotate(m_xBuilder->weld_label(u"labelDegrees"_ustr)) + , m_xNfRotate(m_xBuilder->weld_metric_spin_button(u"spinDegrees"_ustr, FieldUnit::DEGREE)) + , m_xFtRefEdge(m_xBuilder->weld_label(u"labelRefEdge"_ustr)) //Asian mode - , m_xCbStacked(m_xBuilder->weld_check_button("checkVertStack")) - , m_xCbAsianMode(m_xBuilder->weld_check_button("checkAsianMode")) + , m_xCbStacked(m_xBuilder->weld_check_button(u"checkVertStack"_ustr)) + , m_xCbAsianMode(m_xBuilder->weld_check_button(u"checkAsianMode"_ustr)) // Properties - , m_xBtnWrap(m_xBuilder->weld_check_button("checkWrapTextAuto")) - , m_xBtnHyphen(m_xBuilder->weld_check_button("checkHyphActive")) - , m_xBtnShrink(m_xBuilder->weld_check_button("checkShrinkFitCellSize")) - , m_xLbFrameDir(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box("comboTextDirBox"))) + , m_xBtnWrap(m_xBuilder->weld_check_button(u"checkWrapTextAuto"_ustr)) + , m_xBtnHyphen(m_xBuilder->weld_check_button(u"checkHyphActive"_ustr)) + , m_xBtnShrink(m_xBuilder->weld_check_button(u"checkShrinkFitCellSize"_ustr)) + , m_xLbFrameDir(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(u"comboTextDirBox"_ustr))) //ValueSet hover strings - , m_xFtBotLock(m_xBuilder->weld_label("labelSTR_BOTTOMLOCK")) - , m_xFtTopLock(m_xBuilder->weld_label("labelSTR_TOPLOCK")) - , m_xFtCelLock(m_xBuilder->weld_label("labelSTR_CELLLOCK")) - , m_xFtABCD(m_xBuilder->weld_label("labelABCD")) - , m_xAlignmentFrame(m_xBuilder->weld_widget("alignment")) - , m_xOrientFrame(m_xBuilder->weld_widget("orientation")) - , m_xPropertiesFrame(m_xBuilder->weld_widget("properties")) - , m_xVsRefEdge(new weld::CustomWeld(*m_xBuilder, "references", m_aVsRefEdge)) + , m_xFtBotLock(m_xBuilder->weld_label(u"labelSTR_BOTTOMLOCK"_ustr)) + , m_xFtTopLock(m_xBuilder->weld_label(u"labelSTR_TOPLOCK"_ustr)) + , m_xFtCelLock(m_xBuilder->weld_label(u"labelSTR_CELLLOCK"_ustr)) + , m_xFtABCD(m_xBuilder->weld_label(u"labelABCD"_ustr)) + , m_xAlignmentFrame(m_xBuilder->weld_widget(u"alignment"_ustr)) + , m_xOrientFrame(m_xBuilder->weld_widget(u"orientation"_ustr)) + , m_xPropertiesFrame(m_xBuilder->weld_widget(u"properties"_ustr)) + , m_xVsRefEdge(new weld::CustomWeld(*m_xBuilder, u"references"_ustr, m_aVsRefEdge)) , m_xCtrlDial(new DialControl) - , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialcontrol", *m_xCtrlDial)) + , m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, u"dialcontrol"_ustr, *m_xCtrlDial)) { m_xCtrlDial->SetLinkedField(m_xNfRotate.get()); m_xCtrlDial->SetText(m_xFtABCD->get_label()); @@ -483,7 +483,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) m_xEdIndent->set_sensitive(false); break; case SfxItemState::INVALID: - m_xEdIndent->set_text(""); + m_xEdIndent->set_text(u""_ustr); break; case SfxItemState::DEFAULT: case SfxItemState::SET: diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index b7abdbcce907..87e803f677b4 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -57,9 +57,9 @@ static LanguageType eLastDialogLanguage = LANGUAGE_SYSTEM; using namespace ::com::sun::star; OfaAutoCorrDlg::OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet* _pSet ) - : SfxTabDialogController(pParent, "cui/ui/autocorrectdialog.ui", "AutoCorrectDialog", _pSet) - , m_xLanguageBox(m_xBuilder->weld_widget("langbox")) - , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("lang"))) + : SfxTabDialogController(pParent, u"cui/ui/autocorrectdialog.ui"_ustr, u"AutoCorrectDialog"_ustr, _pSet) + , m_xLanguageBox(m_xBuilder->weld_widget(u"langbox"_ustr)) + , m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"lang"_ustr))) { bool bShowSWOptions = false; bool bOpenSmartTagOptions = false; @@ -75,16 +75,16 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet* _pSet ) bOpenSmartTagOptions = true; } - AddTabPage("options", OfaAutocorrOptionsPage::Create, nullptr); - AddTabPage("applypage", OfaSwAutoFmtOptionsPage::Create, nullptr); - AddTabPage("wordcompletion", OfaAutoCompleteTabPage::Create, nullptr); - AddTabPage("smarttags", OfaSmartTagOptionsTabPage::Create, nullptr); + AddTabPage(u"options"_ustr, OfaAutocorrOptionsPage::Create, nullptr); + AddTabPage(u"applypage"_ustr, OfaSwAutoFmtOptionsPage::Create, nullptr); + AddTabPage(u"wordcompletion"_ustr, OfaAutoCompleteTabPage::Create, nullptr); + AddTabPage(u"smarttags"_ustr, OfaSmartTagOptionsTabPage::Create, nullptr); if (!bShowSWOptions) { - RemoveTabPage("applypage"); - RemoveTabPage("wordcompletion"); - RemoveTabPage("smarttags"); + RemoveTabPage(u"applypage"_ustr); + RemoveTabPage(u"wordcompletion"_ustr); + RemoveTabPage(u"smarttags"_ustr); } else { @@ -92,14 +92,14 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet* _pSet ) SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFormatFlags& rOpt = pAutoCorrect->GetSwFlags(); if (!rOpt.pSmartTagMgr || 0 == rOpt.pSmartTagMgr->NumberOfRecognizers()) - RemoveTabPage("smarttags"); + RemoveTabPage(u"smarttags"_ustr); - RemoveTabPage("options"); + RemoveTabPage(u"options"_ustr); } - AddTabPage("replace", OfaAutocorrReplacePage::Create, nullptr); - AddTabPage("exceptions", OfaAutocorrExceptPage::Create, nullptr); - AddTabPage("localized", OfaQuoteTabPage::Create, nullptr); + AddTabPage(u"replace"_ustr, OfaAutocorrReplacePage::Create, nullptr); + AddTabPage(u"exceptions"_ustr, OfaAutocorrExceptPage::Create, nullptr); + AddTabPage(u"localized"_ustr, OfaQuoteTabPage::Create, nullptr); // initialize languages //! LANGUAGE_NONE is displayed as '[All]' and the LanguageType @@ -129,7 +129,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet* _pSet ) m_xLanguageLB->connect_changed(LINK(this, OfaAutoCorrDlg, SelectLanguageHdl)); if ( bOpenSmartTagOptions ) - SetCurPageId("smarttags"); + SetCurPageId(u"smarttags"_ustr); } OfaAutoCorrDlg::~OfaAutoCorrDlg() @@ -182,7 +182,7 @@ IMPL_LINK_NOARG(OfaAutoCorrDlg, SelectLanguageHdl, weld::ComboBox&, void) } OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/acoroptionspage.ui", "AutocorrectOptionsPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/acoroptionspage.ui"_ustr, u"AutocorrectOptionsPage"_ustr, &rSet) , m_sInput(CuiResId(RID_CUISTR_USE_REPLACE)) , m_sDoubleCaps(CuiResId(RID_CUISTR_CPTL_STT_WORD)) , m_sStartCap(CuiResId(RID_CUISTR_CPTL_STT_SENT)) @@ -192,7 +192,7 @@ OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(weld::Container* pPage, weld::Dia , m_sNoDblSpaces(CuiResId(RID_CUISTR_NO_DBL_SPACES)) , m_sDash(CuiResId(RID_CUISTR_DASH)) , m_sAccidentalCaps(CuiResId(RID_CUISTR_CORRECT_ACCIDENTAL_CAPS_LOCK)) - , m_xCheckLB(m_xBuilder->weld_tree_view("checklist")) + , m_xCheckLB(m_xBuilder->weld_tree_view(u"checklist"_ustr)) { m_xCheckLB->enable_toggle_buttons(weld::ColumnToggleType::Check); m_xCheckLB->set_size_request(-1, m_xCheckLB->get_height_rows(10)); @@ -312,8 +312,8 @@ class OfaAutoFmtPrcntSet : public weld::GenericDialogController std::unique_ptr<weld::MetricSpinButton> m_xPrcntMF; public: explicit OfaAutoFmtPrcntSet(weld::Window* pParent) - : GenericDialogController(pParent, "cui/ui/percentdialog.ui", "PercentDialog") - , m_xPrcntMF(m_xBuilder->weld_metric_spin_button("margin", FieldUnit::PERCENT)) + : GenericDialogController(pParent, u"cui/ui/percentdialog.ui"_ustr, u"PercentDialog"_ustr) + , m_xPrcntMF(m_xBuilder->weld_metric_spin_button(u"margin"_ustr, FieldUnit::PERCENT)) { } @@ -357,7 +357,7 @@ enum OfaAutoFmtOptions OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) - : SfxTabPage(pPage, pController, "cui/ui/applyautofmtpage.ui", "ApplyAutoFmtPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/applyautofmtpage.ui"_ustr, u"ApplyAutoFmtPage"_ustr, &rSet) , sDeleteEmptyPara(CuiResId(RID_CUISTR_DEL_EMPTY_PARA)) , sUseReplaceTbl(CuiResId(RID_CUISTR_USE_REPLACE)) , sCapitalStartWord(CuiResId(RID_CUISTR_CPTL_STT_WORD)) @@ -379,8 +379,8 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage(weld::Container* pPage, weld::D , sDelSpaceAtSttEnd(CuiResId(RID_CUISTR_DEL_SPACES_AT_STT_END)) , sDelSpaceBetweenLines(CuiResId(RID_CUISTR_DEL_SPACES_BETWEEN_LINES)) , nPercent(50) - , m_xCheckLB(m_xBuilder->weld_tree_view("list")) - , m_xEditPB(m_xBuilder->weld_button("edit")) + , m_xCheckLB(m_xBuilder->weld_tree_view(u"list"_ustr)) + , m_xEditPB(m_xBuilder->weld_button(u"edit"_ustr)) { m_xCheckLB->connect_changed(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl)); m_xCheckLB->connect_row_activated(LINK(this, OfaSwAutoFmtOptionsPage, DoubleClickEditHdl)); @@ -688,21 +688,21 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, weld::Button&, void) OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/acorreplacepage.ui", "AcorReplacePage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/acorreplacepage.ui"_ustr, u"AcorReplacePage"_ustr, &rSet) , maCompareClass(comphelper::getProcessComponentContext()) , eLang(eLastDialogLanguage) , bHasSelectionText(false) , bFirstSelect(true) , bReplaceEditChanged(false) , bSWriter(true) - , m_xTextOnlyCB(m_xBuilder->weld_check_button("textonly")) - , m_xShortED(m_xBuilder->weld_entry("origtext")) - , m_xReplaceED(m_xBuilder->weld_entry("newtext")) - , m_xReplaceTLB(m_xBuilder->weld_tree_view("tabview")) - , m_xNewReplacePB(m_xBuilder->weld_button("new")) - , m_xReplacePB(m_xBuilder->weld_button("replace")) - , m_xDeleteReplacePB(m_xBuilder->weld_button("delete")) - , m_xButtonBox(m_xBuilder->weld_container("buttonbox")) + , m_xTextOnlyCB(m_xBuilder->weld_check_button(u"textonly"_ustr)) + , m_xShortED(m_xBuilder->weld_entry(u"origtext"_ustr)) + , m_xReplaceED(m_xBuilder->weld_entry(u"newtext"_ustr)) + , m_xReplaceTLB(m_xBuilder->weld_tree_view(u"tabview"_ustr)) + , m_xNewReplacePB(m_xBuilder->weld_button(u"new"_ustr)) + , m_xReplacePB(m_xBuilder->weld_button(u"replace"_ustr)) + , m_xDeleteReplacePB(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xButtonBox(m_xBuilder->weld_container(u"buttonbox"_ustr)) { sNew = m_xNewReplacePB->get_label(); sModify = m_xReplacePB->get_label(); @@ -1211,19 +1211,19 @@ static bool lcl_FindInArray(std::vector<OUString>& rStrings, std::u16string_view } OfaAutocorrExceptPage::OfaAutocorrExceptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/acorexceptpage.ui", "AcorExceptPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/acorexceptpage.ui"_ustr, u"AcorExceptPage"_ustr, &rSet) , maCompareClass(comphelper::getProcessComponentContext()) , eLang(eLastDialogLanguage) - , m_xAbbrevED(m_xBuilder->weld_entry("abbrev")) - , m_xAbbrevLB(m_xBuilder->weld_tree_view("abbrevlist")) - , m_xNewAbbrevPB(m_xBuilder->weld_button("newabbrev")) - , m_xDelAbbrevPB(m_xBuilder->weld_button("delabbrev")) - , m_xAutoAbbrevCB(m_xBuilder->weld_check_button("autoabbrev")) - , m_xDoubleCapsED(m_xBuilder->weld_entry("double")) - , m_xDoubleCapsLB(m_xBuilder->weld_tree_view("doublelist")) - , m_xNewDoublePB(m_xBuilder->weld_button("newdouble")) - , m_xDelDoublePB(m_xBuilder->weld_button("deldouble")) - , m_xAutoCapsCB(m_xBuilder->weld_check_button("autodouble")) + , m_xAbbrevED(m_xBuilder->weld_entry(u"abbrev"_ustr)) + , m_xAbbrevLB(m_xBuilder->weld_tree_view(u"abbrevlist"_ustr)) + , m_xNewAbbrevPB(m_xBuilder->weld_button(u"newabbrev"_ustr)) + , m_xDelAbbrevPB(m_xBuilder->weld_button(u"delabbrev"_ustr)) + , m_xAutoAbbrevCB(m_xBuilder->weld_check_button(u"autoabbrev"_ustr)) + , m_xDoubleCapsED(m_xBuilder->weld_entry(u"double"_ustr)) + , m_xDoubleCapsLB(m_xBuilder->weld_tree_view(u"doublelist"_ustr)) + , m_xNewDoublePB(m_xBuilder->weld_button(u"newdouble"_ustr)) + , m_xDelDoublePB(m_xBuilder->weld_button(u"deldouble"_ustr)) + , m_xAutoCapsCB(m_xBuilder->weld_check_button(u"autodouble"_ustr)) { m_xAbbrevLB->make_sorted(); m_xAbbrevLB->set_size_request(-1, m_xAbbrevLB->get_height_rows(6)); @@ -1426,8 +1426,8 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(bool bFromReset, } m_xDoubleCapsLB->clear(); m_xAbbrevLB->clear(); - m_xAbbrevED->set_text(""); - m_xDoubleCapsED->set_text(""); + m_xAbbrevED->set_text(u""_ustr); + m_xDoubleCapsED->set_text(u""_ustr); if(aStringsTable.find(eLang) != aStringsTable.end()) { @@ -1571,7 +1571,7 @@ void OfaQuoteTabPage::CreateEntry(weld::TreeView& rCheckLB, const OUString& rTxt } OfaQuoteTabPage::OfaQuoteTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/applylocalizedpage.ui", "ApplyLocalizedPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/applylocalizedpage.ui"_ustr, u"ApplyLocalizedPage"_ustr, &rSet) , sNonBrkSpace(CuiResId(RID_CUISTR_NON_BREAK_SPACE)) , sOrdinal(CuiResId(RID_CUISTR_ORDINAL)) , sTransliterateRTL(CuiResId(RID_CUISTR_OLD_HUNGARIAN)) @@ -1580,21 +1580,21 @@ OfaQuoteTabPage::OfaQuoteTabPage(weld::Container* pPage, weld::DialogController* , cSglEndQuote(0) , cStartQuote(0) , cEndQuote(0) - , m_xSingleTypoCB(m_xBuilder->weld_check_button("singlereplace")) - , m_xSglStartQuotePB(m_xBuilder->weld_button("startsingle")) - , m_xSglStartExFT(m_xBuilder->weld_label("singlestartex")) - , m_xSglEndQuotePB(m_xBuilder->weld_button("endsingle")) - , m_xSglEndExFT(m_xBuilder->weld_label("singleendex")) - , m_xSglStandardPB(m_xBuilder->weld_button("defaultsingle")) - , m_xDoubleTypoCB(m_xBuilder->weld_check_button("doublereplace")) - , m_xDblStartQuotePB(m_xBuilder->weld_button("startdouble")) - , m_xDblStartExFT(m_xBuilder->weld_label("doublestartex")) - , m_xDblEndQuotePB(m_xBuilder->weld_button("enddouble")) - , m_xDblEndExFT(m_xBuilder->weld_label("doubleendex")) - , m_xDblStandardPB(m_xBuilder->weld_button("defaultdouble")) + , m_xSingleTypoCB(m_xBuilder->weld_check_button(u"singlereplace"_ustr)) + , m_xSglStartQuotePB(m_xBuilder->weld_button(u"startsingle"_ustr)) + , m_xSglStartExFT(m_xBuilder->weld_label(u"singlestartex"_ustr)) + , m_xSglEndQuotePB(m_xBuilder->weld_button(u"endsingle"_ustr)) + , m_xSglEndExFT(m_xBuilder->weld_label(u"singleendex"_ustr)) + , m_xSglStandardPB(m_xBuilder->weld_button(u"defaultsingle"_ustr)) + , m_xDoubleTypoCB(m_xBuilder->weld_check_button(u"doublereplace"_ustr)) + , m_xDblStartQuotePB(m_xBuilder->weld_button(u"startdouble"_ustr)) + , m_xDblStartExFT(m_xBuilder->weld_label(u"doublestartex"_ustr)) + , m_xDblEndQuotePB(m_xBuilder->weld_button(u"enddouble"_ustr)) + , m_xDblEndExFT(m_xBuilder->weld_label(u"doubleendex"_ustr)) + , m_xDblStandardPB(m_xBuilder->weld_button(u"defaultdouble"_ustr)) , m_sStandard(m_xSglStartExFT->get_label()) - , m_xCheckLB(m_xBuilder->weld_tree_view("checklist")) - , m_xSwCheckLB(m_xBuilder->weld_tree_view("list")) + , m_xCheckLB(m_xBuilder->weld_tree_view(u"checklist"_ustr)) + , m_xSwCheckLB(m_xBuilder->weld_tree_view(u"list"_ustr)) { m_xSwCheckLB->set_size_request(m_xSwCheckLB->get_approximate_digit_width() * 50, m_xSwCheckLB->get_height_rows(6)); @@ -1920,20 +1920,20 @@ OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar ) OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/wordcompletionpage.ui", - "WordCompletionPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/wordcompletionpage.ui"_ustr, + u"WordCompletionPage"_ustr, &rSet) , m_pAutoCompleteList(nullptr) , m_nAutoCmpltListCnt(0) - , m_xCBActiv(m_xBuilder->weld_check_button("enablewordcomplete")) - , m_xCBAppendSpace(m_xBuilder->weld_check_button("appendspace")) - , m_xCBAsTip(m_xBuilder->weld_check_button("showastip")) - , m_xCBCollect(m_xBuilder->weld_check_button("collectwords")) - , m_xCBRemoveList(m_xBuilder->weld_check_button("whenclosing")) - , m_xDCBExpandKey(m_xBuilder->weld_combo_box("acceptwith")) - , m_xNFMinWordlen(m_xBuilder->weld_spin_button("minwordlen")) - , m_xNFMaxEntries(m_xBuilder->weld_spin_button("maxentries")) - , m_xLBEntries(m_xBuilder->weld_tree_view("entries")) - , m_xPBEntries(m_xBuilder->weld_button("delete")) + , m_xCBActiv(m_xBuilder->weld_check_button(u"enablewordcomplete"_ustr)) + , m_xCBAppendSpace(m_xBuilder->weld_check_button(u"appendspace"_ustr)) + , m_xCBAsTip(m_xBuilder->weld_check_button(u"showastip"_ustr)) + , m_xCBCollect(m_xBuilder->weld_check_button(u"collectwords"_ustr)) + , m_xCBRemoveList(m_xBuilder->weld_check_button(u"whenclosing"_ustr)) + , m_xDCBExpandKey(m_xBuilder->weld_combo_box(u"acceptwith"_ustr)) + , m_xNFMinWordlen(m_xBuilder->weld_spin_button(u"minwordlen"_ustr)) + , m_xNFMaxEntries(m_xBuilder->weld_spin_button(u"maxentries"_ustr)) + , m_xLBEntries(m_xBuilder->weld_tree_view(u"entries"_ustr)) + , m_xPBEntries(m_xBuilder->weld_button(u"delete"_ustr)) { //fdo#65595, we need height-for-width support here, but for now we can //bodge it @@ -2165,10 +2165,10 @@ IMPL_LINK(OfaAutoCompleteTabPage, KeyReleaseHdl, const KeyEvent&, rEvent, bool) OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) - : SfxTabPage(pPage, pController, "cui/ui/smarttagoptionspage.ui", "SmartTagOptionsPage", &rSet) - , m_xMainCB(m_xBuilder->weld_check_button("main")) - , m_xSmartTagTypesLB(m_xBuilder->weld_tree_view("list")) - , m_xPropertiesPB(m_xBuilder->weld_button("properties")) + : SfxTabPage(pPage, pController, u"cui/ui/smarttagoptionspage.ui"_ustr, u"SmartTagOptionsPage"_ustr, &rSet) + , m_xMainCB(m_xBuilder->weld_check_button(u"main"_ustr)) + , m_xSmartTagTypesLB(m_xBuilder->weld_tree_view(u"list"_ustr)) + , m_xPropertiesPB(m_xBuilder->weld_button(u"properties"_ustr)) { m_xSmartTagTypesLB->set_size_request(m_xSmartTagTypesLB->get_approximate_digit_width() * 50, m_xSmartTagTypesLB->get_height_rows(6)); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index b10c6f79c304..aa53dcd64afe 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -237,7 +237,7 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet) if ( nFlags & SvxBackgroundTabFlags::SHOW_TBLCTL ) { m_xBtnBitmap->show(); - m_xTblLBox = m_xBuilder->weld_combo_box("tablelb"); + m_xTblLBox = m_xBuilder->weld_combo_box(u"tablelb"_ustr); m_xTblLBox->connect_changed(LINK(this, SvxBkgTabPage, TblDestinationHdl_Impl)); m_xTblLBox->show(); } diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index 9fc59604476e..f2d6a567feb2 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -30,24 +30,24 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(weld::Window *pParent, bool bEnableDrawingLayerFillStyles) : SfxTabDialogController(pParent, bEnableDrawingLayerFillStyles - ? OUString("cui/ui/borderareatransparencydialog.ui") - : OUString("cui/ui/borderbackgrounddialog.ui"), + ? u"cui/ui/borderareatransparencydialog.ui"_ustr + : u"cui/ui/borderbackgrounddialog.ui"_ustr, bEnableDrawingLayerFillStyles - ? OUString("BorderAreaTransparencyDialog") - : OUString("BorderBackgroundDialog"), + ? u"BorderAreaTransparencyDialog"_ustr + : u"BorderBackgroundDialog"_ustr, &rCoreSet) , mbEnableBackgroundSelector(bEnableSelector) { - AddTabPage("borders", SvxBorderTabPage::Create, nullptr ); + AddTabPage(u"borders"_ustr, SvxBorderTabPage::Create, nullptr ); if (bEnableDrawingLayerFillStyles) { // Here we want full DrawingLayer FillStyle access, so add Area and Transparency TabPages - AddTabPage("area", SvxAreaTabPage::Create, nullptr); - AddTabPage("transparence", SvxTransparenceTabPage::Create, nullptr); + AddTabPage(u"area"_ustr, SvxAreaTabPage::Create, nullptr); + AddTabPage(u"transparence"_ustr, SvxTransparenceTabPage::Create, nullptr); } else { - AddTabPage("background", SvxBkgTabPage::Create, nullptr ); + AddTabPage(u"background"_ustr, SvxBkgTabPage::Create, nullptr ); } } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index ccb94fe46854..fe07cc5d8221 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -225,7 +225,7 @@ bool ShadowControlsWrapper::get_value_changed_from_saved() const void ShadowControlsWrapper::SetControlDontKnow() { mrVsPos.SetNoSelection(); - mrMfSize.set_text(""); + mrMfSize.set_text(u""_ustr); mrLbColor.SetNoSelection(); } @@ -282,7 +282,7 @@ void MarginControlsWrapper::SetControlDontKnow() } SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) - : SfxTabPage(pPage, pController, "cui/ui/borderpage.ui", "BorderPage", &rCoreAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/borderpage.ui"_ustr, u"BorderPage"_ustr, &rCoreAttrs) , nMinValue(0) , nSWMode(SwBorderModes::NONE) , mnBoxSlot(SID_ATTR_BORDER_OUTER) @@ -300,37 +300,37 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle , mbRemoveAdjacentCellBorders(false) , bIsCalcDoc(false) , m_xWndPresets(new ValueSet(nullptr)) - , m_xWndPresetsWin(new weld::CustomWeld(*m_xBuilder, "presets", *m_xWndPresets)) - , m_xUserDefFT(m_xBuilder->weld_label("userdefft")) - , m_xFrameSelWin(new weld::CustomWeld(*m_xBuilder, "framesel", m_aFrameSel)) - , m_xLbLineStyle(new SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb"))) - , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), + , m_xWndPresetsWin(new weld::CustomWeld(*m_xBuilder, u"presets"_ustr, *m_xWndPresets)) + , m_xUserDefFT(m_xBuilder->weld_label(u"userdefft"_ustr)) + , m_xFrameSelWin(new weld::CustomWeld(*m_xBuilder, u"framesel"_ustr, m_aFrameSel)) + , m_xLbLineStyle(new SvtLineListBox(m_xBuilder->weld_menu_button(u"linestylelb"_ustr))) + , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button(u"linecolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb")) - , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", FieldUnit::POINT)) - , m_xSpacingFrame(m_xBuilder->weld_container("spacing")) - , m_xLeftFT(m_xBuilder->weld_label("leftft")) - , m_xLeftMF(m_xBuilder->weld_metric_spin_button("leftmf", FieldUnit::MM)) - , m_xRightFT(m_xBuilder->weld_label("rightft")) - , m_xRightMF(m_xBuilder->weld_metric_spin_button("rightmf", FieldUnit::MM)) - , m_xTopFT(m_xBuilder->weld_label("topft")) - , m_xTopMF(m_xBuilder->weld_metric_spin_button("topmf", FieldUnit::MM)) - , m_xBottomFT(m_xBuilder->weld_label("bottomft")) - , m_xBottomMF(m_xBuilder->weld_metric_spin_button("bottommf", FieldUnit::MM)) - , m_xSynchronizeCB(m_xBuilder->weld_check_button("sync")) - , m_xShadowFrame(m_xBuilder->weld_container("shadow")) + , m_xLineWidthLB(m_xBuilder->weld_combo_box(u"linewidthlb"_ustr)) + , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button(u"linewidthmf"_ustr, FieldUnit::POINT)) + , m_xSpacingFrame(m_xBuilder->weld_container(u"spacing"_ustr)) + , m_xLeftFT(m_xBuilder->weld_label(u"leftft"_ustr)) + , m_xLeftMF(m_xBuilder->weld_metric_spin_button(u"leftmf"_ustr, FieldUnit::MM)) + , m_xRightFT(m_xBuilder->weld_label(u"rightft"_ustr)) + , m_xRightMF(m_xBuilder->weld_metric_spin_button(u"rightmf"_ustr, FieldUnit::MM)) + , m_xTopFT(m_xBuilder->weld_label(u"topft"_ustr)) + , m_xTopMF(m_xBuilder->weld_metric_spin_button(u"topmf"_ustr, FieldUnit::MM)) + , m_xBottomFT(m_xBuilder->weld_label(u"bottomft"_ustr)) + , m_xBottomMF(m_xBuilder->weld_metric_spin_button(u"bottommf"_ustr, FieldUnit::MM)) + , m_xSynchronizeCB(m_xBuilder->weld_check_button(u"sync"_ustr)) + , m_xShadowFrame(m_xBuilder->weld_container(u"shadow"_ustr)) , m_xWndShadows(new ValueSet(nullptr)) - , m_xWndShadowsWin(new weld::CustomWeld(*m_xBuilder, "shadows", *m_xWndShadows)) - , m_xFtShadowSize(m_xBuilder->weld_label("distanceft")) - , m_xEdShadowSize(m_xBuilder->weld_metric_spin_button("distancemf", FieldUnit::MM)) - , m_xFtShadowColor(m_xBuilder->weld_label("shadowcolorft")) - , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button("shadowcolorlb"), + , m_xWndShadowsWin(new weld::CustomWeld(*m_xBuilder, u"shadows"_ustr, *m_xWndShadows)) + , m_xFtShadowSize(m_xBuilder->weld_label(u"distanceft"_ustr)) + , m_xEdShadowSize(m_xBuilder->weld_metric_spin_button(u"distancemf"_ustr, FieldUnit::MM)) + , m_xFtShadowColor(m_xBuilder->weld_label(u"shadowcolorft"_ustr)) + , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button(u"shadowcolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xPropertiesFrame(m_xBuilder->weld_container("properties")) - , m_xMergeWithNextCB(m_xBuilder->weld_check_button("mergewithnext")) - , m_xMergeAdjacentBordersCB(m_xBuilder->weld_check_button("mergeadjacent")) - , m_xRemoveAdjacentCellBordersCB(m_xBuilder->weld_check_button("rmadjcellborders")) - , m_xRemoveAdjacentCellBordersFT(m_xBuilder->weld_label("rmadjcellbordersft")) + , m_xPropertiesFrame(m_xBuilder->weld_container(u"properties"_ustr)) + , m_xMergeWithNextCB(m_xBuilder->weld_check_button(u"mergewithnext"_ustr)) + , m_xMergeAdjacentBordersCB(m_xBuilder->weld_check_button(u"mergeadjacent"_ustr)) + , m_xRemoveAdjacentCellBordersCB(m_xBuilder->weld_check_button(u"rmadjcellborders"_ustr)) + , m_xRemoveAdjacentCellBordersFT(m_xBuilder->weld_label(u"rmadjcellbordersft"_ustr)) { static std::vector<OUString> aBorderImageIds; @@ -544,7 +544,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle if (rCoreAttrs.HasItem(GetWhich(SID_ATTR_PARA_GRABBAG), &pItem)) { const SfxGrabBagItem* pGrabBag = static_cast<const SfxGrabBagItem*>(pItem); - auto it = pGrabBag->GetGrabBag().find("DialogUseCharAttr"); + auto it = pGrabBag->GetGrabBag().find(u"DialogUseCharAttr"_ustr); if (it != pGrabBag->GetGrabBag().end()) { bool bDialogUseCharAttr = false; @@ -575,7 +575,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle { Reference< XServiceInfo > xSI( pDocSh->GetModel(), UNO_QUERY ); if ( xSI.is() ) - bIsCalcDoc = xSI->supportsService("com.sun.star.sheet.SpreadsheetDocument"); + bIsCalcDoc = xSI->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr); } if( bIsCalcDoc ) { @@ -1318,7 +1318,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void) m_xLineWidthLB->remove_id(OUString::number(i)); } if (m_xLineWidthLB->get_active_id().isEmpty()) - m_xLineWidthLB->set_active_id("3"); + m_xLineWidthLB->set_active_id(u"3"_ustr); } else { diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index ea6ee2ca382b..bd1f6810cf31 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -189,53 +189,53 @@ struct SvxCharNamePage_Impl // class SvxCharNamePage ------------------------------------------------- SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInSet) - : SvxCharBasePage(pPage, pController, "cui/ui/charnamepage.ui", "CharNamePage", rInSet) + : SvxCharBasePage(pPage, pController, u"cui/ui/charnamepage.ui"_ustr, u"CharNamePage"_ustr, rInSet) , m_pImpl(new SvxCharNamePage_Impl) // Western - , m_xWestern(m_xBuilder->weld_notebook("nbWestern")) - , m_xWestFontNameFT(m_xBuilder->weld_label("lbWestFontname")) - , m_xWestFontStyleFT(m_xBuilder->weld_label("lbWestStyle")) - , m_xWestFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box("cbWestStyle"))) - , m_xWestFontSizeFT(m_xBuilder->weld_label("lbWestSize")) - , m_xWestFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box("cbWestSize"))) - , m_xWestFontLanguageFT(m_xBuilder->weld_label("lbWestLanguage")) - , m_xWestFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("cbWestLanguage"))) - , m_xWestFontFeaturesButton(m_xBuilder->weld_button("btnWestFeatures")) - , m_xWestFontTypeFT(m_xBuilder->weld_label("lbWestFontinfo")) - , m_xCJK_CTL(m_xBuilder->weld_notebook("nbCJKCTL")) + , m_xWestern(m_xBuilder->weld_notebook(u"nbWestern"_ustr)) + , m_xWestFontNameFT(m_xBuilder->weld_label(u"lbWestFontname"_ustr)) + , m_xWestFontStyleFT(m_xBuilder->weld_label(u"lbWestStyle"_ustr)) + , m_xWestFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box(u"cbWestStyle"_ustr))) + , m_xWestFontSizeFT(m_xBuilder->weld_label(u"lbWestSize"_ustr)) + , m_xWestFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box(u"cbWestSize"_ustr))) + , m_xWestFontLanguageFT(m_xBuilder->weld_label(u"lbWestLanguage"_ustr)) + , m_xWestFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"cbWestLanguage"_ustr))) + , m_xWestFontFeaturesButton(m_xBuilder->weld_button(u"btnWestFeatures"_ustr)) + , m_xWestFontTypeFT(m_xBuilder->weld_label(u"lbWestFontinfo"_ustr)) + , m_xCJK_CTL(m_xBuilder->weld_notebook(u"nbCJKCTL"_ustr)) // CJK - , m_xEastFontNameFT(m_xBuilder->weld_label("lbCJKFontname")) - , m_xEastFontStyleFT(m_xBuilder->weld_label("lbCJKStyle")) - , m_xEastFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box("cbCJKStyle"))) - , m_xEastFontSizeFT(m_xBuilder->weld_label("lbCJKSize")) - , m_xEastFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box("cbCJKSize"))) - , m_xEastFontLanguageFT(m_xBuilder->weld_label("lbCJKLanguage")) - , m_xEastFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("cbCJKLanguage"))) - , m_xEastFontFeaturesButton(m_xBuilder->weld_button("btnCJKFeatures")) - , m_xEastFontTypeFT(m_xBuilder->weld_label("lbCJKFontinfo")) + , m_xEastFontNameFT(m_xBuilder->weld_label(u"lbCJKFontname"_ustr)) + , m_xEastFontStyleFT(m_xBuilder->weld_label(u"lbCJKStyle"_ustr)) + , m_xEastFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box(u"cbCJKStyle"_ustr))) + , m_xEastFontSizeFT(m_xBuilder->weld_label(u"lbCJKSize"_ustr)) + , m_xEastFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box(u"cbCJKSize"_ustr))) + , m_xEastFontLanguageFT(m_xBuilder->weld_label(u"lbCJKLanguage"_ustr)) + , m_xEastFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"cbCJKLanguage"_ustr))) + , m_xEastFontFeaturesButton(m_xBuilder->weld_button(u"btnCJKFeatures"_ustr)) + , m_xEastFontTypeFT(m_xBuilder->weld_label(u"lbCJKFontinfo"_ustr)) // CTL - , m_xCTLFontNameFT(m_xBuilder->weld_label("lbCTLFontname")) + , m_xCTLFontNameFT(m_xBuilder->weld_label(u"lbCTLFontname"_ustr)) // tree - , m_xCTLFontStyleFT(m_xBuilder->weld_label("lbCTLStyle")) - , m_xCTLFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box("cbCTLStyle"))) - , m_xCTLFontSizeFT(m_xBuilder->weld_label("lbCTLSize")) - , m_xCTLFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box("cbCTLSize"))) - , m_xCTLFontLanguageFT(m_xBuilder->weld_label("lbCTLLanguage")) - , m_xCTLFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("cbCTLLanguage"))) - , m_xCTLFontFeaturesButton(m_xBuilder->weld_button("btnCTLFeatures")) - , m_xCTLFontTypeFT(m_xBuilder->weld_label("lbCTLFontinfo")) + , m_xCTLFontStyleFT(m_xBuilder->weld_label(u"lbCTLStyle"_ustr)) + , m_xCTLFontStyleLB(new FontStyleBox(m_xBuilder->weld_combo_box(u"cbCTLStyle"_ustr))) + , m_xCTLFontSizeFT(m_xBuilder->weld_label(u"lbCTLSize"_ustr)) + , m_xCTLFontSizeLB(new FontSizeBox(m_xBuilder->weld_combo_box(u"cbCTLSize"_ustr))) + , m_xCTLFontLanguageFT(m_xBuilder->weld_label(u"lbCTLLanguage"_ustr)) + , m_xCTLFontLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"cbCTLLanguage"_ustr))) + , m_xCTLFontFeaturesButton(m_xBuilder->weld_button(u"btnCTLFeatures"_ustr)) + , m_xCTLFontTypeFT(m_xBuilder->weld_label(u"lbCTLFontinfo"_ustr)) , m_xVDev(*Application::GetDefaultDevice(), DeviceFormat::WITH_ALPHA) { - m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); + m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWin)); #ifdef IOS m_xPreviewWin->hide(); #endif m_pImpl->m_aNoStyleText = CuiResId( RID_CUISTR_CHARNAME_NOSTYLE ); - std::unique_ptr<weld::EntryTreeView> xWestFontName = m_xBuilder->weld_entry_tree_view("gdWestern", "edWestFontName", "trWestFontName"); - std::unique_ptr<weld::EntryTreeView> xCJKFontName = m_xBuilder->weld_entry_tree_view("gdCJK", "edCJKFontName", "trCJKFontName"); - std::unique_ptr<weld::EntryTreeView> xCTLFontName = m_xBuilder->weld_entry_tree_view("gdCTL", "edCTLFontName", "trCTLFontName"); + std::unique_ptr<weld::EntryTreeView> xWestFontName = m_xBuilder->weld_entry_tree_view(u"gdWestern"_ustr, u"edWestFontName"_ustr, u"trWestFontName"_ustr); + std::unique_ptr<weld::EntryTreeView> xCJKFontName = m_xBuilder->weld_entry_tree_view(u"gdCJK"_ustr, u"edCJKFontName"_ustr, u"trCJKFontName"_ustr); + std::unique_ptr<weld::EntryTreeView> xCTLFontName = m_xBuilder->weld_entry_tree_view(u"gdCTL"_ustr, u"edCTLFontName"_ustr, u"trCTLFontName"_ustr); // 7 lines in the treeview xWestFontName->set_height_request_by_rows(7); @@ -254,8 +254,8 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, weld::DialogController* m_xCJK_CTL->hide(); m_xWestern->set_show_tabs(false); //hide single tab in case of Western only } - else if (!bShowCJK) m_xCJK_CTL->remove_page("nbCJK"); - else if (!bShowCTL) m_xCJK_CTL->remove_page("nbCTL"); + else if (!bShowCJK) m_xCJK_CTL->remove_page(u"nbCJK"_ustr); + else if (!bShowCTL) m_xCJK_CTL->remove_page(u"nbCTL"_ustr); //In MacOSX the standard dialogs name font-name, font-style as @@ -1298,40 +1298,40 @@ void SvxCharNamePage::PageCreated(const SfxAllItemSet& aSet) // class SvxCharEffectsPage ---------------------------------------------- SvxCharEffectsPage::SvxCharEffectsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInSet) - : SvxCharBasePage(pPage, pController, "cui/ui/effectspage.ui", "EffectsPage", rInSet) + : SvxCharBasePage(pPage, pController, u"cui/ui/effectspage.ui"_ustr, u"EffectsPage"_ustr, rInSet) , m_bOrigFontColor(false) , m_bNewFontColor(false) , m_bEnableNoneFontColor(false) - , m_xFontColorFT(m_xBuilder->weld_label("fontcolorft")) - , m_xFontColorLB(new ColorListBox(m_xBuilder->weld_menu_button("fontcolorlb"), + , m_xFontColorFT(m_xBuilder->weld_label(u"fontcolorft"_ustr)) + , m_xFontColorLB(new ColorListBox(m_xBuilder->weld_menu_button(u"fontcolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xFontTransparencyFT(m_xBuilder->weld_label("fonttransparencyft")) + , m_xFontTransparencyFT(m_xBuilder->weld_label(u"fonttransparencyft"_ustr)) , m_xFontTransparencyMtr( - m_xBuilder->weld_metric_spin_button("fonttransparencymtr", FieldUnit::PERCENT)) - , m_xEffectsFT(m_xBuilder->weld_label("effectsft")) - , m_xEffectsLB(m_xBuilder->weld_combo_box("effectslb")) - , m_xReliefFT(m_xBuilder->weld_label("reliefft")) - , m_xReliefLB(m_xBuilder->weld_combo_box("relieflb")) - , m_xOutlineBtn(m_xBuilder->weld_check_button("outlinecb")) - , m_xShadowBtn(m_xBuilder->weld_check_button("shadowcb")) - , m_xHiddenBtn(m_xBuilder->weld_check_button("hiddencb")) - , m_xOverlineLB(m_xBuilder->weld_combo_box("overlinelb")) - , m_xOverlineColorFT(m_xBuilder->weld_label("overlinecolorft")) - , m_xOverlineColorLB(new ColorListBox(m_xBuilder->weld_menu_button("overlinecolorlb"), + m_xBuilder->weld_metric_spin_button(u"fonttransparencymtr"_ustr, FieldUnit::PERCENT)) + , m_xEffectsFT(m_xBuilder->weld_label(u"effectsft"_ustr)) + , m_xEffectsLB(m_xBuilder->weld_combo_box(u"effectslb"_ustr)) + , m_xReliefFT(m_xBuilder->weld_label(u"reliefft"_ustr)) + , m_xReliefLB(m_xBuilder->weld_combo_box(u"relieflb"_ustr)) + , m_xOutlineBtn(m_xBuilder->weld_check_button(u"outlinecb"_ustr)) + , m_xShadowBtn(m_xBuilder->weld_check_button(u"shadowcb"_ustr)) + , m_xHiddenBtn(m_xBuilder->weld_check_button(u"hiddencb"_ustr)) + , m_xOverlineLB(m_xBuilder->weld_combo_box(u"overlinelb"_ustr)) + , m_xOverlineColorFT(m_xBuilder->weld_label(u"overlinecolorft"_ustr)) + , m_xOverlineColorLB(new ColorListBox(m_xBuilder->weld_menu_button(u"overlinecolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xStrikeoutLB(m_xBuilder->weld_combo_box("strikeoutlb")) - , m_xUnderlineLB(m_xBuilder->weld_combo_box("underlinelb")) - , m_xUnderlineColorFT(m_xBuilder->weld_label("underlinecolorft")) - , m_xUnderlineColorLB(new ColorListBox(m_xBuilder->weld_menu_button("underlinecolorlb"), + , m_xStrikeoutLB(m_xBuilder->weld_combo_box(u"strikeoutlb"_ustr)) + , m_xUnderlineLB(m_xBuilder->weld_combo_box(u"underlinelb"_ustr)) + , m_xUnderlineColorFT(m_xBuilder->weld_label(u"underlinecolorft"_ustr)) + , m_xUnderlineColorLB(new ColorListBox(m_xBuilder->weld_menu_button(u"underlinecolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xIndividualWordsBtn(m_xBuilder->weld_check_button("individualwordscb")) - , m_xEmphasisFT(m_xBuilder->weld_label("emphasisft")) - , m_xEmphasisLB(m_xBuilder->weld_combo_box("emphasislb")) - , m_xPositionFT(m_xBuilder->weld_label("positionft")) - , m_xPositionLB(m_xBuilder->weld_combo_box("positionlb")) - , m_xA11yWarningFT(m_xBuilder->weld_label("a11ywarning")) -{ - m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); + , m_xIndividualWordsBtn(m_xBuilder->weld_check_button(u"individualwordscb"_ustr)) + , m_xEmphasisFT(m_xBuilder->weld_label(u"emphasisft"_ustr)) + , m_xEmphasisLB(m_xBuilder->weld_combo_box(u"emphasislb"_ustr)) + , m_xPositionFT(m_xBuilder->weld_label(u"positionft"_ustr)) + , m_xPositionLB(m_xBuilder->weld_combo_box(u"positionlb"_ustr)) + , m_xA11yWarningFT(m_xBuilder->weld_label(u"a11ywarning"_ustr)) +{ + m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWin)); #ifdef IOS m_xPreviewWin->hide(); #endif @@ -2405,34 +2405,34 @@ void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet) // class SvxCharPositionPage --------------------------------------------- SvxCharPositionPage::SvxCharPositionPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInSet) - : SvxCharBasePage(pPage, pController, "cui/ui/positionpage.ui", "PositionPage", rInSet) + : SvxCharBasePage(pPage, pController, u"cui/ui/positionpage.ui"_ustr, u"PositionPage"_ustr, rInSet) , m_nSuperEsc(short(DFLT_ESC_SUPER)) , m_nSubEsc(short(DFLT_ESC_SUB)) , m_nScaleWidthItemSetVal(100) , m_nScaleWidthInitialVal(100) , m_nSuperProp(sal_uInt8(DFLT_ESC_PROP)) , m_nSubProp(sal_uInt8(DFLT_ESC_PROP)) - , m_xHighPosBtn(m_xBuilder->weld_radio_button("superscript")) - , m_xNormalPosBtn(m_xBuilder->weld_radio_button("normal")) - , m_xLowPosBtn(m_xBuilder->weld_radio_button("subscript")) - , m_xHighLowFT(m_xBuilder->weld_label("raiselower")) - , m_xHighLowMF(m_xBuilder->weld_metric_spin_button("raiselowersb", FieldUnit::PERCENT)) - , m_xHighLowRB(m_xBuilder->weld_check_button("automatic")) - , m_xFontSizeFT(m_xBuilder->weld_label("relativefontsize")) - , m_xFontSizeMF(m_xBuilder->weld_metric_spin_button("fontsizesb", FieldUnit::PERCENT)) - , m_xRotationContainer(m_xBuilder->weld_widget("rotationcontainer")) - , m_xScalingFT(m_xBuilder->weld_label("scale")) - , m_xScalingAndRotationFT(m_xBuilder->weld_label("rotateandscale")) - , m_x0degRB(m_xBuilder->weld_radio_button("0deg")) - , m_x90degRB(m_xBuilder->weld_radio_button("90deg")) - , m_x270degRB(m_xBuilder->weld_radio_button("270deg")) - , m_xFitToLineCB(m_xBuilder->weld_check_button("fittoline")) - , m_xScaleWidthMF(m_xBuilder->weld_metric_spin_button("scalewidthsb", FieldUnit::PERCENT)) - , m_xKerningMF(m_xBuilder->weld_metric_spin_button("kerningsb", FieldUnit::POINT)) - , m_xPairKerningBtn(m_xBuilder->weld_check_button("pairkerning")) - , m_xNoHyphenationBtn(m_xBuilder->weld_check_button("nohyphenation")) -{ - m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); + , m_xHighPosBtn(m_xBuilder->weld_radio_button(u"superscript"_ustr)) + , m_xNormalPosBtn(m_xBuilder->weld_radio_button(u"normal"_ustr)) + , m_xLowPosBtn(m_xBuilder->weld_radio_button(u"subscript"_ustr)) + , m_xHighLowFT(m_xBuilder->weld_label(u"raiselower"_ustr)) + , m_xHighLowMF(m_xBuilder->weld_metric_spin_button(u"raiselowersb"_ustr, FieldUnit::PERCENT)) + , m_xHighLowRB(m_xBuilder->weld_check_button(u"automatic"_ustr)) + , m_xFontSizeFT(m_xBuilder->weld_label(u"relativefontsize"_ustr)) + , m_xFontSizeMF(m_xBuilder->weld_metric_spin_button(u"fontsizesb"_ustr, FieldUnit::PERCENT)) + , m_xRotationContainer(m_xBuilder->weld_widget(u"rotationcontainer"_ustr)) + , m_xScalingFT(m_xBuilder->weld_label(u"scale"_ustr)) + , m_xScalingAndRotationFT(m_xBuilder->weld_label(u"rotateandscale"_ustr)) + , m_x0degRB(m_xBuilder->weld_radio_button(u"0deg"_ustr)) + , m_x90degRB(m_xBuilder->weld_radio_button(u"90deg"_ustr)) + , m_x270degRB(m_xBuilder->weld_radio_button(u"270deg"_ustr)) + , m_xFitToLineCB(m_xBuilder->weld_check_button(u"fittoline"_ustr)) + , m_xScaleWidthMF(m_xBuilder->weld_metric_spin_button(u"scalewidthsb"_ustr, FieldUnit::PERCENT)) + , m_xKerningMF(m_xBuilder->weld_metric_spin_button(u"kerningsb"_ustr, FieldUnit::POINT)) + , m_xPairKerningBtn(m_xBuilder->weld_check_button(u"pairkerning"_ustr)) + , m_xNoHyphenationBtn(m_xBuilder->weld_check_button(u"nohyphenation"_ustr)) +{ + m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWin)); #ifdef IOS m_xPreviewWin->hide(); #endif @@ -3046,20 +3046,20 @@ void SvxCharPositionPage::PageCreated(const SfxAllItemSet& aSet) // class SvxCharTwoLinesPage ------------------------------------------------ SvxCharTwoLinesPage::SvxCharTwoLinesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInSet) - : SvxCharBasePage(pPage, pController, "cui/ui/twolinespage.ui", "TwoLinesPage", rInSet) + : SvxCharBasePage(pPage, pController, u"cui/ui/twolinespage.ui"_ustr, u"TwoLinesPage"_ustr, rInSet) , m_nStartBracketPosition( 0 ) , m_nEndBracketPosition( 0 ) - , m_xTwoLinesBtn(m_xBuilder->weld_check_button("twolines")) - , m_xEnclosingFrame(m_xBuilder->weld_widget("enclosing")) - , m_xStartBracketLB(m_xBuilder->weld_tree_view("startbracket")) - , m_xEndBracketLB(m_xBuilder->weld_tree_view("endbracket")) + , m_xTwoLinesBtn(m_xBuilder->weld_check_button(u"twolines"_ustr)) + , m_xEnclosingFrame(m_xBuilder->weld_widget(u"enclosing"_ustr)) + , m_xStartBracketLB(m_xBuilder->weld_tree_view(u"startbracket"_ustr)) + , m_xEndBracketLB(m_xBuilder->weld_tree_view(u"endbracket"_ustr)) { for (size_t i = 0; i < std::size(TWOLINE_OPEN); ++i) m_xStartBracketLB->append(OUString::number(TWOLINE_OPEN[i].second), CuiResId(TWOLINE_OPEN[i].first)); for (size_t i = 0; i < std::size(TWOLINE_CLOSE); ++i) m_xEndBracketLB->append(OUString::number(TWOLINE_CLOSE[i].second), CuiResId(TWOLINE_CLOSE[i].first)); - m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); + m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWin)); #ifdef IOS m_xPreviewWin->hide(); #endif diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 54979804a5bb..fa7109844fec 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -60,22 +60,22 @@ SvxConnectionDialog::SvxConnectionDialog(weld::Window* pParent, const SfxItemSet \************************************************************************/ SvxConnectionPage::SvxConnectionPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/connectortabpage.ui", "ConnectorTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/connectortabpage.ui"_ustr, u"ConnectorTabPage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) , aAttrSet(*rInAttrs.GetPool()) , pView(nullptr) - , m_xLbType(m_xBuilder->weld_combo_box("LB_TYPE")) - , m_xFtLine1(m_xBuilder->weld_label("FT_LINE_1")) - , m_xMtrFldLine1(m_xBuilder->weld_metric_spin_button("MTR_FLD_LINE_1", FieldUnit::CM)) - , m_xFtLine2(m_xBuilder->weld_label("FT_LINE_2")) - , m_xMtrFldLine2(m_xBuilder->weld_metric_spin_button("MTR_FLD_LINE_2", FieldUnit::CM)) - , m_xFtLine3(m_xBuilder->weld_label("FT_LINE_3")) - , m_xMtrFldLine3(m_xBuilder->weld_metric_spin_button("MTR_FLD_LINE_3", FieldUnit::CM)) - , m_xMtrFldHorz1(m_xBuilder->weld_metric_spin_button("MTR_FLD_HORZ_1", FieldUnit::MM)) - , m_xMtrFldVert1(m_xBuilder->weld_metric_spin_button("MTR_FLD_VERT_1", FieldUnit::MM)) - , m_xMtrFldHorz2(m_xBuilder->weld_metric_spin_button("MTR_FLD_HORZ_2", FieldUnit::MM)) - , m_xMtrFldVert2(m_xBuilder->weld_metric_spin_button("MTR_FLD_VERT_2", FieldUnit::MM)) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) + , m_xLbType(m_xBuilder->weld_combo_box(u"LB_TYPE"_ustr)) + , m_xFtLine1(m_xBuilder->weld_label(u"FT_LINE_1"_ustr)) + , m_xMtrFldLine1(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LINE_1"_ustr, FieldUnit::CM)) + , m_xFtLine2(m_xBuilder->weld_label(u"FT_LINE_2"_ustr)) + , m_xMtrFldLine2(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LINE_2"_ustr, FieldUnit::CM)) + , m_xFtLine3(m_xBuilder->weld_label(u"FT_LINE_3"_ustr)) + , m_xMtrFldLine3(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LINE_3"_ustr, FieldUnit::CM)) + , m_xMtrFldHorz1(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HORZ_1"_ustr, FieldUnit::MM)) + , m_xMtrFldVert1(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_VERT_1"_ustr, FieldUnit::MM)) + , m_xMtrFldHorz2(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HORZ_2"_ustr, FieldUnit::MM)) + , m_xMtrFldVert2(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_VERT_2"_ustr, FieldUnit::MM)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) { SfxItemPool* pPool = rOutAttrs.GetPool(); assert(pPool && "Where is the pool"); @@ -170,17 +170,17 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs ) case 0: m_xFtLine1->set_sensitive(false); m_xMtrFldLine1->set_sensitive(false); - m_xMtrFldLine1->set_text(""); + m_xMtrFldLine1->set_text(u""_ustr); [[fallthrough]]; case 1: m_xFtLine2->set_sensitive(false); m_xMtrFldLine2->set_sensitive(false); - m_xMtrFldLine2->set_text(""); + m_xMtrFldLine2->set_text(u""_ustr); [[fallthrough]]; case 2: m_xFtLine3->set_sensitive(false); m_xMtrFldLine3->set_sensitive(false); - m_xMtrFldLine3->set_text(""); + m_xMtrFldLine3->set_text(u""_ustr); break; } @@ -303,21 +303,21 @@ IMPL_LINK_NOARG(SvxConnectionPage, ChangeAttrListBoxHdl_Impl, weld::ComboBox&, v if( nCount > 2 ) m_xMtrFldLine3->set_value(m_xMtrFldLine3->get_value(FieldUnit::NONE), FieldUnit::NONE); else - m_xMtrFldLine3->set_text(""); + m_xMtrFldLine3->set_text(u""_ustr); m_xFtLine2->set_sensitive( nCount > 1 ); m_xMtrFldLine2->set_sensitive( nCount > 1 ); if( nCount > 1 ) m_xMtrFldLine2->set_value(m_xMtrFldLine2->get_value(FieldUnit::NONE), FieldUnit::NONE); else - m_xMtrFldLine2->set_text(""); + m_xMtrFldLine2->set_text(u""_ustr); m_xFtLine1->set_sensitive( nCount > 0 ); m_xMtrFldLine1->set_sensitive( nCount > 0 ); if( nCount > 0 ) m_xMtrFldLine1->set_value(m_xMtrFldLine1->get_value(FieldUnit::NONE), FieldUnit::NONE); else - m_xMtrFldLine1->set_text(""); + m_xMtrFldLine1->set_text(u""_ustr); } IMPL_LINK(SvxConnectionPage, ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, r, void) diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 6ed4d261c1c1..688e03cf5d7e 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -55,29 +55,29 @@ static int lcl_GetValue(const weld::MetricSpinButton& rMetric, FieldUnit eUnit) --------------------------------------------------------------------*/ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet) - : SfxTabPage(pPage, pController, "cui/ui/croppage.ui", "CropPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/croppage.ui"_ustr, u"CropPage"_ustr, &rSet) , m_nOldWidth(0) , m_nOldHeight(0) , m_bSetOrigSize(false) , m_aPreferredDPI(0) - , m_xCropFrame(m_xBuilder->weld_widget("cropframe")) - , m_xZoomConstRB(m_xBuilder->weld_radio_button("keepscale")) - , m_xSizeConstRB(m_xBuilder->weld_radio_button("keepsize")) - , m_xLeftMF(m_xBuilder->weld_metric_spin_button("left", FieldUnit::CM)) - , m_xRightMF(m_xBuilder->weld_metric_spin_button("right", FieldUnit::CM)) - , m_xTopMF(m_xBuilder->weld_metric_spin_button("top", FieldUnit::CM)) - , m_xBottomMF(m_xBuilder->weld_metric_spin_button("bottom", FieldUnit::CM)) - , m_xScaleFrame(m_xBuilder->weld_widget("scaleframe")) - , m_xWidthZoomMF(m_xBuilder->weld_metric_spin_button("widthzoom", FieldUnit::PERCENT)) - , m_xHeightZoomMF(m_xBuilder->weld_metric_spin_button("heightzoom", FieldUnit::PERCENT)) - , m_xSizeFrame(m_xBuilder->weld_widget("sizeframe")) - , m_xWidthMF(m_xBuilder->weld_metric_spin_button("width", FieldUnit::CM)) - , m_xHeightMF(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM)) - , m_xOrigSizeGrid(m_xBuilder->weld_widget("origsizegrid")) - , m_xOrigSizeFT(m_xBuilder->weld_label("origsizeft")) - , m_xOrigSizePB(m_xBuilder->weld_button("origsize")) - , m_xUncropPB(m_xBuilder->weld_button("uncrop")) - , m_xExampleWN(new weld::CustomWeld(*m_xBuilder, "preview", m_aExampleWN)) + , m_xCropFrame(m_xBuilder->weld_widget(u"cropframe"_ustr)) + , m_xZoomConstRB(m_xBuilder->weld_radio_button(u"keepscale"_ustr)) + , m_xSizeConstRB(m_xBuilder->weld_radio_button(u"keepsize"_ustr)) + , m_xLeftMF(m_xBuilder->weld_metric_spin_button(u"left"_ustr, FieldUnit::CM)) + , m_xRightMF(m_xBuilder->weld_metric_spin_button(u"right"_ustr, FieldUnit::CM)) + , m_xTopMF(m_xBuilder->weld_metric_spin_button(u"top"_ustr, FieldUnit::CM)) + , m_xBottomMF(m_xBuilder->weld_metric_spin_button(u"bottom"_ustr, FieldUnit::CM)) + , m_xScaleFrame(m_xBuilder->weld_widget(u"scaleframe"_ustr)) + , m_xWidthZoomMF(m_xBuilder->weld_metric_spin_button(u"widthzoom"_ustr, FieldUnit::PERCENT)) + , m_xHeightZoomMF(m_xBuilder->weld_metric_spin_button(u"heightzoom"_ustr, FieldUnit::PERCENT)) + , m_xSizeFrame(m_xBuilder->weld_widget(u"sizeframe"_ustr)) + , m_xWidthMF(m_xBuilder->weld_metric_spin_button(u"width"_ustr, FieldUnit::CM)) + , m_xHeightMF(m_xBuilder->weld_metric_spin_button(u"height"_ustr, FieldUnit::CM)) + , m_xOrigSizeGrid(m_xBuilder->weld_widget(u"origsizegrid"_ustr)) + , m_xOrigSizeFT(m_xBuilder->weld_label(u"origsizeft"_ustr)) + , m_xOrigSizePB(m_xBuilder->weld_button(u"origsize"_ustr)) + , m_xUncropPB(m_xBuilder->weld_button(u"uncrop"_ustr)) + , m_xExampleWN(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aExampleWN)) { SetExchangeSupport(); @@ -292,7 +292,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) #endif auto& aProperties = getAdditionalProperties(); - auto aIterator = aProperties.find("PreferredDPI"); + auto aIterator = aProperties.find(u"PreferredDPI"_ustr); if (aIterator != aProperties.end()) m_aPreferredDPI = aIterator->second.get<sal_Int32>(); @@ -663,9 +663,9 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) OUString sTemp; { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/spinbox.ui")); - std::unique_ptr<weld::Dialog> xTopLevel(xBuilder->weld_dialog("SpinDialog")); - std::unique_ptr<weld::MetricSpinButton> xFld(xBuilder->weld_metric_spin_button("spin", FieldUnit::CM)); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/spinbox.ui"_ustr)); + std::unique_ptr<weld::Dialog> xTopLevel(xBuilder->weld_dialog(u"SpinDialog"_ustr)); + std::unique_ptr<weld::MetricSpinButton> xFld(xBuilder->weld_metric_spin_button(u"spin"_ustr, FieldUnit::CM)); SetFieldUnit( *xFld, eMetric ); xFld->set_digits(m_xWidthMF->get_digits()); xFld->set_max(INT_MAX - 1, FieldUnit::NONE); diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 7e428f7455e7..2540c5335282 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -58,7 +58,7 @@ const WhichRangesContainer SvxCaptionTabPage::pCaptionRanges( SDRATTR_CAPTIONLINELEN, SDRATTR_CAPTIONFITLINELEN>); SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/calloutpage.ui", "CalloutPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/calloutpage.ui"_ustr, u"CalloutPage"_ustr, &rInAttrs) , nCaptionType(SdrCaptionType::Type1) , nGap(0) , nEscDir(SdrCaptionEscDir::Horizontal) @@ -71,18 +71,18 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl , nExtension(0) , rOutAttrs(rInAttrs) , pView(nullptr) - , m_xMF_SPACING(m_xBuilder->weld_metric_spin_button("spacing", FieldUnit::MM)) - , m_xLB_EXTENSION(m_xBuilder->weld_combo_box("extension")) - , m_xFT_BYFT(m_xBuilder->weld_label("byft")) - , m_xMF_BY(m_xBuilder->weld_metric_spin_button("by", FieldUnit::MM)) - , m_xFT_POSITIONFT(m_xBuilder->weld_label("positionft")) - , m_xLB_POSITION(m_xBuilder->weld_combo_box("position")) - , m_xLineTypes(m_xBuilder->weld_combo_box("linetypes")) - , m_xFT_LENGTHFT(m_xBuilder->weld_label("lengthft")) - , m_xMF_LENGTH(m_xBuilder->weld_metric_spin_button("length", FieldUnit::MM)) - , m_xCB_OPTIMAL(m_xBuilder->weld_check_button("optimal")) - , m_xCT_CAPTTYPE(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , m_xCT_CAPTTYPEWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xCT_CAPTTYPE)) + , m_xMF_SPACING(m_xBuilder->weld_metric_spin_button(u"spacing"_ustr, FieldUnit::MM)) + , m_xLB_EXTENSION(m_xBuilder->weld_combo_box(u"extension"_ustr)) + , m_xFT_BYFT(m_xBuilder->weld_label(u"byft"_ustr)) + , m_xMF_BY(m_xBuilder->weld_metric_spin_button(u"by"_ustr, FieldUnit::MM)) + , m_xFT_POSITIONFT(m_xBuilder->weld_label(u"positionft"_ustr)) + , m_xLB_POSITION(m_xBuilder->weld_combo_box(u"position"_ustr)) + , m_xLineTypes(m_xBuilder->weld_combo_box(u"linetypes"_ustr)) + , m_xFT_LENGTHFT(m_xBuilder->weld_label(u"lengthft"_ustr)) + , m_xMF_LENGTH(m_xBuilder->weld_metric_spin_button(u"length"_ustr, FieldUnit::MM)) + , m_xCB_OPTIMAL(m_xBuilder->weld_check_button(u"optimal"_ustr)) + , m_xCT_CAPTTYPE(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , m_xCT_CAPTTYPEWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xCT_CAPTTYPE)) { Size aSize(m_xCT_CAPTTYPE->GetDrawingArea()->get_ref_device().LogicToPixel(Size(187, 38), MapMode(MapUnit::MapAppFont))); m_xCT_CAPTTYPEWin->set_size_request(aSize.Width(), aSize.Height()); @@ -451,7 +451,7 @@ void SvxCaptionTabPage::FillValueSet() SvxCaptionTabDialog::SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pSdrView, SvxAnchorIds nAnchorTypes) - : SfxTabDialogController(pParent, "cui/ui/calloutdialog.ui", "CalloutDialog") + : SfxTabDialogController(pParent, u"cui/ui/calloutdialog.ui"_ustr, u"CalloutDialog"_ustr) , pView(pSdrView) , nAnchorCtrls(nAnchorTypes) { @@ -460,17 +460,17 @@ SvxCaptionTabDialog::SvxCaptionTabDialog(weld::Window* pParent, const SdrView* p //different positioning page in Writer if (nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly)) { - AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, + AddTabPage(u"RID_SVXPAGE_SWPOSSIZE"_ustr, SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges ); - RemoveTabPage("RID_SVXPAGE_POSITION_SIZE"); + RemoveTabPage(u"RID_SVXPAGE_POSITION_SIZE"_ustr); } else { - AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, + AddTabPage(u"RID_SVXPAGE_POSITION_SIZE"_ustr, SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges ); - RemoveTabPage("RID_SVXPAGE_SWPOSSIZE"); + RemoveTabPage(u"RID_SVXPAGE_SWPOSSIZE"_ustr); } - AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create, + AddTabPage(u"RID_SVXPAGE_CAPTION"_ustr, SvxCaptionTabPage::Create, SvxCaptionTabPage::GetRanges ); } diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index baff7c87b0ae..9da8e8ce83fe 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -100,21 +100,21 @@ void SfxMacroTabPage::EnableButtons() } SfxMacroTabPage::SfxMacroTabPage(weld::Container* pPage, weld::DialogController* pController, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rAttrSet ) - : SfxTabPage(pPage, pController, "cui/ui/eventassignpage.ui", "EventAssignPage", &rAttrSet) + : SfxTabPage(pPage, pController, u"cui/ui/eventassignpage.ui"_ustr, u"EventAssignPage"_ustr, &rAttrSet) { mpImpl.reset(new SfxMacroTabPage_Impl); mpImpl->m_aFillGroupIdle.SetInvokeHandler( LINK( this, SfxMacroTabPage, TimeOut_Impl ) ); mpImpl->m_aFillGroupIdle.SetPriority( TaskPriority::HIGHEST ); - mpImpl->m_xEventLB.reset(new MacroEventListBox(m_xBuilder->weld_tree_view("assignments"))); - mpImpl->m_xAssignPB = m_xBuilder->weld_button("assign"); - mpImpl->m_xDeletePB = m_xBuilder->weld_button("delete"); - mpImpl->m_xGroupFrame = m_xBuilder->weld_widget("groupframe"); - mpImpl->m_xGroupLB.reset(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view("libraries"))); - mpImpl->m_xMacroFrame = m_xBuilder->weld_frame("macroframe"); + mpImpl->m_xEventLB.reset(new MacroEventListBox(m_xBuilder->weld_tree_view(u"assignments"_ustr))); + mpImpl->m_xAssignPB = m_xBuilder->weld_button(u"assign"_ustr); + mpImpl->m_xDeletePB = m_xBuilder->weld_button(u"delete"_ustr); + mpImpl->m_xGroupFrame = m_xBuilder->weld_widget(u"groupframe"_ustr); + mpImpl->m_xGroupLB.reset(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view(u"libraries"_ustr))); + mpImpl->m_xMacroFrame = m_xBuilder->weld_frame(u"macroframe"_ustr); mpImpl->m_aStaticMacroLBLabel = mpImpl->m_xMacroFrame->get_label(); - mpImpl->m_xMacroLB.reset(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("macros"))); + mpImpl->m_xMacroLB.reset(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view(u"macros"_ustr))); SetFrame( rxDocumentFrame ); @@ -388,8 +388,8 @@ std::unique_ptr<SfxTabPage> SfxMacroTabPage::Create(weld::Container* pPage, weld SfxMacroAssignDlg::SfxMacroAssignDlg(weld::Widget* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet) - : SfxSingleTabDialogController(pParent, &rSet,"cui/ui/eventassigndialog.ui", - "EventAssignDialog") + : SfxSingleTabDialogController(pParent, &rSet,u"cui/ui/eventassigndialog.ui"_ustr, + u"EventAssignDialog"_ustr) { std::unique_ptr<SfxMacroTabPage> xPage = CreateSfxMacroTabPage(get_content_area(), this, rSet); xPage->SetFrame(rxDocumentFrame); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 8c7b4dcd8351..c1873bfe785e 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -64,28 +64,28 @@ SvxMeasureDialog::SvxMeasureDialog(weld::Window* pParent, const SfxItemSet& rInA \************************************************************************/ SvxMeasurePage::SvxMeasurePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/dimensionlinestabpage.ui", "DimensionLinesTabPage", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/dimensionlinestabpage.ui"_ustr, u"DimensionLinesTabPage"_ustr, rInAttrs) , rOutAttrs(rInAttrs) , aAttrSet(*rInAttrs.GetPool()) , pView(nullptr) , eUnit(MapUnit::Map100thMM) , bPositionModified(false) , m_aCtlPosition(this) - , m_xMtrFldLineDist(m_xBuilder->weld_metric_spin_button("MTR_LINE_DIST", FieldUnit::MM)) - , m_xMtrFldHelplineOverhang(m_xBuilder->weld_metric_spin_button("MTR_FLD_HELPLINE_OVERHANG", FieldUnit::MM)) - , m_xMtrFldHelplineDist(m_xBuilder->weld_metric_spin_button("MTR_FLD_HELPLINE_DIST", FieldUnit::MM)) - , m_xMtrFldHelpline1Len(m_xBuilder->weld_metric_spin_button("MTR_FLD_HELPLINE1_LEN", FieldUnit::MM)) - , m_xMtrFldHelpline2Len(m_xBuilder->weld_metric_spin_button("MTR_FLD_HELPLINE2_LEN", FieldUnit::MM)) - , m_xTsbBelowRefEdge(m_xBuilder->weld_check_button("TSB_BELOW_REF_EDGE")) - , m_xMtrFldDecimalPlaces(m_xBuilder->weld_spin_button("MTR_FLD_DECIMALPLACES")) - , m_xTsbAutoPosV(m_xBuilder->weld_check_button("TSB_AUTOPOSV")) - , m_xTsbAutoPosH(m_xBuilder->weld_check_button("TSB_AUTOPOSH")) - , m_xTsbShowUnit(m_xBuilder->weld_check_button("TSB_SHOW_UNIT")) - , m_xLbUnit(m_xBuilder->weld_combo_box("LB_UNIT")) - , m_xTsbParallel(m_xBuilder->weld_check_button("TSB_PARALLEL")) - , m_xFtAutomatic(m_xBuilder->weld_label("STR_MEASURE_AUTOMATIC")) - , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", m_aCtlPosition)) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) + , m_xMtrFldLineDist(m_xBuilder->weld_metric_spin_button(u"MTR_LINE_DIST"_ustr, FieldUnit::MM)) + , m_xMtrFldHelplineOverhang(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HELPLINE_OVERHANG"_ustr, FieldUnit::MM)) + , m_xMtrFldHelplineDist(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HELPLINE_DIST"_ustr, FieldUnit::MM)) + , m_xMtrFldHelpline1Len(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HELPLINE1_LEN"_ustr, FieldUnit::MM)) + , m_xMtrFldHelpline2Len(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HELPLINE2_LEN"_ustr, FieldUnit::MM)) + , m_xTsbBelowRefEdge(m_xBuilder->weld_check_button(u"TSB_BELOW_REF_EDGE"_ustr)) + , m_xMtrFldDecimalPlaces(m_xBuilder->weld_spin_button(u"MTR_FLD_DECIMALPLACES"_ustr)) + , m_xTsbAutoPosV(m_xBuilder->weld_check_button(u"TSB_AUTOPOSV"_ustr)) + , m_xTsbAutoPosH(m_xBuilder->weld_check_button(u"TSB_AUTOPOSH"_ustr)) + , m_xTsbShowUnit(m_xBuilder->weld_check_button(u"TSB_SHOW_UNIT"_ustr)) + , m_xLbUnit(m_xBuilder->weld_combo_box(u"LB_UNIT"_ustr)) + , m_xTsbParallel(m_xBuilder->weld_check_button(u"TSB_PARALLEL"_ustr)) + , m_xFtAutomatic(m_xBuilder->weld_label(u"STR_MEASURE_AUTOMATIC"_ustr)) + , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, u"CTL_POSITION"_ustr, m_aCtlPosition)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) { m_aCtlPreview.SetAttributes(rInAttrs); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index afaa43f0dc1c..7eed6df2e241 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -198,37 +198,37 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: SvxNumberFormatTabPage::SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) - : SfxTabPage(pPage, pController, "cui/ui/numberingformatpage.ui", "NumberingFormatPage", &rCoreAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/numberingformatpage.ui"_ustr, u"NumberingFormatPage"_ustr, &rCoreAttrs) , nInitFormat(std::numeric_limits<sal_uInt32>::max()) , m_nLbFormatSelPosEdComment(SELPOS_NONE) , bLegacyAutomaticCurrency(false) , sAutomaticLangEntry(CuiResId(RID_CUISTR_AUTO_ENTRY)) - , m_xFtCategory(m_xBuilder->weld_label("categoryft")) - , m_xLbCategory(m_xBuilder->weld_tree_view("categorylb")) - , m_xFtFormat(m_xBuilder->weld_label("formatft")) - , m_xLbCurrency(m_xBuilder->weld_combo_box("currencylb")) - , m_xLbFormat(m_xBuilder->weld_tree_view("formatlb")) - , m_xFtLanguage(m_xBuilder->weld_label("languageft")) - , m_xCbSourceFormat(m_xBuilder->weld_check_button("sourceformat")) - , m_xFtOptions(m_xBuilder->weld_label("optionsft")) - , m_xFtDecimals(m_xBuilder->weld_label("decimalsft")) - , m_xEdDecimals(m_xBuilder->weld_spin_button("decimalsed")) - , m_xFtDenominator(m_xBuilder->weld_label("denominatorft")) - , m_xEdDenominator(m_xBuilder->weld_spin_button("denominatored")) - , m_xBtnNegRed(m_xBuilder->weld_check_button("negnumred")) - , m_xFtLeadZeroes(m_xBuilder->weld_label("leadzerosft")) - , m_xEdLeadZeroes(m_xBuilder->weld_spin_button("leadzerosed")) - , m_xBtnThousand(m_xBuilder->weld_check_button("thousands")) - , m_xBtnEngineering(m_xBuilder->weld_check_button("engineering")) - , m_xFormatCodeFrame(m_xBuilder->weld_widget("formatcode")) - , m_xEdFormat(m_xBuilder->weld_entry("formatted")) - , m_xIbAdd(m_xBuilder->weld_button("add")) - , m_xIbInfo(m_xBuilder->weld_button("edit")) - , m_xIbRemove(m_xBuilder->weld_button("delete")) - , m_xFtComment(m_xBuilder->weld_label("commentft")) - , m_xEdComment(m_xBuilder->weld_entry("commented")) - , m_xLbLanguage(new SvxLanguageBox(m_xBuilder->weld_combo_box("languagelb"))) - , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aWndPreview)) + , m_xFtCategory(m_xBuilder->weld_label(u"categoryft"_ustr)) + , m_xLbCategory(m_xBuilder->weld_tree_view(u"categorylb"_ustr)) + , m_xFtFormat(m_xBuilder->weld_label(u"formatft"_ustr)) + , m_xLbCurrency(m_xBuilder->weld_combo_box(u"currencylb"_ustr)) + , m_xLbFormat(m_xBuilder->weld_tree_view(u"formatlb"_ustr)) + , m_xFtLanguage(m_xBuilder->weld_label(u"languageft"_ustr)) + , m_xCbSourceFormat(m_xBuilder->weld_check_button(u"sourceformat"_ustr)) + , m_xFtOptions(m_xBuilder->weld_label(u"optionsft"_ustr)) + , m_xFtDecimals(m_xBuilder->weld_label(u"decimalsft"_ustr)) + , m_xEdDecimals(m_xBuilder->weld_spin_button(u"decimalsed"_ustr)) + , m_xFtDenominator(m_xBuilder->weld_label(u"denominatorft"_ustr)) + , m_xEdDenominator(m_xBuilder->weld_spin_button(u"denominatored"_ustr)) + , m_xBtnNegRed(m_xBuilder->weld_check_button(u"negnumred"_ustr)) + , m_xFtLeadZeroes(m_xBuilder->weld_label(u"leadzerosft"_ustr)) + , m_xEdLeadZeroes(m_xBuilder->weld_spin_button(u"leadzerosed"_ustr)) + , m_xBtnThousand(m_xBuilder->weld_check_button(u"thousands"_ustr)) + , m_xBtnEngineering(m_xBuilder->weld_check_button(u"engineering"_ustr)) + , m_xFormatCodeFrame(m_xBuilder->weld_widget(u"formatcode"_ustr)) + , m_xEdFormat(m_xBuilder->weld_entry(u"formatted"_ustr)) + , m_xIbAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xIbInfo(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xIbRemove(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xFtComment(m_xBuilder->weld_label(u"commentft"_ustr)) + , m_xEdComment(m_xBuilder->weld_entry(u"commented"_ustr)) + , m_xLbLanguage(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"languagelb"_ustr))) + , m_xWndPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aWndPreview)) { for (size_t i = 0; i < std::size(NUM_CATEGORIES); ++i) m_xLbCategory->append_text(CuiResId(NUM_CATEGORIES[i])); @@ -494,7 +494,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) // is this a calc document Reference< XServiceInfo > xSI( pDocSh->GetModel(), UNO_QUERY ); if ( xSI.is() ) - bUseStarFormat = xSI->supportsService("com.sun.star.sheet.SpreadsheetDocument"); + bUseStarFormat = xSI->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr); } pNumFmtShell->SetUseStarFormat( bUseStarFormat ); @@ -930,7 +930,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_xEdLeadZeroes->set_sensitive( nCategory != CAT_TIME ); m_xBtnNegRed->set_sensitive(true); if ( nCategory == CAT_NUMBER && m_xLbFormat->get_selected_index() == 0 ) - m_xEdDecimals->set_text( "" ); //General format tdf#44399 + m_xEdDecimals->set_text( u""_ustr ); //General format tdf#44399 else if ( nCategory == CAT_FRACTION ) m_xEdDenominator->set_value( nDecimals ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 05bd5822b5e0..320d6ab4e1dd 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -139,7 +139,7 @@ static vcl::Font& lcl_GetDefaultBulletFont() { static vcl::Font aDefBulletFont = []() { - vcl::Font tmp("OpenSymbol", "", Size(0, 14)); + vcl::Font tmp(u"OpenSymbol"_ustr, u""_ustr, Size(0, 14)); tmp.SetCharSet( RTL_TEXTENCODING_SYMBOL ); tmp.SetFamily( FAMILY_DONTKNOW ); tmp.SetPitch( PITCH_DONTKNOW ); @@ -151,13 +151,13 @@ static vcl::Font& lcl_GetDefaultBulletFont() } SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/picknumberingpage.ui", "PickNumberingPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/picknumberingpage.ui"_ustr, u"PickNumberingPage"_ustr, &rSet) , nActNumLvl(SAL_MAX_UINT16) , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) - , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xExamplesVS)) { SetExchangeSupport(); m_xExamplesVS->init(NumberingPageType::SINGLENUM); @@ -302,9 +302,9 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) { SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType(eNewType); - aFmt.SetListFormat(cLocalPrefix == ' ' ? "" : _pSet->sPrefix, - cLocalSuffix == ' ' ? "" : _pSet->sSuffix, i); - aFmt.SetCharFormatName(""); + aFmt.SetListFormat(cLocalPrefix == ' ' ? u""_ustr : _pSet->sPrefix, + cLocalSuffix == ' ' ? u""_ustr : _pSet->sSuffix, i); + aFmt.SetCharFormatName(u""_ustr); aFmt.SetBulletRelSize(100); pActNum->SetLevel(i, aFmt); } @@ -320,13 +320,13 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, DoubleClickHdl_Impl, ValueSet*, void) } SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/pickbulletpage.ui", "PickBulletPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/pickbulletpage.ui"_ustr, u"PickBulletPage"_ustr, &rSet) , nActNumLvl(SAL_MAX_UINT16) , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) - , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xExamplesVS)) { SetExchangeSupport(); m_xExamplesVS->init(NumberingPageType::BULLET); @@ -440,7 +440,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL ); // #i93908# clear suffix for bullet lists - aFmt.SetListFormat("", "", i); + aFmt.SetListFormat(u""_ustr, u""_ustr, i); aFmt.SetBulletFont(&rActBulletFont); aFmt.SetBulletChar(cChar ); aFmt.SetCharFormatName(sBulletCharFormatName); @@ -467,13 +467,13 @@ void SvxBulletPickTabPage::PageCreated(const SfxAllItemSet& aSet) } SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/pickoutlinepage.ui", "PickOutlinePage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/pickoutlinepage.ui"_ustr, u"PickOutlinePage"_ustr, &rSet) , nActNumLvl(SAL_MAX_UINT16) , nNumItemId(SID_ATTR_NUMBERING_RULE) , bModified(false) , bPreset(false) - , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xExamplesVS)) { SetExchangeSupport(); @@ -630,7 +630,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL) { // #i93908# clear suffix for bullet lists - aFmt.SetListFormat("", "", i); + aFmt.SetListFormat(u""_ustr, u""_ustr, i); if( !pLevelSettings->sBulletFont.isEmpty() && pLevelSettings->sBulletFont != rActBulletFont.GetFamilyName()) { @@ -709,15 +709,15 @@ void SvxNumPickTabPage::PageCreated(const SfxAllItemSet& aSet) } SvxBitmapPickTabPage::SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/pickgraphicpage.ui", "PickGraphicPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/pickgraphicpage.ui"_ustr, u"PickGraphicPage"_ustr, &rSet) , nActNumLvl(SAL_MAX_UINT16) , nNumItemId(SID_ATTR_NUMBERING_RULE) , bModified(false) , bPreset(false) - , m_xErrorText(m_xBuilder->weld_label("errorft")) - , m_xBtBrowseFile(m_xBuilder->weld_button("browseBtn")) - , m_xExamplesVS(new SvxBmpNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) + , m_xErrorText(m_xBuilder->weld_label(u"errorft"_ustr)) + , m_xBtBrowseFile(m_xBuilder->weld_button(u"browseBtn"_ustr)) + , m_xExamplesVS(new SvxBmpNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xExamplesVS)) { SetExchangeSupport(); @@ -871,8 +871,8 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, void) { SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType(SVX_NUM_BITMAP); - aFmt.SetListFormat("", "", i); - aFmt.SetCharFormatName( "" ); + aFmt.SetListFormat(u""_ustr, u""_ustr, i); + aFmt.SetCharFormatName( u""_ustr ); Graphic aGraphic; if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, nIdx, &aGraphic)) @@ -962,8 +962,8 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); Sequence< PropertyValue > aFilterData{ - comphelper::makePropertyValue("Compression", sal_Int32(-1)), - comphelper::makePropertyValue("Quality", sal_Int32(1)) + comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(-1)), + comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(1)) }; sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( gURL.GetFileExtension() ); @@ -1000,7 +1000,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi // tabpage numbering options SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/numberingoptionspage.ui", "NumberingOptionsPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/numberingoptionspage.ui"_ustr, u"NumberingOptionsPage"_ustr, &rSet) , aInvalidateTimer("cui SvxNumOptionsTabPage aInvalidateTimer") , m_pLevelHdlEvent(nullptr) , bLastWidthModified(false) @@ -1013,43 +1013,43 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC , nNumItemId(SID_ATTR_NUMBERING_RULE) , m_aRatioTop(ConnectorType::Top) , m_aRatioBottom(ConnectorType::Bottom) - , m_xGrid(m_xBuilder->weld_widget("grid2")) - , m_xLevelLB(m_xBuilder->weld_tree_view("levellb")) - , m_xFmtLB(m_xBuilder->weld_combo_box("numfmtlb")) - , m_xSeparatorFT(m_xBuilder->weld_label("separator")) - , m_xPrefixFT(m_xBuilder->weld_label("prefixft")) - , m_xPrefixED(m_xBuilder->weld_entry("prefix")) - , m_xSuffixFT(m_xBuilder->weld_label("suffixft")) - , m_xSuffixED(m_xBuilder->weld_entry("suffix")) - , m_xCharFmtFT(m_xBuilder->weld_label("charstyleft")) - , m_xCharFmtLB(m_xBuilder->weld_combo_box("charstyle")) - , m_xBulColorFT(m_xBuilder->weld_label("colorft")) - , m_xBulColLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), + , m_xGrid(m_xBuilder->weld_widget(u"grid2"_ustr)) + , m_xLevelLB(m_xBuilder->weld_tree_view(u"levellb"_ustr)) + , m_xFmtLB(m_xBuilder->weld_combo_box(u"numfmtlb"_ustr)) + , m_xSeparatorFT(m_xBuilder->weld_label(u"separator"_ustr)) + , m_xPrefixFT(m_xBuilder->weld_label(u"prefixft"_ustr)) + , m_xPrefixED(m_xBuilder->weld_entry(u"prefix"_ustr)) + , m_xSuffixFT(m_xBuilder->weld_label(u"suffixft"_ustr)) + , m_xSuffixED(m_xBuilder->weld_entry(u"suffix"_ustr)) + , m_xCharFmtFT(m_xBuilder->weld_label(u"charstyleft"_ustr)) + , m_xCharFmtLB(m_xBuilder->weld_combo_box(u"charstyle"_ustr)) + , m_xBulColorFT(m_xBuilder->weld_label(u"colorft"_ustr)) + , m_xBulColLB(new ColorListBox(m_xBuilder->weld_menu_button(u"color"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xBulRelSizeFT(m_xBuilder->weld_label("relsizeft")) - , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", FieldUnit::PERCENT)) - , m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft")) - , m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevels")) - , m_xIsLegalCB(m_xBuilder->weld_check_button("islegal")) - , m_xStartFT(m_xBuilder->weld_label("startatft")) - , m_xStartED(m_xBuilder->weld_spin_button("startat")) - , m_xBulletFT(m_xBuilder->weld_label("bulletft")) - , m_xBulletPB(m_xBuilder->weld_button("bullet")) - , m_xBitmapFT(m_xBuilder->weld_label("bitmapft")) - , m_xBitmapMB(m_xBuilder->weld_menu_button("bitmap")) - , m_xWidthFT(m_xBuilder->weld_label("widthft")) - , m_xWidthMF(m_xBuilder->weld_metric_spin_button("widthmf", FieldUnit::CM)) - , m_xHeightFT(m_xBuilder->weld_label("heightft")) - , m_xHeightMF(m_xBuilder->weld_metric_spin_button("heightmf", FieldUnit::CM)) - , m_xRatioCB(m_xBuilder->weld_check_button("keepratio")) - , m_xCbxScaleImg(m_xBuilder->weld_image("imRatio")) - , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, "daRatioTop", m_aRatioTop)) - , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, "daRatioBottom", m_aRatioBottom)) - , m_xOrientFT(m_xBuilder->weld_label("orientft")) - , m_xOrientLB(m_xBuilder->weld_combo_box("orientlb")) - , m_xAllLevelsFrame(m_xBuilder->weld_widget("levelsframe")) - , m_xSameLevelCB(m_xBuilder->weld_check_button("allsame")) - , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWIN)) + , m_xBulRelSizeFT(m_xBuilder->weld_label(u"relsizeft"_ustr)) + , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button(u"relsize"_ustr, FieldUnit::PERCENT)) + , m_xAllLevelFT(m_xBuilder->weld_label(u"sublevelsft"_ustr)) + , m_xAllLevelNF(m_xBuilder->weld_spin_button(u"sublevels"_ustr)) + , m_xIsLegalCB(m_xBuilder->weld_check_button(u"islegal"_ustr)) + , m_xStartFT(m_xBuilder->weld_label(u"startatft"_ustr)) + , m_xStartED(m_xBuilder->weld_spin_button(u"startat"_ustr)) + , m_xBulletFT(m_xBuilder->weld_label(u"bulletft"_ustr)) + , m_xBulletPB(m_xBuilder->weld_button(u"bullet"_ustr)) + , m_xBitmapFT(m_xBuilder->weld_label(u"bitmapft"_ustr)) + , m_xBitmapMB(m_xBuilder->weld_menu_button(u"bitmap"_ustr)) + , m_xWidthFT(m_xBuilder->weld_label(u"widthft"_ustr)) + , m_xWidthMF(m_xBuilder->weld_metric_spin_button(u"widthmf"_ustr, FieldUnit::CM)) + , m_xHeightFT(m_xBuilder->weld_label(u"heightft"_ustr)) + , m_xHeightMF(m_xBuilder->weld_metric_spin_button(u"heightmf"_ustr, FieldUnit::CM)) + , m_xRatioCB(m_xBuilder->weld_check_button(u"keepratio"_ustr)) + , m_xCbxScaleImg(m_xBuilder->weld_image(u"imRatio"_ustr)) + , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, u"daRatioTop"_ustr, m_aRatioTop)) + , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, u"daRatioBottom"_ustr, m_aRatioBottom)) + , m_xOrientFT(m_xBuilder->weld_label(u"orientft"_ustr)) + , m_xOrientLB(m_xBuilder->weld_combo_box(u"orientlb"_ustr)) + , m_xAllLevelsFrame(m_xBuilder->weld_widget(u"levelsframe"_ustr)) + , m_xSameLevelCB(m_xBuilder->weld_check_button(u"allsame"_ustr)) + , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWIN)) { m_xBulColLB->SetSlotId(SID_ATTR_CHAR_COLOR); m_xBulRelSizeMF->set_min(SVX_NUM_REL_SIZE_MIN, FieldUnit::PERCENT); @@ -1433,8 +1433,8 @@ void SvxNumOptionsTabPage::InitControls() } else { - m_xHeightMF->set_text(""); - m_xWidthMF->set_text(""); + m_xHeightMF->set_text(u""_ustr); + m_xWidthMF->set_text(u""_ustr); } } @@ -1454,7 +1454,7 @@ void SvxNumOptionsTabPage::InitControls() } else { - m_xAllLevelNF->set_text(""); + m_xAllLevelNF->set_text(u""_ustr); } m_xIsLegalCB->set_state(isLegal); @@ -1465,7 +1465,7 @@ void SvxNumOptionsTabPage::InitControls() if(bSameBulRelSize) m_xBulRelSizeMF->set_value(aNumFmtArr[nLvl]->GetBulletRelSize(), FieldUnit::PERCENT); else - m_xBulRelSizeMF->set_text(""); + m_xBulRelSizeMF->set_text(u""_ustr); } if(bBullColor) { @@ -1483,7 +1483,7 @@ void SvxNumOptionsTabPage::InitControls() m_xStartED->set_value(aNumFmtArr[nLvl]->GetStart()); } else - m_xStartED->set_text(""); + m_xStartED->set_text(u""_ustr); break; case SHOW_BULLET: break; @@ -1494,11 +1494,11 @@ void SvxNumOptionsTabPage::InitControls() if(bSamePrefix) m_xPrefixED->set_text(aNumFmtArr[nLvl]->GetPrefix()); else - m_xPrefixED->set_text(""); + m_xPrefixED->set_text(u""_ustr); if(bSameSuffix) m_xSuffixED->set_text(aNumFmtArr[nLvl]->GetSuffix()); else - m_xSuffixED->set_text(""); + m_xSuffixED->set_text(u""_ustr); if(bSameCharFmt) { @@ -1687,9 +1687,9 @@ IMPL_LINK(SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, weld::ComboBox&, rBox, { bBmp |= nullptr != aNumFmt.GetBrush(); aNumFmt.SetIncludeUpperLevels( 1 ); - aNumFmt.SetListFormat("", "", i); + aNumFmt.SetListFormat(u""_ustr, u""_ustr, i); if(!bBmp) - aNumFmt.SetGraphic(""); + aNumFmt.SetGraphic(u""_ustr); pActNum->SetLevel(i, aNumFmt); SwitchNumberType(SHOW_BITMAP); bShowOrient = true; @@ -1697,7 +1697,7 @@ IMPL_LINK(SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, weld::ComboBox&, rBox, else if( SVX_NUM_CHAR_SPECIAL == nNumberingType ) { aNumFmt.SetIncludeUpperLevels( 1 ); - aNumFmt.SetListFormat("", "", i); + aNumFmt.SetListFormat(u""_ustr, u""_ustr, i); if( !aNumFmt.GetBulletFont() ) aNumFmt.SetBulletFont(&aActBulletFont); if( !aNumFmt.GetBulletChar() ) @@ -1920,7 +1920,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, weld::Toggleable&, if (m_xGalleryMenu) return; - m_xGalleryMenu = m_xBuilder->weld_menu("gallerysubmenu"); + m_xGalleryMenu = m_xBuilder->weld_menu(u"gallerysubmenu"_ustr); weld::WaitObject aWait(GetFrameWeld()); if (!GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames)) @@ -2119,7 +2119,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, CharFmtHdl_Impl, weld::ComboBox&, void) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); if( 0 == nEntryPos ) - aNumFmt.SetCharFormatName(""); + aNumFmt.SetCharFormatName(u""_ustr); else { if(SVX_NUM_BITMAP != (aNumFmt.GetNumberingType()&(~LINK_TOKEN))) @@ -2168,7 +2168,7 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit) //TODO, determine if SwNumPositionTabPage and SvxNumPositionTabPage can be //merged SvxNumPositionTabPage::SvxNumPositionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/numberingpositionpage.ui", "NumberingPositionPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/numberingpositionpage.ui"_ustr, u"NumberingPositionPage"_ustr, &rSet) , m_pLevelHdlEvent(nullptr) , nActNumLvl(1) , nNumItemId(SID_ATTR_NUMBERING_RULE) @@ -2176,28 +2176,28 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(weld::Container* pPage, weld::Dialo , bPreset(false) , bInInintControl(false) , bLabelAlignmentPosAndSpaceModeActive(false) - , m_xLevelLB(m_xBuilder->weld_tree_view("levellb")) - , m_xDistBorderFT(m_xBuilder->weld_label("indent")) - , m_xDistBorderMF(m_xBuilder->weld_metric_spin_button("indentmf", FieldUnit::CM)) - , m_xRelativeCB(m_xBuilder->weld_check_button("relative")) - , m_xIndentFT(m_xBuilder->weld_label("numberingwidth")) - , m_xIndentMF(m_xBuilder->weld_metric_spin_button("numberingwidthmf", FieldUnit::CM)) - , m_xDistNumFT(m_xBuilder->weld_label("numdist")) - , m_xDistNumMF(m_xBuilder->weld_metric_spin_button("numdistmf", FieldUnit::CM)) - , m_xAlignFT(m_xBuilder->weld_label("numalign")) - , m_xAlignLB(m_xBuilder->weld_combo_box("numalignlb")) - , m_xLabelFollowedByFT(m_xBuilder->weld_label("numfollowedby")) - , m_xLabelFollowedByLB(m_xBuilder->weld_combo_box("numfollowedbylb")) - , m_xListtabFT(m_xBuilder->weld_label("at")) - , m_xListtabMF(m_xBuilder->weld_metric_spin_button("atmf", FieldUnit::CM)) - , m_xAlign2FT(m_xBuilder->weld_label("num2align")) - , m_xAlign2LB(m_xBuilder->weld_combo_box("num2alignlb")) - , m_xAlignedAtFT(m_xBuilder->weld_label("alignedat")) - , m_xAlignedAtMF(m_xBuilder->weld_metric_spin_button("alignedatmf", FieldUnit::CM)) - , m_xIndentAtFT(m_xBuilder->weld_label("indentat")) - , m_xIndentAtMF(m_xBuilder->weld_metric_spin_button("indentatmf", FieldUnit::CM)) - , m_xStandardPB(m_xBuilder->weld_button("standard")) - , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWIN)) + , m_xLevelLB(m_xBuilder->weld_tree_view(u"levellb"_ustr)) + , m_xDistBorderFT(m_xBuilder->weld_label(u"indent"_ustr)) + , m_xDistBorderMF(m_xBuilder->weld_metric_spin_button(u"indentmf"_ustr, FieldUnit::CM)) + , m_xRelativeCB(m_xBuilder->weld_check_button(u"relative"_ustr)) + , m_xIndentFT(m_xBuilder->weld_label(u"numberingwidth"_ustr)) + , m_xIndentMF(m_xBuilder->weld_metric_spin_button(u"numberingwidthmf"_ustr, FieldUnit::CM)) + , m_xDistNumFT(m_xBuilder->weld_label(u"numdist"_ustr)) + , m_xDistNumMF(m_xBuilder->weld_metric_spin_button(u"numdistmf"_ustr, FieldUnit::CM)) + , m_xAlignFT(m_xBuilder->weld_label(u"numalign"_ustr)) + , m_xAlignLB(m_xBuilder->weld_combo_box(u"numalignlb"_ustr)) + , m_xLabelFollowedByFT(m_xBuilder->weld_label(u"numfollowedby"_ustr)) + , m_xLabelFollowedByLB(m_xBuilder->weld_combo_box(u"numfollowedbylb"_ustr)) + , m_xListtabFT(m_xBuilder->weld_label(u"at"_ustr)) + , m_xListtabMF(m_xBuilder->weld_metric_spin_button(u"atmf"_ustr, FieldUnit::CM)) + , m_xAlign2FT(m_xBuilder->weld_label(u"num2align"_ustr)) + , m_xAlign2LB(m_xBuilder->weld_combo_box(u"num2alignlb"_ustr)) + , m_xAlignedAtFT(m_xBuilder->weld_label(u"alignedat"_ustr)) + , m_xAlignedAtMF(m_xBuilder->weld_metric_spin_button(u"alignedatmf"_ustr, FieldUnit::CM)) + , m_xIndentAtFT(m_xBuilder->weld_label(u"indentat"_ustr)) + , m_xIndentAtMF(m_xBuilder->weld_metric_spin_button(u"indentatmf"_ustr, FieldUnit::CM)) + , m_xStandardPB(m_xBuilder->weld_button(u"standard"_ustr)) + , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aPreviewWIN)) { SetExchangeSupport(); @@ -2357,11 +2357,11 @@ void SvxNumPositionTabPage::InitControls() if(bSameDist) SetMetricValue(*m_xDistNumMF, aNumFmtArr[nLvl]->GetCharTextDistance(), eCoreUnit); else - m_xDistNumMF->set_text(""); + m_xDistNumMF->set_text(u""_ustr); if(bSameIndent) SetMetricValue(*m_xIndentMF, - aNumFmtArr[nLvl]->GetFirstLineOffset(), eCoreUnit); else - m_xIndentMF->set_text(""); + m_xIndentMF->set_text(u""_ustr); if(bSameAdjust) { @@ -2411,14 +2411,14 @@ void SvxNumPositionTabPage::InitControls() } else { - m_xListtabMF->set_text(""); + m_xListtabMF->set_text(u""_ustr); } } else { m_xListtabFT->set_sensitive(false); m_xListtabMF->set_sensitive(false); - m_xListtabMF->set_text(""); + m_xListtabMF->set_text(u""_ustr); } if ( bSameAlignAt ) @@ -2429,7 +2429,7 @@ void SvxNumPositionTabPage::InitControls() } else { - m_xAlignedAtMF->set_text(""); + m_xAlignedAtMF->set_text(u""_ustr); } if ( bSameIndentAt ) @@ -2438,11 +2438,11 @@ void SvxNumPositionTabPage::InitControls() } else { - m_xIndentAtMF->set_text(""); + m_xIndentAtMF->set_text(u""_ustr); } if ( bSetDistEmpty ) - m_xDistBorderMF->set_text(""); + m_xDistBorderMF->set_text(u""_ustr); bInInintControl = false; } @@ -2796,7 +2796,7 @@ IMPL_LINK(SvxNumPositionTabPage, DistanceHdl_Impl, weld::MetricSpinButton&, rFld SetModified(); if (!m_xDistBorderMF->get_sensitive()) { - m_xDistBorderMF->set_text(""); + m_xDistBorderMF->set_text(u""_ustr); } } @@ -2835,7 +2835,7 @@ IMPL_LINK(SvxNumPositionTabPage, RelativeHdl_Impl, weld::Toggleable&, rBox, void if(bSetValue) SetMetricValue(*m_xDistBorderMF, nValue, eCoreUnit); else - m_xDistBorderMF->set_text(""); + m_xDistBorderMF->set_text(u""_ustr); m_xDistBorderMF->set_sensitive(bOn || bSingleSelection); m_xDistBorderFT->set_sensitive(bOn || bSingleSelection); bLastRelative = bOn; diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 0fec60690e9a..ee0a4be0a945 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -138,7 +138,7 @@ std::unique_ptr<SfxTabPage> SvxPageDescPage::Create( weld::Container* pPage, wel } SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr) - : SfxTabPage(pPage, pController, "cui/ui/pageformatpage.ui", "PageFormatPage", &rAttr) + : SfxTabPage(pPage, pController, u"cui/ui/pageformatpage.ui"_ustr, u"PageFormatPage"_ustr, &rAttr) , bLandscape(false) , eMode(SVX_PAGE_MODE_STANDARD) , ePaperStart(PAPER_A3) @@ -146,42 +146,42 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, weld::DialogController* , mpDefPrinter(nullptr) , mbDelPrinter(false) , mbEnableDrawingLayerFillStyles(false) - , m_xPaperSizeBox(new SvxPaperSizeListBox(m_xBuilder->weld_combo_box("comboPageFormat"))) - , m_xPaperWidthEdit(m_xBuilder->weld_metric_spin_button("spinWidth", FieldUnit::CM)) - , m_xPaperHeightEdit(m_xBuilder->weld_metric_spin_button("spinHeight", FieldUnit::CM)) - , m_xPortraitBtn(m_xBuilder->weld_radio_button("radiobuttonPortrait")) - , m_xLandscapeBtn(m_xBuilder->weld_radio_button("radiobuttonLandscape")) - , m_xTextFlowLbl(m_xBuilder->weld_label("labelTextFlow")) - , m_xTextFlowBox(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box("comboTextFlowBox"))) - , m_xPaperTrayBox(m_xBuilder->weld_combo_box("comboPaperTray")) - , m_xLeftMarginLbl(m_xBuilder->weld_label("labelLeftMargin")) - , m_xLeftMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargLeft", FieldUnit::CM)) - , m_xRightMarginLbl(m_xBuilder->weld_label("labelRightMargin")) - , m_xRightMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargRight", FieldUnit::CM)) - , m_xTopMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargTop", FieldUnit::CM)) - , m_xBottomMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargBot", FieldUnit::CM)) - , m_xGutterMarginLbl(m_xBuilder->weld_label("labelGutterMargin")) - , m_xGutterMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargGut", FieldUnit::CM)) - , m_xPageText(m_xBuilder->weld_label("labelPageLayout")) - , m_xLayoutBox(m_xBuilder->weld_combo_box("comboPageLayout")) - , m_xNumberFormatText(m_xBuilder->weld_label("labelPageNumbers")) - , m_xNumberFormatBox(new SvxPageNumberListBox(m_xBuilder->weld_combo_box("comboLayoutFormat"))) - , m_xTblAlignFT(m_xBuilder->weld_label("labelTblAlign")) - , m_xHorzBox(m_xBuilder->weld_check_button("checkbuttonHorz")) - , m_xVertBox(m_xBuilder->weld_check_button("checkbuttonVert")) - , m_xAdaptBox(m_xBuilder->weld_check_button("checkAdaptBox")) - , m_xRegisterCB(m_xBuilder->weld_check_button("checkRegisterTrue")) - , m_xRegisterFT(m_xBuilder->weld_label("labelRegisterStyle")) - , m_xRegisterLB(m_xBuilder->weld_combo_box("comboRegisterStyle")) - , m_xGutterPositionFT(m_xBuilder->weld_label("labelGutterPosition")) - , m_xGutterPositionLB(m_xBuilder->weld_combo_box("comboGutterPosition")) - , m_xRtlGutterCB(m_xBuilder->weld_check_button("checkRtlGutter")) - , m_xBackgroundFullSizeCB(m_xBuilder->weld_check_button("checkBackgroundFullSize")) + , m_xPaperSizeBox(new SvxPaperSizeListBox(m_xBuilder->weld_combo_box(u"comboPageFormat"_ustr))) + , m_xPaperWidthEdit(m_xBuilder->weld_metric_spin_button(u"spinWidth"_ustr, FieldUnit::CM)) + , m_xPaperHeightEdit(m_xBuilder->weld_metric_spin_button(u"spinHeight"_ustr, FieldUnit::CM)) + , m_xPortraitBtn(m_xBuilder->weld_radio_button(u"radiobuttonPortrait"_ustr)) + , m_xLandscapeBtn(m_xBuilder->weld_radio_button(u"radiobuttonLandscape"_ustr)) + , m_xTextFlowLbl(m_xBuilder->weld_label(u"labelTextFlow"_ustr)) + , m_xTextFlowBox(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(u"comboTextFlowBox"_ustr))) + , m_xPaperTrayBox(m_xBuilder->weld_combo_box(u"comboPaperTray"_ustr)) + , m_xLeftMarginLbl(m_xBuilder->weld_label(u"labelLeftMargin"_ustr)) + , m_xLeftMarginEdit(m_xBuilder->weld_metric_spin_button(u"spinMargLeft"_ustr, FieldUnit::CM)) + , m_xRightMarginLbl(m_xBuilder->weld_label(u"labelRightMargin"_ustr)) + , m_xRightMarginEdit(m_xBuilder->weld_metric_spin_button(u"spinMargRight"_ustr, FieldUnit::CM)) + , m_xTopMarginEdit(m_xBuilder->weld_metric_spin_button(u"spinMargTop"_ustr, FieldUnit::CM)) + , m_xBottomMarginEdit(m_xBuilder->weld_metric_spin_button(u"spinMargBot"_ustr, FieldUnit::CM)) + , m_xGutterMarginLbl(m_xBuilder->weld_label(u"labelGutterMargin"_ustr)) + , m_xGutterMarginEdit(m_xBuilder->weld_metric_spin_button(u"spinMargGut"_ustr, FieldUnit::CM)) + , m_xPageText(m_xBuilder->weld_label(u"labelPageLayout"_ustr)) + , m_xLayoutBox(m_xBuilder->weld_combo_box(u"comboPageLayout"_ustr)) + , m_xNumberFormatText(m_xBuilder->weld_label(u"labelPageNumbers"_ustr)) + , m_xNumberFormatBox(new SvxPageNumberListBox(m_xBuilder->weld_combo_box(u"comboLayoutFormat"_ustr))) + , m_xTblAlignFT(m_xBuilder->weld_label(u"labelTblAlign"_ustr)) + , m_xHorzBox(m_xBuilder->weld_check_button(u"checkbuttonHorz"_ustr)) + , m_xVertBox(m_xBuilder->weld_check_button(u"checkbuttonVert"_ustr)) + , m_xAdaptBox(m_xBuilder->weld_check_button(u"checkAdaptBox"_ustr)) + , m_xRegisterCB(m_xBuilder->weld_check_button(u"checkRegisterTrue"_ustr)) + , m_xRegisterFT(m_xBuilder->weld_label(u"labelRegisterStyle"_ustr)) + , m_xRegisterLB(m_xBuilder->weld_combo_box(u"comboRegisterStyle"_ustr)) + , m_xGutterPositionFT(m_xBuilder->weld_label(u"labelGutterPosition"_ustr)) + , m_xGutterPositionLB(m_xBuilder->weld_combo_box(u"comboGutterPosition"_ustr)) + , m_xRtlGutterCB(m_xBuilder->weld_check_button(u"checkRtlGutter"_ustr)) + , m_xBackgroundFullSizeCB(m_xBuilder->weld_check_button(u"checkBackgroundFullSize"_ustr)) // Strings stored in UI - , m_xInsideLbl(m_xBuilder->weld_label("labelInner")) - , m_xOutsideLbl(m_xBuilder->weld_label("labelOuter")) - , m_xPrintRangeQueryText(m_xBuilder->weld_label("labelMsg")) - , m_xBspWin(new weld::CustomWeld(*m_xBuilder, "drawingareaPageDirection", m_aBspWin)) + , m_xInsideLbl(m_xBuilder->weld_label(u"labelInner"_ustr)) + , m_xOutsideLbl(m_xBuilder->weld_label(u"labelOuter"_ustr)) + , m_xPrintRangeQueryText(m_xBuilder->weld_label(u"labelMsg"_ustr)) + , m_xBspWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaPageDirection"_ustr, m_aBspWin)) { m_xRegisterLB->set_size_request(m_xRegisterLB->get_approximate_digit_width() * 20, -1); @@ -362,7 +362,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) if (const SfxGrabBagItem* pGragbagItem = rSet->GetItemIfSet(SID_ATTR_CHAR_GRABBAG)) { bool bGutterAtTop{}; - auto it = pGragbagItem->GetGrabBag().find("GutterAtTop"); + auto it = pGragbagItem->GetGrabBag().find(u"GutterAtTop"_ustr); if (it != pGragbagItem->GetGrabBag().end()) { it->second >>= bGutterAtTop; @@ -377,7 +377,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) // Left. m_xGutterPositionLB->set_active(0); } - it = pGragbagItem->GetGrabBag().find("RtlGutter"); + it = pGragbagItem->GetGrabBag().find(u"RtlGutter"_ustr); bool bRtlGutter{}; if (it != pGragbagItem->GetGrabBag().end()) { @@ -385,7 +385,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) m_xRtlGutterCB->set_active(bRtlGutter); m_xRtlGutterCB->show(); } - it = pGragbagItem->GetGrabBag().find("BackgroundFullSize"); + it = pGragbagItem->GetGrabBag().find(u"BackgroundFullSize"_ustr); bool isBackgroundFullSize{}; if (it != pGragbagItem->GetGrabBag().end()) { @@ -610,7 +610,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) void SvxPageDescPage::FillUserData() { if (SVX_PAGE_MODE_PRESENTATION == eMode) - SetUserData(m_xAdaptBox->get_active() ? OUString("1") : OUString("0")) ; + SetUserData(m_xAdaptBox->get_active() ? u"1"_ustr : u"0"_ustr) ; } @@ -667,19 +667,19 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet ) if (m_xGutterPositionLB->get_value_changed_from_saved()) { bool bGutterAtTop = m_xGutterPositionLB->get_active() == 1; - aGrabBagItem.GetGrabBag()["GutterAtTop"] <<= bGutterAtTop; + aGrabBagItem.GetGrabBag()[u"GutterAtTop"_ustr] <<= bGutterAtTop; bModified = true; } if (m_xRtlGutterCB->get_state_changed_from_saved()) { bool const bRtlGutter(m_xRtlGutterCB->get_active()); - aGrabBagItem.GetGrabBag()["RtlGutter"] <<= bRtlGutter; + aGrabBagItem.GetGrabBag()[u"RtlGutter"_ustr] <<= bRtlGutter; bModified = true; } if (m_xBackgroundFullSizeCB->get_state_changed_from_saved()) { bool const isBackgroundFullSize(m_xBackgroundFullSizeCB->get_active()); - aGrabBagItem.GetGrabBag()["BackgroundFullSize"] <<= isBackgroundFullSize; + aGrabBagItem.GetGrabBag()[u"BackgroundFullSize"_ustr] <<= isBackgroundFullSize; bModified = true; } diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 5827a74942ad..034983ea73ce 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -905,26 +905,26 @@ DeactivateRC SvxStdParagraphTabPage::DeactivatePage( SfxItemSet* _pSet ) } SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr) - : SfxTabPage(pPage, pController, "cui/ui/paraindentspacing.ui", "ParaIndentSpacing", &rAttr) + : SfxTabPage(pPage, pController, u"cui/ui/paraindentspacing.ui"_ustr, u"ParaIndentSpacing"_ustr, &rAttr) , nWidth(11905 /*567 * 50*/) , nMinFixDist(0) , bRelativeMode(false) - , m_aLeftIndent(m_xBuilder->weld_metric_spin_button("spinED_LEFTINDENT", FieldUnit::CM)) - , m_aRightIndent(m_xBuilder->weld_metric_spin_button("spinED_RIGHTINDENT", FieldUnit::CM)) - , m_xFLineLabel(m_xBuilder->weld_label("labelFT_FLINEINDENT")) - , m_aFLineIndent(m_xBuilder->weld_metric_spin_button("spinED_FLINEINDENT", FieldUnit::CM)) - , m_xAutoCB(m_xBuilder->weld_check_button("checkCB_AUTO")) - , m_aTopDist(m_xBuilder->weld_metric_spin_button("spinED_TOPDIST", FieldUnit::CM)) - , m_aBottomDist(m_xBuilder->weld_metric_spin_button("spinED_BOTTOMDIST", FieldUnit::CM)) - , m_xContextualCB(m_xBuilder->weld_check_button("checkCB_CONTEXTUALSPACING")) - , m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST")) - , m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTPERCENT", FieldUnit::PERCENT)) - , m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTMETRIC", FieldUnit::CM)) - , m_xLineDistAtPlaceHolderBox(m_xBuilder->weld_metric_spin_button("spinED_BLANK", FieldUnit::CM)) - , m_xLineDistAtLabel(m_xBuilder->weld_label("labelFT_LINEDIST")) - , m_xAbsDist(m_xBuilder->weld_label("labelST_LINEDIST_ABS")) - , m_xRegisterCB(m_xBuilder->weld_check_button("checkCB_REGISTER")) - , m_xExampleWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWN_EXAMPLE", m_aExampleWin)) + , m_aLeftIndent(m_xBuilder->weld_metric_spin_button(u"spinED_LEFTINDENT"_ustr, FieldUnit::CM)) + , m_aRightIndent(m_xBuilder->weld_metric_spin_button(u"spinED_RIGHTINDENT"_ustr, FieldUnit::CM)) + , m_xFLineLabel(m_xBuilder->weld_label(u"labelFT_FLINEINDENT"_ustr)) + , m_aFLineIndent(m_xBuilder->weld_metric_spin_button(u"spinED_FLINEINDENT"_ustr, FieldUnit::CM)) + , m_xAutoCB(m_xBuilder->weld_check_button(u"checkCB_AUTO"_ustr)) + , m_aTopDist(m_xBuilder->weld_metric_spin_button(u"spinED_TOPDIST"_ustr, FieldUnit::CM)) + , m_aBottomDist(m_xBuilder->weld_metric_spin_button(u"spinED_BOTTOMDIST"_ustr, FieldUnit::CM)) + , m_xContextualCB(m_xBuilder->weld_check_button(u"checkCB_CONTEXTUALSPACING"_ustr)) + , m_xLineDist(m_xBuilder->weld_combo_box(u"comboLB_LINEDIST"_ustr)) + , m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button(u"spinED_LINEDISTPERCENT"_ustr, FieldUnit::PERCENT)) + , m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button(u"spinED_LINEDISTMETRIC"_ustr, FieldUnit::CM)) + , m_xLineDistAtPlaceHolderBox(m_xBuilder->weld_metric_spin_button(u"spinED_BLANK"_ustr, FieldUnit::CM)) + , m_xLineDistAtLabel(m_xBuilder->weld_label(u"labelFT_LINEDIST"_ustr)) + , m_xAbsDist(m_xBuilder->weld_label(u"labelST_LINEDIST_ABS"_ustr)) + , m_xRegisterCB(m_xBuilder->weld_check_button(u"checkCB_REGISTER"_ustr)) + , m_xExampleWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWN_EXAMPLE"_ustr, m_aExampleWin)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -1214,24 +1214,24 @@ void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) #define LASTLINECOUNT_NEW 4 SvxParaAlignTabPage::SvxParaAlignTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/paragalignpage.ui", "ParaAlignPage", &rSet) + : SfxTabPage(pPage, pController, u"cui/ui/paragalignpage.ui"_ustr, u"ParaAlignPage"_ustr, &rSet) , m_bSdrVertAlign(false) - , m_xLeft(m_xBuilder->weld_radio_button("radioBTN_LEFTALIGN")) - , m_xRight(m_xBuilder->weld_radio_button("radioBTN_RIGHTALIGN")) - , m_xCenter(m_xBuilder->weld_radio_button("radioBTN_CENTERALIGN")) - , m_xJustify(m_xBuilder->weld_radio_button("radioBTN_JUSTIFYALIGN")) - , m_xLeftBottom(m_xBuilder->weld_label("labelST_LEFTALIGN_ASIAN")) - , m_xRightTop(m_xBuilder->weld_label("labelST_RIGHTALIGN_ASIAN")) - , m_xLastLineFT(m_xBuilder->weld_label("labelLB_LASTLINE")) - , m_xLastLineLB(m_xBuilder->weld_combo_box("comboLB_LASTLINE")) - , m_xExpandCB(m_xBuilder->weld_check_button("checkCB_EXPAND")) - , m_xSnapToGridCB(m_xBuilder->weld_check_button("checkCB_SNAP")) - , m_xExampleWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWN_EXAMPLE", m_aExampleWin)) - , m_xVertAlignFL(m_xBuilder->weld_widget("frameFL_VERTALIGN")) - , m_xVertAlignLB(m_xBuilder->weld_combo_box("comboLB_VERTALIGN")) - , m_xVertAlign(m_xBuilder->weld_label("labelFL_VERTALIGN")) - , m_xVertAlignSdr(m_xBuilder->weld_label("labelST_VERTALIGN_SDR")) - , m_xTextDirectionLB(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box("comboLB_TEXTDIRECTION"))) + , m_xLeft(m_xBuilder->weld_radio_button(u"radioBTN_LEFTALIGN"_ustr)) + , m_xRight(m_xBuilder->weld_radio_button(u"radioBTN_RIGHTALIGN"_ustr)) + , m_xCenter(m_xBuilder->weld_radio_button(u"radioBTN_CENTERALIGN"_ustr)) + , m_xJustify(m_xBuilder->weld_radio_button(u"radioBTN_JUSTIFYALIGN"_ustr)) + , m_xLeftBottom(m_xBuilder->weld_label(u"labelST_LEFTALIGN_ASIAN"_ustr)) + , m_xRightTop(m_xBuilder->weld_label(u"labelST_RIGHTALIGN_ASIAN"_ustr)) + , m_xLastLineFT(m_xBuilder->weld_label(u"labelLB_LASTLINE"_ustr)) + , m_xLastLineLB(m_xBuilder->weld_combo_box(u"comboLB_LASTLINE"_ustr)) + , m_xExpandCB(m_xBuilder->weld_check_button(u"checkCB_EXPAND"_ustr)) + , m_xSnapToGridCB(m_xBuilder->weld_check_button(u"checkCB_SNAP"_ustr)) + , m_xExampleWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWN_EXAMPLE"_ustr, m_aExampleWin)) + , m_xVertAlignFL(m_xBuilder->weld_widget(u"frameFL_VERTALIGN"_ustr)) + , m_xVertAlignLB(m_xBuilder->weld_combo_box(u"comboLB_VERTALIGN"_ustr)) + , m_xVertAlign(m_xBuilder->weld_label(u"labelFL_VERTALIGN"_ustr)) + , m_xVertAlignSdr(m_xBuilder->weld_label(u"labelST_VERTALIGN_SDR"_ustr)) + , m_xTextDirectionLB(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(u"comboLB_TEXTDIRECTION"_ustr))) { SetExchangeSupport(); @@ -1585,8 +1585,8 @@ void SvxParaAlignTabPage::EnableSdrVertAlign() { m_bSdrVertAlign = true; - m_xVertAlignLB->remove_id("0"); - m_xVertAlignLB->remove_id("1"); + m_xVertAlignLB->remove_id(u"0"_ustr); + m_xVertAlignLB->remove_id(u"1"_ustr); m_xVertAlign->set_label(m_xVertAlignSdr->get_label()); } @@ -2219,50 +2219,50 @@ void SvxExtParagraphTabPage::DisablePageBreak() } SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr) - : SfxTabPage(pPage, pController, "cui/ui/textflowpage.ui", "TextFlowPage", &rAttr) + : SfxTabPage(pPage, pController, u"cui/ui/textflowpage.ui"_ustr, u"TextFlowPage"_ustr, &rAttr) , bPageBreak(true) , bHtmlMode(false) , nStdPos(0) // Hyphenation - , m_xHyphenBox(m_xBuilder->weld_check_button("checkAuto")) - , m_xHyphenNoCapsBox(m_xBuilder->weld_check_button("checkNoCaps")) - , m_xHyphenNoLastWordBox(m_xBuilder->weld_check_button("checkNoLastWord")) - , m_xBeforeText(m_xBuilder->weld_label("labelLineBegin")) - , m_xExtHyphenBeforeBox(m_xBuilder->weld_spin_button("spinLineEnd")) - , m_xAfterText(m_xBuilder->weld_label("labelLineEnd")) - , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button("spinLineBegin")) - , m_xCompoundBeforeText(m_xBuilder->weld_label("labelCompoundLineEnd")) - , m_xExtCompoundHyphenBeforeBox(m_xBuilder->weld_spin_button("spinCompoundLineEnd")) - , m_xMaxHyphenLabel(m_xBuilder->weld_label("labelMaxNum")) - , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button("spinMaxNum")) - , m_xMinWordLabel(m_xBuilder->weld_label("labelMinLen")) - , m_xMinWordLength(m_xBuilder->weld_spin_button("spinMinLen")) - , m_xHyphenZoneLabel(m_xBuilder->weld_label("labelHyphenZone")) - , m_aHyphenZone(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM)) + , m_xHyphenBox(m_xBuilder->weld_check_button(u"checkAuto"_ustr)) + , m_xHyphenNoCapsBox(m_xBuilder->weld_check_button(u"checkNoCaps"_ustr)) + , m_xHyphenNoLastWordBox(m_xBuilder->weld_check_button(u"checkNoLastWord"_ustr)) + , m_xBeforeText(m_xBuilder->weld_label(u"labelLineBegin"_ustr)) + , m_xExtHyphenBeforeBox(m_xBuilder->weld_spin_button(u"spinLineEnd"_ustr)) + , m_xAfterText(m_xBuilder->weld_label(u"labelLineEnd"_ustr)) + , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button(u"spinLineBegin"_ustr)) + , m_xCompoundBeforeText(m_xBuilder->weld_label(u"labelCompoundLineEnd"_ustr)) + , m_xExtCompoundHyphenBeforeBox(m_xBuilder->weld_spin_button(u"spinCompoundLineEnd"_ustr)) + , m_xMaxHyphenLabel(m_xBuilder->weld_label(u"labelMaxNum"_ustr)) + , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button(u"spinMaxNum"_ustr)) + , m_xMinWordLabel(m_xBuilder->weld_label(u"labelMinLen"_ustr)) + , m_xMinWordLength(m_xBuilder->weld_spin_button(u"spinMinLen"_ustr)) + , m_xHyphenZoneLabel(m_xBuilder->weld_label(u"labelHyphenZone"_ustr)) + , m_aHyphenZone(m_xBuilder->weld_metric_spin_button(u"spinHyphenZone"_ustr, FieldUnit::CM)) //Page break - , m_xPageBreakBox(m_xBuilder->weld_check_button("checkInsert")) - , m_xBreakTypeFT(m_xBuilder->weld_label("labelType")) - , m_xBreakTypeLB(m_xBuilder->weld_combo_box("comboBreakType")) - , m_xBreakPositionFT(m_xBuilder->weld_label("labelPosition")) - , m_xBreakPositionLB(m_xBuilder->weld_combo_box("comboBreakPosition")) - , m_xApplyCollBtn(m_xBuilder->weld_check_button("checkPageStyle")) - , m_xApplyCollBox(m_xBuilder->weld_combo_box("comboPageStyle")) - , m_xPageNumBox(m_xBuilder->weld_check_button("labelPageNum")) - , m_xPagenumEdit(m_xBuilder->weld_spin_button("spinPageNumber")) + , m_xPageBreakBox(m_xBuilder->weld_check_button(u"checkInsert"_ustr)) + , m_xBreakTypeFT(m_xBuilder->weld_label(u"labelType"_ustr)) + , m_xBreakTypeLB(m_xBuilder->weld_combo_box(u"comboBreakType"_ustr)) + , m_xBreakPositionFT(m_xBuilder->weld_label(u"labelPosition"_ustr)) + , m_xBreakPositionLB(m_xBuilder->weld_combo_box(u"comboBreakPosition"_ustr)) + , m_xApplyCollBtn(m_xBuilder->weld_check_button(u"checkPageStyle"_ustr)) + , m_xApplyCollBox(m_xBuilder->weld_combo_box(u"comboPageStyle"_ustr)) + , m_xPageNumBox(m_xBuilder->weld_check_button(u"labelPageNum"_ustr)) + , m_xPagenumEdit(m_xBuilder->weld_spin_button(u"spinPageNumber"_ustr)) // Options - , m_xAllowSplitBox(m_xBuilder->weld_check_button("checkSplitPara")) - , m_xKeepParaBox(m_xBuilder->weld_check_button("checkKeepPara")) - , m_xOrphanBox(m_xBuilder->weld_check_button("checkOrphan")) - , m_xOrphanRowNo(m_xBuilder->weld_spin_button("spinOrphan")) - , m_xOrphanRowLabel(m_xBuilder->weld_label("labelOrphan")) - , m_xWidowBox(m_xBuilder->weld_check_button("checkWidow")) - , m_xWidowRowNo(m_xBuilder->weld_spin_button("spinWidow")) - , m_xWidowRowLabel(m_xBuilder->weld_label("labelWidow")) + , m_xAllowSplitBox(m_xBuilder->weld_check_button(u"checkSplitPara"_ustr)) + , m_xKeepParaBox(m_xBuilder->weld_check_button(u"checkKeepPara"_ustr)) + , m_xOrphanBox(m_xBuilder->weld_check_button(u"checkOrphan"_ustr)) + , m_xOrphanRowNo(m_xBuilder->weld_spin_button(u"spinOrphan"_ustr)) + , m_xOrphanRowLabel(m_xBuilder->weld_label(u"labelOrphan"_ustr)) + , m_xWidowBox(m_xBuilder->weld_check_button(u"checkWidow"_ustr)) + , m_xWidowRowNo(m_xBuilder->weld_spin_button(u"spinWidow"_ustr)) + , m_xWidowRowLabel(m_xBuilder->weld_label(u"labelWidow"_ustr)) // Avoid hyphenation across - , m_xAcrossText(m_xBuilder->weld_label("labelHyphenAcross")) - , m_xAcrossColumnBox(m_xBuilder->weld_check_button("checkAcrossColumn")) - , m_xAcrossPageBox(m_xBuilder->weld_check_button("checkAcrossPage")) - , m_xAcrossSpreadBox(m_xBuilder->weld_check_button("checkAcrossSpread")) + , m_xAcrossText(m_xBuilder->weld_label(u"labelHyphenAcross"_ustr)) + , m_xAcrossColumnBox(m_xBuilder->weld_check_button(u"checkAcrossColumn"_ustr)) + , m_xAcrossPageBox(m_xBuilder->weld_check_button(u"checkAcrossPage"_ustr)) + , m_xAcrossSpreadBox(m_xBuilder->weld_check_button(u"checkAcrossSpread"_ustr)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -2598,10 +2598,10 @@ IMPL_LINK(SvxExtParagraphTabPage, AcrossSpreadHdl_Impl, weld::Toggleable&, rTogg } SvxAsianTabPage::SvxAsianTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "cui/ui/asiantypography.ui", "AsianTypography", &rSet) - , m_xForbiddenRulesCB(m_xBuilder->weld_check_button("checkForbidList")) - , m_xHangingPunctCB(m_xBuilder->weld_check_button("checkHangPunct")) - , m_xScriptSpaceCB(m_xBuilder->weld_check_button("checkApplySpacing")) + : SfxTabPage(pPage, pController, u"cui/ui/asiantypography.ui"_ustr, u"AsianTypography"_ustr, &rSet) + , m_xForbiddenRulesCB(m_xBuilder->weld_check_button(u"checkForbidList"_ustr)) + , m_xHangingPunctCB(m_xBuilder->weld_check_button(u"checkHangPunct"_ustr)) + , m_xScriptSpaceCB(m_xBuilder->weld_check_button(u"checkApplySpacing"_ustr)) { } diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 752af91a1a62..6789caaf477f 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -529,7 +529,7 @@ static LB lcl_GetLBRelationsForStrID(const FrmMap* _pMap, } SvxSwPosSizeTabPage::SvxSwPosSizeTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/swpossizepage.ui", "SwPosSizePage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/swpossizepage.ui"_ustr, u"SwPosSizePage"_ustr, &rInAttrs) , m_pVMap(nullptr) , m_pHMap(nullptr) , m_pSdrView(nullptr) @@ -546,35 +546,35 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage(weld::Container* pPage, weld::DialogCon , m_nProtectSizeState(TRISTATE_FALSE) , m_aRatioTop(ConnectorType::Top) , m_aRatioBottom(ConnectorType::Bottom) - , m_xWidthMF(m_xBuilder->weld_metric_spin_button("width", FieldUnit::CM)) - , m_xHeightMF(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM)) - , m_xKeepRatioCB(m_xBuilder->weld_check_button("ratio")) - , m_xCbxScaleImg(m_xBuilder->weld_image("imRatio")) - , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, "daRatioTop", m_aRatioTop)) - , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, "daRatioBottom", m_aRatioBottom)) - , m_xToPageRB(m_xBuilder->weld_radio_button("topage")) - , m_xToParaRB(m_xBuilder->weld_radio_button("topara")) - , m_xToCharRB(m_xBuilder->weld_radio_button("tochar")) - , m_xAsCharRB(m_xBuilder->weld_radio_button("aschar")) - , m_xToFrameRB(m_xBuilder->weld_radio_button("toframe")) - , m_xPositionCB(m_xBuilder->weld_check_button("pos")) - , m_xSizeCB(m_xBuilder->weld_check_button("size")) - , m_xPosFrame(m_xBuilder->weld_widget("posframe")) - , m_xHoriFT(m_xBuilder->weld_label("horiposft")) - , m_xHoriLB(m_xBuilder->weld_combo_box("horipos")) - , m_xHoriByFT(m_xBuilder->weld_label("horibyft")) - , m_xHoriByMF(m_xBuilder->weld_metric_spin_button("byhori", FieldUnit::CM)) - , m_xHoriToFT(m_xBuilder->weld_label("horitoft")) - , m_xHoriToLB(m_xBuilder->weld_combo_box("horianchor")) - , m_xHoriMirrorCB(m_xBuilder->weld_check_button("mirror")) - , m_xVertFT(m_xBuilder->weld_label("vertposft")) - , m_xVertLB(m_xBuilder->weld_combo_box("vertpos")) - , m_xVertByFT(m_xBuilder->weld_label("vertbyft")) - , m_xVertByMF(m_xBuilder->weld_metric_spin_button("byvert", FieldUnit::CM)) - , m_xVertToFT(m_xBuilder->weld_label("verttoft")) - , m_xVertToLB(m_xBuilder->weld_combo_box("vertanchor")) - , m_xFollowCB(m_xBuilder->weld_check_button("followtextflow")) - , m_xExampleWN(new weld::CustomWeld(*m_xBuilder, "preview", m_aExampleWN)) + , m_xWidthMF(m_xBuilder->weld_metric_spin_button(u"width"_ustr, FieldUnit::CM)) + , m_xHeightMF(m_xBuilder->weld_metric_spin_button(u"height"_ustr, FieldUnit::CM)) + , m_xKeepRatioCB(m_xBuilder->weld_check_button(u"ratio"_ustr)) + , m_xCbxScaleImg(m_xBuilder->weld_image(u"imRatio"_ustr)) + , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, u"daRatioTop"_ustr, m_aRatioTop)) + , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, u"daRatioBottom"_ustr, m_aRatioBottom)) + , m_xToPageRB(m_xBuilder->weld_radio_button(u"topage"_ustr)) + , m_xToParaRB(m_xBuilder->weld_radio_button(u"topara"_ustr)) + , m_xToCharRB(m_xBuilder->weld_radio_button(u"tochar"_ustr)) + , m_xAsCharRB(m_xBuilder->weld_radio_button(u"aschar"_ustr)) + , m_xToFrameRB(m_xBuilder->weld_radio_button(u"toframe"_ustr)) + , m_xPositionCB(m_xBuilder->weld_check_button(u"pos"_ustr)) + , m_xSizeCB(m_xBuilder->weld_check_button(u"size"_ustr)) + , m_xPosFrame(m_xBuilder->weld_widget(u"posframe"_ustr)) + , m_xHoriFT(m_xBuilder->weld_label(u"horiposft"_ustr)) + , m_xHoriLB(m_xBuilder->weld_combo_box(u"horipos"_ustr)) + , m_xHoriByFT(m_xBuilder->weld_label(u"horibyft"_ustr)) + , m_xHoriByMF(m_xBuilder->weld_metric_spin_button(u"byhori"_ustr, FieldUnit::CM)) + , m_xHoriToFT(m_xBuilder->weld_label(u"horitoft"_ustr)) + , m_xHoriToLB(m_xBuilder->weld_combo_box(u"horianchor"_ustr)) + , m_xHoriMirrorCB(m_xBuilder->weld_check_button(u"mirror"_ustr)) + , m_xVertFT(m_xBuilder->weld_label(u"vertposft"_ustr)) + , m_xVertLB(m_xBuilder->weld_combo_box(u"vertpos"_ustr)) + , m_xVertByFT(m_xBuilder->weld_label(u"vertbyft"_ustr)) + , m_xVertByMF(m_xBuilder->weld_metric_spin_button(u"byvert"_ustr, FieldUnit::CM)) + , m_xVertToFT(m_xBuilder->weld_label(u"verttoft"_ustr)) + , m_xVertToLB(m_xBuilder->weld_combo_box(u"vertanchor"_ustr)) + , m_xFollowCB(m_xBuilder->weld_check_button(u"followtextflow"_ustr)) + , m_xExampleWN(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aExampleWN)) { setOptimalFrmWidth(); setOptimalRelWidth(); @@ -996,7 +996,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) if (pGrabBag) { const std::map<OUString, css::uno::Any>& rMap = pGrabBag->GetGrabBag(); - auto it = rMap.find("DoNotMirrorRtlDrawObjs"); + auto it = rMap.find(u"DoNotMirrorRtlDrawObjs"_ustr); if (it != rMap.end()) { it->second >>= m_bDoNotMirrorRtlDrawObjs; diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index a568eb08223b..498afe81fdc5 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -34,7 +34,7 @@ SvxAreaTabDialog::SvxAreaTabDialog bool bShadow, bool bSlideBackground ) - : SfxTabDialogController(pParent, "cui/ui/areadialog.ui", "AreaDialog", pAttr) + : SfxTabDialogController(pParent, u"cui/ui/areadialog.ui"_ustr, u"AreaDialog"_ustr, pAttr) , mpDrawModel ( pModel ), mpColorList ( pModel->GetColorList() ), mpNewColorList ( pModel->GetColorList() ), @@ -54,20 +54,20 @@ SvxAreaTabDialog::SvxAreaTabDialog mnHatchingListState ( ChangeType::NONE ) { if (bSlideBackground) - AddTabPage("RID_SVXPAGE_AREA", SvxAreaTabPage::CreateWithSlideBackground, nullptr); + AddTabPage(u"RID_SVXPAGE_AREA"_ustr, SvxAreaTabPage::CreateWithSlideBackground, nullptr); else - AddTabPage("RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_AREA"_ustr, SvxAreaTabPage::Create, nullptr); if (bShadow) { - AddTabPage("RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_SHADOW"_ustr, SvxShadowTabPage::Create, nullptr); } else { - RemoveTabPage( "RID_SVXPAGE_SHADOW" ); + RemoveTabPage( u"RID_SVXPAGE_SHADOW"_ustr ); } - AddTabPage( "RID_SVXPAGE_TRANSPARENCE", SvxTransparenceTabPage::Create, nullptr); + AddTabPage( u"RID_SVXPAGE_TRANSPARENCE"_ustr, SvxTransparenceTabPage::Create, nullptr); weld::Button& rBtnCancel = GetCancelButton(); rBtnCancel.connect_clicked(LINK(this, SvxAreaTabDialog, CancelHdlImpl)); diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index ac6cadd51109..3facbce8b91d 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -28,7 +28,7 @@ SvxLineTabDialog::SvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pSdrObj, bool bHasObj) - : SfxTabDialogController(pParent, "cui/ui/linedialog.ui", "LineDialog", pAttr) + : SfxTabDialogController(pParent, u"cui/ui/linedialog.ui"_ustr, u"LineDialog"_ustr, pAttr) , pDrawModel(pModel) , pObj(pSdrObj) , pColorList(pModel->GetColorList()) @@ -65,14 +65,14 @@ SvxLineTabDialog::SvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAtt } - AddTabPage("RID_SVXPAGE_LINE", SvxLineTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_LINE"_ustr, SvxLineTabPage::Create, nullptr); if( bLineOnly ) - AddTabPage("RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_SHADOW"_ustr, SvxShadowTabPage::Create, nullptr); else - RemoveTabPage( "RID_SVXPAGE_SHADOW" ); + RemoveTabPage( u"RID_SVXPAGE_SHADOW"_ustr ); - AddTabPage("RID_SVXPAGE_LINE_DEF", SvxLineDefTabPage::Create, nullptr); - AddTabPage("RID_SVXPAGE_LINEEND_DEF", SvxLineEndDefTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_LINE_DEF"_ustr, SvxLineDefTabPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_LINEEND_DEF"_ustr, SvxLineEndDefTabPage::Create, nullptr); weld::Button& rBtnCancel = GetCancelButton(); rBtnCancel.connect_clicked(LINK(this, SvxLineTabDialog, CancelHdlImpl)); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index b3a1745c26f9..558a537ef7d3 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -60,34 +60,34 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta } SvxTabulatorTabPage::SvxTabulatorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr) - : SfxTabPage(pPage, pController, "cui/ui/paratabspage.ui", "ParagraphTabsPage", &rAttr) + : SfxTabPage(pPage, pController, u"cui/ui/paratabspage.ui"_ustr, u"ParagraphTabsPage"_ustr, &rAttr) , aCurrentTab(0) , aNewTabs(std::make_unique<SvxTabStopItem>(0, 0, SvxTabAdjust::Left, GetWhich(SID_ATTR_TABSTOP))) , nDefDist(0) - , m_xTabSpin(m_xBuilder->weld_metric_spin_button("SP_TABPOS", FieldUnit::CM)) - , m_xTabBox(m_xBuilder->weld_entry_tree_view("tabgrid", "ED_TABPOS", "LB_TABPOS")) - , m_xCenterTab(m_xBuilder->weld_radio_button("radiobuttonBTN_TABTYPE_CENTER")) - , m_xDezTab(m_xBuilder->weld_radio_button("radiobuttonBTN_TABTYPE_DECIMAL")) - , m_xDezChar(m_xBuilder->weld_entry("entryED_TABTYPE_DECCHAR")) - , m_xDezCharLabel(m_xBuilder->weld_label("labelFT_TABTYPE_DECCHAR")) + , m_xTabSpin(m_xBuilder->weld_metric_spin_button(u"SP_TABPOS"_ustr, FieldUnit::CM)) + , m_xTabBox(m_xBuilder->weld_entry_tree_view(u"tabgrid"_ustr, u"ED_TABPOS"_ustr, u"LB_TABPOS"_ustr)) + , m_xCenterTab(m_xBuilder->weld_radio_button(u"radiobuttonBTN_TABTYPE_CENTER"_ustr)) + , m_xDezTab(m_xBuilder->weld_radio_button(u"radiobuttonBTN_TABTYPE_DECIMAL"_ustr)) + , m_xDezChar(m_xBuilder->weld_entry(u"entryED_TABTYPE_DECCHAR"_ustr)) + , m_xDezCharLabel(m_xBuilder->weld_label(u"labelFT_TABTYPE_DECCHAR"_ustr)) // lower radio buttons - , m_xNoFillChar(m_xBuilder->weld_radio_button("radiobuttonBTN_FILLCHAR_NO")) - , m_xFillPoints(m_xBuilder->weld_radio_button("radiobuttonBTN_FILLCHAR_POINTS")) - , m_xFillDashLine(m_xBuilder->weld_radio_button("radiobuttonBTN_FILLCHAR_DASHLINE")) - , m_xFillSolidLine(m_xBuilder->weld_radio_button("radiobuttonBTN_FILLCHAR_UNDERSCORE")) - , m_xFillSpecial(m_xBuilder->weld_radio_button("radiobuttonBTN_FILLCHAR_OTHER")) - , m_xFillChar(m_xBuilder->weld_entry("entryED_FILLCHAR_OTHER")) + , m_xNoFillChar(m_xBuilder->weld_radio_button(u"radiobuttonBTN_FILLCHAR_NO"_ustr)) + , m_xFillPoints(m_xBuilder->weld_radio_button(u"radiobuttonBTN_FILLCHAR_POINTS"_ustr)) + , m_xFillDashLine(m_xBuilder->weld_radio_button(u"radiobuttonBTN_FILLCHAR_DASHLINE"_ustr)) + , m_xFillSolidLine(m_xBuilder->weld_radio_button(u"radiobuttonBTN_FILLCHAR_UNDERSCORE"_ustr)) + , m_xFillSpecial(m_xBuilder->weld_radio_button(u"radiobuttonBTN_FILLCHAR_OTHER"_ustr)) + , m_xFillChar(m_xBuilder->weld_entry(u"entryED_FILLCHAR_OTHER"_ustr)) // button bar - , m_xNewBtn(m_xBuilder->weld_button("buttonBTN_NEW")) - , m_xDelAllBtn(m_xBuilder->weld_button("buttonBTN_DELALL")) - , m_xDelBtn(m_xBuilder->weld_button("buttonBTN_DEL")) - , m_xTypeFrame(m_xBuilder->weld_container("frameFL_TABTYPE")) - , m_xFillFrame(m_xBuilder->weld_container("frameFL_FILLCHAR")) + , m_xNewBtn(m_xBuilder->weld_button(u"buttonBTN_NEW"_ustr)) + , m_xDelAllBtn(m_xBuilder->weld_button(u"buttonBTN_DELALL"_ustr)) + , m_xDelBtn(m_xBuilder->weld_button(u"buttonBTN_DEL"_ustr)) + , m_xTypeFrame(m_xBuilder->weld_container(u"frameFL_TABTYPE"_ustr)) + , m_xFillFrame(m_xBuilder->weld_container(u"frameFL_FILLCHAR"_ustr)) // the tab images - , m_xLeftWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWIN_TABLEFT", m_aLeftWin)) - , m_xRightWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWIN_TABRIGHT", m_aRightWin)) - , m_xCenterWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWIN_TABCENTER", m_aCenterWin)) - , m_xDezWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWIN_TABDECIMAL", m_aDezWin)) + , m_xLeftWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWIN_TABLEFT"_ustr, m_aLeftWin)) + , m_xRightWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWIN_TABRIGHT"_ustr, m_aRightWin)) + , m_xCenterWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWIN_TABCENTER"_ustr, m_aCenterWin)) + , m_xDezWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaWIN_TABDECIMAL"_ustr, m_aDezWin)) { m_aLeftWin.SetTabStyle(sal_uInt16(RULER_TAB_LEFT|WB_HORZ)); m_aRightWin.SetTabStyle(sal_uInt16(RULER_TAB_RIGHT|WB_HORZ)); @@ -392,7 +392,7 @@ void SvxTabulatorTabPage::SetFillAndTabType_Impl() pTypeBtn->set_active(true); m_xFillChar->set_sensitive(false); - m_xFillChar->set_text(""); + m_xFillChar->set_text(u""_ustr); if ( aCurrentTab.GetFill() == ' ' ) pFillBtn = m_xNoFillChar.get(); @@ -529,7 +529,7 @@ IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::Toggleable&, rBox, vo SvxTabAdjust eAdj; m_xDezChar->set_sensitive(false); m_xDezCharLabel->set_sensitive(false); - m_xDezChar->set_text(""); + m_xDezChar->set_text(u""_ustr); if (&rBox == m_xLeftTab.get()) eAdj = SvxTabAdjust::Left; @@ -560,7 +560,7 @@ IMPL_LINK(SvxTabulatorTabPage, FillTypeCheckHdl_Impl, weld::Toggleable&, rBox, v return; sal_uInt8 cFill = ' '; - m_xFillChar->set_text( "" ); + m_xFillChar->set_text( u""_ustr ); m_xFillChar->set_sensitive(false); if (&rBox == m_xFillSpecial.get()) diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 20faae653cd9..986d3da4c425 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -39,12 +39,12 @@ const WhichRangesContainer SvxTextAnimationPage::pRanges( \************************************************************************/ SvxTextTabDialog::SvxTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView) - : SfxTabDialogController(pParent, "cui/ui/textdialog.ui", "TextDialog", pAttr) + : SfxTabDialogController(pParent, u"cui/ui/textdialog.ui"_ustr, u"TextDialog"_ustr, pAttr) , pView(pSdrView) { - AddTabPage("RID_SVXPAGE_TEXTATTR", SvxTextAttrPage::Create, nullptr); - AddTabPage("RID_SVXPAGE_TEXTANIMATION", SvxTextAnimationPage::Create, nullptr); - AddTabPage("RID_SVXPAGE_TEXTCOLUMNS", SvxTextColumnsPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_TEXTATTR"_ustr, SvxTextAttrPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_TEXTANIMATION"_ustr, SvxTextAnimationPage::Create, nullptr); + AddTabPage(u"RID_SVXPAGE_TEXTCOLUMNS"_ustr, SvxTextColumnsPage::Create, nullptr); } /************************************************************************* @@ -82,28 +82,28 @@ void SvxTextTabDialog::PageCreated(const OUString& rId, SfxTabPage &rPage) |* \************************************************************************/ SvxTextAnimationPage::SvxTextAnimationPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/textanimtabpage.ui", "TextAnimation", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/textanimtabpage.ui"_ustr, u"TextAnimation"_ustr, &rInAttrs) , eAniKind(SdrTextAniKind::NONE) , m_aUpState(TRISTATE_INDET) , m_aLeftState(TRISTATE_INDET) , m_aRightState(TRISTATE_INDET) , m_aDownState(TRISTATE_INDET) - , m_xLbEffect(m_xBuilder->weld_combo_box("LB_EFFECT")) - , m_xBoxDirection(m_xBuilder->weld_widget("boxDIRECTION")) - , m_xBtnUp(m_xBuilder->weld_toggle_button("BTN_UP")) - , m_xBtnLeft(m_xBuilder->weld_toggle_button("BTN_LEFT")) - , m_xBtnRight(m_xBuilder->weld_toggle_button("BTN_RIGHT")) - , m_xBtnDown(m_xBuilder->weld_toggle_button("BTN_DOWN")) - , m_xFlProperties(m_xBuilder->weld_frame("FL_PROPERTIES")) - , m_xTsbStartInside(m_xBuilder->weld_check_button("TSB_START_INSIDE")) - , m_xTsbStopInside(m_xBuilder->weld_check_button("TSB_STOP_INSIDE")) - , m_xBoxCount(m_xBuilder->weld_widget("boxCOUNT")) - , m_xTsbEndless(m_xBuilder->weld_check_button("TSB_ENDLESS")) - , m_xNumFldCount(m_xBuilder->weld_spin_button("NUM_FLD_COUNT")) - , m_xTsbPixel(m_xBuilder->weld_check_button("TSB_PIXEL")) - , m_xMtrFldAmount(m_xBuilder->weld_metric_spin_button("MTR_FLD_AMOUNT", FieldUnit::PIXEL)) - , m_xTsbAuto(m_xBuilder->weld_check_button("TSB_AUTO")) - , m_xMtrFldDelay(m_xBuilder->weld_metric_spin_button("MTR_FLD_DELAY", FieldUnit::MILLISECOND)) + , m_xLbEffect(m_xBuilder->weld_combo_box(u"LB_EFFECT"_ustr)) + , m_xBoxDirection(m_xBuilder->weld_widget(u"boxDIRECTION"_ustr)) + , m_xBtnUp(m_xBuilder->weld_toggle_button(u"BTN_UP"_ustr)) + , m_xBtnLeft(m_xBuilder->weld_toggle_button(u"BTN_LEFT"_ustr)) + , m_xBtnRight(m_xBuilder->weld_toggle_button(u"BTN_RIGHT"_ustr)) + , m_xBtnDown(m_xBuilder->weld_toggle_button(u"BTN_DOWN"_ustr)) + , m_xFlProperties(m_xBuilder->weld_frame(u"FL_PROPERTIES"_ustr)) + , m_xTsbStartInside(m_xBuilder->weld_check_button(u"TSB_START_INSIDE"_ustr)) + , m_xTsbStopInside(m_xBuilder->weld_check_button(u"TSB_STOP_INSIDE"_ustr)) + , m_xBoxCount(m_xBuilder->weld_widget(u"boxCOUNT"_ustr)) + , m_xTsbEndless(m_xBuilder->weld_check_button(u"TSB_ENDLESS"_ustr)) + , m_xNumFldCount(m_xBuilder->weld_spin_button(u"NUM_FLD_COUNT"_ustr)) + , m_xTsbPixel(m_xBuilder->weld_check_button(u"TSB_PIXEL"_ustr)) + , m_xMtrFldAmount(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_AMOUNT"_ustr, FieldUnit::PIXEL)) + , m_xTsbAuto(m_xBuilder->weld_check_button(u"TSB_AUTO"_ustr)) + , m_xMtrFldDelay(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_DELAY"_ustr, FieldUnit::MILLISECOND)) { eFUnit = GetModuleFieldUnit( rInAttrs ); SfxItemPool* pPool = rInAttrs.GetPool(); @@ -196,7 +196,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs ) else { m_xTsbEndless->set_state(TRISTATE_TRUE); - m_xNumFldCount->set_text(""); + m_xNumFldCount->set_text(u""_ustr); } } else @@ -214,7 +214,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs ) if (nValue == 0) { m_xTsbAuto->set_state(TRISTATE_TRUE); - m_xMtrFldDelay->set_text(""); + m_xMtrFldDelay->set_text(u""_ustr); } else m_xTsbAuto->set_state(TRISTATE_FALSE); @@ -445,7 +445,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickEndlessHdl_Impl, weld::Toggleable&, v if( eState != TRISTATE_FALSE ) { m_xNumFldCount->set_sensitive(false); - m_xNumFldCount->set_text(""); + m_xNumFldCount->set_text(u""_ustr); } else { @@ -460,7 +460,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickAutoHdl_Impl, weld::Toggleable&, void if( eState != TRISTATE_FALSE ) { m_xMtrFldDelay->set_sensitive(false); - m_xMtrFldDelay->set_text(""); + m_xMtrFldDelay->set_text(u""_ustr); } else { diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index a803efffe5cb..73eb5e215fd5 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -46,7 +46,7 @@ const WhichRangesContainer SvxTextAttrPage::pRanges( |* \************************************************************************/ SvxTextAttrPage::SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/textattrtabpage.ui", "TextAttributesPage", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/textattrtabpage.ui"_ustr, u"TextAttributesPage"_ustr, rInAttrs) , rOutAttrs(rInAttrs) , m_eObjKind(SdrObjKind::NONE) , bAutoGrowSizeEnabled(false) @@ -56,22 +56,22 @@ SvxTextAttrPage::SvxTextAttrPage(weld::Container* pPage, weld::DialogController* , bWordWrapTextEnabled(false) , bFitToSizeEnabled(false) , m_aCtlPosition(this) - , m_xDrawingText(m_xBuilder->weld_widget("drawingtext")) - , m_xCustomShapeText(m_xBuilder->weld_widget("customshapetext")) - , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button("TSB_AUTOGROW_WIDTH")) - , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button("TSB_AUTOGROW_HEIGHT")) - , m_xTsbFitToSize(m_xBuilder->weld_check_button("TSB_FIT_TO_SIZE")) - , m_xTsbContour(m_xBuilder->weld_check_button("TSB_CONTOUR")) - , m_xTsbWordWrapText(m_xBuilder->weld_check_button("TSB_WORDWRAP_TEXT")) - , m_xTsbAutoGrowSize(m_xBuilder->weld_check_button("TSB_AUTOGROW_SIZE")) - , m_xFlDistance(m_xBuilder->weld_frame("FL_DISTANCE")) - , m_xMtrFldLeft(m_xBuilder->weld_metric_spin_button("MTR_FLD_LEFT", FieldUnit::CM)) - , m_xMtrFldRight(m_xBuilder->weld_metric_spin_button("MTR_FLD_RIGHT", FieldUnit::CM)) - , m_xMtrFldTop(m_xBuilder->weld_metric_spin_button("MTR_FLD_TOP", FieldUnit::CM)) - , m_xMtrFldBottom(m_xBuilder->weld_metric_spin_button("MTR_FLD_BOTTOM", FieldUnit::CM)) - , m_xFlPosition(m_xBuilder->weld_frame("FL_POSITION")) - , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", m_aCtlPosition)) - , m_xTsbFullWidth(m_xBuilder->weld_check_button("TSB_FULL_WIDTH")) + , m_xDrawingText(m_xBuilder->weld_widget(u"drawingtext"_ustr)) + , m_xCustomShapeText(m_xBuilder->weld_widget(u"customshapetext"_ustr)) + , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_WIDTH"_ustr)) + , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_HEIGHT"_ustr)) + , m_xTsbFitToSize(m_xBuilder->weld_check_button(u"TSB_FIT_TO_SIZE"_ustr)) + , m_xTsbContour(m_xBuilder->weld_check_button(u"TSB_CONTOUR"_ustr)) + , m_xTsbWordWrapText(m_xBuilder->weld_check_button(u"TSB_WORDWRAP_TEXT"_ustr)) + , m_xTsbAutoGrowSize(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_SIZE"_ustr)) + , m_xFlDistance(m_xBuilder->weld_frame(u"FL_DISTANCE"_ustr)) + , m_xMtrFldLeft(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LEFT"_ustr, FieldUnit::CM)) + , m_xMtrFldRight(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_RIGHT"_ustr, FieldUnit::CM)) + , m_xMtrFldTop(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_TOP"_ustr, FieldUnit::CM)) + , m_xMtrFldBottom(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_BOTTOM"_ustr, FieldUnit::CM)) + , m_xFlPosition(m_xBuilder->weld_frame(u"FL_POSITION"_ustr)) + , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, u"CTL_POSITION"_ustr, m_aCtlPosition)) + , m_xTsbFullWidth(m_xBuilder->weld_check_button(u"TSB_FULL_WIDTH"_ustr)) { m_aCtlPosition.SetControlSettings(RectPoint::MM, 240); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index b67990e29625..202db8ce8526 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -75,7 +75,7 @@ void lclExtendSize(Size& rSize, const Size& rInputSize) SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs, bool bSlideBackground) - : SfxTabPage(pPage, pController, "cui/ui/areatabpage.ui", "AreaTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/areatabpage.ui"_ustr, u"AreaTabPage"_ustr, &rInAttrs) // local fixed not o be changed values for local pointers , maFixed_ChangeType(ChangeType::NONE) // init with pointers to fixed ChangeType @@ -86,14 +86,14 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, weld::DialogController* p , m_pnHatchingListState(&maFixed_ChangeType) , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) - , m_xFillTab(m_xBuilder->weld_container("fillstylebox")) - , m_xBtnNone(m_xBuilder->weld_toggle_button("btnnone")) - , m_xBtnColor(m_xBuilder->weld_toggle_button("btncolor")) - , m_xBtnGradient(m_xBuilder->weld_toggle_button("btngradient")) - , m_xBtnHatch(m_xBuilder->weld_toggle_button("btnhatch")) - , m_xBtnBitmap(m_xBuilder->weld_toggle_button("btnbitmap")) - , m_xBtnPattern(m_xBuilder->weld_toggle_button("btnpattern")) - , m_xBtnUseBackground(m_xBuilder->weld_toggle_button("btnusebackground")) + , m_xFillTab(m_xBuilder->weld_container(u"fillstylebox"_ustr)) + , m_xBtnNone(m_xBuilder->weld_toggle_button(u"btnnone"_ustr)) + , m_xBtnColor(m_xBuilder->weld_toggle_button(u"btncolor"_ustr)) + , m_xBtnGradient(m_xBuilder->weld_toggle_button(u"btngradient"_ustr)) + , m_xBtnHatch(m_xBuilder->weld_toggle_button(u"btnhatch"_ustr)) + , m_xBtnBitmap(m_xBuilder->weld_toggle_button(u"btnbitmap"_ustr)) + , m_xBtnPattern(m_xBuilder->weld_toggle_button(u"btnpattern"_ustr)) + , m_xBtnUseBackground(m_xBuilder->weld_toggle_button(u"btnusebackground"_ustr)) { maBox.AddButton(m_xBtnNone.get()); maBox.AddButton(m_xBtnColor.get()); @@ -281,8 +281,8 @@ bool SvxAreaTabPage::FillItemSet_Impl( SfxItemSet* rAttrs) OUString SvxAreaTabPage::GetAllStrings() { OUString sAllStrings; - OUString toggleButton[] = { "btnnone", "btncolor", "btngradient", "btnbitmap", - "btnpattern", "btnhatch", "btnusebackground" }; + OUString toggleButton[] = { u"btnnone"_ustr, u"btncolor"_ustr, u"btngradient"_ustr, u"btnbitmap"_ustr, + u"btnpattern"_ustr, u"btnhatch"_ustr, u"btnusebackground"_ustr }; for (const auto& toggle : toggleButton) { diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 2990f4473e91..4844cc1d3e51 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -67,7 +67,7 @@ enum TileOffset } SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/imagetabpage.ui", "ImageTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/imagetabpage.ui"_ustr, u"ImageTabPage"_ustr, &rInAttrs) , m_rOutAttrs(rInAttrs) , m_pnBitmapListState(nullptr) , m_fObjectWidth(0.0) @@ -76,23 +76,23 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) , mpView(nullptr) - , m_xBitmapLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("imagewin", true))) - , m_xBitmapStyleLB(m_xBuilder->weld_combo_box("imagestyle")) - , m_xSizeBox(m_xBuilder->weld_container("sizebox")) - , m_xTsbScale(m_xBuilder->weld_check_button("scaletsb")) - , m_xBitmapWidth(m_xBuilder->weld_metric_spin_button("width", FieldUnit::PERCENT)) - , m_xBitmapHeight(m_xBuilder->weld_metric_spin_button("height", FieldUnit::PERCENT)) - , m_xPositionBox(m_xBuilder->weld_container("posbox")) - , m_xPositionLB(m_xBuilder->weld_combo_box("positionlb")) - , m_xPositionOffBox(m_xBuilder->weld_container("posoffbox")) - , m_xPositionOffX(m_xBuilder->weld_metric_spin_button("posoffx", FieldUnit::PERCENT)) - , m_xPositionOffY(m_xBuilder->weld_metric_spin_button("posoffy", FieldUnit::PERCENT)) - , m_xTileOffBox(m_xBuilder->weld_container("tileoffbox")) - , m_xTileOffLB(m_xBuilder->weld_combo_box("tileofflb")) - , m_xTileOffset(m_xBuilder->weld_metric_spin_button("tileoffmtr", FieldUnit::PERCENT)) - , m_xBtnImport(m_xBuilder->weld_button("BTN_IMPORT")) - , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, "CTL_IMAGE_PREVIEW", m_aCtlBitmapPreview)) - , m_xBitmapLBWin(new weld::CustomWeld(*m_xBuilder, "IMAGE", *m_xBitmapLB)) + , m_xBitmapLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window(u"imagewin"_ustr, true))) + , m_xBitmapStyleLB(m_xBuilder->weld_combo_box(u"imagestyle"_ustr)) + , m_xSizeBox(m_xBuilder->weld_container(u"sizebox"_ustr)) + , m_xTsbScale(m_xBuilder->weld_check_button(u"scaletsb"_ustr)) + , m_xBitmapWidth(m_xBuilder->weld_metric_spin_button(u"width"_ustr, FieldUnit::PERCENT)) + , m_xBitmapHeight(m_xBuilder->weld_metric_spin_button(u"height"_ustr, FieldUnit::PERCENT)) + , m_xPositionBox(m_xBuilder->weld_container(u"posbox"_ustr)) + , m_xPositionLB(m_xBuilder->weld_combo_box(u"positionlb"_ustr)) + , m_xPositionOffBox(m_xBuilder->weld_container(u"posoffbox"_ustr)) + , m_xPositionOffX(m_xBuilder->weld_metric_spin_button(u"posoffx"_ustr, FieldUnit::PERCENT)) + , m_xPositionOffY(m_xBuilder->weld_metric_spin_button(u"posoffy"_ustr, FieldUnit::PERCENT)) + , m_xTileOffBox(m_xBuilder->weld_container(u"tileoffbox"_ustr)) + , m_xTileOffLB(m_xBuilder->weld_combo_box(u"tileofflb"_ustr)) + , m_xTileOffset(m_xBuilder->weld_metric_spin_button(u"tileoffmtr"_ustr, FieldUnit::PERCENT)) + , m_xBtnImport(m_xBuilder->weld_button(u"BTN_IMPORT"_ustr)) + , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_IMAGE_PREVIEW"_ustr, m_aCtlBitmapPreview)) + , m_xBitmapLBWin(new weld::CustomWeld(*m_xBuilder, u"IMAGE"_ustr, *m_xBitmapLB)) { // setting the output device m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) ); @@ -379,7 +379,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) m_xPositionOffX->set_value(nValue, FieldUnit::PERCENT); } else - m_xPositionOffX->set_text(""); + m_xPositionOffX->set_text(u""_ustr); if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SfxItemState::INVALID ) { @@ -387,7 +387,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) m_xPositionOffY->set_value(nValue, FieldUnit::PERCENT); } else - m_xPositionOffY->set_text(""); + m_xPositionOffY->set_text(u""_ustr); if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SfxItemState::INVALID) { @@ -543,8 +543,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xBox->run(); } } @@ -558,8 +558,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl, SvxPresetListBox*, void) if( nPos == VALUESET_ITEM_NOTFOUND ) return; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletebitmapdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelBitmapDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletebitmapdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelBitmapDialog"_ustr)); if (xQueryBox->run() != RET_YES) return; @@ -753,8 +753,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void) break; } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pDialogFrameWeld, "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pDialogFrameWeld, u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); if (xBox->run() != RET_OK) break; } @@ -778,8 +778,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void) else { // graphic couldn't be loaded - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pDialogFrameWeld, "cui/ui/querynoloadedfiledialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoLoadedFileDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pDialogFrameWeld, u"cui/ui/querynoloadedfiledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"NoLoadedFileDialog"_ustr)); xBox->run(); } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index ccfe75232bef..8a84b1a99bca 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -42,46 +42,46 @@ using namespace com::sun::star; SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/colorpage.ui", "ColorPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/colorpage.ui"_ustr, u"ColorPage"_ustr, &rInAttrs) , rOutAttrs ( rInAttrs ) // All the horrific pointers we store and should not , pnColorListState( nullptr ) , aXFillAttr( rInAttrs.GetPool() ) , rXFSet( aXFillAttr.GetItemSet() ) , eCM( ColorModel::RGB ) - , m_xValSetColorList(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true))) + , m_xValSetColorList(new SvxColorValueSet(m_xBuilder->weld_scrolled_window(u"colorsetwin"_ustr, true))) , m_xValSetRecentList(new SvxColorValueSet(nullptr)) - , m_xSelectPalette(m_xBuilder->weld_combo_box("paletteselector")) - , m_xRbRGB(m_xBuilder->weld_radio_button("RGB")) - , m_xRbCMYK(m_xBuilder->weld_radio_button("CMYK")) - , m_xRGBcustom(m_xBuilder->weld_widget("rgbcustom")) - , m_xRGBpreset(m_xBuilder->weld_widget("rgbpreset")) - , m_xRpreset(m_xBuilder->weld_entry("R_preset")) - , m_xGpreset(m_xBuilder->weld_entry("G_preset")) - , m_xBpreset(m_xBuilder->weld_entry("B_preset")) - , m_xRcustom(m_xBuilder->weld_spin_button("R_custom")) - , m_xGcustom(m_xBuilder->weld_spin_button("G_custom")) - , m_xBcustom(m_xBuilder->weld_spin_button("B_custom")) - , m_xHexpreset(new weld::HexColorControl(m_xBuilder->weld_entry("hex_preset"))) - , m_xHexcustom(new weld::HexColorControl(m_xBuilder->weld_entry("hex_custom"))) - , m_xCMYKcustom(m_xBuilder->weld_widget("cmykcustom")) - , m_xCMYKpreset(m_xBuilder->weld_widget("cmykpreset")) - , m_xCpreset(m_xBuilder->weld_entry("C_preset")) - , m_xYpreset(m_xBuilder->weld_entry("Y_preset")) - , m_xMpreset(m_xBuilder->weld_entry("M_preset")) - , m_xKpreset(m_xBuilder->weld_entry("K_preset")) - , m_xCcustom(m_xBuilder->weld_metric_spin_button("C_custom", FieldUnit::PERCENT)) - , m_xYcustom(m_xBuilder->weld_metric_spin_button("Y_custom", FieldUnit::PERCENT)) - , m_xMcustom(m_xBuilder->weld_metric_spin_button("M_custom", FieldUnit::PERCENT)) - , m_xKcustom(m_xBuilder->weld_metric_spin_button("K_custom", FieldUnit::PERCENT)) - , m_xBtnAdd(m_xBuilder->weld_button("add")) - , m_xBtnDelete(m_xBuilder->weld_button("delete")) - , m_xBtnWorkOn(m_xBuilder->weld_button("edit")) - , m_xMoreColors(m_xBuilder->weld_button("btnMoreColors")) - , m_xCtlPreviewOld(new weld::CustomWeld(*m_xBuilder, "oldpreview", m_aCtlPreviewOld)) - , m_xCtlPreviewNew(new weld::CustomWeld(*m_xBuilder, "newpreview", m_aCtlPreviewNew)) - , m_xValSetColorListWin(new weld::CustomWeld(*m_xBuilder, "colorset", *m_xValSetColorList)) - , m_xValSetRecentListWin(new weld::CustomWeld(*m_xBuilder, "recentcolorset", *m_xValSetRecentList)) + , m_xSelectPalette(m_xBuilder->weld_combo_box(u"paletteselector"_ustr)) + , m_xRbRGB(m_xBuilder->weld_radio_button(u"RGB"_ustr)) + , m_xRbCMYK(m_xBuilder->weld_radio_button(u"CMYK"_ustr)) + , m_xRGBcustom(m_xBuilder->weld_widget(u"rgbcustom"_ustr)) + , m_xRGBpreset(m_xBuilder->weld_widget(u"rgbpreset"_ustr)) + , m_xRpreset(m_xBuilder->weld_entry(u"R_preset"_ustr)) + , m_xGpreset(m_xBuilder->weld_entry(u"G_preset"_ustr)) + , m_xBpreset(m_xBuilder->weld_entry(u"B_preset"_ustr)) + , m_xRcustom(m_xBuilder->weld_spin_button(u"R_custom"_ustr)) + , m_xGcustom(m_xBuilder->weld_spin_button(u"G_custom"_ustr)) + , m_xBcustom(m_xBuilder->weld_spin_button(u"B_custom"_ustr)) + , m_xHexpreset(new weld::HexColorControl(m_xBuilder->weld_entry(u"hex_preset"_ustr))) + , m_xHexcustom(new weld::HexColorControl(m_xBuilder->weld_entry(u"hex_custom"_ustr))) + , m_xCMYKcustom(m_xBuilder->weld_widget(u"cmykcustom"_ustr)) + , m_xCMYKpreset(m_xBuilder->weld_widget(u"cmykpreset"_ustr)) + , m_xCpreset(m_xBuilder->weld_entry(u"C_preset"_ustr)) + , m_xYpreset(m_xBuilder->weld_entry(u"Y_preset"_ustr)) + , m_xMpreset(m_xBuilder->weld_entry(u"M_preset"_ustr)) + , m_xKpreset(m_xBuilder->weld_entry(u"K_preset"_ustr)) + , m_xCcustom(m_xBuilder->weld_metric_spin_button(u"C_custom"_ustr, FieldUnit::PERCENT)) + , m_xYcustom(m_xBuilder->weld_metric_spin_button(u"Y_custom"_ustr, FieldUnit::PERCENT)) + , m_xMcustom(m_xBuilder->weld_metric_spin_button(u"M_custom"_ustr, FieldUnit::PERCENT)) + , m_xKcustom(m_xBuilder->weld_metric_spin_button(u"K_custom"_ustr, FieldUnit::PERCENT)) + , m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnDelete(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xBtnWorkOn(m_xBuilder->weld_button(u"edit"_ustr)) + , m_xMoreColors(m_xBuilder->weld_button(u"btnMoreColors"_ustr)) + , m_xCtlPreviewOld(new weld::CustomWeld(*m_xBuilder, u"oldpreview"_ustr, m_aCtlPreviewOld)) + , m_xCtlPreviewNew(new weld::CustomWeld(*m_xBuilder, u"newpreview"_ustr, m_aCtlPreviewNew)) + , m_xValSetColorListWin(new weld::CustomWeld(*m_xBuilder, u"colorset"_ustr, *m_xValSetColorList)) + , m_xValSetRecentListWin(new weld::CustomWeld(*m_xBuilder, u"recentcolorset"_ustr, *m_xValSetRecentList)) { Size aSize(m_xBtnWorkOn->get_approximate_digit_width() * 25, m_xBtnWorkOn->get_text_height() * 10); @@ -359,8 +359,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void) break; } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); if (xWarnBox->run() != RET_OK) break; } @@ -523,7 +523,7 @@ IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void) if (m_xSelectPalette->get_active() == 0 && m_xValSetColorList->GetSelectedItemId() != 0) { m_xBtnDelete->set_sensitive(true); - m_xBtnDelete->set_tooltip_text(""); + m_xBtnDelete->set_tooltip_text(u""_ustr); } else { @@ -574,8 +574,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorModeHdl_Impl, weld::Toggleable&, voi IMPL_STATIC_LINK_NOARG(SvxColorTabPage, OnMoreColorsClick, weld::Button&, void) { css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue( - "AdditionsTag", OUString("Color Palette")) }; - comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); + u"AdditionsTag"_ustr, u"Color Palette"_ustr) }; + comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); } void SvxColorTabPage::ChangeColor(const NamedColor &rNewColor, bool bUpdatePreset ) diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 2fb57742e0b3..b052e2356e29 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -40,34 +40,34 @@ using namespace com::sun::star; SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/gradientpage.ui", "GradientPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/gradientpage.ui"_ustr, u"GradientPage"_ustr, &rInAttrs) , m_rOutAttrs(rInAttrs) , m_pnGradientListState(nullptr) , m_pnColorListState(nullptr) , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) - , m_xLbGradientType(m_xBuilder->weld_combo_box("gradienttypelb")) - , m_xFtCenter(m_xBuilder->weld_label("centerft")) - , m_xMtrCenterX(m_xBuilder->weld_metric_spin_button("centerxmtr", FieldUnit::PERCENT)) - , m_xMtrCenterY(m_xBuilder->weld_metric_spin_button("centerymtr", FieldUnit::PERCENT)) - , m_xFtAngle(m_xBuilder->weld_label("angleft")) - , m_xMtrAngle(m_xBuilder->weld_metric_spin_button("anglemtr", FieldUnit::DEGREE)) - , m_xSliderAngle(m_xBuilder->weld_scale("angleslider")) - , m_xMtrBorder(m_xBuilder->weld_metric_spin_button("bordermtr", FieldUnit::PERCENT)) - , m_xSliderBorder(m_xBuilder->weld_scale("borderslider")) - , m_xLbColorFrom(new ColorListBox(m_xBuilder->weld_menu_button("colorfromlb"), + , m_xLbGradientType(m_xBuilder->weld_combo_box(u"gradienttypelb"_ustr)) + , m_xFtCenter(m_xBuilder->weld_label(u"centerft"_ustr)) + , m_xMtrCenterX(m_xBuilder->weld_metric_spin_button(u"centerxmtr"_ustr, FieldUnit::PERCENT)) + , m_xMtrCenterY(m_xBuilder->weld_metric_spin_button(u"centerymtr"_ustr, FieldUnit::PERCENT)) + , m_xFtAngle(m_xBuilder->weld_label(u"angleft"_ustr)) + , m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"anglemtr"_ustr, FieldUnit::DEGREE)) + , m_xSliderAngle(m_xBuilder->weld_scale(u"angleslider"_ustr)) + , m_xMtrBorder(m_xBuilder->weld_metric_spin_button(u"bordermtr"_ustr, FieldUnit::PERCENT)) + , m_xSliderBorder(m_xBuilder->weld_scale(u"borderslider"_ustr)) + , m_xLbColorFrom(new ColorListBox(m_xBuilder->weld_menu_button(u"colorfromlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xMtrColorFrom(m_xBuilder->weld_metric_spin_button("colorfrommtr", FieldUnit::PERCENT)) - , m_xLbColorTo(new ColorListBox(m_xBuilder->weld_menu_button("colortolb"), + , m_xMtrColorFrom(m_xBuilder->weld_metric_spin_button(u"colorfrommtr"_ustr, FieldUnit::PERCENT)) + , m_xLbColorTo(new ColorListBox(m_xBuilder->weld_menu_button(u"colortolb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xMtrColorTo(m_xBuilder->weld_metric_spin_button("colortomtr", FieldUnit::PERCENT)) - , m_xGradientLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("gradientpresetlistwin", true))) - , m_xMtrIncrement(m_xBuilder->weld_spin_button("incrementmtr")) - , m_xCbIncrement(m_xBuilder->weld_check_button("autoincrement")) - , m_xBtnAdd(m_xBuilder->weld_button("add")) - , m_xBtnModify(m_xBuilder->weld_button("modify")) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "previewctl", m_aCtlPreview)) - , m_xGradientLBWin(new weld::CustomWeld(*m_xBuilder, "gradientpresetlist", *m_xGradientLB)) + , m_xMtrColorTo(m_xBuilder->weld_metric_spin_button(u"colortomtr"_ustr, FieldUnit::PERCENT)) + , m_xGradientLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window(u"gradientpresetlistwin"_ustr, true))) + , m_xMtrIncrement(m_xBuilder->weld_spin_button(u"incrementmtr"_ustr)) + , m_xCbIncrement(m_xBuilder->weld_check_button(u"autoincrement"_ustr)) + , m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnModify(m_xBuilder->weld_button(u"modify"_ustr)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"previewctl"_ustr, m_aCtlPreview)) + , m_xGradientLBWin(new weld::CustomWeld(*m_xBuilder, u"gradientpresetlist"_ustr, *m_xGradientLB)) { Size aSize = getDrawPreviewOptimalSize(m_aCtlPreview.GetDrawingArea()->get_ref_device()); m_xGradientLB->set_size_request(aSize.Width(), aSize.Height()); @@ -352,8 +352,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, weld::Button&, void) break; } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); if (xWarnBox->run() != RET_OK) break; } @@ -436,8 +436,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl, SvxPresetListBox*, void if( nPos != VALUESET_ITEM_NOTFOUND ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletegradientdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelGradientDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletegradientdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelGradientDialog"_ustr)); if (xQueryBox->run() == RET_YES) { m_pGradientList->Remove(nPos); @@ -491,8 +491,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xBox->run(); } } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index ccfc12a7b445..343e9fac7708 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -44,26 +44,26 @@ using namespace com::sun::star; SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/hatchpage.ui", "HatchPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/hatchpage.ui"_ustr, u"HatchPage"_ustr, &rInAttrs) , m_rOutAttrs(rInAttrs) , m_pnHatchingListState(nullptr) , m_pnColorListState(nullptr) , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) - , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("distancemtr", FieldUnit::MM)) - , m_xMtrAngle(m_xBuilder->weld_metric_spin_button("anglemtr", FieldUnit::DEGREE)) - , m_xSliderAngle(m_xBuilder->weld_scale("angleslider")) - , m_xLbLineType(m_xBuilder->weld_combo_box("linetypelb")) - , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), + , m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distancemtr"_ustr, FieldUnit::MM)) + , m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"anglemtr"_ustr, FieldUnit::DEGREE)) + , m_xSliderAngle(m_xBuilder->weld_scale(u"angleslider"_ustr)) + , m_xLbLineType(m_xBuilder->weld_combo_box(u"linetypelb"_ustr)) + , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button(u"linecolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xCbBackgroundColor(m_xBuilder->weld_check_button("backgroundcolor")) - , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("backgroundcolorlb"), + , m_xCbBackgroundColor(m_xBuilder->weld_check_button(u"backgroundcolor"_ustr)) + , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button(u"backgroundcolorlb"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xHatchLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("hatchpresetlistwin", true))) - , m_xBtnAdd(m_xBuilder->weld_button("add")) - , m_xBtnModify(m_xBuilder->weld_button("modify")) - , m_xHatchLBWin(new weld::CustomWeld(*m_xBuilder, "hatchpresetlist", *m_xHatchLB)) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "previewctl", m_aCtlPreview)) + , m_xHatchLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window(u"hatchpresetlistwin"_ustr, true))) + , m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnModify(m_xBuilder->weld_button(u"modify"_ustr)) + , m_xHatchLBWin(new weld::CustomWeld(*m_xBuilder, u"hatchpresetlist"_ustr, *m_xHatchLB)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"previewctl"_ustr, m_aCtlPreview)) { Size aSize = getDrawPreviewOptimalSize(m_aCtlPreview.GetDrawingArea()->get_ref_device()); m_xHatchLBWin->set_size_request(aSize.Width(), aSize.Height()); @@ -431,8 +431,8 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void) break; } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); if (xWarnBox->run() != RET_OK) break; } @@ -500,8 +500,8 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl, SvxPresetListBox*, void) if( nPos == VALUESET_ITEM_NOTFOUND ) return; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletehatchdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelHatchDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletehatchdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelHatchDialog"_ustr)); if (xQueryBox->run() != RET_YES) return; @@ -551,8 +551,8 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void ) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xBox->run(); } } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index c480e3e6abd9..f07ca7a3497c 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -77,7 +77,7 @@ const WhichRangesContainer SvxLineTabPage::pLineRanges(svl::Items< >); SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/linetabpage.ui", "LineTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/linetabpage.ui"_ustr, u"LineTabPage"_ustr, &rInAttrs) , m_pSymbolList(nullptr) , m_bNewSize(false) , m_nSymbolType(SVX_SYMBOLTYPE_UNKNOWN) // unknown respectively unchanged @@ -95,36 +95,36 @@ SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* p , m_nDlgType(0) , m_pPosDashLb(nullptr) , m_pPosLineEndLb(nullptr) - , m_xBoxColor(m_xBuilder->weld_widget("boxCOLOR")) - , m_xLbLineStyle(new SvxLineLB(m_xBuilder->weld_combo_box("LB_LINE_STYLE"))) - , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"), + , m_xBoxColor(m_xBuilder->weld_widget(u"boxCOLOR"_ustr)) + , m_xLbLineStyle(new SvxLineLB(m_xBuilder->weld_combo_box(u"LB_LINE_STYLE"_ustr))) + , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_COLOR"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xBoxWidth(m_xBuilder->weld_widget("boxWIDTH")) - , m_xMtrLineWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_LINE_WIDTH", FieldUnit::CM)) - , m_xBoxTransparency(m_xBuilder->weld_widget("boxTRANSPARENCY")) - , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_LINE_TRANSPARENT", FieldUnit::PERCENT)) - , m_xFlLineEnds(m_xBuilder->weld_widget("FL_LINE_ENDS")) - , m_xBoxArrowStyles(m_xBuilder->weld_widget("boxARROW_STYLES")) - , m_xLbStartStyle(new SvxLineEndLB(m_xBuilder->weld_combo_box("LB_START_STYLE"))) - , m_xBoxStart(m_xBuilder->weld_widget("boxSTART")) - , m_xMtrStartWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_START_WIDTH", FieldUnit::CM)) - , m_xTsbCenterStart(m_xBuilder->weld_check_button("TSB_CENTER_START")) - , m_xBoxEnd(m_xBuilder->weld_widget("boxEND")) - , m_xLbEndStyle(new SvxLineEndLB(m_xBuilder->weld_combo_box("LB_END_STYLE"))) - , m_xMtrEndWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_END_WIDTH", FieldUnit::CM)) - , m_xTsbCenterEnd(m_xBuilder->weld_check_button("TSB_CENTER_END")) - , m_xCbxSynchronize(m_xBuilder->weld_check_button("CBX_SYNCHRONIZE")) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) - , m_xFLEdgeStyle(m_xBuilder->weld_widget("FL_EDGE_STYLE")) - , m_xGridEdgeCaps(m_xBuilder->weld_widget("gridEDGE_CAPS")) - , m_xLBEdgeStyle(m_xBuilder->weld_combo_box("LB_EDGE_STYLE")) - , m_xLBCapStyle(m_xBuilder->weld_combo_box("LB_CAP_STYLE")) // LineCaps - , m_xFlSymbol(m_xBuilder->weld_widget("FL_SYMBOL_FORMAT")) //#58425# Symbols on a line (e.g. StarChart) - , m_xGridIconSize(m_xBuilder->weld_widget("gridICON_SIZE")) - , m_xSymbolMB(m_xBuilder->weld_menu_button("MB_SYMBOL_BITMAP")) - , m_xSymbolWidthMF(m_xBuilder->weld_metric_spin_button("MF_SYMBOL_WIDTH", FieldUnit::CM)) - , m_xSymbolHeightMF(m_xBuilder->weld_metric_spin_button("MF_SYMBOL_HEIGHT", FieldUnit::CM)) - , m_xSymbolRatioCB(m_xBuilder->weld_check_button("CB_SYMBOL_RATIO")) + , m_xBoxWidth(m_xBuilder->weld_widget(u"boxWIDTH"_ustr)) + , m_xMtrLineWidth(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LINE_WIDTH"_ustr, FieldUnit::CM)) + , m_xBoxTransparency(m_xBuilder->weld_widget(u"boxTRANSPARENCY"_ustr)) + , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button(u"MTR_LINE_TRANSPARENT"_ustr, FieldUnit::PERCENT)) + , m_xFlLineEnds(m_xBuilder->weld_widget(u"FL_LINE_ENDS"_ustr)) + , m_xBoxArrowStyles(m_xBuilder->weld_widget(u"boxARROW_STYLES"_ustr)) + , m_xLbStartStyle(new SvxLineEndLB(m_xBuilder->weld_combo_box(u"LB_START_STYLE"_ustr))) + , m_xBoxStart(m_xBuilder->weld_widget(u"boxSTART"_ustr)) + , m_xMtrStartWidth(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_START_WIDTH"_ustr, FieldUnit::CM)) + , m_xTsbCenterStart(m_xBuilder->weld_check_button(u"TSB_CENTER_START"_ustr)) + , m_xBoxEnd(m_xBuilder->weld_widget(u"boxEND"_ustr)) + , m_xLbEndStyle(new SvxLineEndLB(m_xBuilder->weld_combo_box(u"LB_END_STYLE"_ustr))) + , m_xMtrEndWidth(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_END_WIDTH"_ustr, FieldUnit::CM)) + , m_xTsbCenterEnd(m_xBuilder->weld_check_button(u"TSB_CENTER_END"_ustr)) + , m_xCbxSynchronize(m_xBuilder->weld_check_button(u"CBX_SYNCHRONIZE"_ustr)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) + , m_xFLEdgeStyle(m_xBuilder->weld_widget(u"FL_EDGE_STYLE"_ustr)) + , m_xGridEdgeCaps(m_xBuilder->weld_widget(u"gridEDGE_CAPS"_ustr)) + , m_xLBEdgeStyle(m_xBuilder->weld_combo_box(u"LB_EDGE_STYLE"_ustr)) + , m_xLBCapStyle(m_xBuilder->weld_combo_box(u"LB_CAP_STYLE"_ustr)) // LineCaps + , m_xFlSymbol(m_xBuilder->weld_widget(u"FL_SYMBOL_FORMAT"_ustr)) //#58425# Symbols on a line (e.g. StarChart) + , m_xGridIconSize(m_xBuilder->weld_widget(u"gridICON_SIZE"_ustr)) + , m_xSymbolMB(m_xBuilder->weld_menu_button(u"MB_SYMBOL_BITMAP"_ustr)) + , m_xSymbolWidthMF(m_xBuilder->weld_metric_spin_button(u"MF_SYMBOL_WIDTH"_ustr, FieldUnit::CM)) + , m_xSymbolHeightMF(m_xBuilder->weld_metric_spin_button(u"MF_SYMBOL_HEIGHT"_ustr, FieldUnit::CM)) + , m_xSymbolRatioCB(m_xBuilder->weld_check_button(u"CB_SYMBOL_RATIO"_ustr)) { // This Page requires ExchangeSupport SetExchangeSupport(); @@ -947,7 +947,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) SetMetricValue( *m_xMtrLineWidth, rAttrs->Get( XATTR_LINEWIDTH ).GetValue(), m_ePoolUnit ); } else - m_xMtrLineWidth->set_text(""); + m_xMtrLineWidth->set_text(u""_ustr); // Line color m_xLbColor->SetNoSelection(); @@ -1034,7 +1034,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_ePoolUnit ); } else - m_xMtrStartWidth->set_text( "" ); + m_xMtrStartWidth->set_text( u""_ustr ); // Line end strength if( m_bObjSelected && rAttrs->GetItemState( XATTR_LINEENDWIDTH ) == SfxItemState::DEFAULT ) @@ -1048,7 +1048,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_ePoolUnit ); } else - m_xMtrEndWidth->set_text(""); + m_xMtrEndWidth->set_text(u""_ustr); // Centered line end (start) if( m_bObjSelected && rAttrs->GetItemState( XATTR_LINESTARTCENTER ) == SfxItemState::DEFAULT ) @@ -1092,7 +1092,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) ChangeTransparentHdl_Impl(*m_xMtrTransparent); } else - m_xMtrTransparent->set_text( "" ); + m_xMtrTransparent->set_text( u""_ustr ); if( !m_xLbStartStyle->get_sensitive() && !m_xLbEndStyle->get_sensitive() && @@ -1385,7 +1385,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::Toggleable&, void) // Initialize popup if (!m_xGalleryMenu) { - m_xGalleryMenu = m_xBuilder->weld_menu("gallerysubmenu"); + m_xGalleryMenu = m_xBuilder->weld_menu(u"gallerysubmenu"_ustr); weld::WaitObject aWait(GetFrameWeld()); // Get gallery entries GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, m_aGrfNames); @@ -1404,7 +1404,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::Toggleable&, void) } SvxBmpItemInfo* pInfo = new SvxBmpItemInfo; - pInfo->pBrushItem.reset(new SvxBrushItem(grfName, "", GPOS_AREA, SID_ATTR_BRUSH)); + pInfo->pBrushItem.reset(new SvxBrushItem(grfName, u""_ustr, GPOS_AREA, SID_ATTR_BRUSH)); pInfo->sItemId = "gallery" + OUString::number(i); m_aGalleryBrushItems.emplace_back(pInfo); const Graphic* pGraphic = pInfo->pBrushItem->GetGraphic(); @@ -1434,13 +1434,13 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::Toggleable&, void) } if (m_aGrfNames.empty()) - m_xSymbolMB->set_item_sensitive("gallery", false); + m_xSymbolMB->set_item_sensitive(u"gallery"_ustr, false); } if (m_xSymbolsMenu || !m_pSymbolList) return; - m_xSymbolsMenu = m_xBuilder->weld_menu("symbolssubmenu"); + m_xSymbolsMenu = m_xBuilder->weld_menu(u"symbolssubmenu"_ustr); ScopedVclPtrInstance< VirtualDevice > pVDev; pVDev->SetMapMode(MapMode(MapUnit::Map100thMM)); std::unique_ptr<SdrModel> pModel( @@ -1507,13 +1507,13 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::Toggleable&, void) } pVD->SetOutputSizePixel(aBitmapEx.GetSizePixel()); pVD->DrawBitmapEx(Point(), aBitmapEx); - m_xSymbolsMenu->append(pInfo->sItemId, "", *pVD); + m_xSymbolsMenu->append(pInfo->sItemId, u""_ustr, *pVD); } pPage->RemoveObject(0); pInvisibleSquare.clear(); if (m_aGrfNames.empty()) - m_xSymbolMB->set_item_sensitive("symbols", false); + m_xSymbolMB->set_item_sensitive(u"symbols"_ustr, false); } } diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 677abd7e266a..d1db86e4956e 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -51,7 +51,7 @@ using namespace com::sun::star; SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/linestyletabpage.ui", "LineStylePage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/linestyletabpage.ui"_ustr, u"LineStylePage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) , aXLineAttr(rInAttrs.GetPool()) , rXLSet(aXLineAttr.GetItemSet()) @@ -59,21 +59,21 @@ SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogControl , pPageType(nullptr) , nDlgType(0) , pPosDashLb(nullptr) - , m_xLbLineStyles(new SvxLineLB(m_xBuilder->weld_combo_box("LB_LINESTYLES"))) - , m_xLbType1(m_xBuilder->weld_combo_box("LB_TYPE_1")) - , m_xLbType2(m_xBuilder->weld_combo_box("LB_TYPE_2")) - , m_xNumFldNumber1(m_xBuilder->weld_spin_button("NUM_FLD_1")) - , m_xNumFldNumber2(m_xBuilder->weld_spin_button("NUM_FLD_2")) - , m_xMtrLength1(m_xBuilder->weld_metric_spin_button("MTR_FLD_LENGTH_1", FieldUnit::CM)) - , m_xMtrLength2(m_xBuilder->weld_metric_spin_button("MTR_FLD_LENGTH_2", FieldUnit::CM)) - , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("MTR_FLD_DISTANCE", FieldUnit::CM)) - , m_xCbxSynchronize(m_xBuilder->weld_check_button("CBX_SYNCHRONIZE")) - , m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD")) - , m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY")) - , m_xBtnDelete(m_xBuilder->weld_button("BTN_DELETE")) - , m_xBtnLoad(m_xBuilder->weld_button("BTN_LOAD")) - , m_xBtnSave(m_xBuilder->weld_button("BTN_SAVE")) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) + , m_xLbLineStyles(new SvxLineLB(m_xBuilder->weld_combo_box(u"LB_LINESTYLES"_ustr))) + , m_xLbType1(m_xBuilder->weld_combo_box(u"LB_TYPE_1"_ustr)) + , m_xLbType2(m_xBuilder->weld_combo_box(u"LB_TYPE_2"_ustr)) + , m_xNumFldNumber1(m_xBuilder->weld_spin_button(u"NUM_FLD_1"_ustr)) + , m_xNumFldNumber2(m_xBuilder->weld_spin_button(u"NUM_FLD_2"_ustr)) + , m_xMtrLength1(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LENGTH_1"_ustr, FieldUnit::CM)) + , m_xMtrLength2(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_LENGTH_2"_ustr, FieldUnit::CM)) + , m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_DISTANCE"_ustr, FieldUnit::CM)) + , m_xCbxSynchronize(m_xBuilder->weld_check_button(u"CBX_SYNCHRONIZE"_ustr)) + , m_xBtnAdd(m_xBuilder->weld_button(u"BTN_ADD"_ustr)) + , m_xBtnModify(m_xBuilder->weld_button(u"BTN_MODIFY"_ustr)) + , m_xBtnDelete(m_xBuilder->weld_button(u"BTN_DELETE"_ustr)) + , m_xBtnLoad(m_xBuilder->weld_button(u"BTN_LOAD"_ustr)) + , m_xBtnSave(m_xBuilder->weld_button(u"BTN_SAVE"_ustr)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -461,7 +461,7 @@ void SvxLineDefTabPage::SelectTypeHdl_Impl(const weld::ComboBox* p) if (m_xLbType1->get_active() == 0) { m_xMtrLength1->set_sensitive(false); - m_xMtrLength1->set_text(""); + m_xMtrLength1->set_text(u""_ustr); } else if (!m_xMtrLength1->get_sensitive()) { @@ -475,7 +475,7 @@ void SvxLineDefTabPage::SelectTypeHdl_Impl(const weld::ComboBox* p) if (m_xLbType2->get_active() == 0) { m_xMtrLength2->set_sensitive(false); - m_xMtrLength2->set_text(""); + m_xMtrLength2->set_text(u""_ustr); } else if (!m_xMtrLength2->get_sensitive()) { @@ -547,8 +547,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xBox->run(); } } @@ -616,8 +616,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xBox->run(); } } @@ -628,8 +628,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl, weld::Button&, void) int nPos = m_xLbLineStyles->get_active(); if (nPos != -1) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletelinestyledialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelLineStyleDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletelinestyledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelLineStyleDialog"_ustr)); if (xQueryBox->run() == RET_YES) { pDashList->Remove(nPos); @@ -660,8 +660,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) if ( *pnDashListState & ChangeType::MODIFIED ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querysavelistdialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("AskSaveList")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querysavelistdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"AskSaveList"_ustr)); nReturn = xBox->run(); @@ -673,7 +673,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) { ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld()); - OUString aStrFilterType( "*.sod" ); + OUString aStrFilterType( u"*.sod"_ustr ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); OUString aPalettePath(SvtPathOptions().GetPalettePath()); OUString aLastDir; @@ -695,7 +695,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) aPathURL.removeSegment(); aPathURL.removeFinalSlash(); - XDashListRef pDshLst = XPropertyList::AsDashList(XPropertyList::CreatePropertyList( XPropertyListType::Dash, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" )); + XDashListRef pDshLst = XPropertyList::AsDashList(XPropertyList::CreatePropertyList( XPropertyListType::Dash, aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), u""_ustr )); pDshLst->SetName( aURL.getName() ); if( pDshLst->Load() ) @@ -714,8 +714,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querynoloadedfiledialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoLoadedFileDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querynoloadedfiledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"NoLoadedFileDialog"_ustr)); xBox->run(); } } @@ -739,7 +739,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, weld::Button&, void) { ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, GetFrameWeld()); - OUString aStrFilterType( "*.sod" ); + OUString aStrFilterType( u"*.sod"_ustr ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); OUString aPalettePath(SvtPathOptions().GetPalettePath()); @@ -781,8 +781,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querynosavefiledialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoSaveFileDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querynosavefiledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"NoSaveFileDialog"_ustr)); xBox->run(); } } diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 2d181a3f5cb9..d2a137c17306 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -50,7 +50,7 @@ #define XOUT_WIDTH 150 SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/lineendstabpage.ui", "LineEndPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/lineendstabpage.ui"_ustr, u"LineEndPage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) , pPolyObj(nullptr) , aXLineAttr(rInAttrs.GetPool()) @@ -59,14 +59,14 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogC , pPageType(nullptr) , nDlgType(0) , pPosLineEndLb(nullptr) - , m_xEdtName(m_xBuilder->weld_entry("EDT_NAME")) - , m_xLbLineEnds(new SvxLineEndLB(m_xBuilder->weld_combo_box("LB_LINEENDS"))) - , m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD")) - , m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY")) - , m_xBtnDelete(m_xBuilder->weld_button("BTN_DELETE")) - , m_xBtnLoad(m_xBuilder->weld_button("BTN_LOAD")) - , m_xBtnSave(m_xBuilder->weld_button("BTN_SAVE")) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) + , m_xEdtName(m_xBuilder->weld_entry(u"EDT_NAME"_ustr)) + , m_xLbLineEnds(new SvxLineEndLB(m_xBuilder->weld_combo_box(u"LB_LINEENDS"_ustr))) + , m_xBtnAdd(m_xBuilder->weld_button(u"BTN_ADD"_ustr)) + , m_xBtnModify(m_xBuilder->weld_button(u"BTN_MODIFY"_ustr)) + , m_xBtnDelete(m_xBuilder->weld_button(u"BTN_DELETE"_ustr)) + , m_xBtnLoad(m_xBuilder->weld_button(u"BTN_LOAD"_ustr)) + , m_xBtnSave(m_xBuilder->weld_button(u"BTN_SAVE"_ustr)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -164,8 +164,8 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() if( aString != m_xLbLineEnds->get_active_text() ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querychangelineenddialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskChangeLineEndDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querychangelineenddialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskChangeLineEndDialog"_ustr)); if (xQueryBox->run() == RET_YES) ClickModifyHdl_Impl(*m_xBtnModify); } @@ -283,8 +283,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, weld::Button&, void) // if yes, repeat and demand a new name if ( !bDifferent ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarningBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarningBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xWarningBox->run(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -422,8 +422,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarningBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarningBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xWarningBox->run(); } } @@ -446,8 +446,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl, weld::Button&, void) if (nPos != -1) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletelineenddialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelLineEndDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletelineenddialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelLineEndDialog"_ustr)); if (xQueryBox->run() == RET_YES) { @@ -478,8 +478,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) if ( *pnLineEndListState & ChangeType::MODIFIED ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querysavelistdialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("AskSaveList")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querysavelistdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"AskSaveList"_ustr)); nReturn = xBox->run(); @@ -491,7 +491,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) { ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld()); - OUString aStrFilterType( "*.soe" ); + OUString aStrFilterType( u"*.soe"_ustr ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); OUString aPalettePath(SvtPathOptions().GetPalettePath()); @@ -517,7 +517,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) XLineEndListRef pLeList = XPropertyList::AsLineEndList( XPropertyList::CreatePropertyList( XPropertyListType::LineEnd, - aPathURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), "")); + aPathURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), u""_ustr)); pLeList->SetName( aURL.getName() ); if( pLeList->Load() ) { @@ -534,8 +534,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querynoloadedfiledialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoLoadedFileDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querynoloadedfiledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"NoLoadedFileDialog"_ustr)); xBox->run(); } } @@ -559,7 +559,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, weld::Button&, void) { ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, GetFrameWeld()); - OUString aStrFilterType( "*.soe" ); + OUString aStrFilterType( u"*.soe"_ustr ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); OUString aPalettePath(SvtPathOptions().GetPalettePath()); @@ -601,8 +601,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, weld::Button&, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querynosavefiledialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoSaveFileDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querynosavefiledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"NoSaveFileDialog"_ustr)); xBox->run(); } } diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 9a37685951dd..6128ae946184 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -70,23 +70,23 @@ public: }; SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/patterntabpage.ui", "PatternTabPage", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/patterntabpage.ui"_ustr, u"PatternTabPage"_ustr, rInAttrs) , m_rOutAttrs(rInAttrs) , m_pnPatternListState(nullptr) , m_pnColorListState(nullptr) , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) , m_xCtlPixel(new SvxPixelCtl(this)) - , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"), + , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_COLOR"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_BACKGROUND_COLOR"), + , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_BACKGROUND_COLOR"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xPatternLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("patternpresetlistwin", true))) - , m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD")) - , m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY")) - , m_xCtlPixelWin(new weld::CustomWeld(*m_xBuilder, "CTL_PIXEL", *m_xCtlPixel)) - , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) - , m_xPatternLBWin(new weld::CustomWeld(*m_xBuilder, "patternpresetlist", *m_xPatternLB)) + , m_xPatternLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window(u"patternpresetlistwin"_ustr, true))) + , m_xBtnAdd(m_xBuilder->weld_button(u"BTN_ADD"_ustr)) + , m_xBtnModify(m_xBuilder->weld_button(u"BTN_MODIFY"_ustr)) + , m_xCtlPixelWin(new weld::CustomWeld(*m_xBuilder, u"CTL_PIXEL"_ustr, *m_xCtlPixel)) + , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_PREVIEW"_ustr, m_aCtlPreview)) + , m_xPatternLBWin(new weld::CustomWeld(*m_xBuilder, u"patternpresetlist"_ustr, *m_xPatternLB)) { // size of the bitmap display Size aSize = getDrawPreviewOptimalSize(m_aCtlPreview.GetDrawingArea()->get_ref_device()); @@ -350,8 +350,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void) break; } - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); if (xWarnBox->run() != RET_OK) break; } @@ -458,8 +458,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void) } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/queryduplicatedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog(u"DuplicateNameDialog"_ustr)); xWarnBox->run(); } } @@ -472,8 +472,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickDeleteHdl_Impl, SvxPresetListBox*, void) if( nPos != VALUESET_ITEM_NOTFOUND ) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletebitmapdialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelBitmapDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"cui/ui/querydeletebitmapdialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"AskDelBitmapDialog"_ustr)); if (xQueryBox->run() == RET_YES) { m_pPatternList->Remove(nPos); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 75d37a9ebb3c..86fb46334575 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -50,7 +50,7 @@ const WhichRangesContainer SvxShadowTabPage::pShadowRanges(svl::Items< >); SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/shadowtabpage.ui", "ShadowTabPage", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/shadowtabpage.ui"_ustr, u"ShadowTabPage"_ustr, rInAttrs) , m_rOutAttrs(rInAttrs) , m_pnColorListState(nullptr) , m_nPageType(PageType::Area) @@ -58,15 +58,15 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle , m_aXFillAttr(rInAttrs.GetPool()) , m_rXFSet(m_aXFillAttr.GetItemSet()) , m_aCtlPosition(this) - , m_xTsbShowShadow(m_xBuilder->weld_check_button("TSB_SHOW_SHADOW")) - , m_xGridShadow(m_xBuilder->weld_widget("gridSHADOW")) - , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("MTR_FLD_DISTANCE", FieldUnit::CM)) - , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_SHADOW_COLOR"), + , m_xTsbShowShadow(m_xBuilder->weld_check_button(u"TSB_SHOW_SHADOW"_ustr)) + , m_xGridShadow(m_xBuilder->weld_widget(u"gridSHADOW"_ustr)) + , m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_DISTANCE"_ustr, FieldUnit::CM)) + , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_SHADOW_COLOR"_ustr), [this]{ return GetDialogController()->getDialog(); })) - , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_SHADOW_TRANSPARENT", FieldUnit::PERCENT)) - , m_xLbShadowBlurMetric(m_xBuilder->weld_metric_spin_button("LB_SHADOW_BLUR", FieldUnit::POINT)) - , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", m_aCtlPosition)) - , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_COLOR_PREVIEW", m_aCtlXRectPreview)) + , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button(u"MTR_SHADOW_TRANSPARENT"_ustr, FieldUnit::PERCENT)) + , m_xLbShadowBlurMetric(m_xBuilder->weld_metric_spin_button(u"LB_SHADOW_BLUR"_ustr, FieldUnit::POINT)) + , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, u"CTL_POSITION"_ustr, m_aCtlPosition)) + , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_COLOR_PREVIEW"_ustr, m_aCtlXRectPreview)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -390,7 +390,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // Tristate, e. g. multiple objects have been marked of which some have a shadow and some don't. // The text (which shall be displayed) of the MetricFields is set to "" and serves as an // identification in the method FillItemSet for the fact that the distance value was NOT changed !!!! - m_xMtrDistance->set_text( "" ); + m_xMtrDistance->set_text( u""_ustr ); m_aCtlPosition.SetActualRP( RectPoint::MM ); } @@ -407,7 +407,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) m_xMtrTransparent->set_value(nTransp, FieldUnit::PERCENT); } else - m_xMtrTransparent->set_text(""); + m_xMtrTransparent->set_text(u""_ustr); if( rAttrs->GetItemState( SDRATTR_SHADOWBLUR ) != SfxItemState::INVALID ) { @@ -415,7 +415,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) m_xLbShadowBlurMetric->set_value(nBlur, FieldUnit::MM_100TH); } else - m_xLbShadowBlurMetric->set_text(""); + m_xLbShadowBlurMetric->set_text(u""_ustr); //aCtlPosition m_xMtrDistance->save_value(); diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index b2d6a10dea0a..842af80df238 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -184,32 +184,32 @@ void SvxTransparenceTabPage::SetControlState_Impl(css::awt::GradientStyle eXGS) } SvxTransparenceTabPage::SvxTransparenceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/transparencytabpage.ui", "TransparencyTabPage", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/transparencytabpage.ui"_ustr, u"TransparencyTabPage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) , nPageType(PageType::Area) , nDlgType(0) , bBitmap(false) , aXFillAttr(rInAttrs.GetPool()) , rXFSet(aXFillAttr.GetItemSet()) - , m_xRbtTransOff(m_xBuilder->weld_radio_button("RBT_TRANS_OFF")) - , m_xRbtTransLinear(m_xBuilder->weld_radio_button("RBT_TRANS_LINEAR")) - , m_xRbtTransGradient(m_xBuilder->weld_radio_button("RBT_TRANS_GRADIENT")) - , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_TRANSPARENT", FieldUnit::PERCENT)) - , m_xGridGradient(m_xBuilder->weld_widget("gridGradient")) - , m_xLbTrgrGradientType(m_xBuilder->weld_combo_box("LB_TRGR_GRADIENT_TYPES")) - , m_xFtTrgrCenterX(m_xBuilder->weld_label("FT_TRGR_CENTER_X")) - , m_xMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_X", FieldUnit::PERCENT)) - , m_xFtTrgrCenterY(m_xBuilder->weld_label("FT_TRGR_CENTER_Y")) - , m_xMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_Y", FieldUnit::PERCENT)) - , m_xFtTrgrAngle(m_xBuilder->weld_label("FT_TRGR_ANGLE")) - , m_xMtrTrgrAngle(m_xBuilder->weld_metric_spin_button("MTR_TRGR_ANGLE", FieldUnit::DEGREE)) - , m_xMtrTrgrBorder(m_xBuilder->weld_metric_spin_button("MTR_TRGR_BORDER", FieldUnit::PERCENT)) - , m_xMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_START_VALUE", FieldUnit::PERCENT)) - , m_xMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_END_VALUE", FieldUnit::PERCENT)) - , m_xCtlBitmapBorder(m_xBuilder->weld_widget("bitmap_border")) - , m_xCtlXRectBorder(m_xBuilder->weld_widget("trans_border")) - , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, "CTL_IMAGE_PREVIEW", m_aCtlBitmapPreview)) - , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_TRANS_PREVIEW", m_aCtlXRectPreview)) + , m_xRbtTransOff(m_xBuilder->weld_radio_button(u"RBT_TRANS_OFF"_ustr)) + , m_xRbtTransLinear(m_xBuilder->weld_radio_button(u"RBT_TRANS_LINEAR"_ustr)) + , m_xRbtTransGradient(m_xBuilder->weld_radio_button(u"RBT_TRANS_GRADIENT"_ustr)) + , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button(u"MTR_TRANSPARENT"_ustr, FieldUnit::PERCENT)) + , m_xGridGradient(m_xBuilder->weld_widget(u"gridGradient"_ustr)) + , m_xLbTrgrGradientType(m_xBuilder->weld_combo_box(u"LB_TRGR_GRADIENT_TYPES"_ustr)) + , m_xFtTrgrCenterX(m_xBuilder->weld_label(u"FT_TRGR_CENTER_X"_ustr)) + , m_xMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_CENTER_X"_ustr, FieldUnit::PERCENT)) + , m_xFtTrgrCenterY(m_xBuilder->weld_label(u"FT_TRGR_CENTER_Y"_ustr)) + , m_xMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_CENTER_Y"_ustr, FieldUnit::PERCENT)) + , m_xFtTrgrAngle(m_xBuilder->weld_label(u"FT_TRGR_ANGLE"_ustr)) + , m_xMtrTrgrAngle(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_ANGLE"_ustr, FieldUnit::DEGREE)) + , m_xMtrTrgrBorder(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_BORDER"_ustr, FieldUnit::PERCENT)) + , m_xMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_START_VALUE"_ustr, FieldUnit::PERCENT)) + , m_xMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button(u"MTR_TRGR_END_VALUE"_ustr, FieldUnit::PERCENT)) + , m_xCtlBitmapBorder(m_xBuilder->weld_widget(u"bitmap_border"_ustr)) + , m_xCtlXRectBorder(m_xBuilder->weld_widget(u"trans_border"_ustr)) + , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_IMAGE_PREVIEW"_ustr, m_aCtlBitmapPreview)) + , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_TRANS_PREVIEW"_ustr, m_aCtlXRectPreview)) { // main selection m_xRbtTransOff->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl)); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 68cdeed8685e..4ccf16dfd822 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -71,7 +71,7 @@ const WhichRangesContainer SvxSlantTabPage::pSlantRanges(svl::Items< SvxTransformTabDialog::SvxTransformTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView, SvxAnchorIds nAnchorTypes) - : SfxTabDialogController(pParent, "cui/ui/positionsizedialog.ui", "PositionAndSizeDialog", pAttr) + : SfxTabDialogController(pParent, u"cui/ui/positionsizedialog.ui"_ustr, u"PositionAndSizeDialog"_ustr, pAttr) , pView(pSdrView) , nAnchorCtrls(nAnchorTypes) { @@ -80,17 +80,17 @@ SvxTransformTabDialog::SvxTransformTabDialog(weld::Window* pParent, const SfxIte //different positioning page in Writer if(nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly)) { - AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges); - RemoveTabPage("RID_SVXPAGE_POSITION_SIZE"); + AddTabPage(u"RID_SVXPAGE_SWPOSSIZE"_ustr, SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges); + RemoveTabPage(u"RID_SVXPAGE_POSITION_SIZE"_ustr); } else { - AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges); - RemoveTabPage("RID_SVXPAGE_SWPOSSIZE"); + AddTabPage(u"RID_SVXPAGE_POSITION_SIZE"_ustr, SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges); + RemoveTabPage(u"RID_SVXPAGE_SWPOSSIZE"_ustr); } - AddTabPage("RID_SVXPAGE_ANGLE", SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges); - AddTabPage("RID_SVXPAGE_SLANT", SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges); + AddTabPage(u"RID_SVXPAGE_ANGLE"_ustr, SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges); + AddTabPage(u"RID_SVXPAGE_SLANT"_ustr, SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges); } @@ -149,18 +149,18 @@ void SvxTransformTabDialog::SetValidateFramePosLink(const Link<SvxSwFrameValidat |* \************************************************************************/ SvxAngleTabPage::SvxAngleTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/rotationtabpage.ui", "Rotation", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/rotationtabpage.ui"_ustr, u"Rotation"_ustr, rInAttrs) , pView(nullptr) , eDlgUnit(FieldUnit::NONE) , m_aCtlRect(this) - , m_xFlPosition(m_xBuilder->weld_widget("FL_POSITION")) - , m_xMtrPosX(m_xBuilder->weld_metric_spin_button("MTR_FLD_POS_X", FieldUnit::CM)) - , m_xMtrPosY(m_xBuilder->weld_metric_spin_button("MTR_FLD_POS_Y", FieldUnit::CM)) - , m_xCtlRect(new weld::CustomWeld(*m_xBuilder, "CTL_RECT", m_aCtlRect)) - , m_xFlAngle(m_xBuilder->weld_widget("FL_ANGLE")) - , m_xNfAngle(m_xBuilder->weld_metric_spin_button("NF_ANGLE", FieldUnit::DEGREE)) + , m_xFlPosition(m_xBuilder->weld_widget(u"FL_POSITION"_ustr)) + , m_xMtrPosX(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_X"_ustr, FieldUnit::CM)) + , m_xMtrPosY(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_Y"_ustr, FieldUnit::CM)) + , m_xCtlRect(new weld::CustomWeld(*m_xBuilder, u"CTL_RECT"_ustr, m_aCtlRect)) + , m_xFlAngle(m_xBuilder->weld_widget(u"FL_ANGLE"_ustr)) + , m_xNfAngle(m_xBuilder->weld_metric_spin_button(u"NF_ANGLE"_ustr, FieldUnit::DEGREE)) , m_xCtlAngle(new svx::DialControl) - , m_xCtlAngleWin(new weld::CustomWeld(*m_xBuilder, "CTL_ANGLE", *m_xCtlAngle)) + , m_xCtlAngleWin(new weld::CustomWeld(*m_xBuilder, u"CTL_ANGLE"_ustr, *m_xCtlAngle)) { // calculate PoolUnit SfxItemPool* pPool = rInAttrs.GetPool(); @@ -377,13 +377,13 @@ void SvxAngleTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint eR |* \************************************************************************/ SvxSlantTabPage::SvxSlantTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SfxTabPage(pPage, pController, "cui/ui/slantcornertabpage.ui", "SlantAndCornerRadius", &rInAttrs) + : SfxTabPage(pPage, pController, u"cui/ui/slantcornertabpage.ui"_ustr, u"SlantAndCornerRadius"_ustr, &rInAttrs) , pView(nullptr) , eDlgUnit(FieldUnit::NONE) - , m_xFlRadius(m_xBuilder->weld_widget("FL_RADIUS")) - , m_xMtrRadius(m_xBuilder->weld_metric_spin_button("MTR_FLD_RADIUS", FieldUnit::CM)) - , m_xFlAngle(m_xBuilder->weld_widget("FL_SLANT")) - , m_xMtrAngle(m_xBuilder->weld_metric_spin_button("MTR_FLD_ANGLE", FieldUnit::DEGREE)) + , m_xFlRadius(m_xBuilder->weld_widget(u"FL_RADIUS"_ustr)) + , m_xMtrRadius(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_RADIUS"_ustr, FieldUnit::CM)) + , m_xFlAngle(m_xBuilder->weld_widget(u"FL_SLANT"_ustr)) + , m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_ANGLE"_ustr, FieldUnit::DEGREE)) { for (int i = 0; i < 2; ++i) { @@ -553,7 +553,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) // corner radius if(!pView->IsEdgeRadiusAllowed()) { - m_xMtrRadius->set_text(""); + m_xMtrRadius->set_text(u""_ustr); m_xFlRadius->set_sensitive(false); } else @@ -568,7 +568,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) } else { - m_xMtrRadius->set_text(""); + m_xMtrRadius->set_text(u""_ustr); } } @@ -577,7 +577,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) // slant: angle if( !pView->IsShearAllowed() ) { - m_xMtrAngle->set_text( "" ); + m_xMtrAngle->set_text( u""_ustr ); m_xFlAngle->set_sensitive(false); } else @@ -590,7 +590,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) } else { - m_xMtrAngle->set_text(""); + m_xMtrAngle->set_text(u""_ustr); } } @@ -717,7 +717,7 @@ DeactivateRC SvxSlantTabPage::DeactivatePage( SfxItemSet* _pSet ) |* \************************************************************************/ SvxPositionSizeTabPage::SvxPositionSizeTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) - : SvxTabPage(pPage, pController, "cui/ui/possizetabpage.ui", "PositionAndSize", rInAttrs) + : SvxTabPage(pPage, pController, u"cui/ui/possizetabpage.ui"_ustr, u"PositionAndSize"_ustr, rInAttrs) , mrOutAttrs(rInAttrs) , mpView(nullptr) , meDlgUnit(FieldUnit::NONE) @@ -734,26 +734,26 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(weld::Container* pPage, weld::Dia , m_aCtlSize(this) , m_aRatioTop(ConnectorType::Top) , m_aRatioBottom(ConnectorType::Bottom) - , m_xFlPosition(m_xBuilder->weld_widget("FL_POSITION")) - , m_xMtrPosX(m_xBuilder->weld_metric_spin_button("MTR_FLD_POS_X", FieldUnit::CM)) - , m_xMtrPosY(m_xBuilder->weld_metric_spin_button("MTR_FLD_POS_Y", FieldUnit::CM)) - , m_xCtlPos(new weld::CustomWeld(*m_xBuilder, "CTL_POSRECT", m_aCtlPos)) - , m_xFlSize(m_xBuilder->weld_widget("FL_SIZE")) - , m_xFtWidth(m_xBuilder->weld_label("FT_WIDTH")) - , m_xMtrWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_WIDTH", FieldUnit::CM)) - , m_xFtHeight(m_xBuilder->weld_label("FT_HEIGHT")) - , m_xMtrHeight(m_xBuilder->weld_metric_spin_button("MTR_FLD_HEIGHT", FieldUnit::CM)) - , m_xCbxScale(m_xBuilder->weld_check_button("CBX_SCALE")) - , m_xCbxScaleImg(m_xBuilder->weld_image("imRatio")) - , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, "daRatioTop", m_aRatioTop)) - , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, "daRatioBottom", m_aRatioBottom)) - , m_xCtlSize(new weld::CustomWeld(*m_xBuilder, "CTL_SIZERECT", m_aCtlSize)) - , m_xFlProtect(m_xBuilder->weld_widget("FL_PROTECT")) - , m_xTsbPosProtect(m_xBuilder->weld_check_button("TSB_POSPROTECT")) - , m_xTsbSizeProtect(m_xBuilder->weld_check_button("TSB_SIZEPROTECT")) - , m_xFlAdjust(m_xBuilder->weld_widget("FL_ADJUST")) - , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button("TSB_AUTOGROW_WIDTH")) - , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button("TSB_AUTOGROW_HEIGHT")) + , m_xFlPosition(m_xBuilder->weld_widget(u"FL_POSITION"_ustr)) + , m_xMtrPosX(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_X"_ustr, FieldUnit::CM)) + , m_xMtrPosY(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_Y"_ustr, FieldUnit::CM)) + , m_xCtlPos(new weld::CustomWeld(*m_xBuilder, u"CTL_POSRECT"_ustr, m_aCtlPos)) + , m_xFlSize(m_xBuilder->weld_widget(u"FL_SIZE"_ustr)) + , m_xFtWidth(m_xBuilder->weld_label(u"FT_WIDTH"_ustr)) + , m_xMtrWidth(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_WIDTH"_ustr, FieldUnit::CM)) + , m_xFtHeight(m_xBuilder->weld_label(u"FT_HEIGHT"_ustr)) + , m_xMtrHeight(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_HEIGHT"_ustr, FieldUnit::CM)) + , m_xCbxScale(m_xBuilder->weld_check_button(u"CBX_SCALE"_ustr)) + , m_xCbxScaleImg(m_xBuilder->weld_image(u"imRatio"_ustr)) + , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, u"daRatioTop"_ustr, m_aRatioTop)) + , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, u"daRatioBottom"_ustr, m_aRatioBottom)) + , m_xCtlSize(new weld::CustomWeld(*m_xBuilder, u"CTL_SIZERECT"_ustr, m_aCtlSize)) + , m_xFlProtect(m_xBuilder->weld_widget(u"FL_PROTECT"_ustr)) + , m_xTsbPosProtect(m_xBuilder->weld_check_button(u"TSB_POSPROTECT"_ustr)) + , m_xTsbSizeProtect(m_xBuilder->weld_check_button(u"TSB_SIZEPROTECT"_ustr)) + , m_xFlAdjust(m_xBuilder->weld_widget(u"FL_ADJUST"_ustr)) + , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_WIDTH"_ustr)) + , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_HEIGHT"_ustr)) { // this page needs ExchangeSupport SetExchangeSupport(); @@ -839,8 +839,8 @@ void SvxPositionSizeTabPage::Construct() if(maAnchor != basegfx::B2DPoint(pObj->GetAnchorPos().X(), pObj->GetAnchorPos().Y())) { // different anchor positions - m_xMtrPosX->set_text(""); - m_xMtrPosY->set_text(""); + m_xMtrPosX->set_text(u""_ustr); + m_xMtrPosY->set_text(u""_ustr); mbPageDisabled = true; return; } @@ -1573,7 +1573,7 @@ IMPL_LINK_NOARG(SvxPositionSizeTabPage, ClickAutoHdl, weld::Toggleable&, void) void SvxPositionSizeTabPage::FillUserData() { // matching is saved in the Ini-file - OUString aStr = m_xCbxScale->get_active() ? OUString("1") : OUString("0"); + OUString aStr = m_xCbxScale->get_active() ? u"1"_ustr : u"0"_ustr; SetUserData( aStr ); } |