diff options
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/EnumContext.cxx | 104 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 126 | ||||
-rw-r--r-- | vcl/source/window/cursor.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 20 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/keycod.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 14 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 194 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 8 |
14 files changed, 252 insertions, 252 deletions
diff --git a/vcl/source/window/EnumContext.cxx b/vcl/source/window/EnumContext.cxx index ffe065568282..46486f98f82d 100644 --- a/vcl/source/window/EnumContext.cxx +++ b/vcl/source/window/EnumContext.cxx @@ -110,20 +110,20 @@ void EnumContext::ProvideApplicationContainers() if (!maApplicationMap.empty()) return; - AddEntry("com.sun.star.text.TextDocument", EnumContext::Application::Writer); - AddEntry("com.sun.star.text.GlobalDocument", EnumContext::Application::WriterGlobal); - AddEntry("com.sun.star.text.WebDocument", EnumContext::Application::WriterWeb); - AddEntry("com.sun.star.xforms.XMLFormDocument", EnumContext::Application::WriterXML); - AddEntry("com.sun.star.sdb.FormDesign", EnumContext::Application::WriterForm); - AddEntry("com.sun.star.sdb.TextReportDesign", EnumContext::Application::WriterReport); - AddEntry("com.sun.star.sheet.SpreadsheetDocument", EnumContext::Application::Calc); - AddEntry("com.sun.star.chart2.ChartDocument", EnumContext::Application::Chart); - AddEntry("com.sun.star.drawing.DrawingDocument", EnumContext::Application::Draw); - AddEntry("com.sun.star.presentation.PresentationDocument", EnumContext::Application::Impress); - AddEntry("com.sun.star.formula.FormulaProperties", EnumContext::Application::Formula); - AddEntry("com.sun.star.sdb.OfficeDatabaseDocument", EnumContext::Application::Base); - AddEntry("any", EnumContext::Application::Any); - AddEntry("none", EnumContext::Application::NONE); + AddEntry(u"com.sun.star.text.TextDocument"_ustr, EnumContext::Application::Writer); + AddEntry(u"com.sun.star.text.GlobalDocument"_ustr, EnumContext::Application::WriterGlobal); + AddEntry(u"com.sun.star.text.WebDocument"_ustr, EnumContext::Application::WriterWeb); + AddEntry(u"com.sun.star.xforms.XMLFormDocument"_ustr, EnumContext::Application::WriterXML); + AddEntry(u"com.sun.star.sdb.FormDesign"_ustr, EnumContext::Application::WriterForm); + AddEntry(u"com.sun.star.sdb.TextReportDesign"_ustr, EnumContext::Application::WriterReport); + AddEntry(u"com.sun.star.sheet.SpreadsheetDocument"_ustr, EnumContext::Application::Calc); + AddEntry(u"com.sun.star.chart2.ChartDocument"_ustr, EnumContext::Application::Chart); + AddEntry(u"com.sun.star.drawing.DrawingDocument"_ustr, EnumContext::Application::Draw); + AddEntry(u"com.sun.star.presentation.PresentationDocument"_ustr, EnumContext::Application::Impress); + AddEntry(u"com.sun.star.formula.FormulaProperties"_ustr, EnumContext::Application::Formula); + AddEntry(u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr, EnumContext::Application::Base); + AddEntry(u"any"_ustr, EnumContext::Application::Any); + AddEntry(u"none"_ustr, EnumContext::Application::NONE); } @@ -156,46 +156,46 @@ void EnumContext::ProvideContextContainers() if (!maContextMap.empty()) return; - AddEntry("3DObject", Context::ThreeDObject); - AddEntry("Annotation", Context::Annotation); - AddEntry("Auditing", Context::Auditing); - AddEntry("Axis", Context::Axis); - AddEntry("Cell", Context::Cell); - AddEntry("Chart", Context::Chart); - AddEntry("ChartElements", Context::ChartElements); - AddEntry("Draw", Context::Draw); - AddEntry("DrawFontwork", Context::DrawFontwork); - AddEntry("DrawLine", Context::DrawLine); - AddEntry("DrawPage", Context::DrawPage); - AddEntry("DrawText", Context::DrawText); - AddEntry("EditCell", Context::EditCell); - AddEntry("ErrorBar", Context::ErrorBar); - AddEntry("Form", Context::Form); - AddEntry("Frame", Context::Frame); - AddEntry("Graphic", Context::Graphic); - AddEntry("Grid", Context::Grid); - AddEntry("HandoutPage", Context::HandoutPage); - AddEntry("MasterPage", Context::MasterPage); - AddEntry("Math", Context::Math); - AddEntry("Media", Context::Media); - AddEntry("MultiObject", Context::MultiObject); - AddEntry("NotesPage", Context::NotesPage); - AddEntry("OLE", Context::OLE); - AddEntry("OutlineText", Context::OutlineText); - AddEntry("Pivot", Context::Pivot); - AddEntry("Printpreview", Context::Printpreview); - AddEntry("Series", Context::Series); - AddEntry("SlidesorterPage", Context::SlidesorterPage); - AddEntry("Table", Context::Table); - AddEntry("Text", Context::Text); - AddEntry("TextObject", Context::TextObject); - AddEntry("Trendline", Context::Trendline); - AddEntry("Sparkline", Context::Sparkline); + AddEntry(u"3DObject"_ustr, Context::ThreeDObject); + AddEntry(u"Annotation"_ustr, Context::Annotation); + AddEntry(u"Auditing"_ustr, Context::Auditing); + AddEntry(u"Axis"_ustr, Context::Axis); + AddEntry(u"Cell"_ustr, Context::Cell); + AddEntry(u"Chart"_ustr, Context::Chart); + AddEntry(u"ChartElements"_ustr, Context::ChartElements); + AddEntry(u"Draw"_ustr, Context::Draw); + AddEntry(u"DrawFontwork"_ustr, Context::DrawFontwork); + AddEntry(u"DrawLine"_ustr, Context::DrawLine); + AddEntry(u"DrawPage"_ustr, Context::DrawPage); + AddEntry(u"DrawText"_ustr, Context::DrawText); + AddEntry(u"EditCell"_ustr, Context::EditCell); + AddEntry(u"ErrorBar"_ustr, Context::ErrorBar); + AddEntry(u"Form"_ustr, Context::Form); + AddEntry(u"Frame"_ustr, Context::Frame); + AddEntry(u"Graphic"_ustr, Context::Graphic); + AddEntry(u"Grid"_ustr, Context::Grid); + AddEntry(u"HandoutPage"_ustr, Context::HandoutPage); + AddEntry(u"MasterPage"_ustr, Context::MasterPage); + AddEntry(u"Math"_ustr, Context::Math); + AddEntry(u"Media"_ustr, Context::Media); + AddEntry(u"MultiObject"_ustr, Context::MultiObject); + AddEntry(u"NotesPage"_ustr, Context::NotesPage); + AddEntry(u"OLE"_ustr, Context::OLE); + AddEntry(u"OutlineText"_ustr, Context::OutlineText); + AddEntry(u"Pivot"_ustr, Context::Pivot); + AddEntry(u"Printpreview"_ustr, Context::Printpreview); + AddEntry(u"Series"_ustr, Context::Series); + AddEntry(u"SlidesorterPage"_ustr, Context::SlidesorterPage); + AddEntry(u"Table"_ustr, Context::Table); + AddEntry(u"Text"_ustr, Context::Text); + AddEntry(u"TextObject"_ustr, Context::TextObject); + AddEntry(u"Trendline"_ustr, Context::Trendline); + AddEntry(u"Sparkline"_ustr, Context::Sparkline); // other general contexts - AddEntry("any", Context::Any); - AddEntry("default", Context::Default); - AddEntry("empty", Context::Empty); + AddEntry(u"any"_ustr, Context::Any); + AddEntry(u"default"_ustr, Context::Default); + AddEntry(u"empty"_ustr, Context::Empty); } EnumContext::Context EnumContext::GetContextEnum (const OUString& rsContextName) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 225ad1b6f1c4..ed8d349f2dac 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -479,7 +479,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr catch (const css::uno::Exception &rExcept) { TOOLS_WARN_EXCEPTION("vcl.builder", "Unable to read .ui file " << sUIDir << sUIFile); - CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message, CrashReporter::Write); + CrashReporter::addKeyValue(u"VclBuilderException"_ustr, "Unable to read .ui file: " + rExcept.Message, CrashReporter::Write); assert(false && "missing ui file or missing gb_CppunitTest_use_uiconfigs dependency"); throw; } @@ -796,7 +796,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr officecfg::Office::Common::Help::HelpRootURL::get().isEmpty(); if (bHideHelp) { - if (vcl::Window *pHelpButton = get("help")) + if (vcl::Window *pHelpButton = get(u"help"_ustr)) pHelpButton->Hide(); } } @@ -829,7 +829,7 @@ namespace bool extractHasFrame(VclBuilder::stringmap& rMap) { bool bHasFrame = true; - VclBuilder::stringmap::iterator aFind = rMap.find("has-frame"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"has-frame"_ustr); if (aFind != rMap.end()) { bHasFrame = toBool(aFind->second); @@ -841,7 +841,7 @@ namespace bool extractDrawValue(VclBuilder::stringmap& rMap) { bool bDrawValue = true; - VclBuilder::stringmap::iterator aFind = rMap.find("draw-value"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"draw-value"_ustr); if (aFind != rMap.end()) { bDrawValue = toBool(aFind->second); @@ -853,7 +853,7 @@ namespace OUString extractPopupMenu(VclBuilder::stringmap& rMap) { OUString sRet; - VclBuilder::stringmap::iterator aFind = rMap.find("popup"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"popup"_ustr); if (aFind != rMap.end()) { sRet = aFind->second; @@ -865,7 +865,7 @@ namespace OUString extractWidgetName(VclBuilder::stringmap& rMap) { OUString sRet; - VclBuilder::stringmap::iterator aFind = rMap.find("name"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"name"_ustr); if (aFind != rMap.end()) { sRet = aFind->second; @@ -876,8 +876,8 @@ namespace OUString extractValuePos(VclBuilder::stringmap& rMap) { - OUString sRet("top"); - VclBuilder::stringmap::iterator aFind = rMap.find("value-pos"); + OUString sRet(u"top"_ustr); + VclBuilder::stringmap::iterator aFind = rMap.find(u"value-pos"_ustr); if (aFind != rMap.end()) { sRet = aFind->second; @@ -888,8 +888,8 @@ namespace OUString extractTypeHint(VclBuilder::stringmap &rMap) { - OUString sRet("normal"); - VclBuilder::stringmap::iterator aFind = rMap.find("type-hint"); + OUString sRet(u"normal"_ustr); + VclBuilder::stringmap::iterator aFind = rMap.find(u"type-hint"_ustr); if (aFind != rMap.end()) { sRet = aFind->second; @@ -901,7 +901,7 @@ namespace bool extractResizable(VclBuilder::stringmap &rMap) { bool bResizable = true; - VclBuilder::stringmap::iterator aFind = rMap.find("resizable"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"resizable"_ustr); if (aFind != rMap.end()) { bResizable = toBool(aFind->second); @@ -914,7 +914,7 @@ namespace bool extractModal(VclBuilder::stringmap &rMap) { bool bModal = false; - VclBuilder::stringmap::iterator aFind = rMap.find("modal"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"modal"_ustr); if (aFind != rMap.end()) { bModal = toBool(aFind->second); @@ -927,7 +927,7 @@ namespace bool extractDecorated(VclBuilder::stringmap &rMap) { bool bDecorated = true; - VclBuilder::stringmap::iterator aFind = rMap.find("decorated"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"decorated"_ustr); if (aFind != rMap.end()) { bDecorated = toBool(aFind->second); @@ -939,7 +939,7 @@ namespace bool extractCloseable(VclBuilder::stringmap &rMap) { bool bCloseable = true; - VclBuilder::stringmap::iterator aFind = rMap.find("deletable"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"deletable"_ustr); if (aFind != rMap.end()) { bCloseable = toBool(aFind->second); @@ -951,7 +951,7 @@ namespace bool extractEntry(VclBuilder::stringmap &rMap) { bool bHasEntry = false; - VclBuilder::stringmap::iterator aFind = rMap.find("has-entry"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"has-entry"_ustr); if (aFind != rMap.end()) { bHasEntry = toBool(aFind->second); @@ -963,7 +963,7 @@ namespace bool extractOrientation(VclBuilder::stringmap &rMap) { bool bVertical = false; - VclBuilder::stringmap::iterator aFind = rMap.find("orientation"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"orientation"_ustr); if (aFind != rMap.end()) { bVertical = aFind->second.equalsIgnoreAsciiCase("vertical"); @@ -975,7 +975,7 @@ namespace bool extractVerticalTabPos(VclBuilder::stringmap &rMap) { bool bVertical = false; - VclBuilder::stringmap::iterator aFind = rMap.find("tab-pos"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"tab-pos"_ustr); if (aFind != rMap.end()) { bVertical = aFind->second.equalsIgnoreAsciiCase("left") || @@ -988,7 +988,7 @@ namespace bool extractVerticalTabsWithIcons(VclBuilder::stringmap &rMap) { bool bWithIcons = false; - VclBuilder::stringmap::iterator aFind = rMap.find("group-name"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"group-name"_ustr); if (aFind != rMap.end()) { bWithIcons = aFind->second.equalsIgnoreAsciiCase("icons"); @@ -1000,7 +1000,7 @@ namespace bool extractInconsistent(VclBuilder::stringmap &rMap) { bool bInconsistent = false; - VclBuilder::stringmap::iterator aFind = rMap.find("inconsistent"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"inconsistent"_ustr); if (aFind != rMap.end()) { bInconsistent = toBool(aFind->second); @@ -1014,7 +1014,7 @@ namespace OUString sIconName; // allow pixbuf, but prefer icon-name { - VclBuilder::stringmap::iterator aFind = rMap.find("pixbuf"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"pixbuf"_ustr); if (aFind != rMap.end()) { sIconName = aFind->second; @@ -1022,7 +1022,7 @@ namespace } } { - VclBuilder::stringmap::iterator aFind = rMap.find("icon-name"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"icon-name"_ustr); if (aFind != rMap.end()) { sIconName = aFind->second; @@ -1038,7 +1038,7 @@ namespace WinBits extractRelief(VclBuilder::stringmap &rMap) { WinBits nBits = WB_3DLOOK; - VclBuilder::stringmap::iterator aFind = rMap.find("relief"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"relief"_ustr); if (aFind != rMap.end()) { assert(aFind->second != "half" && "relief of 'half' unsupported"); @@ -1052,7 +1052,7 @@ namespace OUString extractLabel(VclBuilder::stringmap &rMap) { OUString sType; - VclBuilder::stringmap::iterator aFind = rMap.find("label"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"label"_ustr); if (aFind != rMap.end()) { sType = aFind->second; @@ -1064,7 +1064,7 @@ namespace OUString extractActionName(VclBuilder::stringmap &rMap) { OUString sActionName; - VclBuilder::stringmap::iterator aFind = rMap.find("action-name"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"action-name"_ustr); if (aFind != rMap.end()) { sActionName = aFind->second; @@ -1076,7 +1076,7 @@ namespace bool extractVisible(VclBuilder::stringmap &rMap) { bool bRet = false; - VclBuilder::stringmap::iterator aFind = rMap.find("visible"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"visible"_ustr); if (aFind != rMap.end()) { bRet = toBool(aFind->second); @@ -1087,15 +1087,15 @@ namespace Size extractSizeRequest(VclBuilder::stringmap &rMap) { - OUString sWidthRequest("0"); - OUString sHeightRequest("0"); - VclBuilder::stringmap::iterator aFind = rMap.find("width-request"); + OUString sWidthRequest(u"0"_ustr); + OUString sHeightRequest(u"0"_ustr); + VclBuilder::stringmap::iterator aFind = rMap.find(u"width-request"_ustr); if (aFind != rMap.end()) { sWidthRequest = aFind->second; rMap.erase(aFind); } - aFind = rMap.find("height-request"); + aFind = rMap.find(u"height-request"_ustr); if (aFind != rMap.end()) { sHeightRequest = aFind->second; @@ -1107,9 +1107,9 @@ namespace OUString extractTooltipText(VclBuilder::stringmap &rMap) { OUString sTooltipText; - VclBuilder::stringmap::iterator aFind = rMap.find("tooltip-text"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"tooltip-text"_ustr); if (aFind == rMap.end()) - aFind = rMap.find("tooltip-markup"); + aFind = rMap.find(u"tooltip-markup"_ustr); if (aFind != rMap.end()) { sTooltipText = aFind->second; @@ -1121,7 +1121,7 @@ namespace float extractAlignment(VclBuilder::stringmap &rMap) { float f = 0.0; - VclBuilder::stringmap::iterator aFind = rMap.find("alignment"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"alignment"_ustr); if (aFind != rMap.end()) { f = aFind->second.toFloat(); @@ -1133,7 +1133,7 @@ namespace OUString extractTitle(VclBuilder::stringmap &rMap) { OUString sTitle; - VclBuilder::stringmap::iterator aFind = rMap.find("title"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"title"_ustr); if (aFind != rMap.end()) { sTitle = aFind->second; @@ -1145,7 +1145,7 @@ namespace bool extractHeadersVisible(VclBuilder::stringmap &rMap) { bool bHeadersVisible = true; - VclBuilder::stringmap::iterator aFind = rMap.find("headers-visible"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"headers-visible"_ustr); if (aFind != rMap.end()) { bHeadersVisible = toBool(aFind->second); @@ -1157,7 +1157,7 @@ namespace bool extractSortIndicator(VclBuilder::stringmap &rMap) { bool bSortIndicator = false; - VclBuilder::stringmap::iterator aFind = rMap.find("sort-indicator"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"sort-indicator"_ustr); if (aFind != rMap.end()) { bSortIndicator = toBool(aFind->second); @@ -1169,7 +1169,7 @@ namespace bool extractClickable(VclBuilder::stringmap &rMap) { bool bClickable = false; - VclBuilder::stringmap::iterator aFind = rMap.find("clickable"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"clickable"_ustr); if (aFind != rMap.end()) { bClickable = toBool(aFind->second); @@ -1259,7 +1259,7 @@ namespace void VclBuilder::extractGroup(const OUString &id, stringmap &rMap) { - VclBuilder::stringmap::iterator aFind = rMap.find("group"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"group"_ustr); if (aFind != rMap.end()) { OUString sID = aFind->second; @@ -1285,7 +1285,7 @@ void VclBuilder::connectFormattedFormatterAdjustment(const OUString &id, const O bool VclBuilder::extractAdjustmentToMap(const OUString& id, VclBuilder::stringmap& rMap, std::vector<WidgetAdjustmentMap>& rAdjustmentMap) { - VclBuilder::stringmap::iterator aFind = rMap.find("adjustment"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"adjustment"_ustr); if (aFind != rMap.end()) { rAdjustmentMap.emplace_back(id, aFind->second); @@ -1300,7 +1300,7 @@ namespace sal_Int32 extractActive(VclBuilder::stringmap &rMap) { sal_Int32 nActiveId = 0; - VclBuilder::stringmap::iterator aFind = rMap.find("active"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"active"_ustr); if (aFind != rMap.end()) { nActiveId = aFind->second.toInt32(); @@ -1312,7 +1312,7 @@ namespace bool extractSelectable(VclBuilder::stringmap &rMap) { bool bSelectable = false; - VclBuilder::stringmap::iterator aFind = rMap.find("selectable"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"selectable"_ustr); if (aFind != rMap.end()) { bSelectable = toBool(aFind->second); @@ -1324,7 +1324,7 @@ namespace OUString extractAdjustment(VclBuilder::stringmap &rMap) { OUString sAdjustment; - VclBuilder::stringmap::iterator aFind = rMap.find("adjustment"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"adjustment"_ustr); if (aFind != rMap.end()) { sAdjustment= aFind->second; @@ -1337,7 +1337,7 @@ namespace bool extractDrawIndicator(VclBuilder::stringmap &rMap) { bool bDrawIndicator = false; - VclBuilder::stringmap::iterator aFind = rMap.find("draw-indicator"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"draw-indicator"_ustr); if (aFind != rMap.end()) { bDrawIndicator = toBool(aFind->second); @@ -1349,7 +1349,7 @@ namespace void VclBuilder::extractModel(const OUString &id, stringmap &rMap) { - VclBuilder::stringmap::iterator aFind = rMap.find("model"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"model"_ustr); if (aFind != rMap.end()) { m_pParserState->m_aModelMaps.emplace_back(id, aFind->second, @@ -1360,7 +1360,7 @@ void VclBuilder::extractModel(const OUString &id, stringmap &rMap) void VclBuilder::extractBuffer(const OUString &id, stringmap &rMap) { - VclBuilder::stringmap::iterator aFind = rMap.find("buffer"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"buffer"_ustr); if (aFind != rMap.end()) { m_pParserState->m_aTextBufferMaps.emplace_back(id, aFind->second); @@ -1371,7 +1371,7 @@ void VclBuilder::extractBuffer(const OUString &id, stringmap &rMap) int VclBuilder::getImageSize(const stringmap &rMap) { int nSize = 4; - auto aFind = rMap.find("icon-size"); + auto aFind = rMap.find(u"icon-size"_ustr); if (aFind != rMap.end()) nSize = aFind->second.toInt32(); return nSize; @@ -1379,7 +1379,7 @@ int VclBuilder::getImageSize(const stringmap &rMap) void VclBuilder::extractButtonImage(const OUString &id, stringmap &rMap, bool bRadio) { - VclBuilder::stringmap::iterator aFind = rMap.find("image"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"image"_ustr); if (aFind != rMap.end()) { m_pParserState->m_aButtonImageWidgetMaps.emplace_back(id, aFind->second, bRadio); @@ -1389,7 +1389,7 @@ void VclBuilder::extractButtonImage(const OUString &id, stringmap &rMap, bool bR void VclBuilder::extractMnemonicWidget(const OUString &rLabelID, stringmap &rMap) { - VclBuilder::stringmap::iterator aFind = rMap.find("mnemonic-widget"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"mnemonic-widget"_ustr); if (aFind != rMap.end()) { OUString sID = aFind->second; @@ -1423,9 +1423,9 @@ void VclBuilder::cleanupWidgetOwnScrolling(vcl::Window *pScrollParent, vcl::Wind { //remove the redundant scrolling parent sal_Int32 nWidthReq = pScrollParent->get_width_request(); - rMap["width-request"] = OUString::number(nWidthReq); + rMap[u"width-request"_ustr] = OUString::number(nWidthReq); sal_Int32 nHeightReq = pScrollParent->get_height_request(); - rMap["height-request"] = OUString::number(nHeightReq); + rMap[u"height-request"_ustr] = OUString::number(nHeightReq); m_pParserState->m_aRedundantParentWidgets[pScrollParent] = pWindow; } @@ -1529,7 +1529,7 @@ namespace // Takes a string like "sfxlo-NotebookbarToolBox" VclBuilder::customMakeWidget GetCustomMakeWidget(const OUString& rName) { - const OUString name = rName == "sfxlo-SidebarToolBox" ? "sfxlo-NotebookbarToolBox" : rName; + const OUString name = rName == "sfxlo-SidebarToolBox" ? u"sfxlo-NotebookbarToolBox"_ustr : rName; VclBuilder::customMakeWidget pFunction = nullptr; if (sal_Int32 nDelim = name.indexOf('-'); nDelim != -1) { @@ -1884,7 +1884,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString } else if (name == "GtkIconView") { - assert(rMap.find("model") != rMap.end() && "GtkIconView must have a model"); + assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkIconView must have a model"); //window we want to apply the packing props for this GtkIconView to VclPtr<vcl::Window> xWindowForPackingProps; @@ -1907,7 +1907,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString { if (!m_bLegacy) { - assert(rMap.find("model") != rMap.end() && "GtkTreeView must have a model"); + assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkTreeView must have a model"); } //window we want to apply the packing props for this GtkTreeView to @@ -2022,7 +2022,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString //full screen windows if (!pParent) { - rMap["visible"] = "false"; + rMap[u"visible"_ustr] = "false"; } } else if (name == "GtkSeparator") @@ -2115,7 +2115,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString } else if(name == "NotebookBarAddonsToolMergePoint") { - customMakeWidget pFunction = GetCustomMakeWidget("sfxlo-NotebookbarToolBox"); + customMakeWidget pFunction = GetCustomMakeWidget(u"sfxlo-NotebookbarToolBox"_ustr); if(pFunction != nullptr) NotebookBarAddonsMerger::MergeNotebookBarAddons(pParent, pFunction, m_xFrame, *m_pNotebookBarAddonsItem, rMap); return nullptr; @@ -2288,7 +2288,7 @@ namespace BuilderUtils OUString extractCustomProperty(VclBuilder::stringmap &rMap) { OUString sCustomProperty; - VclBuilder::stringmap::iterator aFind = rMap.find("customproperty"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"customproperty"_ustr); if (aFind != rMap.end()) { sCustomProperty = aFind->second; @@ -2299,7 +2299,7 @@ namespace BuilderUtils void ensureDefaultWidthChars(VclBuilder::stringmap &rMap) { - OUString sWidthChars("width-chars"); + OUString sWidthChars(u"width-chars"_ustr); VclBuilder::stringmap::iterator aFind = rMap.find(sWidthChars); if (aFind == rMap.end()) rMap[sWidthChars] = "20"; @@ -2308,7 +2308,7 @@ namespace BuilderUtils bool extractDropdown(VclBuilder::stringmap &rMap) { bool bDropdown = true; - VclBuilder::stringmap::iterator aFind = rMap.find("dropdown"); + VclBuilder::stringmap::iterator aFind = rMap.find(u"dropdown"_ustr); if (aFind != rMap.end()) { bDropdown = toBool(aFind->second); @@ -2541,7 +2541,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OUStrin // tdf#119827 handle size before scale so we can trivially // scale on the current font size whether size is present // or not. - VclBuilder::stringmap::iterator aSize = rPango.find("size"); + VclBuilder::stringmap::iterator aSize = rPango.find(u"size"_ustr); if (aSize != rPango.end()) { pCurrentChild->set_font_attribute(aSize->first, aSize->second); @@ -2599,7 +2599,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read sal_Int32 nDelim = sID.indexOf(':'); if (nDelim != -1) { - aProperties["customproperty"] = sID.copy(nDelim + 1); + aProperties[u"customproperty"_ustr] = sID.copy(nDelim + 1); sID = sID.copy(0, nDelim); } sIDs.push_back(sID); @@ -2638,7 +2638,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read VerticalTabControl *pVerticalTabControl = pParent->GetType() == WindowType::VERTICALTABCONTROL ? static_cast<VerticalTabControl*>(pParent) : nullptr; assert(pTabControl || pVerticalTabControl); - VclBuilder::stringmap::iterator aFind = aProperties.find("label"); + VclBuilder::stringmap::iterator aFind = aProperties.find(u"label"_ustr); if (aFind != aProperties.end()) { OUString sTooltip(extractTooltipText(aProperties)); @@ -2960,7 +2960,7 @@ void BuilderBase::collectAtkRoleAttribute(xmlreader::XmlReader& reader, stringma } if (!sProperty.isEmpty()) - rMap["role"] = sProperty; + rMap[u"role"_ustr] = sProperty; } void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OUString &rID) @@ -3339,7 +3339,7 @@ void VclBuilder::handleMenuObject(Menu *pParent, xmlreader::XmlReader &reader) accelmap aAccelerators; if (!sCustomProperty.isEmpty()) - aProperties["customproperty"] = sCustomProperty; + aProperties[u"customproperty"_ustr] = sCustomProperty; while(true) { @@ -3656,7 +3656,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, stringmap *pA std::vector<ComboBoxTextItem> aItems; if (!sCustomProperty.isEmpty()) - aProperties["customproperty"] = sCustomProperty; + aProperties[u"customproperty"_ustr] = sCustomProperty; VclPtr<vcl::Window> pCurrentChild; while(true) diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index d160e8aa73ef..6c9d7577aa41 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -236,8 +236,8 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore ) mpData->maTimer.Start(); else if ( !mpData->mbCurVisible ) ImplDraw(); - LOKNotify( pWindow, "cursor_invalidate" ); - LOKNotify( pWindow, "cursor_visible" ); + LOKNotify( pWindow, u"cursor_invalidate"_ustr ); + LOKNotify( pWindow, u"cursor_visible"_ustr ); } } @@ -297,7 +297,7 @@ bool vcl::Cursor::ImplDoHide( bool bSuspend ) if ( !bSuspend ) { - LOKNotify( mpData->mpWindow, "cursor_visible" ); + LOKNotify( mpData->mpWindow, u"cursor_visible"_ustr ); mpData->maTimer.Stop(); mpData->mpWindow = nullptr; } @@ -336,7 +336,7 @@ void vcl::Cursor::ImplNew() ImplDraw(); if ( !mpWindow ) { - LOKNotify( mpData->mpWindow, "cursor_invalidate" ); + LOKNotify( mpData->mpWindow, u"cursor_invalidate"_ustr ); if ( mpData->maTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME ) mpData->maTimer.Start(); } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 1ba812c94197..aa8f3d1d4b4c 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -556,7 +556,7 @@ void VclBuilderContainer::disposeBuilder() OUString AllSettings::GetUIRootDir() { - OUString sShareLayer("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/"); + OUString sShareLayer(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/"_ustr); rtl::Bootstrap::expandMacros(sShareLayer); return sShareLayer; } @@ -641,7 +641,7 @@ void Dialog::dispose() if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { if (bTunnelingEnabled) - pNotifier->notifyWindow(GetLOKWindowId(), "close"); + pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr); ReleaseLOKNotifier(); } } @@ -773,8 +773,8 @@ void Dialog::StateChanged( StateChangedType nType ) if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { - pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); - pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); + pNotifier->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems); + pNotifier->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems); } else { @@ -782,7 +782,7 @@ void Dialog::StateChanged( StateChangedType nType ) if (pViewShell) { SetLOKNotifier(pViewShell); - pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems); + pViewShell->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems); } } } @@ -807,7 +807,7 @@ void Dialog::StateChanged( StateChangedType nType ) { std::vector<vcl::LOKPayloadItem> aPayload; aPayload.emplace_back("title", GetText().toUtf8()); - pNotifier->notifyWindow(GetLOKWindowId(), "title_changed", aPayload); + pNotifier->notifyWindow(GetLOKWindowId(), u"title_changed"_ustr, aPayload); } } @@ -826,7 +826,7 @@ void Dialog::StateChanged( StateChangedType nType ) { std::vector<vcl::LOKPayloadItem> aPayload; aPayload.emplace_back("title", GetText().toUtf8()); - pNotifier->notifyWindow(GetLOKWindowId(), IsVisible()? OUString("show"): OUString("hide"), aPayload); + pNotifier->notifyWindow(GetLOKWindowId(), IsVisible()? u"show"_ustr: u"hide"_ustr, aPayload); } } } @@ -1049,7 +1049,7 @@ bool Dialog::ImplStartExecute() std::vector<vcl::LOKPayloadItem> aItems; aItems.emplace_back("size", GetSizePixel().toString()); aItems.emplace_back("unique_id", this->get_id().toUtf8()); - pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); + pNotifier->notifyWindow(GetLOKWindowId(), u"size_changed"_ustr, aItems); } } @@ -1147,7 +1147,7 @@ void Dialog::EndDialog( tools::Long nResult ) if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { if (mpDialogImpl->m_bLOKTunneling) - pNotifier->notifyWindow(GetLOKWindowId(), "close"); + pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr); ReleaseLOKNotifier(); } } @@ -1439,7 +1439,7 @@ void Dialog::Resize() std::vector<vcl::LOKPayloadItem> aItems; aItems.emplace_back("size", GetSizePixel().toString()); aItems.emplace_back("unique_id", this->get_id().toUtf8()); - pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); + pNotifier->notifyWindow(GetLOKWindowId(), u"size_changed"_ustr, aItems); } } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 2bced4d8047b..e55cca238349 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -1088,11 +1088,11 @@ SystemWindow* DockingWindow::GetFloatingWindow() const DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable) : DockingWindow(pParent, - !bTearable ? OUString("InterimDockParent") : OUString("InterimTearableParent"), - !bTearable ? OUString("vcl/ui/interimdockparent.ui") : OUString("vcl/ui/interimtearableparent.ui"), + !bTearable ? u"InterimDockParent"_ustr : u"InterimTearableParent"_ustr, + !bTearable ? u"vcl/ui/interimdockparent.ui"_ustr : u"vcl/ui/interimtearableparent.ui"_ustr, "vcl::DropdownDockingWindow maLayoutIdle", rFrame) - , m_xBox(m_pUIBuilder->get("box")) + , m_xBox(m_pUIBuilder->get(u"box"_ustr)) { } @@ -1108,8 +1108,8 @@ void DropdownDockingWindow::dispose() } ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame) - : DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui", "vcl::ResizableDockingWindow maLayoutIdle", rFrame) - , m_xBox(m_pUIBuilder->get("box")) + : DockingWindow(pParent, u"DockingWindow"_ustr, u"vcl/ui/dockingwindow.ui"_ustr, "vcl::ResizableDockingWindow maLayoutIdle", rFrame) + , m_xBox(m_pUIBuilder->get(u"box"_ustr)) { } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index b2faacadb5fa..5c576a0fd358 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -662,7 +662,7 @@ void FloatingWindow::PixelInvalidate(const tools::Rectangle* /*pRectangle*/) std::make_pair("rectangle"_ostr, aRect.toString()) }; const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier(); - pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload); + pNotifier->notifyWindow(GetLOKWindowId(), u"invalidate"_ustr, aPayload); } } @@ -708,13 +708,13 @@ void FloatingWindow::StateChanged( StateChangedType nType ) } aItems.emplace_back("size", GetSizePixel().toString()); - GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems); + GetLOKNotifier()->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems); } else if (!IsVisible() && nType == StateChangedType::Visible) { if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { - pNotifier->notifyWindow(GetLOKWindowId(), "close"); + pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr); ReleaseLOKNotifier(); } } diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index cc3fca5802ea..31bf70f08d57 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -66,7 +66,7 @@ vcl::KeyCode::KeyCode( KeyFuncType eFunction ) OUString vcl::KeyCode::GetName() const { vcl::Window* pWindow = ImplGetDefaultWindow(); - return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : ""; + return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : u""_ustr; } KeyFuncType vcl::KeyCode::GetFunction() const diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index c4729a1e1abb..2d42d305498e 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2449,7 +2449,7 @@ void MessageDialog::create_message_area() pBtn.set( VclPtr<OKButton>::Create(pButtonBox) ); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); - pBtn->set_id("ok"); + pBtn->set_id(u"ok"_ustr); add_button(pBtn, RET_OK, true); nDefaultResponse = RET_OK; break; @@ -2457,7 +2457,7 @@ void MessageDialog::create_message_area() pBtn.set( VclPtr<CloseButton>::Create(pButtonBox) ); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); - pBtn->set_id("close"); + pBtn->set_id(u"close"_ustr); add_button(pBtn, RET_CLOSE, true); nDefaultResponse = RET_CLOSE; break; @@ -2465,7 +2465,7 @@ void MessageDialog::create_message_area() pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) ); pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON); pBtn->Show(); - pBtn->set_id("cancel"); + pBtn->set_id(u"cancel"_ustr); add_button(pBtn, RET_CANCEL, true); nDefaultResponse = RET_CANCEL; break; @@ -2473,25 +2473,25 @@ void MessageDialog::create_message_area() pBtn = VclPtr<PushButton>::Create(pButtonBox); pBtn->SetText(GetStandardText(StandardButtonType::Yes)); pBtn->Show(); - pBtn->set_id("yes"); + pBtn->set_id(u"yes"_ustr); add_button(pBtn, RET_YES, true); pBtn.set( VclPtr<PushButton>::Create(pButtonBox) ); pBtn->SetText(GetStandardText(StandardButtonType::No)); pBtn->Show(); - pBtn->set_id("no"); + pBtn->set_id(u"no"_ustr); add_button(pBtn, RET_NO, true); nDefaultResponse = RET_NO; break; case VclButtonsType::OkCancel: pBtn.set( VclPtr<OKButton>::Create(pButtonBox) ); pBtn->Show(); - pBtn->set_id("ok"); + pBtn->set_id(u"ok"_ustr); add_button(pBtn, RET_OK, true); pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) ); pBtn->Show(); - pBtn->set_id("cancel"); + pBtn->set_id(u"cancel"_ustr); add_button(pBtn, RET_CANCEL, true); nDefaultResponse = RET_CANCEL; break; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index eb08c4de9848..3fedfb936bc3 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -84,7 +84,7 @@ static bool ImplAccelDisabled() { OUString aStr = vcl::SettingsConfigItem::get()-> - getValue( "Menu", "SuppressAccelerators" ); + getValue( u"Menu"_ustr, u"SuppressAccelerators"_ustr ); nAccelDisabled = aStr.equalsIgnoreAsciiCase("true") ? 1 : 0; } return nAccelDisabled == 1; diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 5996b818d4bb..fc6435ef46bd 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1225,7 +1225,7 @@ void Window::PixelInvalidate(const tools::Rectangle* pRectangle) aPayload.emplace_back("rectangle", aRect.toString()); - pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload); + pNotifier->notifyWindow(GetLOKWindowId(), u"invalidate"_ustr, aPayload); } // Added for dialog items. Pass invalidation to the parent window. else if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier()) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index c76701b31698..f642641a0fc2 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -524,57 +524,57 @@ Size const & PrintDialog::getJobPageSize() } PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterController> i_xController) - : GenericDialogController(i_pWindow, "vcl/ui/printdialog.ui", "PrintDialog") + : GenericDialogController(i_pWindow, u"vcl/ui/printdialog.ui"_ustr, u"PrintDialog"_ustr) , maPController(std::move( i_xController )) - , mxTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) - , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow")) - , mxPageLayoutFrame(m_xBuilder->weld_frame("layoutframe")) - , mxPrinters(m_xBuilder->weld_combo_box("printersbox")) - , mxStatusTxt(m_xBuilder->weld_label("status")) - , mxSetupButton(m_xBuilder->weld_button("setup")) - , mxCopyCountField(m_xBuilder->weld_spin_button("copycount")) - , mxCollateBox(m_xBuilder->weld_check_button("collate")) - , mxCollateImage(m_xBuilder->weld_image("collateimage")) - , mxPageRangeEdit(m_xBuilder->weld_entry("pagerange")) - , mxPageRangesRadioButton(m_xBuilder->weld_radio_button("rbRangePages")) - , mxPaperSidesBox(m_xBuilder->weld_combo_box("sidesbox")) - , mxSingleJobsBox(m_xBuilder->weld_check_button("singlejobs")) - , mxReverseOrderBox(m_xBuilder->weld_check_button("reverseorder")) - , mxOKButton(m_xBuilder->weld_button("ok")) - , mxCancelButton(m_xBuilder->weld_button("cancel")) - , mxBackwardBtn(m_xBuilder->weld_button("backward")) - , mxForwardBtn(m_xBuilder->weld_button("forward")) - , mxFirstBtn(m_xBuilder->weld_button("btnFirst")) - , mxLastBtn(m_xBuilder->weld_button("btnLast")) - , mxPreviewBox(m_xBuilder->weld_check_button("previewbox")) - , mxNumPagesText(m_xBuilder->weld_label("totalnumpages")) + , mxTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , mxScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr)) + , mxPageLayoutFrame(m_xBuilder->weld_frame(u"layoutframe"_ustr)) + , mxPrinters(m_xBuilder->weld_combo_box(u"printersbox"_ustr)) + , mxStatusTxt(m_xBuilder->weld_label(u"status"_ustr)) + , mxSetupButton(m_xBuilder->weld_button(u"setup"_ustr)) + , mxCopyCountField(m_xBuilder->weld_spin_button(u"copycount"_ustr)) + , mxCollateBox(m_xBuilder->weld_check_button(u"collate"_ustr)) + , mxCollateImage(m_xBuilder->weld_image(u"collateimage"_ustr)) + , mxPageRangeEdit(m_xBuilder->weld_entry(u"pagerange"_ustr)) + , mxPageRangesRadioButton(m_xBuilder->weld_radio_button(u"rbRangePages"_ustr)) + , mxPaperSidesBox(m_xBuilder->weld_combo_box(u"sidesbox"_ustr)) + , mxSingleJobsBox(m_xBuilder->weld_check_button(u"singlejobs"_ustr)) + , mxReverseOrderBox(m_xBuilder->weld_check_button(u"reverseorder"_ustr)) + , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , mxCancelButton(m_xBuilder->weld_button(u"cancel"_ustr)) + , mxBackwardBtn(m_xBuilder->weld_button(u"backward"_ustr)) + , mxForwardBtn(m_xBuilder->weld_button(u"forward"_ustr)) + , mxFirstBtn(m_xBuilder->weld_button(u"btnFirst"_ustr)) + , mxLastBtn(m_xBuilder->weld_button(u"btnLast"_ustr)) + , mxPreviewBox(m_xBuilder->weld_check_button(u"previewbox"_ustr)) + , mxNumPagesText(m_xBuilder->weld_label(u"totalnumpages"_ustr)) , mxPreview(new PrintPreviewWindow(this)) - , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", *mxPreview)) - , mxPageEdit(m_xBuilder->weld_entry("pageedit")) - , mxPagesBtn(m_xBuilder->weld_radio_button("pagespersheetbtn")) - , mxBrochureBtn(m_xBuilder->weld_radio_button("brochure")) - , mxPagesBoxTitleTxt(m_xBuilder->weld_label("pagespersheettxt")) - , mxNupPagesBox(m_xBuilder->weld_combo_box("pagespersheetbox")) - , mxNupNumPagesTxt(m_xBuilder->weld_label("pagestxt")) - , mxNupColEdt(m_xBuilder->weld_spin_button("pagecols")) - , mxNupTimesTxt(m_xBuilder->weld_label("by")) - , mxNupRowsEdt(m_xBuilder->weld_spin_button("pagerows")) - , mxPageMarginTxt1(m_xBuilder->weld_label("pagemargintxt1")) - , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button("pagemarginsb", FieldUnit::MM)) - , mxPageMarginTxt2(m_xBuilder->weld_label("pagemargintxt2")) - , mxSheetMarginTxt1(m_xBuilder->weld_label("sheetmargintxt1")) - , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button("sheetmarginsb", FieldUnit::MM)) - , mxSheetMarginTxt2(m_xBuilder->weld_label("sheetmargintxt2")) - , mxPaperSizeBox(m_xBuilder->weld_combo_box("papersizebox")) - , mxOrientationBox(m_xBuilder->weld_combo_box("pageorientationbox")) - , mxNupOrderTxt(m_xBuilder->weld_label("labelorder")) - , mxNupOrderBox(m_xBuilder->weld_combo_box("orderbox")) + , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *mxPreview)) + , mxPageEdit(m_xBuilder->weld_entry(u"pageedit"_ustr)) + , mxPagesBtn(m_xBuilder->weld_radio_button(u"pagespersheetbtn"_ustr)) + , mxBrochureBtn(m_xBuilder->weld_radio_button(u"brochure"_ustr)) + , mxPagesBoxTitleTxt(m_xBuilder->weld_label(u"pagespersheettxt"_ustr)) + , mxNupPagesBox(m_xBuilder->weld_combo_box(u"pagespersheetbox"_ustr)) + , mxNupNumPagesTxt(m_xBuilder->weld_label(u"pagestxt"_ustr)) + , mxNupColEdt(m_xBuilder->weld_spin_button(u"pagecols"_ustr)) + , mxNupTimesTxt(m_xBuilder->weld_label(u"by"_ustr)) + , mxNupRowsEdt(m_xBuilder->weld_spin_button(u"pagerows"_ustr)) + , mxPageMarginTxt1(m_xBuilder->weld_label(u"pagemargintxt1"_ustr)) + , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button(u"pagemarginsb"_ustr, FieldUnit::MM)) + , mxPageMarginTxt2(m_xBuilder->weld_label(u"pagemargintxt2"_ustr)) + , mxSheetMarginTxt1(m_xBuilder->weld_label(u"sheetmargintxt1"_ustr)) + , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button(u"sheetmarginsb"_ustr, FieldUnit::MM)) + , mxSheetMarginTxt2(m_xBuilder->weld_label(u"sheetmargintxt2"_ustr)) + , mxPaperSizeBox(m_xBuilder->weld_combo_box(u"papersizebox"_ustr)) + , mxOrientationBox(m_xBuilder->weld_combo_box(u"pageorientationbox"_ustr)) + , mxNupOrderTxt(m_xBuilder->weld_label(u"labelorder"_ustr)) + , mxNupOrderBox(m_xBuilder->weld_combo_box(u"orderbox"_ustr)) , mxNupOrder(new ShowNupOrderWindow) - , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, "orderpreview", *mxNupOrder)) - , mxBorderCB(m_xBuilder->weld_check_button("bordercb")) - , mxRangeExpander(m_xBuilder->weld_expander("exRangeExpander")) - , mxLayoutExpander(m_xBuilder->weld_expander("exLayoutExpander")) - , mxCustom(m_xBuilder->weld_widget("customcontents")) + , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, u"orderpreview"_ustr, *mxNupOrder)) + , mxBorderCB(m_xBuilder->weld_check_button(u"bordercb"_ustr)) + , mxRangeExpander(m_xBuilder->weld_expander(u"exRangeExpander"_ustr)) + , mxLayoutExpander(m_xBuilder->weld_expander(u"exLayoutExpander"_ustr)) + , mxCustom(m_xBuilder->weld_widget(u"customcontents"_ustr)) , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ) ) , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ) ) , maNoPageStr( VclResId( SV_PRINT_NOPAGES ) ) @@ -608,8 +608,8 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl { // fall back to last printer SettingsConfigItem* pItem = SettingsConfigItem::get(); - OUString aValue( pItem->getValue( "PrintDialog", - "LastPrinter" ) ); + OUString aValue( pItem->getValue( u"PrintDialog"_ustr, + u"LastPrinter"_ustr ) ); if (mxPrinters->find_text(aValue) != -1) { mxPrinters->set_active_text(aValue); @@ -752,37 +752,37 @@ void PrintDialog::storeToSettings() { SettingsConfigItem* pItem = SettingsConfigItem::get(); - pItem->setValue( "PrintDialog", - "LastPrinter", + pItem->setValue( u"PrintDialog"_ustr, + u"LastPrinter"_ustr, isPrintToFile() ? Printer::GetDefaultPrinterName() : mxPrinters->get_active_text() ); - pItem->setValue( "PrintDialog", - "LastPage", + pItem->setValue( u"PrintDialog"_ustr, + u"LastPage"_ustr, mxTabCtrl->get_tab_label_text(mxTabCtrl->get_current_page_ident())); - pItem->setValue( "PrintDialog", - "WindowState", + pItem->setValue( u"PrintDialog"_ustr, + u"WindowState"_ustr, m_xDialog->get_window_state(vcl::WindowDataMask::All) ); - pItem->setValue( "PrintDialog", - "CopyCount", + pItem->setValue( u"PrintDialog"_ustr, + u"CopyCount"_ustr, mxCopyCountField->get_text() ); - pItem->setValue( "PrintDialog", - "Collate", - mxCollateBox->get_active() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"Collate"_ustr, + mxCollateBox->get_active() ? u"true"_ustr : + u"false"_ustr ); - pItem->setValue( "PrintDialog", - "CollateSingleJobs", - mxSingleJobsBox->get_active() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"CollateSingleJobs"_ustr, + mxSingleJobsBox->get_active() ? u"true"_ustr : + u"false"_ustr ); - pItem->setValue( "PrintDialog", - "HasPreview", - hasPreview() ? OUString("true") : - OUString("false") ); + pItem->setValue( u"PrintDialog"_ustr, + u"HasPreview"_ustr, + hasPreview() ? u"true"_ustr : + u"false"_ustr ); pItem->Commit(); } @@ -792,8 +792,8 @@ void PrintDialog::readFromSettings() SettingsConfigItem* pItem = SettingsConfigItem::get(); // read last selected tab page; if it exists, activate it - OUString aValue = pItem->getValue( "PrintDialog", - "LastPage" ); + OUString aValue = pItem->getValue( u"PrintDialog"_ustr, + u"LastPage"_ustr ); sal_uInt16 nCount = mxTabCtrl->get_n_pages(); for (sal_uInt16 i = 0; i < nCount; ++i) { @@ -806,14 +806,14 @@ void PrintDialog::readFromSettings() } // persistent window state - aValue = pItem->getValue( "PrintDialog", - "WindowState" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"WindowState"_ustr ); if (!aValue.isEmpty()) m_xDialog->set_window_state(aValue); // collate - aValue = pItem->getValue( "PrintDialog", - "CollateBox" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"CollateBox"_ustr ); if( aValue.equalsIgnoreAsciiCase("alwaysoff") ) { mbCollateAlwaysOff = true; @@ -823,19 +823,19 @@ void PrintDialog::readFromSettings() else { mbCollateAlwaysOff = false; - aValue = pItem->getValue( "PrintDialog", - "Collate" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"Collate"_ustr ); mxCollateBox->set_active( aValue.equalsIgnoreAsciiCase("true") ); } // collate single jobs - aValue = pItem->getValue( "PrintDialog", - "CollateSingleJobs" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"CollateSingleJobs"_ustr ); mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true")); // preview box - aValue = pItem->getValue( "PrintDialog", - "HasPreview" ); + aValue = pItem->getValue( u"PrintDialog"_ustr, + u"HasPreview"_ustr ); if ( aValue.equalsIgnoreAsciiCase("false") ) mxPreviewBox->set_active( false ); else @@ -877,7 +877,7 @@ void PrintDialog::setPaperSizes() OUString aWidth( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) ); OUString aHeight( rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ) ); - OUString aUnit = eUnit == o3tl::Length::mm ? OUString("mm") : OUString("in"); + OUString aUnit = eUnit == o3tl::Length::mm ? u"mm"_ustr : u"in"_ustr; OUString aPaperName; // Paper sizes that we don't know of but the system printer driver lists are not "User @@ -1015,7 +1015,7 @@ void PrintDialog::updatePageRange(sal_Int32 nPages) } OUString sRange = aBuf.makeStringAndClear(); mxPageRangeEdit->set_text(sRange); - maPController->setValue("PageRange", Any(sRange)); + maPController->setValue(u"PageRange"_ustr, Any(sRange)); } } @@ -1372,8 +1372,8 @@ void PrintDialog::setupOptionalUI() OUString sOptionsUIFile; rOption.Value >>= sOptionsUIFile; mxCustomOptionsUIBuilder = Application::CreateBuilder(mxCustom.get(), sOptionsUIFile); - std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container("box"); - xWindow->set_help_id("vcl/ui/printdialog/PrintDialog"); + std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container(u"box"_ustr); + xWindow->set_help_id(u"vcl/ui/printdialog/PrintDialog"_ustr); xWindow->show(); continue; } @@ -1856,13 +1856,13 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) } else if (&rButton == mxSingleJobsBox.get()) { - maPController->setValue( "SinglePrintJobs", + maPController->setValue( u"SinglePrintJobs"_ustr, Any( isSingleJobs() ) ); checkControlDependencies(); } else if( &rButton == mxCollateBox.get() ) { - maPController->setValue( "Collate", + maPController->setValue( u"Collate"_ustr, Any( isCollate() ) ); checkControlDependencies(); } @@ -1870,7 +1870,7 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) { bool bChecked = mxReverseOrderBox->get_active(); maPController->setReversePrint( bChecked ); - maPController->setValue( "PrintReverse", + maPController->setValue( u"PrintReverse"_ustr, Any( bChecked ) ); maUpdatePreviewIdle.Start(); } @@ -2064,7 +2064,7 @@ IMPL_LINK_NOARG(PrintDialog, ActivateHdl, weld::Entry&, bool) if (nPage < 1) { nPage = 1; - mxPageEdit->set_text("1"); + mxPageEdit->set_text(u"1"_ustr); } else if (nPage > mnCachedPages) { @@ -2089,9 +2089,9 @@ IMPL_LINK( PrintDialog, SpinModifyHdl, weld::SpinButton&, rEdit, void ) } else if( &rEdit == mxCopyCountField.get() ) { - maPController->setValue( "CopyCount", + maPController->setValue( u"CopyCount"_ustr, Any( sal_Int32(mxCopyCountField->get_value()) ) ); - maPController->setValue( "Collate", + maPController->setValue( u"Collate"_ustr, Any( isCollate() ) ); } } @@ -2224,7 +2224,7 @@ void PrintDialog::previewBackward() void PrintDialog::previewFirst() { - mxPageEdit->set_text("1"); + mxPageEdit->set_text(u"1"_ustr); ActivateHdl(*mxPageEdit); } @@ -2245,13 +2245,13 @@ static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax) // PrintProgressDialog PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax) - : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", "PrintProgressDialog") + : GenericDialogController(i_pParent, u"vcl/ui/printprogressdialog.ui"_ustr, u"PrintProgressDialog"_ustr) , mbCanceled(false) , mnCur(0) , mnMax(i_nMax) - , mxText(m_xBuilder->weld_label("label")) - , mxProgress(m_xBuilder->weld_progress_bar("progressbar")) - , mxButton(m_xBuilder->weld_button("cancel")) + , mxText(m_xBuilder->weld_label(u"label"_ustr)) + , mxProgress(m_xBuilder->weld_progress_bar(u"progressbar"_ustr)) + , mxButton(m_xBuilder->weld_button(u"cancel"_ustr)) { if( mnMax < 1 ) mnMax = 1; diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index fc14762bef7a..b79f58766461 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1173,8 +1173,8 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText, int nCha tools::Long nWidth; if (nCharsWidth != -1) { - nWidth = GetTextWidth("0",0,-1,nullptr, - SalLayoutGlyphsCache::self()->GetLayoutGlyphs(GetOutDev(),"0")); + nWidth = GetTextWidth(u"0"_ustr,0,-1,nullptr, + SalLayoutGlyphsCache::self()->GetLayoutGlyphs(GetOutDev(),u"0"_ustr)); nWidth = nWidth * nCharsWidth + nFudge; } else diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 7fdd03a031e3..37a0c4c75fe0 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1679,7 +1679,7 @@ bool ToolBox::AlwaysLocked() utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), - "/org.openoffice.Office.UI.GlobalSettings/Toolbars" ); // note: case sensitive ! + u"/org.openoffice.Office.UI.GlobalSettings/Toolbars"_ustr ); // note: case sensitive ! if ( aNode.isValid() ) { // feature enabled ? @@ -1692,7 +1692,7 @@ bool ToolBox::AlwaysLocked() // now read the locking state utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), - "/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ); // note: case sensitive ! + u"/org.openoffice.Office.UI.GlobalSettings/Toolbars/States"_ustr ); // note: case sensitive ! bool bLocked = bool(); css::uno::Any aValue2 = aNode2.getNodeValue( "Locked" ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 06a60a209483..b7f0ea58181b 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1059,7 +1059,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p { // do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario) throw RuntimeException( - "Could not create system window!", + u"Could not create system window!"_ustr, Reference< XInterface >() ); } @@ -1921,7 +1921,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt ) if( !aStrHelpId.isEmpty() ) pHelp->Start( aStrHelpId, this ); else - pHelp->Start( OOO_HELP_INDEX, this ); + pHelp->Start( u"" OOO_HELP_INDEX ""_ustr, this ); } } } @@ -3783,8 +3783,8 @@ Reference< css::rendering::XCanvas > WindowOutputDevice::ImplGetCanvas( bool bSp { xCanvas.set( xCanvasFactory->createInstanceWithArgumentsAndContext( bSpriteCanvas ? - OUString( "com.sun.star.rendering.SpriteCanvas" ) : - OUString( "com.sun.star.rendering.Canvas" ), + u"com.sun.star.rendering.SpriteCanvas"_ustr : + u"com.sun.star.rendering.Canvas"_ustr, aArg, xContext ), UNO_QUERY ); |