diff options
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/CommandCategoryListBox.cxx | 10 | ||||
-rw-r--r-- | cui/source/customize/CustomNotebookbarGenerator.cxx | 23 | ||||
-rw-r--r-- | cui/source/customize/SvxConfigPageHelper.cxx | 24 | ||||
-rw-r--r-- | cui/source/customize/SvxMenuConfigPage.cxx | 50 | ||||
-rw-r--r-- | cui/source/customize/SvxNotebookbarConfigPage.cxx | 20 | ||||
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 62 | ||||
-rw-r--r-- | cui/source/customize/acccfg.cxx | 39 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 120 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 44 | ||||
-rw-r--r-- | cui/source/customize/eventdlg.cxx | 14 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 30 |
11 files changed, 220 insertions, 216 deletions
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)); } |