diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 13:18:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-11 12:41:09 +0200 |
commit | bc91cc47505c448ded7297074ccff809b59e8ed1 (patch) | |
tree | ddd3d33ff41ae6021738a0dcda4f9dbb5c177dea /svx/source/tbxctrls | |
parent | 28a43d53b25c183a7997cc18819d6ee0c675df19 (diff) |
loplugin:ostr in svx
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'svx/source/tbxctrls')
23 files changed, 330 insertions, 329 deletions
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx index b3f1965de31b..a87eaa52b7c5 100644 --- a/svx/source/tbxctrls/Palette.cxx +++ b/svx/source/tbxctrls/Palette.cxx @@ -109,7 +109,7 @@ void PaletteASE::LoadPalette() aFile.ReadUInt16(nChunkSize); aFile.ReadUInt16(nChars); - OUString aPaletteName(""); + OUString aPaletteName(u""_ustr); if (nChars > 1) aPaletteName = read_uInt16s_ToOUString(aFile, nChars); else @@ -304,7 +304,7 @@ Palette* PaletteGPL::Clone() const static OString lcl_getToken(OStringBuffer& rStr, sal_Int32& index) { sal_Int32 substart, toklen = 0; - OUString aWhitespaceChars( " \n\t" ); + OUString aWhitespaceChars( u" \n\t"_ustr ); while(index < rStr.getLength() && aWhitespaceChars.indexOf( rStr[index] ) != -1) diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx index d26063d5447e..2870e5dc36b7 100644 --- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx +++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx @@ -58,13 +58,15 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::style::XStyleFamiliesSupplier> xStylesSupplier( xModel, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::lang::XServiceInfo> xServices(xModel, css::uno::UNO_QUERY_THROW); - if (xServices->supportsService("com.sun.star.text.TextDocument")) + if (xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr)) { css::uno::Reference<css::container::XNameAccess> xParaStyles; - xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= xParaStyles; - static const std::vector<OUString> aWriterStyles - = { "Standard", "Text body", "Heading 1", "Heading 2", "Heading 3", - "Heading 4", "Title", "Subtitle", "Quotations", "Preformatted Text" }; + xStylesSupplier->getStyleFamilies()->getByName(u"ParagraphStyles"_ustr) >>= xParaStyles; + static const std::vector<OUString> aWriterStyles = { + u"Standard"_ustr, u"Text body"_ustr, u"Heading 1"_ustr, u"Heading 2"_ustr, + u"Heading 3"_ustr, u"Heading 4"_ustr, u"Title"_ustr, u"Subtitle"_ustr, + u"Quotations"_ustr, u"Preformatted Text"_ustr + }; for (const OUString& aStyle : aWriterStyles) { try @@ -72,7 +74,7 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::beans::XPropertySet> xStyle; xParaStyles->getByName(aStyle) >>= xStyle; OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if (!sName.isEmpty()) m_aDefaultStyles.push_back(std::pair<OUString, OUString>(aStyle, sName)); } @@ -84,12 +86,12 @@ void StylesPreviewToolBoxControl::InitializeStyles( } } } - else if (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument")) + else if (xServices->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr)) { static const char* aCalcStyles[] = { "Default", "Accent 1", "Accent 2", "Accent 3", "Heading 1", "Heading 2", "Result" }; css::uno::Reference<css::container::XNameAccess> xCellStyles; - xStylesSupplier->getStyleFamilies()->getByName("CellStyles") >>= xCellStyles; + xStylesSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr) >>= xCellStyles; for (const char* pCalcStyle : aCalcStyles) { try @@ -100,7 +102,7 @@ void StylesPreviewToolBoxControl::InitializeStyles( css::uno::Reference<css::beans::XPropertySet> xStyle( xCellStyles->getByName(sStyleName), css::uno::UNO_QUERY_THROW); OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if (!sName.isEmpty()) { m_aDefaultStyles.push_back( @@ -161,7 +163,7 @@ StylesPreviewToolBoxControl::createItemWindow(const css::uno::Reference<css::awt OUString StylesPreviewToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.StylesPreviewToolBoxControl"; + return u"com.sun.star.comp.svx.StylesPreviewToolBoxControl"_ustr; } sal_Bool StylesPreviewToolBoxControl::supportsService(const OUString& rServiceName) @@ -171,7 +173,7 @@ sal_Bool StylesPreviewToolBoxControl::supportsService(const OUString& rServiceNa css::uno::Sequence<OUString> StylesPreviewToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index d7f46bda4318..153ad3c09661 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -133,7 +133,7 @@ StylePreviewCache::JsonStylePreviewCacheClear StylePreviewCache::gJsonIdleClear; StyleStatusListener::StyleStatusListener( StylesPreviewWindow_Base* pPreviewControl, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) - : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, ".uno:ParaStyle") + : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, u".uno:ParaStyle"_ustr) , m_pPreviewControl(pPreviewControl) { ReBind(); @@ -201,8 +201,8 @@ bool StylesPreviewWindow_Base::Command(const CommandEvent& rEvent) return false; std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(m_xStylesView.get(), "svx/ui/stylemenu.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + Application::CreateBuilder(m_xStylesView.get(), u"svx/ui/stylemenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); OUString rIdent = xMenu->popup_at_rect(m_xStylesView.get(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1))); if (rIdent == "update" || rIdent == "edit") @@ -211,10 +211,9 @@ bool StylesPreviewWindow_Base::Command(const CommandEvent& rEvent) const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, - rIdent == "update" ? OUString(".uno:StyleUpdateByExample") - : OUString(".uno:EditStyle"), - aArgs); + SfxToolBoxControl::Dispatch( + xProvider, + rIdent == "update" ? u".uno:StyleUpdateByExample"_ustr : u".uno:EditStyle"_ustr, aArgs); return true; } @@ -447,7 +446,7 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base( weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XFrame>& xFrame) : m_xFrame(xFrame) - , m_xStylesView(xBuilder.weld_icon_view("stylesview")) + , m_xStylesView(xBuilder.weld_icon_view(u"stylesview"_ustr)) , m_aUpdateTask(*this) , m_aDefaultStyles(std::move(aDefaultStyles)) { @@ -473,12 +472,12 @@ IMPL_LINK(StylesPreviewWindow_Base, Selected, weld::IconView&, rIconView, void) OUString sStyleName = rIconView.get_selected_text(); css::uno::Sequence<css::beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("Template", sStyleName), - comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para)) + comphelper::makePropertyValue(u"Template"_ustr, sStyleName), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16(SfxStyleFamily::Para)) }; const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleApply", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleApply"_ustr, aArgs); } IMPL_LINK(StylesPreviewWindow_Base, DoubleClick, weld::IconView&, rIconView, bool) @@ -486,12 +485,12 @@ IMPL_LINK(StylesPreviewWindow_Base, DoubleClick, weld::IconView&, rIconView, boo OUString sStyleName = rIconView.get_selected_text(); css::uno::Sequence<css::beans::PropertyValue> aArgs{ - comphelper::makePropertyValue("Param", sStyleName), - comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para)) + comphelper::makePropertyValue(u"Param"_ustr, sStyleName), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16(SfxStyleFamily::Para)) }; const css::uno::Reference<css::frame::XDispatchProvider> xProvider(m_xFrame, css::uno::UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:EditStyle", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:EditStyle"_ustr, aArgs); return true; } @@ -552,7 +551,7 @@ static OString extractPngString(const BitmapEx& rBitmap) SvMemoryStream aOStm(65535, 65535); // Use fastest compression "1" css::uno::Sequence<css::beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("Compression", sal_Int32(1)), + comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(1)), }; vcl::PngImageWriter aPNGWriter(aOStm); aPNGWriter.setParameters(aFilterData); @@ -661,7 +660,7 @@ void StylesPreviewWindow_Base::UpdateStylesList() StylesPreviewWindow_Impl::StylesPreviewWindow_Impl( vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XFrame>& xFrame) - : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", true, + : InterimItemWindow(pParent, u"svx/ui/stylespreview.ui"_ustr, u"ApplyStyleBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) , StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xFrame) { diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index e72ab98598d6..ca65798f9a34 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -84,7 +84,7 @@ void SvxColorValueSet::addEntriesForColorSet(const std::set<Color>& rColorSet, s { for(const auto& rColor : rColorSet) { - InsertItem(nStartIndex, rColor, ""); + InsertItem(nStartIndex, rColor, u""_ustr); nStartIndex++; } } diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx index bbbfa7363452..2e8c71af3902 100644 --- a/svx/source/tbxctrls/SvxPresetListBox.cxx +++ b/svx/source/tbxctrls/SvxPresetListBox.cxx @@ -53,8 +53,8 @@ bool SvxPresetListBox::Command(const CommandEvent& rEvent) if (nIndex > 0) { std::unique_ptr<weld::Builder> xBuilder( - Application::CreateBuilder(GetDrawingArea(), "svx/ui/presetmenu.ui")); - std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu")); + Application::CreateBuilder(GetDrawingArea(), u"svx/ui/presetmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(u"menu"_ustr)); OnMenuItemSelected(xMenu->popup_at_rect( GetDrawingArea(), tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1)))); return true; diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index e7ccc6238800..f6ca64be5bdb 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -65,12 +65,12 @@ public: NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, weld::Widget* pParent, NumberingPageType ePageType) - : WeldToolbarPopup(rController.getFrameInterface(), pParent, "svx/ui/numberingwindow.ui", "NumberingWindow") + : WeldToolbarPopup(rController.getFrameInterface(), pParent, u"svx/ui/numberingwindow.ui"_ustr, u"NumberingWindow"_ustr) , mePageType(ePageType) , mrController(rController) - , mxValueSet(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet)) - , mxMoreButton(m_xBuilder->weld_button("more")) + , mxValueSet(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxValueSet)) + , mxMoreButton(m_xBuilder->weld_button(u"more"_ustr)) { mxValueSet->SetStyle(WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NO_DIRECTSELECT); mxValueSet->init(mePageType); @@ -108,13 +108,13 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFieldColor()); if ( mePageType == NumberingPageType::BULLET ) - AddStatusListener( ".uno:CurrentBulletListType" ); + AddStatusListener( u".uno:CurrentBulletListType"_ustr ); else if ( mePageType == NumberingPageType::SINGLENUM ) - AddStatusListener( ".uno:CurrentNumListType" ); + AddStatusListener( u".uno:CurrentNumListType"_ustr ); else - AddStatusListener( ".uno:CurrentOutlineType" ); + AddStatusListener( u".uno:CurrentOutlineType"_ustr ); - auto xImage = vcl::CommandInfoProvider::GetXGraphicForCommand(".uno:OutlineBullet", mrController.getFrameInterface()); + auto xImage = vcl::CommandInfoProvider::GetXGraphicForCommand(u".uno:OutlineBullet"_ustr, mrController.getFrameInterface()); mxMoreButton->set_image(xImage); mxMoreButton->connect_clicked(LINK(this, NumberingPopup, VSButtonClickSetHdl)); @@ -136,17 +136,17 @@ IMPL_LINK_NOARG(NumberingPopup, VSSelectValueSetHdl, ValueSet*, void) if ( mePageType == NumberingPageType::BULLET ) { auto aArgs( comphelper::InitPropertySequence( { { "SetBullet", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetBullet", aArgs ); + mrController.dispatchCommand( u".uno:SetBullet"_ustr, aArgs ); } else if ( mePageType == NumberingPageType::SINGLENUM ) { auto aArgs( comphelper::InitPropertySequence( { { "SetNumber", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetNumber", aArgs ); + mrController.dispatchCommand( u".uno:SetNumber"_ustr, aArgs ); } else { auto aArgs( comphelper::InitPropertySequence( { { "SetOutline", css::uno::Any( nSelItem ) } } ) ); - mrController.dispatchCommand( ".uno:SetOutline", aArgs ); + mrController.dispatchCommand( u".uno:SetOutline"_ustr, aArgs ); } mrController.EndPopupMode(); } @@ -158,8 +158,8 @@ void NumberingPopup::GrabFocus() IMPL_LINK_NOARG(NumberingPopup, VSButtonClickSetHdl, weld::Button&, void) { - auto aArgs( comphelper::InitPropertySequence( { { "Page", css::uno::Any( OUString("customize") ) } } ) ); - mrController.dispatchCommand( ".uno:OutlineBullet", aArgs ); + auto aArgs( comphelper::InitPropertySequence( { { "Page", css::uno::Any( u"customize"_ustr ) } } ) ); + mrController.dispatchCommand( u".uno:OutlineBullet"_ustr, aArgs ); mrController.EndPopupMode(); } @@ -214,12 +214,12 @@ void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css OUString SAL_CALL NumberingToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.NumberingToolBoxControl"; + return u"com.sun.star.comp.svx.NumberingToolBoxControl"_ustr; } css::uno::Sequence< OUString > SAL_CALL NumberingToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index da2a83be8198..22bd359d7de5 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -167,8 +167,8 @@ bool SvxColorValueSet_docking::StartDrag() color.QueryValue(c, 0); style.QueryValue(s, 0); - uno::Sequence<beans::NamedValue> props{ { "FillColor", std::move(c) }, - { "FillStyle", std::move(s) } }; + uno::Sequence<beans::NamedValue> props{ { u"FillColor"_ustr, std::move(c) }, + { u"FillStyle"_ustr, std::move(s) } }; m_xHelper->SetData(props); return false; @@ -179,9 +179,9 @@ constexpr sal_uInt16 gnRightSlot = SID_ATTR_LINE_COLOR; SvxColorDockingWindow::SvxColorDockingWindow(SfxBindings* _pBindings, SfxChildWindow* pCW, vcl::Window* _pParent) : SfxDockingWindow(_pBindings, pCW, _pParent, - "DockingColorWindow", "svx/ui/dockingcolorwindow.ui") - , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , xColorSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *xColorSet)) + u"DockingColorWindow"_ustr, u"svx/ui/dockingcolorwindow.ui"_ustr) + , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , xColorSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *xColorSet)) { SetText(SvxResId(STR_COLORTABLE)); SetQuickHelpText(SvxResId(RID_SVXSTR_COLORBAR)); diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 99cb6ec7808f..54e4f7eb9c7b 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -114,12 +114,12 @@ static TranslateId aDirectionStrs[] = ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/directionwindow.ui", "DirectionWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/directionwindow.ui"_ustr, u"DirectionWindow"_ustr) , mxControl(pControl) , mxDirectionSet(new ValueSet(nullptr)) - , mxDirectionSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxDirectionSet)) - , mxPerspective(m_xBuilder->weld_radio_button("perspective")) - , mxParallel(m_xBuilder->weld_radio_button("parallel")) + , mxDirectionSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxDirectionSet)) + , mxPerspective(m_xBuilder->weld_radio_button(u"perspective"_ustr)) + , mxParallel(m_xBuilder->weld_radio_button(u"parallel"_ustr)) { mxDirectionSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); @@ -249,7 +249,7 @@ ExtrusionDirectionControl::ExtrusionDirectionControl( ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDirectionFloater" + u".uno:ExtrusionDirectionFloater"_ustr ) { } @@ -285,13 +285,13 @@ void SAL_CALL ExtrusionDirectionControl::initialize( const css::uno::Sequence< c OUString ExtrusionDirectionControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionDirectionController"; + return u"com.sun.star.comp.svx.ExtrusionDirectionController"_ustr; } Sequence< OUString > ExtrusionDirectionControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -305,8 +305,8 @@ com_sun_star_comp_svx_ExtrusionDirectionControl_get_implementation( ExtrusionDepthDialog::ExtrusionDepthDialog(weld::Window* pParent, double fDepth, FieldUnit eDefaultUnit) - : GenericDialogController(pParent, "svx/ui/extrustiondepthdialog.ui", "ExtrustionDepthDialog") - , m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", eDefaultUnit)) + : GenericDialogController(pParent, u"svx/ui/extrustiondepthdialog.ui"_ustr, u"ExtrustionDepthDialog"_ustr) + , m_xMtrDepth(m_xBuilder->weld_metric_spin_button(u"depth"_ustr, eDefaultUnit)) { m_xMtrDepth->set_value(static_cast<int>(fDepth) * 100, FieldUnit::MM_100TH); } @@ -327,15 +327,15 @@ constexpr OUString gsExtrusionDepth( u".uno:ExtrusionDepth"_ustr ); constexpr OUString gsMetricUnit( u".uno:MetricUnit"_ustr ); ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/depthwindow.ui", "DepthWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/depthwindow.ui"_ustr, u"DepthWindow"_ustr) , mxControl(pControl) - , mxDepth0(m_xBuilder->weld_radio_button("depth0")) - , mxDepth1(m_xBuilder->weld_radio_button("depth1")) - , mxDepth2(m_xBuilder->weld_radio_button("depth2")) - , mxDepth3(m_xBuilder->weld_radio_button("depth3")) - , mxDepth4(m_xBuilder->weld_radio_button("depth4")) - , mxInfinity(m_xBuilder->weld_radio_button("infinity")) - , mxCustom(m_xBuilder->weld_radio_button("custom")) + , mxDepth0(m_xBuilder->weld_radio_button(u"depth0"_ustr)) + , mxDepth1(m_xBuilder->weld_radio_button(u"depth1"_ustr)) + , mxDepth2(m_xBuilder->weld_radio_button(u"depth2"_ustr)) + , mxDepth3(m_xBuilder->weld_radio_button(u"depth3"_ustr)) + , mxDepth4(m_xBuilder->weld_radio_button(u"depth4"_ustr)) + , mxInfinity(m_xBuilder->weld_radio_button(u"infinity"_ustr)) + , mxCustom(m_xBuilder->weld_radio_button(u"custom"_ustr)) , meUnit(FieldUnit::NONE) , mfDepth( -1.0 ) , mbSettingValue(false) @@ -446,13 +446,13 @@ void ExtrusionDepthWindow::statusChanged( void ExtrusionDepthWindow::DispatchDepthDialog() { Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("Depth", mfDepth), - comphelper::makePropertyValue("Metric", static_cast<sal_Int32>( meUnit )) + comphelper::makePropertyValue(u"Depth"_ustr, mfDepth), + comphelper::makePropertyValue(u"Metric"_ustr, static_cast<sal_Int32>( meUnit )) }; rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode(); - xControl->dispatchCommand(".uno:ExtrusionDepthDialog", aArgs); + xControl->dispatchCommand(u".uno:ExtrusionDepthDialog"_ustr, aArgs); mbCommandDispatched = true; } @@ -529,7 +529,7 @@ ExtrusionDepthController::ExtrusionDepthController( ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDepthFloater" + u".uno:ExtrusionDepthFloater"_ustr ) { } @@ -565,13 +565,13 @@ void SAL_CALL ExtrusionDepthController::initialize( const css::uno::Sequence< cs OUString ExtrusionDepthController::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionDepthController"; + return u"com.sun.star.comp.svx.ExtrusionDepthController"_ustr; } Sequence< OUString > ExtrusionDepthController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -589,13 +589,13 @@ constexpr OUString g_sExtrusionLightingIntensity = u".uno:ExtrusionLightingInten ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/lightingwindow.ui", "LightingWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/lightingwindow.ui"_ustr, u"LightingWindow"_ustr) , mxControl(pControl) , mxLightingSet(new ValueSet(nullptr)) - , mxLightingSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLightingSet)) - , mxBright(m_xBuilder->weld_radio_button("bright")) - , mxNormal(m_xBuilder->weld_radio_button("normal")) - , mxDim(m_xBuilder->weld_radio_button("dim")) + , mxLightingSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLightingSet)) + , mxBright(m_xBuilder->weld_radio_button(u"bright"_ustr)) + , mxNormal(m_xBuilder->weld_radio_button(u"normal"_ustr)) + , mxDim(m_xBuilder->weld_radio_button(u"dim"_ustr)) { mxLightingSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); @@ -762,7 +762,7 @@ ExtrusionLightingControl::ExtrusionLightingControl( const Reference< XComponentContext >& rxContext ) : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionDirectionFloater" + u".uno:ExtrusionDirectionFloater"_ustr ) { } @@ -798,13 +798,13 @@ void SAL_CALL ExtrusionLightingControl::initialize( const css::uno::Sequence< cs OUString ExtrusionLightingControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionLightingController"; + return u"com.sun.star.comp.svx.ExtrusionLightingController"_ustr; } Sequence< OUString > ExtrusionLightingControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -820,13 +820,13 @@ com_sun_star_comp_svx_ExtrusionLightingControl_get_implementation( constexpr OUString g_sExtrusionSurface = u".uno:ExtrusionSurface"_ustr; ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/surfacewindow.ui", "SurfaceWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/surfacewindow.ui"_ustr, u"SurfaceWindow"_ustr) , mxControl(pControl) - , mxWireFrame(m_xBuilder->weld_radio_button("wireframe")) - , mxMatt(m_xBuilder->weld_radio_button("matt")) - , mxPlastic(m_xBuilder->weld_radio_button("plastic")) - , mxMetal(m_xBuilder->weld_radio_button("metal")) - , mxMetalMSO(m_xBuilder->weld_radio_button("metalMSO")) + , mxWireFrame(m_xBuilder->weld_radio_button(u"wireframe"_ustr)) + , mxMatt(m_xBuilder->weld_radio_button(u"matt"_ustr)) + , mxPlastic(m_xBuilder->weld_radio_button(u"plastic"_ustr)) + , mxMetal(m_xBuilder->weld_radio_button(u"metal"_ustr)) + , mxMetalMSO(m_xBuilder->weld_radio_button(u"metalMSO"_ustr)) { mxWireFrame->connect_toggled(LINK(this, ExtrusionSurfaceWindow, SelectHdl)); mxMatt->connect_toggled(LINK(this, ExtrusionSurfaceWindow, SelectHdl)); @@ -908,7 +908,7 @@ ExtrusionSurfaceControl::ExtrusionSurfaceControl( : svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), - ".uno:ExtrusionSurfaceFloater" + u".uno:ExtrusionSurfaceFloater"_ustr ) { } @@ -944,13 +944,13 @@ void SAL_CALL ExtrusionSurfaceControl::initialize( const css::uno::Sequence< css OUString ExtrusionSurfaceControl::getImplementationName() { - return "com.sun.star.comp.svx.ExtrusionSurfaceController"; + return u"com.sun.star.comp.svx.ExtrusionSurfaceController"_ustr; } Sequence< OUString > ExtrusionSurfaceControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index e044055e8904..23177914578f 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -88,14 +88,14 @@ SvxFillToolBoxControl::SvxFillToolBoxControl( , mnLastPosBitmap(0) , mnLastPosPattern(0) { - addStatusListener( ".uno:FillColor"); - addStatusListener( ".uno:FillGradient"); - addStatusListener( ".uno:FillHatch"); - addStatusListener( ".uno:FillBitmap"); - addStatusListener( ".uno:ColorTableState"); - addStatusListener( ".uno:GradientListState"); - addStatusListener( ".uno:HatchListState"); - addStatusListener( ".uno:BitmapListState"); + addStatusListener( u".uno:FillColor"_ustr); + addStatusListener( u".uno:FillGradient"_ustr); + addStatusListener( u".uno:FillHatch"_ustr); + addStatusListener( u".uno:FillBitmap"_ustr); + addStatusListener( u".uno:ColorTableState"_ustr); + addStatusListener( u".uno:GradientListState"_ustr); + addStatusListener( u".uno:HatchListState"_ustr); + addStatusListener( u".uno:BitmapListState"_ustr); } SvxFillToolBoxControl::~SvxFillToolBoxControl() @@ -405,7 +405,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - rtl::Reference<XGradientList> xGradientList = new XGradientList( "", ""/*TODO?*/ ); + rtl::Reference<XGradientList> xGradientList = new XGradientList( u""_ustr, u""_ustr/*TODO?*/ ); xGradientList->Insert(std::make_unique<XGradientEntry>(mpFillGradientItem->GetGradientValue(), aTmpStr)); xGradientList->SetDirty( false ); const BitmapEx aBmp = xGradientList->GetUiBitmap( 0 ); @@ -416,7 +416,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", xGradientList->Get(0)->GetName(), *pVD); + mpLbFillAttr->append(u""_ustr, xGradientList->Get(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } @@ -468,7 +468,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - rtl::Reference<XHatchList> xHatchList = new XHatchList( "", ""/*TODO?*/ ); + rtl::Reference<XHatchList> xHatchList = new XHatchList( u""_ustr, u""_ustr/*TODO?*/ ); xHatchList->Insert(std::make_unique<XHatchEntry>(mpHatchItem->GetHatchValue(), aTmpStr)); xHatchList->SetDirty( false ); const BitmapEx & aBmp = xHatchList->GetUiBitmap( 0 ); @@ -479,7 +479,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", xHatchList->GetHatch(0)->GetName(), *pVD); + mpLbFillAttr->append(u""_ustr, xHatchList->GetHatch(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } @@ -534,7 +534,7 @@ void SvxFillToolBoxControl::Update() XBitmapListRef xBitmapList = XPropertyList::AsBitmapList( XPropertyList::CreatePropertyList( - XPropertyListType::Bitmap, "TmpList", ""/*TODO?*/)); + XPropertyListType::Bitmap, u"TmpList"_ustr, u""_ustr/*TODO?*/)); xBitmapList->Insert(std::make_unique<XBitmapEntry>(mpBitmapItem->GetGraphicObject(), aTmpStr)); xBitmapList->SetDirty( false ); SvxFillAttrBox::Fill(*mpLbFillAttr, xBitmapList); @@ -590,11 +590,11 @@ VclPtr<InterimItemWindow> SvxFillToolBoxControl::CreateItemWindow(vcl::Window *p } FillControl::FillControl(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame) - : InterimItemWindow(pParent, "svx/ui/fillctrlbox.ui", "FillCtrlBox") - , mxLbFillType(m_xBuilder->weld_combo_box("type")) - , mxToolBoxColor(m_xBuilder->weld_toolbar("color")) + : InterimItemWindow(pParent, u"svx/ui/fillctrlbox.ui"_ustr, u"FillCtrlBox"_ustr) + , mxLbFillType(m_xBuilder->weld_combo_box(u"type"_ustr)) + , mxToolBoxColor(m_xBuilder->weld_toolbar(u"color"_ustr)) , mxColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxColor, *m_xBuilder, rFrame)) - , mxLbFillAttr(m_xBuilder->weld_combo_box("attr")) + , mxLbFillAttr(m_xBuilder->weld_combo_box(u"attr"_ustr)) , mnTypeCurPos(0) , mnAttrCurPos(0) { @@ -735,7 +735,7 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillTypeHdl, weld::ComboBox&, void) if (pSh) { const ::Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO; - const XFillColorItem aXFillColorItem( "", aColor ); + const XFillColorItem aXFillColorItem( u""_ustr, aColor ); // #i122676# change FillStyle and Color in one call pSh->GetDispatcher()->ExecuteList( @@ -1087,7 +1087,7 @@ void FillControl::GetFocus() { // tdf#148047 if the dropdown is active then leave the focus // there and don't grab back to a different widget - if (mxToolBoxColor->get_menu_item_active(".uno:FillColor")) + if (mxToolBoxColor->get_menu_item_active(u".uno:FillColor"_ustr)) return; InterimItemWindow::GetFocus(); } diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 416595c96b5d..7e54f1a3f932 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -60,13 +60,13 @@ namespace svx FontWorkGalleryDialog::FontWorkGalleryDialog(weld::Window* pParent, SdrView& rSdrView, Reference<css::frame::XFrame> xFrame) - : GenericDialogController(pParent, "svx/ui/fontworkgallerydialog.ui", "FontworkGalleryDialog") + : GenericDialogController(pParent, u"svx/ui/fontworkgallerydialog.ui"_ustr, u"FontworkGalleryDialog"_ustr) , mnThemeId(0xffff) , mrSdrView(rSdrView) , mbInsertIntoPage(true) , mpDestModel(nullptr) - , maCtlFavorites(m_xBuilder->weld_icon_view("ctlFavoriteswin")) - , mxOKButton(m_xBuilder->weld_button("ok")) + , maCtlFavorites(m_xBuilder->weld_icon_view(u"ctlFavoriteswin"_ustr)) + , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr)) , mxFrame(std::move(xFrame)) { Size aSize(530, 400); @@ -324,12 +324,12 @@ private: constexpr OUString gsFontworkAlignment(u".uno:FontworkAlignment"_ustr); FontworkAlignmentWindow::FontworkAlignmentWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkalignmentcontrol.ui", "FontworkAlignmentControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/fontworkalignmentcontrol.ui"_ustr, u"FontworkAlignmentControl"_ustr) , mxControl(pControl) - , mxLeft(m_xBuilder->weld_radio_button("left")) - , mxCenter(m_xBuilder->weld_radio_button("center")) - , mxRight(m_xBuilder->weld_radio_button("right")) - , mxStretch(m_xBuilder->weld_radio_button("stretch")) + , mxLeft(m_xBuilder->weld_radio_button(u"left"_ustr)) + , mxCenter(m_xBuilder->weld_radio_button(u"center"_ustr)) + , mxRight(m_xBuilder->weld_radio_button(u"right"_ustr)) + , mxStretch(m_xBuilder->weld_radio_button(u"stretch"_ustr)) , mbSettingValue(false) { mxLeft->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl)); @@ -424,7 +424,7 @@ public: } FontworkAlignmentControl::FontworkAlignmentControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), ".uno:FontworkAlignment" ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), u".uno:FontworkAlignment"_ustr ) { } @@ -465,13 +465,13 @@ void SAL_CALL FontworkAlignmentControl::initialize( const css::uno::Sequence< cs OUString FontworkAlignmentControl::getImplementationName() { - return "com.sun.star.comp.svx.FontworkAlignmentController"; + return u"com.sun.star.comp.svx.FontworkAlignmentController"_ustr; } Sequence< OUString > FontworkAlignmentControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } @@ -520,15 +520,15 @@ constexpr OUString gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing"_u constexpr OUString gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs"_ustr); FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkcharacterspacingcontrol.ui", "FontworkCharacterSpacingControl") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/fontworkcharacterspacingcontrol.ui"_ustr, u"FontworkCharacterSpacingControl"_ustr) , mxControl(pControl) - , mxVeryTight(m_xBuilder->weld_radio_button("verytight")) - , mxTight(m_xBuilder->weld_radio_button("tight")) - , mxNormal(m_xBuilder->weld_radio_button("normal")) - , mxLoose(m_xBuilder->weld_radio_button("loose")) - , mxVeryLoose(m_xBuilder->weld_radio_button("veryloose")) - , mxCustom(m_xBuilder->weld_radio_button("custom")) - , mxKernPairs(m_xBuilder->weld_check_button("kernpairs")) + , mxVeryTight(m_xBuilder->weld_radio_button(u"verytight"_ustr)) + , mxTight(m_xBuilder->weld_radio_button(u"tight"_ustr)) + , mxNormal(m_xBuilder->weld_radio_button(u"normal"_ustr)) + , mxLoose(m_xBuilder->weld_radio_button(u"loose"_ustr)) + , mxVeryLoose(m_xBuilder->weld_radio_button(u"veryloose"_ustr)) + , mxCustom(m_xBuilder->weld_radio_button(u"custom"_ustr)) + , mxKernPairs(m_xBuilder->weld_check_button(u"kernpairs"_ustr)) , mnCharacterSpacing(0) , mbSettingValue(false) , mbCommandDispatched(false) @@ -659,7 +659,7 @@ void FontworkCharacterSpacingWindow::DispatchSpacingDialog() rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode(); - xControl->dispatchCommand(".uno:FontworkCharacterSpacingDialog", aArgs); + xControl->dispatchCommand(u".uno:FontworkCharacterSpacingDialog"_ustr, aArgs); mbCommandDispatched = true; } @@ -744,7 +744,7 @@ public: } FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), ".uno:FontworkCharacterSpacingFloater" ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), u".uno:FontworkCharacterSpacingFloater"_ustr ) { } @@ -785,13 +785,13 @@ void SAL_CALL FontworkCharacterSpacingControl::initialize( const css::uno::Seque OUString FontworkCharacterSpacingControl::getImplementationName() { - return "com.sun.star.comp.svx.FontworkCharacterSpacingController"; + return u"com.sun.star.comp.svx.FontworkCharacterSpacingController"_ustr; } Sequence< OUString > FontworkCharacterSpacingControl::getSupportedServiceNames() { - Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; + Sequence<OUString> aSNS { u"com.sun.star.frame.ToolbarController"_ustr }; return aSNS; } @@ -805,8 +805,8 @@ com_sun_star_comp_svx_FontworkCharacterSpacingControl_get_implementation( } FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog(weld::Window* pParent, sal_Int32 nScale) - : GenericDialogController(pParent, "svx/ui/fontworkspacingdialog.ui", "FontworkSpacingDialog") - , m_xMtrScale(m_xBuilder->weld_metric_spin_button("entry", FieldUnit::PERCENT)) + : GenericDialogController(pParent, u"svx/ui/fontworkspacingdialog.ui"_ustr, u"FontworkSpacingDialog"_ustr) + , m_xMtrScale(m_xBuilder->weld_metric_spin_button(u"entry"_ustr, FieldUnit::PERCENT)) { m_xMtrScale->set_value(nScale, FieldUnit::PERCENT); } diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index f67efd12c701..a10040988fab 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -55,9 +55,9 @@ FormatPaintBrushToolBoxControl::~FormatPaintBrushToolBoxControl() void FormatPaintBrushToolBoxControl::impl_executePaintBrush() { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("PersistentCopy", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"PersistentCopy"_ustr, m_bPersistentCopy) }; - Dispatch( ".uno:FormatPaintbrush" + Dispatch( u".uno:FormatPaintbrush"_ustr , aArgs ); } diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 39e974fa0c2a..6ddb8450657a 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -193,11 +193,11 @@ ImplGrafControl::ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame) - : InterimItemWindow(pParent, "svx/ui/grafctrlbox.ui", "GrafCtrlBox") + : InterimItemWindow(pParent, u"svx/ui/grafctrlbox.ui"_ustr, u"GrafCtrlBox"_ustr) , maCommand(rCmd) , mxFrame(rFrame) - , mxImage(m_xBuilder->weld_image("image")) - , mxField(m_xBuilder->weld_metric_spin_button("spinfield", FieldUnit::NONE)) + , mxImage(m_xBuilder->weld_image(u"image"_ustr)) + , mxField(m_xBuilder->weld_metric_spin_button(u"spinfield"_ustr, FieldUnit::NONE)) { InitControlBase(&mxField->get_widget()); @@ -286,10 +286,10 @@ public: } ImplGrafModeControl::ImplGrafModeControl(vcl::Window* pParent, const Reference<XFrame>& rFrame) - : InterimItemWindow(pParent, "svx/ui/grafmodebox.ui", "GrafModeBox") + : InterimItemWindow(pParent, u"svx/ui/grafmodebox.ui"_ustr, u"GrafModeBox"_ustr) , mnCurPos(0) , mxFrame(rFrame) - , m_xWidget(m_xBuilder->weld_combo_box("grafmode")) + , m_xWidget(m_xBuilder->weld_combo_box(u"grafmode"_ustr)) { InitControlBase(m_xWidget.get()); @@ -318,7 +318,7 @@ ImplGrafModeControl::~ImplGrafModeControl() IMPL_LINK(ImplGrafModeControl, SelectHdl, weld::ComboBox&, rBox, void) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("GrafMode", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"GrafMode"_ustr, sal_Int16(rBox.get_active())) }; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -328,7 +328,7 @@ IMPL_LINK(ImplGrafModeControl, SelectHdl, weld::ComboBox&, rBox, void) SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), - ".uno:GrafMode", + u".uno:GrafMode"_ustr, aArgs ); } diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 4fd4086fe0a5..30a1b66d173e 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -47,8 +47,8 @@ using namespace ::com::sun::star::beans; SvxMetricField::SvxMetricField( vcl::Window* pParent, const Reference< XFrame >& rFrame ) - : InterimItemWindow(pParent, "svx/ui/metricfieldbox.ui", "MetricFieldBox") - , m_xWidget(m_xBuilder->weld_metric_spin_button("metricfield", FieldUnit::MM)) + : InterimItemWindow(pParent, u"svx/ui/metricfieldbox.ui"_ustr, u"MetricFieldBox"_ustr) + , m_xWidget(m_xBuilder->weld_metric_spin_button(u"metricfield"_ustr, FieldUnit::MM)) , nCurValue(0) , eDestPoolUnit(MapUnit::Map100thMM) , eDlgUnit(SfxModule::GetModuleFieldUnit(rFrame)) @@ -82,7 +82,7 @@ void SvxMetricField::set_sensitive(bool bSensitive) Enable(bSensitive); m_xWidget->set_sensitive(bSensitive); if (!bSensitive) - m_xWidget->set_text(""); + m_xWidget->set_text(u""_ustr); } void SvxMetricField::Update( const XLineWidthItem* pItem ) @@ -95,7 +95,7 @@ void SvxMetricField::Update( const XLineWidthItem* pItem ) SetMetricValue(*m_xWidget, pItem->GetValue(), MapUnit::Map100thMM); } else - m_xWidget->set_text(""); + m_xWidget->set_text(u""_ustr); } IMPL_LINK_NOARG(SvxMetricField, ModifyHdl, weld::MetricSpinButton&, void) @@ -105,9 +105,9 @@ IMPL_LINK_NOARG(SvxMetricField, ModifyHdl, weld::MetricSpinButton&, void) Any a; aLineWidthItem.QueryValue( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineWidth", a) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineWidth"_ustr, a) }; SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), - ".uno:LineWidth", + u".uno:LineWidth"_ustr, aArgs ); } @@ -258,7 +258,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XHatchListRef &pList) const Size aBmpSize(aBitmapEx.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } else rBox.append_text(pEntry->GetName()); @@ -285,7 +285,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XGradientListRef &pList) const Size aBmpSize(aBitmapEx.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } else rBox.append_text(pEntry->GetName()); @@ -312,7 +312,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XBitmapListRef &pList) BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(aBitmapEx, aSize); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } rBox.thaw(); @@ -336,7 +336,7 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XPatternListRef &pList) BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(aBitmapEx, aSize); pVD->DrawBitmapEx(Point(), aBitmapEx); - rBox.append("", pEntry->GetName(), *pVD); + rBox.append(u""_ustr, pEntry->GetName(), *pVD); } rBox.thaw(); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 88dd401555d4..261c012c8287 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -110,10 +110,10 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl, weld::Button&, void) } TableWindow::TableWindow(SvxTableToolBoxControl* pControl, weld::Widget* pParent, const OUString& rCmd) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/tablewindow.ui", "TableWindow") - , mxTableButton(m_xBuilder->weld_button("moreoptions")) + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/tablewindow.ui"_ustr, u"TableWindow"_ustr) + , mxTableButton(m_xBuilder->weld_button(u"moreoptions"_ustr)) , mxTableWidget(new TableWidget(pControl, rCmd)) - , mxTableWidgetWin(new weld::CustomWeld(*m_xBuilder, "table", *mxTableWidget)) + , mxTableWidgetWin(new weld::CustomWeld(*m_xBuilder, u"table"_ustr, *mxTableWidget)) , mxControl(pControl) { mxTableButton->set_label( SvxResId( RID_SVXSTR_MORE ) ); @@ -337,8 +337,8 @@ void TableWidget::InsertTable() { if (nCol && nLine) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("Columns", sal_Int16( nCol )), - comphelper::makePropertyValue("Rows", sal_Int16( nLine )) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"Columns"_ustr, sal_Int16( nCol )), + comphelper::makePropertyValue(u"Rows"_ustr, sal_Int16( nLine )) }; mxControl->TableDialog( aArgs ); } @@ -442,10 +442,10 @@ public: } ColumnsWindow::ColumnsWindow(SvxColumnsToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/columnswindow.ui", "ColumnsWindow") - , mxSpinButton(m_xBuilder->weld_spin_button("spinbutton")) + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/columnswindow.ui"_ustr, u"ColumnsWindow"_ustr) + , mxSpinButton(m_xBuilder->weld_spin_button(u"spinbutton"_ustr)) , mxColumnsWidget(new ColumnsWidget(pControl, *mxSpinButton)) - , mxColumnsWidgetWin(new weld::CustomWeld(*m_xBuilder, "columns", *mxColumnsWidget)) + , mxColumnsWidgetWin(new weld::CustomWeld(*m_xBuilder, u"columns"_ustr, *mxColumnsWidget)) , mxControl(pControl) { } @@ -672,8 +672,8 @@ void ColumnsWidget::InsertColumns() if (nCol) { Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("Columns", sal_Int16( nCol )), - comphelper::makePropertyValue("Modifier", sal_Int16( m_bMod1 ? KEY_MOD1 : 0 )) + comphelper::makePropertyValue(u"Columns"_ustr, sal_Int16( nCol )), + comphelper::makePropertyValue(u"Modifier"_ustr, sal_Int16( m_bMod1 ? KEY_MOD1 : 0 )) }; mxControl->InsertColumns(aArgs); } @@ -721,12 +721,12 @@ VclPtr<vcl::Window> SvxTableToolBoxControl::createVclPopupWindow( vcl::Window* p OUString SvxTableToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.TableToolBoxControl"; + return u"com.sun.star.comp.svx.TableToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxTableToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -779,12 +779,12 @@ VclPtr<vcl::Window> SvxColumnsToolBoxControl::createVclPopupWindow(vcl::Window* OUString SvxColumnsToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.ColumnsToolBoxControl"; + return u"com.sun.star.comp.svx.ColumnsToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxColumnsToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 6b0a3e32e43c..f814cc87c249 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -70,9 +70,9 @@ public: SvxPopupWindowListBox::SvxPopupWindowListBox(SvxUndoRedoControl* pControl, weld::Widget* pParent, const std::vector<OUString>& rUndoRedoList) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingundoredo.ui", "FloatingUndoRedo") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingundoredo.ui"_ustr, u"FloatingUndoRedo"_ustr) , m_xControl(pControl) - , m_xListBox(m_xBuilder->weld_tree_view("treeview")) + , m_xListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr)) , m_xScratchIter(m_xListBox->make_iterator()) , m_nVisRows(10) { @@ -301,9 +301,9 @@ void SAL_CALL SvxUndoRedoControl::statusChanged(const css::frame::FeatureStateEv std::unique_ptr<WeldToolbarPopup> SvxUndoRedoControl::weldPopupWindow() { if ( m_aCommandURL == ".uno:Undo" ) - updateStatus( ".uno:GetUndoStrings"); + updateStatus( u".uno:GetUndoStrings"_ustr); else - updateStatus( ".uno:GetRedoStrings"); + updateStatus( u".uno:GetRedoStrings"_ustr); return std::make_unique<SvxPopupWindowListBox>(this, m_pToolbar, aUndoRedoList); } @@ -311,9 +311,9 @@ std::unique_ptr<WeldToolbarPopup> SvxUndoRedoControl::weldPopupWindow() VclPtr<vcl::Window> SvxUndoRedoControl::createVclPopupWindow( vcl::Window* pParent ) { if ( m_aCommandURL == ".uno:Undo" ) - updateStatus( ".uno:GetUndoStrings"); + updateStatus( u".uno:GetUndoStrings"_ustr); else - updateStatus( ".uno:GetRedoStrings"); + updateStatus( u".uno:GetRedoStrings"_ustr); auto xPopupWin = std::make_unique<SvxPopupWindowListBox>(this, pParent->GetFrameWeld(), aUndoRedoList); @@ -329,12 +329,12 @@ VclPtr<vcl::Window> SvxUndoRedoControl::createVclPopupWindow( vcl::Window* pPare OUString SvxUndoRedoControl::getImplementationName() { - return "com.sun.star.comp.svx.UndoRedoToolBoxControl"; + return u"com.sun.star.comp.svx.UndoRedoToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxUndoRedoControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index b1264a5a8f67..a47665d1bde5 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star; SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ) : svt::PopupWindowController( rContext, nullptr, OUString() ) { - addStatusListener(".uno:LineDash"); + addStatusListener(u".uno:LineDash"_ustr); } SvxLineStyleToolBoxControl::~SvxLineStyleToolBoxControl() @@ -205,12 +205,12 @@ VclPtr<vcl::Window> SvxLineStyleToolBoxControl::createVclPopupWindow( vcl::Windo OUString SvxLineStyleToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.LineStyleToolBoxControl"; + return u"com.sun.star.comp.svx.LineStyleToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxLineStyleToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -271,10 +271,10 @@ public: constexpr sal_uInt16 gnCols = 2; SvxLineEndWindow::SvxLineEndWindow(SvxLineEndToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglineend.ui", "FloatingLineEnd") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatinglineend.ui"_ustr, u"FloatingLineEnd"_ustr) , mxControl(pControl) - , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxLineEndSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineEndSet)) + , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxLineEndSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLineEndSet)) , mnLines(12) { mxLineEndSet->SetStyle(mxLineEndSet->GetStyle() | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -296,7 +296,7 @@ SvxLineEndWindow::SvxLineEndWindow(SvxLineEndToolBoxControl* pControl, weld::Wid // ValueSet fill with entries of LineEndList FillValueSet(); - AddStatusListener( ".uno:LineEndListState"); + AddStatusListener( u".uno:LineEndListState"_ustr); } IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl, ValueSet*, void) @@ -490,12 +490,12 @@ VclPtr<vcl::Window> SvxLineEndToolBoxControl::createVclPopupWindow( vcl::Window* OUString SvxLineEndToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.LineEndToolBoxControl"; + return u"com.sun.star.comp.svx.LineEndToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxLineEndToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -507,10 +507,10 @@ com_sun_star_comp_svx_LineEndToolBoxControl_get_implementation( } SvxLineBox::SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglinestyle.ui", "FloatingLineStyle") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatinglinestyle.ui"_ustr, u"FloatingLineStyle"_ustr) , mxControl(pControl) - , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true))) - , mxLineStyleSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineStyleSet)) + , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) + , mxLineStyleSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLineStyleSet)) { mxLineStyleSet->SetStyle(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -605,8 +605,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) Any a; aLineDashItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineDash", a) }; - mxControl->dispatchLineStyleCommand(".uno:LineDash", aArgs); + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineDash"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:LineDash"_ustr, aArgs); // set also cap style using the toolbar line style selection popup css::drawing::DashStyle eStyle = pEntry->GetDash().GetDashStyle(); @@ -615,8 +615,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) ? css::drawing::LineCap_BUTT : css::drawing::LineCap_ROUND ); aLineCapItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs2{ comphelper::makePropertyValue("LineCap", a) }; - mxControl->dispatchLineStyleCommand(".uno:LineCap", aArgs2); + Sequence< PropertyValue > aArgs2{ comphelper::makePropertyValue(u"LineCap"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:LineCap"_ustr, aArgs2); } } break; @@ -625,8 +625,8 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void) XLineStyleItem aLineStyleItem( eXLS ); Any a; aLineStyleItem.QueryValue ( a ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("XLineStyle", a) }; - mxControl->dispatchLineStyleCommand(".uno:XLineStyle", aArgs); + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"XLineStyle"_ustr, a) }; + mxControl->dispatchLineStyleCommand(u".uno:XLineStyle"_ustr, aArgs); mxControl->EndPopupMode(); } diff --git a/svx/source/tbxctrls/linewidthctrl.cxx b/svx/source/tbxctrls/linewidthctrl.cxx index cbb5b64b600a..8d23f1ab3c69 100644 --- a/svx/source/tbxctrls/linewidthctrl.cxx +++ b/svx/source/tbxctrls/linewidthctrl.cxx @@ -34,7 +34,7 @@ SvxLineWidthToolBoxControl::SvxLineWidthToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { - addStatusListener( ".uno:MetricUnit"); + addStatusListener( u".uno:MetricUnit"_ustr); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 85d38fd0556e..309f3e403b94 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -350,7 +350,7 @@ protected: { Sequence< PropertyValue > aArgs; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharEndPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharEndPreviewFontName"_ustr, aArgs); } bool CheckFontIsAvailable(std::u16string_view fontname); @@ -870,8 +870,8 @@ SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget, OUString _aMoreKey, bool bInSpec, SvxStyleToolBoxControl& rCtrl) : m_rCtrl(rCtrl) - , m_xMenuBuilder(Application::CreateBuilder(nullptr, "svx/ui/stylemenu.ui")) - , m_xMenu(m_xMenuBuilder->weld_menu("menu")) + , m_xMenuBuilder(Application::CreateBuilder(nullptr, u"svx/ui/stylemenu.ui"_ustr)) + , m_xMenu(m_xMenuBuilder->weld_menu(u"menu"_ustr)) , m_xWidget(std::move(xWidget)) , eStyleFamily( eFamily ) , m_nMaxUserDrawFontWidth(0) @@ -914,13 +914,13 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent, const OUString& rClearFormatKey, const OUString& rMoreKey, bool bInSpec, SvxStyleToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/applystylebox.ui", "ApplyStyleBox") - , SvxStyleBox_Base(m_xBuilder->weld_combo_box("applystyle"), rCommand, eFamily, _xFrame, + : InterimItemWindow(pParent, u"svx/ui/applystylebox.ui"_ustr, u"ApplyStyleBox"_ustr) + , SvxStyleBox_Base(m_xBuilder->weld_combo_box(u"applystyle"_ustr), rCommand, eFamily, _xFrame, rClearFormatKey, rMoreKey, bInSpec, rCtrl) { InitControlBase(m_xWidget.get()); - set_id("applystyle"); + set_id(u"applystyle"_ustr); SetOptimalSize(); } @@ -943,18 +943,18 @@ IMPL_LINK(SvxStyleBox_Base, MenuSelectHdl, const OUString&, rMenuIdent, void) OUString sEntry = m_xWidget->get_text(m_nLastItemWithMenu); ReleaseFocus(); // It must be after getting entry pos! - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("Param", sEntry), - comphelper::makePropertyValue("Family", + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"Param"_ustr, sEntry), + comphelper::makePropertyValue(u"Family"_ustr, sal_Int16( eStyleFamily )) }; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); if (rMenuIdent == "update") { - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleUpdateByExample", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleUpdateByExample"_ustr, aArgs); } else if (rMenuIdent == "edit") { - SfxToolBoxControl::Dispatch(xProvider, ".uno:EditStyle", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:EditStyle"_ustr, aArgs); } } @@ -995,7 +995,7 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect) //not only apply default style but also call 'ClearFormatting' Sequence< PropertyValue > aEmptyVals; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:ResetAttributes", aEmptyVals); + SfxToolBoxControl::Dispatch(xProvider, u".uno:ResetAttributes"_ustr, aEmptyVals); } else if (aSearchEntry == aMoreKey && m_xWidget->get_active() == (m_xWidget->get_count() - 1)) { @@ -1052,7 +1052,7 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect) if( bCreateNew ) { pArgs[0].Name = "Param"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:StyleNewByExample", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:StyleNewByExample"_ustr, aArgs); } else { @@ -1718,9 +1718,9 @@ static bool lcl_GetDocFontList(const FontList** ppFontList, SvxFontNameBox_Base* SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr<weld::ComboBox> xWidget, const Reference<XFrame>& rFrame, SvxFontNameToolBoxControl& rCtrl) - : m_xListener(new comphelper::ConfigurationListener("/org.openoffice.Office.Common/Font/View")) - , m_aWYSIWYG(m_xListener, "ShowFontBoxWYSIWYG", *this) - , m_aHistory(m_xListener, "History", *this) + : m_xListener(new comphelper::ConfigurationListener(u"/org.openoffice.Office.Common/Font/View"_ustr)) + , m_aWYSIWYG(m_xListener, u"ShowFontBoxWYSIWYG"_ustr, *this) + , m_aHistory(m_xListener, u"History"_ustr, *this) , m_rCtrl(rCtrl) , m_xWidget(new FontNameBox(std::move(xWidget))) , pFontList(nullptr) @@ -1746,10 +1746,10 @@ SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr<weld::ComboBox> xWidget SvxFontNameBox_Impl::SvxFontNameBox_Impl(vcl::Window* pParent, const Reference<XFrame>& rFrame, SvxFontNameToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/fontnamebox.ui", "FontNameBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , SvxFontNameBox_Base(m_xBuilder->weld_combo_box("fontnamecombobox"), rFrame, rCtrl) + : InterimItemWindow(pParent, u"svx/ui/fontnamebox.ui"_ustr, u"FontNameBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) + , SvxFontNameBox_Base(m_xBuilder->weld_combo_box(u"fontnamecombobox"_ustr), rFrame, rCtrl) { - set_id("fontnamecombobox"); + set_id(u"fontnamecombobox"_ustr); SetOptimalSize(); } @@ -1889,7 +1889,7 @@ IMPL_LINK(SvxFontNameBox_Base, LivePreviewHdl, const FontMetric&, rFontMetric, v aFontItem.QueryValue(pArgs[0].Value); pArgs[0].Name = "CharPreviewFontName"; const Reference<XDispatchProvider> xProvider(m_xFrame, UNO_QUERY); - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharPreviewFontName"_ustr, aArgs); } IMPL_LINK_NOARG(SvxFontNameBox_Base, PopupToggledHdl, weld::ComboBox&, void) @@ -2004,7 +2004,7 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect) if (pFontItem) { pArgs[0].Name = "CharFontName"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharFontName"_ustr, aArgs); } } else @@ -2012,7 +2012,7 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect) if (pFontItem) { pArgs[0].Name = "CharPreviewFontName"; - SfxToolBoxControl::Dispatch(xProvider, ".uno:CharPreviewFontName", aArgs); + SfxToolBoxControl::Dispatch(xProvider, u".uno:CharPreviewFontName"_ustr, aArgs); } } } @@ -2051,7 +2051,7 @@ ColorWindow::ColorWindow(OUString rCommand, const MenuOrToolMenuButton& rMenuButton, TopLevelParentFunction aTopLevelParentFunction, ColorSelectFunction aColorSelectFunction) - : WeldToolbarPopup(rFrame, rMenuButton.get_widget(), "svx/ui/colorwindow.ui", "palette_popup_window") + : WeldToolbarPopup(rFrame, rMenuButton.get_widget(), u"svx/ui/colorwindow.ui"_ustr, u"palette_popup_window"_ustr) , theSlotId(nSlotId) , maCommand(std::move(rCommand)) , maMenuButton(rMenuButton) @@ -2059,15 +2059,15 @@ ColorWindow::ColorWindow(OUString rCommand, , mrColorStatus(rColorStatus) , maTopLevelParentFunction(std::move(aTopLevelParentFunction)) , maColorSelectFunction(std::move(aColorSelectFunction)) - , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true))) + , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window(u"colorsetwin"_ustr, true))) , mxRecentColorSet(new SvxColorValueSet(nullptr)) - , mxPaletteListBox(m_xBuilder->weld_combo_box("palette_listbox")) - , mxButtonAutoColor(m_xBuilder->weld_button("auto_color_button")) - , mxButtonNoneColor(m_xBuilder->weld_button("none_color_button")) - , mxButtonPicker(m_xBuilder->weld_button("color_picker_button")) - , mxAutomaticSeparator(m_xBuilder->weld_widget("separator4")) - , mxColorSetWin(new weld::CustomWeld(*m_xBuilder, "colorset", *mxColorSet)) - , mxRecentColorSetWin(new weld::CustomWeld(*m_xBuilder, "recent_colorset", *mxRecentColorSet)) + , mxPaletteListBox(m_xBuilder->weld_combo_box(u"palette_listbox"_ustr)) + , mxButtonAutoColor(m_xBuilder->weld_button(u"auto_color_button"_ustr)) + , mxButtonNoneColor(m_xBuilder->weld_button(u"none_color_button"_ustr)) + , mxButtonPicker(m_xBuilder->weld_button(u"color_picker_button"_ustr)) + , mxAutomaticSeparator(m_xBuilder->weld_widget(u"separator4"_ustr)) + , mxColorSetWin(new weld::CustomWeld(*m_xBuilder, u"colorset"_ustr, *mxColorSet)) + , mxRecentColorSetWin(new weld::CustomWeld(*m_xBuilder, u"recent_colorset"_ustr, *mxRecentColorSet)) , mpDefaultButton(nullptr) { mxColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) ); @@ -2143,12 +2143,12 @@ ColorWindow::ColorWindow(OUString rCommand, aSize = mxRecentColorSet->layoutAllVisible(mxPaletteManager->GetRecentColorCount()); mxRecentColorSet->set_size_request(aSize.Width(), aSize.Height()); - AddStatusListener( ".uno:ColorTableState" ); + AddStatusListener( u".uno:ColorTableState"_ustr ); AddStatusListener( maCommand ); if ( maCommand == ".uno:FrameLineColor" ) { - AddStatusListener( ".uno:BorderTLBR" ); - AddStatusListener( ".uno:BorderBLTR" ); + AddStatusListener( u".uno:BorderTLBR"_ustr ); + AddStatusListener( u".uno:BorderBLTR"_ustr ); } } @@ -2457,20 +2457,20 @@ Color ColorStatus::GetColor() SvxFrameWindow_Impl::SvxFrameWindow_Impl(SvxFrameToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingframeborder.ui", "FloatingFrameBorder") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingframeborder.ui"_ustr, u"FloatingFrameBorder"_ustr) , mxControl(pControl) , mxFrameSet(new SvxFrmValueSet_Impl) - , mxFrameSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxFrameSet)) + , mxFrameSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxFrameSet)) , bParagraphMode(false) , m_bIsWriter(false) { // check whether the document is Writer or not if (Reference<lang::XServiceInfo> xSI{ m_xFrame->getController()->getModel(), UNO_QUERY }) - m_bIsWriter = xSI->supportsService("com.sun.star.text.TextDocument"); + m_bIsWriter = xSI->supportsService(u"com.sun.star.text.TextDocument"_ustr); mxFrameSet->SetStyle(WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); - AddStatusListener(".uno:BorderReducedMode"); + AddStatusListener(u".uno:BorderReducedMode"_ustr); InitImageList(); /* @@ -2674,10 +2674,10 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl, ValueSet*, void) Any a1, a2; aBorderOuter.QueryValue( a1 ); aBorderInner.QueryValue( a2 ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("OuterBorder", a1), - comphelper::makePropertyValue("InnerBorder", a2) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"OuterBorder"_ustr, a1), + comphelper::makePropertyValue(u"InnerBorder"_ustr, a2) }; - mxControl->dispatchCommand( ".uno:SetBorderStyle", aArgs ); + mxControl->dispatchCommand( u".uno:SetBorderStyle"_ustr, aArgs ); } // coverity[ check_after_deref : FALSE] @@ -2697,9 +2697,9 @@ void SvxFrameWindow_Impl::SetDiagonalDownBorder(const SvxLineItem& dDownLineItem // apply diagonal down border Any a; dDownLineItem.QueryValue(a); - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("BorderTLBR", a) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"BorderTLBR"_ustr, a) }; - mxControl->dispatchCommand(".uno:BorderTLBR", aArgs); + mxControl->dispatchCommand(u".uno:BorderTLBR"_ustr, aArgs); } void SvxFrameWindow_Impl::SetDiagonalUpBorder(const SvxLineItem& dUpLineItem) @@ -2707,9 +2707,9 @@ void SvxFrameWindow_Impl::SetDiagonalUpBorder(const SvxLineItem& dUpLineItem) // apply diagonal up border Any a; dUpLineItem.QueryValue(a); - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("BorderBLTR", a) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"BorderBLTR"_ustr, a) }; - mxControl->dispatchCommand(".uno:BorderBLTR", aArgs); + mxControl->dispatchCommand(u".uno:BorderBLTR"_ustr, aArgs); } void SvxFrameWindow_Impl::statusChanged( const css::frame::FeatureStateEvent& rEvent ) @@ -2816,16 +2816,16 @@ static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ ) } SvxLineWindow_Impl::SvxLineWindow_Impl(SvxFrameToolBoxControl* pControl, weld::Widget* pParent) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatingframeborder.ui", "FloatingFrameBorder") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/floatingframeborder.ui"_ustr, u"FloatingFrameBorder"_ustr) , m_xControl(pControl) , m_xLineStyleLb(new LineListBox) - , m_xLineStyleLbWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xLineStyleLb)) + , m_xLineStyleLbWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xLineStyleLb)) , m_bIsWriter(false) { try { Reference< lang::XServiceInfo > xServices(m_xFrame->getController()->getModel(), UNO_QUERY_THROW); - m_bIsWriter = xServices->supportsService("com.sun.star.text.TextDocument"); + m_bIsWriter = xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr); } catch(const uno::Exception& ) { @@ -2893,9 +2893,9 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ValueSet*, void) Any a; aLineItem.QueryValue( a, m_bIsWriter ? CONVERT_TWIPS : 0 ); - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("LineStyle", a) }; + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"LineStyle"_ustr, a) }; - m_xControl->dispatchCommand( ".uno:LineStyle", aArgs ); + m_xControl->dispatchCommand( u".uno:LineStyle"_ustr, aArgs ); m_xControl->EndPopupMode(); } @@ -2968,24 +2968,24 @@ struct SvxStyleToolBoxControl::Impl { Reference< style::XStyleFamiliesSupplier > xStylesSupplier( xModel, UNO_QUERY_THROW ); Reference< lang::XServiceInfo > xServices( xModel, UNO_QUERY_THROW ); - bSpecModeWriter = xServices->supportsService("com.sun.star.text.TextDocument"); + bSpecModeWriter = xServices->supportsService(u"com.sun.star.text.TextDocument"_ustr); if(bSpecModeWriter) { Reference<container::XNameAccess> xParaStyles; - xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= + xStylesSupplier->getStyleFamilies()->getByName(u"ParagraphStyles"_ustr) >>= xParaStyles; static const std::vector<OUString> aWriterStyles = { - "Standard", - "Text body", - "Title", - "Subtitle", - "Heading 1", - "Heading 2", - "Heading 3", - "Heading 4", - "Quotations", - "Preformatted Text" + u"Standard"_ustr, + u"Text body"_ustr, + u"Title"_ustr, + u"Subtitle"_ustr, + u"Heading 1"_ustr, + u"Heading 2"_ustr, + u"Heading 3"_ustr, + u"Heading 4"_ustr, + u"Quotations"_ustr, + u"Preformatted Text"_ustr }; for( const OUString& aStyle: aWriterStyles ) { @@ -2994,7 +2994,7 @@ struct SvxStyleToolBoxControl::Impl Reference< beans::XPropertySet > xStyle; xParaStyles->getByName( aStyle ) >>= xStyle; OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back( std::pair<OUString, OUString>(aStyle, sName) ); @@ -3006,7 +3006,7 @@ struct SvxStyleToolBoxControl::Impl } else if( ( bSpecModeCalc = xServices->supportsService( - "com.sun.star.sheet.SpreadsheetDocument"))) + u"com.sun.star.sheet.SpreadsheetDocument"_ustr))) { static const char* aCalcStyles[] = { @@ -3019,7 +3019,7 @@ struct SvxStyleToolBoxControl::Impl "Result" }; Reference<container::XNameAccess> xCellStyles; - xStylesSupplier->getStyleFamilies()->getByName("CellStyles") >>= xCellStyles; + xStylesSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr) >>= xCellStyles; for(const char* pCalcStyle : aCalcStyles) { try @@ -3029,7 +3029,7 @@ struct SvxStyleToolBoxControl::Impl { Reference< beans::XPropertySet > xStyle( xCellStyles->getByName( sStyleName), UNO_QUERY_THROW ); OUString sName; - xStyle->getPropertyValue("DisplayName") >>= sName; + xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back( std::pair<OUString, OUString>(sStyleName, sName) ); @@ -3136,7 +3136,7 @@ void SAL_CALL SvxStyleToolBoxControl::dispose() OUString SvxStyleToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.StyleToolBoxControl"; + return u"com.sun.star.comp.svx.StyleToolBoxControl"_ustr; } sal_Bool SvxStyleToolBoxControl::supportsService( const OUString& rServiceName ) @@ -3146,7 +3146,7 @@ sal_Bool SvxStyleToolBoxControl::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SvxStyleToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3236,7 +3236,7 @@ void SvxStyleToolBoxControl::FillStyleBox() if (pImpl->bSpecModeWriter || pImpl->bSpecModeCalc) { pBox->append_text(pImpl->aClearForm); - pBox->insert_separator(1, "separator"); + pBox->insert_separator(1, u"separator"_ustr); // add default styles if less than 12 items for( const auto &rStyle : pImpl->aDefaultStyles ) @@ -3368,12 +3368,12 @@ css::uno::Reference<css::awt::XWindow> SvxStyleToolBoxControl::createItemWindow( { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("applystyle")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"applystyle"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); pImpl->m_xWeldBox.reset(new SvxStyleBox_Base(std::move(xWidget), - ".uno:StyleApply", + u".uno:StyleApply"_ustr, SfxStyleFamily::Para, m_xFrame, pImpl->aClearForm, @@ -3428,7 +3428,7 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven else { // no active element; delete value in the display m_xWidget->set_active(-1); - set_active_or_entry_text(""); + set_active_or_entry_text(u""_ustr); } m_xWidget->save_value(); } @@ -3459,7 +3459,7 @@ css::uno::Reference<css::awt::XWindow> SvxFontNameToolBoxControl::createItemWind { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("fontnamecombobox")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"fontnamecombobox"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); @@ -3493,7 +3493,7 @@ void SvxFontNameToolBoxControl::dispose() OUString SvxFontNameToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.FontNameToolBoxControl"; + return u"com.sun.star.comp.svx.FontNameToolBoxControl"_ustr; } sal_Bool SvxFontNameToolBoxControl::supportsService( const OUString& rServiceName ) @@ -3503,7 +3503,7 @@ sal_Bool SvxFontNameToolBoxControl::supportsService( const OUString& rServiceNam css::uno::Sequence< OUString > SvxFontNameToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3593,17 +3593,17 @@ void SvxColorToolBoxControl::update() switch( m_nSlotId ) { case SID_ATTR_CHAR_COLOR2: - addStatusListener( ".uno:CharColorExt"); + addStatusListener( u".uno:CharColorExt"_ustr); break; case SID_ATTR_CHAR_BACK_COLOR: case SID_ATTR_CHAR_COLOR_BACKGROUND: - addStatusListener( ".uno:CharBackgroundExt"); + addStatusListener( u".uno:CharBackgroundExt"_ustr); break; case SID_FRAME_LINECOLOR: - addStatusListener( ".uno:BorderTLBR"); - addStatusListener( ".uno:BorderBLTR"); + addStatusListener( u".uno:BorderTLBR"_ustr); + addStatusListener( u".uno:BorderBLTR"_ustr); break; } } @@ -3775,12 +3775,12 @@ void SvxColorToolBoxControl::functionSelected( const OUString& /*rCommand*/ ) OUString SvxColorToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.ColorToolBoxControl"; + return u"com.sun.star.comp.svx.ColorToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxColorToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3859,12 +3859,12 @@ VclPtr<vcl::Window> SvxFrameToolBoxControl::createVclPopupWindow( vcl::Window* p OUString SvxFrameToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.FrameToolBoxControl"; + return u"com.sun.star.comp.svx.FrameToolBoxControl"_ustr; } css::uno::Sequence< OUString > SvxFrameToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -3906,11 +3906,11 @@ namespace public: SvxCurrencyList_Impl(SvxCurrencyToolBoxControl* pControl, weld::Widget* pParent, OUString& rSelectedFormat, LanguageType& eSelectedLanguage) - : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/currencywindow.ui", "CurrencyWindow") + : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/currencywindow.ui"_ustr, u"CurrencyWindow"_ustr) , m_xControl(pControl) - , m_xLabel(m_xBuilder->weld_label("label")) - , m_xCurrencyLb(m_xBuilder->weld_tree_view("currency")) - , m_xOkBtn(m_xBuilder->weld_button("ok")) + , m_xLabel(m_xBuilder->weld_label(u"label"_ustr)) + , m_xCurrencyLb(m_xBuilder->weld_tree_view(u"currency"_ustr)) + , m_xOkBtn(m_xBuilder->weld_button(u"ok"_ustr)) , m_rSelectedFormat(rSelectedFormat) , m_eSelectedLanguage(eSelectedLanguage) { @@ -4084,7 +4084,7 @@ void SvxCurrencyToolBoxControl::execute( sal_Int16 nSelectModifier ) if( nFormatKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) { - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("NumberFormatCurrency", + Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"NumberFormatCurrency"_ustr, nFormatKey) }; dispatchCommand( m_aCommandURL, aArgs ); m_nFormatKey = nFormatKey; @@ -4095,12 +4095,12 @@ void SvxCurrencyToolBoxControl::execute( sal_Int16 nSelectModifier ) OUString SvxCurrencyToolBoxControl::getImplementationName() { - return "com.sun.star.comp.svx.CurrencyToolBoxControl"; + return u"com.sun.star.comp.svx.CurrencyToolBoxControl"_ustr; } css::uno::Sequence<OUString> SvxCurrencyToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 04bd869c8857..ccc8045dc989 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -176,7 +176,7 @@ SvxFontSizeBox_Base::SvxFontSizeBox_Base(std::unique_ptr<weld::ComboBox> xWidget , m_xWidget(new FontSizeBox(std::move(xWidget))) { m_xWidget->set_value(0); - m_xWidget->set_active_or_entry_text(""); + m_xWidget->set_active_or_entry_text(u""_ustr); m_xWidget->disable_entry_completion(); m_xWidget->connect_changed(LINK(this, SvxFontSizeBox_Base, SelectHdl)); @@ -215,7 +215,7 @@ void SvxFontSizeBox_Base::Select() sal_Int64 nSelVal = m_xWidget->get_value(); float fSelVal = float( nSelVal ) / 10; - uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue("FontHeight.Height", + uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue(u"FontHeight.Height"_ustr, fSelVal) }; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -241,7 +241,7 @@ void SvxFontSizeBox_Base::statusChanged_Impl( tools::Long nPoint, bool bErase ) { // delete value in the display m_xWidget->set_value(-1L); - m_xWidget->set_active_or_entry_text(""); + m_xWidget->set_active_or_entry_text(u""_ustr); } m_aCurText = m_xWidget->get_active_text(); } @@ -308,8 +308,8 @@ void SvxFontSizeBox_Impl::SetOptimalSize() SvxFontSizeBox_Impl::SvxFontSizeBox_Impl(vcl::Window* pParent, const uno::Reference<frame::XFrame>& rFrame, FontHeightToolBoxControl& rCtrl) - : InterimItemWindow(pParent, "svx/ui/fontsizebox.ui", "FontSizeBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , SvxFontSizeBox_Base(m_xBuilder->weld_combo_box("fontsizecombobox"), rFrame, rCtrl) + : InterimItemWindow(pParent, u"svx/ui/fontsizebox.ui"_ustr, u"FontSizeBox"_ustr, true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) + , SvxFontSizeBox_Base(m_xBuilder->weld_combo_box(u"fontsizecombobox"_ustr), rFrame, rCtrl) { } @@ -353,7 +353,7 @@ FontHeightToolBoxControl::FontHeightToolBoxControl( const uno::Reference< uno::X ".uno:FontHeight" ), m_pBox( nullptr ) { - addStatusListener( ".uno:CharFontName"); + addStatusListener( u".uno:CharFontName"_ustr); } // XServiceInfo @@ -364,12 +364,12 @@ sal_Bool SAL_CALL FontHeightToolBoxControl::supportsService( const OUString& Ser OUString SAL_CALL FontHeightToolBoxControl::getImplementationName() { - return "com.sun.star.svx.FontHeightToolBoxController"; + return u"com.sun.star.svx.FontHeightToolBoxController"_ustr; } uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( ) { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -455,7 +455,7 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("fontsizecombobox")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"fontsizecombobox"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 2f23bfaa97f4..c2070618d69e 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -80,8 +80,8 @@ class CheckButtonItemWindow final : public InterimItemWindow { public: CheckButtonItemWindow(vcl::Window* pParent, const OUString& rLabel) - : InterimItemWindow(pParent, "svx/ui/checkbuttonbox.ui", "CheckButtonBox") - , m_xWidget(m_xBuilder->weld_check_button("checkbutton")) + : InterimItemWindow(pParent, u"svx/ui/checkbuttonbox.ui"_ustr, u"CheckButtonBox"_ustr) + , m_xWidget(m_xBuilder->weld_check_button(u"checkbutton"_ustr)) { InitControlBase(m_xWidget.get()); @@ -198,9 +198,9 @@ OUString FindTextFieldControl::m_sRememberedSearchString; FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, css::uno::Reference< css::frame::XFrame > xFrame, css::uno::Reference< css::uno::XComponentContext > xContext) : - InterimItemWindow(pParent, "svx/ui/findbox.ui", "FindBox"), + InterimItemWindow(pParent, u"svx/ui/findbox.ui"_ustr, u"FindBox"_ustr), m_nAsyncGetFocusId(nullptr), - m_xWidget(m_xBuilder->weld_combo_box("find")), + m_xWidget(m_xBuilder->weld_combo_box(u"find"_ustr)), m_xFrame(std::move(xFrame)), m_xContext(std::move(xContext)), m_pAcc(svt::AcceleratorExecute::createAcceleratorHelper()) @@ -314,7 +314,7 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -601,7 +601,7 @@ FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< // XServiceInfo OUString SAL_CALL FindTextToolbarController::getImplementationName() { - return "com.sun.star.svx.FindTextToolboxController"; + return u"com.sun.star.svx.FindTextToolboxController"_ustr; } sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& ServiceName ) @@ -611,7 +611,7 @@ sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& Se css::uno::Sequence< OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -744,8 +744,8 @@ UpDownSearchToolboxController::UpDownSearchToolboxController( const css::uno::Re OUString SAL_CALL UpDownSearchToolboxController::getImplementationName() { return meType == UpDownSearchToolboxController::UP? - OUString( "com.sun.star.svx.UpSearchToolboxController" ) : - OUString( "com.sun.star.svx.DownSearchToolboxController" ); + u"com.sun.star.svx.UpSearchToolboxController"_ustr : + u"com.sun.star.svx.DownSearchToolboxController"_ustr; } sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString& ServiceName ) @@ -755,7 +755,7 @@ sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString css::uno::Sequence< OUString > SAL_CALL UpDownSearchToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -836,7 +836,7 @@ MatchCaseToolboxController::MatchCaseToolboxController( const css::uno::Referenc // XServiceInfo OUString SAL_CALL MatchCaseToolboxController::getImplementationName() { - return "com.sun.star.svx.MatchCaseToolboxController"; + return u"com.sun.star.svx.MatchCaseToolboxController"_ustr; } sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& ServiceName ) @@ -846,7 +846,7 @@ sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -927,7 +927,7 @@ SearchFormattedToolboxController::SearchFormattedToolboxController( const css::u // XServiceInfo OUString SAL_CALL SearchFormattedToolboxController::getImplementationName() { - return "com.sun.star.svx.SearchFormattedToolboxController"; + return u"com.sun.star.svx.SearchFormattedToolboxController"_ustr; } sal_Bool SAL_CALL SearchFormattedToolboxController::supportsService( const OUString& ServiceName ) @@ -937,7 +937,7 @@ sal_Bool SAL_CALL SearchFormattedToolboxController::supportsService( const OUStr css::uno::Sequence< OUString > SAL_CALL SearchFormattedToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1014,7 +1014,7 @@ FindAllToolboxController::FindAllToolboxController( const css::uno::Reference< c // XServiceInfo OUString SAL_CALL FindAllToolboxController::getImplementationName() { - return "com.sun.star.svx.FindAllToolboxController"; + return u"com.sun.star.svx.FindAllToolboxController"_ustr; } @@ -1025,7 +1025,7 @@ sal_Bool SAL_CALL FindAllToolboxController::supportsService( const OUString& Ser css::uno::Sequence< OUString > SAL_CALL FindAllToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1096,7 +1096,7 @@ ExitSearchToolboxController::ExitSearchToolboxController( const css::uno::Refere // XServiceInfo OUString SAL_CALL ExitSearchToolboxController::getImplementationName() { - return "com.sun.star.svx.ExitFindbarToolboxController"; + return u"com.sun.star.svx.ExitFindbarToolboxController"_ustr; } @@ -1107,7 +1107,7 @@ sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL ExitSearchToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1139,7 +1139,7 @@ void SAL_CALL ExitSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -1192,7 +1192,7 @@ SearchLabelToolboxController::SearchLabelToolboxController( const css::uno::Refe // XServiceInfo OUString SAL_CALL SearchLabelToolboxController::getImplementationName() { - return "com.sun.star.svx.SearchLabelToolboxController"; + return u"com.sun.star.svx.SearchLabelToolboxController"_ustr; } @@ -1203,7 +1203,7 @@ sal_Bool SAL_CALL SearchLabelToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL SearchLabelToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -1328,7 +1328,7 @@ void SAL_CALL FindbarDispatcher::release() noexcept // XServiceInfo OUString SAL_CALL FindbarDispatcher::getImplementationName() { - return "com.sun.star.comp.svx.Impl.FindbarDispatcher"; + return u"com.sun.star.comp.svx.Impl.FindbarDispatcher"_ustr; } sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceName ) @@ -1338,7 +1338,7 @@ sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceNam css::uno::Sequence< OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() { - return { "com.sun.star.comp.svx.FindbarDispatcher", "com.sun.star.frame.ProtocolHandler" }; + return { u"com.sun.star.comp.svx.FindbarDispatcher"_ustr, u"com.sun.star.frame.ProtocolHandler"_ustr }; } // XInitialization @@ -1383,7 +1383,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css return; css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); + css::uno::Any aValue = xPropSet->getPropertyValue(u"LayoutManager"_ustr); aValue >>= xLayoutManager; if (!xLayoutManager.is()) return; @@ -1403,7 +1403,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY); VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow ); ToolBox* pToolBox = static_cast<ToolBox*>(pWindow.get()); - pToolBox->set_id("FindBar"); + pToolBox->set_id(u"FindBar"_ustr); if ( !pToolBox ) return; diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx index 97e4898065fe..e0e00108f73a 100644 --- a/svx/source/tbxctrls/tbxcolor.cxx +++ b/svx/source/tbxctrls/tbxcolor.cxx @@ -34,7 +34,7 @@ namespace svx using namespace ::com::sun::star::beans; ToolboxAccess::ToolboxAccess( std::u16string_view rToolboxName ) : - m_sToolboxResName ( "private:resource/toolbar/" ) + m_sToolboxResName ( u"private:resource/toolbar/"_ustr ) { m_sToolboxResName += rToolboxName; @@ -48,7 +48,7 @@ namespace svx Reference< XFrame > xFrame = pViewFrm->GetFrame().GetFrameInterface(); Reference< XPropertySet > xFrameProps( xFrame, UNO_QUERY ); if ( xFrameProps.is() ) - xFrameProps->getPropertyValue( "LayoutManager" ) >>= m_xLayouter; + xFrameProps->getPropertyValue( u"LayoutManager"_ustr ) >>= m_xLayouter; } catch ( Exception const & ) { diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 064b4636230b..be2d13c79b3e 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -108,7 +108,7 @@ namespace svx if (aIterator != aSlotNamedColorMap.end()) { NamedColor aNamedColor(aIterator->second); - SvtViewOptions aViewOpt(EViewType::Dialog, "ToolboxButtonColor"); + SvtViewOptions aViewOpt(EViewType::Dialog, u"ToolboxButtonColor"_ustr); if (aViewOpt.Exists()) { css::uno::Any aUserItem = aViewOpt.GetUserItem(OUString::number(nSlotId)); @@ -143,7 +143,7 @@ namespace svx const OUString aUserData = oColor->m_aName + ";" + OUString::number(static_cast<sal_uInt32>(oColor->m_aColor)); - SvtViewOptions(EViewType::Dialog, "ToolboxButtonColor") + SvtViewOptions(EViewType::Dialog, u"ToolboxButtonColor"_ustr) .SetUserItem(OUString::number(mnSlotId), css::uno::Any(aUserData)); } } @@ -217,7 +217,7 @@ namespace svx Update(rNamedColor.m_aColor); // Also show the current color as QuickHelpText - OUString colorSuffix = OUString(" (%1)").replaceFirst("%1", rNamedColor.m_aName); + OUString colorSuffix = u" (%1)"_ustr.replaceFirst("%1", rNamedColor.m_aName); OUString colorHelpText = maCommandLabel + colorSuffix; SetQuickHelpText(colorHelpText); } diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx index 1f36ee635619..58ff163fa478 100644 --- a/svx/source/tbxctrls/verttexttbxctrl.cxx +++ b/svx/source/tbxctrls/verttexttbxctrl.cxx @@ -29,12 +29,12 @@ SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl( const css::uno::Reference<css::uno::XComponentContext>& rContext) : SvxVertCTLTextTbxCtrl(rContext) { - addStatusListener(".uno:CTLFontState"); + addStatusListener(u".uno:CTLFontState"_ustr); } OUString SvxCTLTextTbxCtrl::getImplementationName() { - return "com.sun.star.comp.svx.CTLToolBoxControl"; + return u"com.sun.star.comp.svx.CTLToolBoxControl"_ustr; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -48,12 +48,12 @@ SvxVertTextTbxCtrl::SvxVertTextTbxCtrl( const css::uno::Reference<css::uno::XComponentContext>& rContext) : SvxVertCTLTextTbxCtrl(rContext) { - addStatusListener(".uno:VerticalTextState"); + addStatusListener(u".uno:VerticalTextState"_ustr); } OUString SvxVertTextTbxCtrl::getImplementationName() { - return "com.sun.star.comp.svx.VertTextToolBoxControl"; + return u"com.sun.star.comp.svx.VertTextToolBoxControl"_ustr; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -154,7 +154,7 @@ sal_Bool SAL_CALL SvxVertCTLTextTbxCtrl::supportsService(const OUString& Service css::uno::Sequence<OUString> SvxVertCTLTextTbxCtrl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |