diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 13:18:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 18:42:35 +0200 |
commit | ca5c9591ba38ad83415a2d4ced98bfc74d30b032 (patch) | |
tree | dcccbec3d99727cffe7debd21d3c40521383857b /sfx2/source/dialog | |
parent | e888503ee0aecbce8f3075b106243cf68b8dddc7 (diff) |
loplugin:ostr in sfx2
Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/dialog')
28 files changed, 496 insertions, 495 deletions
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx index 888d03c4ee30..dac770663388 100644 --- a/sfx2/source/dialog/StyleList.cxx +++ b/sfx2/source/dialog/StyleList.cxx @@ -182,28 +182,28 @@ void StyleList::CreateContextMenu() m_bBindingUpdate = false; } mxMenu.reset(); - mxMenuBuilder = Application::CreateBuilder(nullptr, "sfx/ui/stylecontextmenu.ui"); - mxMenu = mxMenuBuilder->weld_menu("menu"); - mxMenu->set_sensitive("edit", m_bCanEdit); - mxMenu->set_sensitive("delete", m_bCanDel); - mxMenu->set_sensitive("new", m_bCanNew); - mxMenu->set_sensitive("hide", m_bCanHide); - mxMenu->set_sensitive("show", m_bCanShow); + mxMenuBuilder = Application::CreateBuilder(nullptr, u"sfx/ui/stylecontextmenu.ui"_ustr); + mxMenu = mxMenuBuilder->weld_menu(u"menu"_ustr); + mxMenu->set_sensitive(u"edit"_ustr, m_bCanEdit); + mxMenu->set_sensitive(u"delete"_ustr, m_bCanDel); + mxMenu->set_sensitive(u"new"_ustr, m_bCanNew); + mxMenu->set_sensitive(u"hide"_ustr, m_bCanHide); + mxMenu->set_sensitive(u"show"_ustr, m_bCanShow); const SfxStyleFamilyItem* pItem = GetFamilyItem(); if (pItem && pItem->GetFamily() == SfxStyleFamily::Table) //tdf#101648, no ui for this yet { - mxMenu->set_sensitive("edit", false); - mxMenu->set_sensitive("new", false); + mxMenu->set_sensitive(u"edit"_ustr, false); + mxMenu->set_sensitive(u"new"_ustr, false); } if (pItem && pItem->GetFamily() == SfxStyleFamily::Pseudo) { const OUString aTemplName(GetSelectedEntry()); if (aTemplName == "No List") { - mxMenu->set_sensitive("edit", false); - mxMenu->set_sensitive("new", false); - mxMenu->set_sensitive("hide", false); + mxMenu->set_sensitive(u"edit"_ustr, false); + mxMenu->set_sensitive(u"new"_ustr, false); + mxMenu->set_sensitive(u"hide"_ustr, false); } } } @@ -568,7 +568,7 @@ IMPL_LINK_NOARG(StyleList, NewMenuExecuteAction, void*, void) if (nResult == RET_OK) { const OUString aTemplName(aDlg.GetName()); - m_pParentDialog->Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE, aTemplName, "", + m_pParentDialog->Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE, aTemplName, u""_ustr, static_cast<sal_uInt16>(GetFamilyItem()->GetFamily()), *this, nFilter); UpdateFamily(); @@ -1061,7 +1061,7 @@ void StyleList::FillTreeBox(SfxStyleFamily eFam) m_xTreeBox->columns_autosize(); - m_pParentDialog->EnableItem("watercan", false); + m_pParentDialog->EnableItem(u"watercan"_ustr, false); SfxTemplateItem* pState = m_pFamilyState[m_nActFamily - 1].get(); @@ -1096,15 +1096,15 @@ void StyleList::FillTreeBox(SfxStyleFamily eFam) static OUString lcl_GetStyleFamilyName(SfxStyleFamily nFamily) { if (nFamily == SfxStyleFamily::Char) - return "CharacterStyles"; + return u"CharacterStyles"_ustr; if (nFamily == SfxStyleFamily::Para) - return "ParagraphStyles"; + return u"ParagraphStyles"_ustr; if (nFamily == SfxStyleFamily::Page) - return "PageStyles"; + return u"PageStyles"_ustr; if (nFamily == SfxStyleFamily::Table) - return "TableStyles"; + return u"TableStyles"_ustr; if (nFamily == SfxStyleFamily::Pseudo) - return "NumberingStyles"; + return u"NumberingStyles"_ustr; return OUString(); } @@ -1128,7 +1128,7 @@ OUString StyleList::getDefaultStyleName(const SfxStyleFamily eFam) xCont->getByName(aFamilyName) >>= xStyles; uno::Reference<beans::XPropertySet> xInfo; xStyles->getByName(sDefaultStyle) >>= xInfo; - xInfo->getPropertyValue("DisplayName") >>= aUIName; + xInfo->getPropertyValue(u"DisplayName"_ustr) >>= aUIName; } catch (const uno::Exception&) { @@ -1154,12 +1154,12 @@ IMPL_LINK_NOARG(StyleList, HasSelectedStyle, void*, bool) IMPL_LINK_NOARG(StyleList, UpdateStyleDependents, void*, void) { // Trigger Help PI. Only when the watercan is on - if (m_nActFamily != 0xffff && m_pParentDialog->IsCheckedItem("watercan") && + if (m_nActFamily != 0xffff && m_pParentDialog->IsCheckedItem(u"watercan"_ustr) && // only if that region is allowed nullptr != m_pFamilyState[m_nActFamily - 1] && IsSafeForWaterCan(nullptr)) { - m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, "", "", 0, *this); - m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, GetSelectedEntry(), "", + m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, u""_ustr, u""_ustr, 0, *this); + m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, GetSelectedEntry(), u""_ustr, static_cast<sal_uInt16>(GetFamilyItem()->GetFamily()), *this); } } @@ -1325,7 +1325,7 @@ void StyleList::NewHdl() if (nMask == SfxStyleSearchBits::Auto) // automatic nMask = m_nAppFilter; - m_pParentDialog->Execute_Impl(SID_STYLE_NEW, "", GetSelectedEntry(), + m_pParentDialog->Execute_Impl(SID_STYLE_NEW, u""_ustr, GetSelectedEntry(), static_cast<sal_uInt16>(eFam), *this, nMask); } @@ -1515,7 +1515,7 @@ void StyleList::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) SfxViewFrame* pViewFrame = m_pBindings->GetDispatcher_Impl()->GetFrame(); SfxObjectShell* pDocShell = pViewFrame->GetObjectShell(); if (m_pParentDialog->GetNotifyUpdate() - && (!m_pParentDialog->IsCheckedItem("watercan") + && (!m_pParentDialog->IsCheckedItem(u"watercan"_ustr) || (pDocShell && pDocShell->GetStyleSheetPool() != m_pStyleSheetPool))) { m_pParentDialog->SetNotifyupdate(false); diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 15fe92ccd408..9d96dfa77268 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -24,12 +24,13 @@ SfxAlienWarningDialog::SfxAlienWarningDialog(weld::Window* pParent, std::u16string_view _rFormatName, const OUString& _rDefaultExtension, bool rDefaultIsAlien) - : MessageDialogController(pParent, "sfx/ui/alienwarndialog.ui", "AlienWarnDialog", "ask") - , m_xKeepCurrentBtn(m_xBuilder->weld_button("save")) - , m_xUseDefaultFormatBtn(m_xBuilder->weld_button("cancel")) - , m_xWarningOnBox(m_xBuilder->weld_check_button("ask")) + : MessageDialogController(pParent, u"sfx/ui/alienwarndialog.ui"_ustr, u"AlienWarnDialog"_ustr, + u"ask"_ustr) + , m_xKeepCurrentBtn(m_xBuilder->weld_button(u"save"_ustr)) + , m_xUseDefaultFormatBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xWarningOnBox(m_xBuilder->weld_check_button(u"ask"_ustr)) { - OUString aExtension = "ODF"; + OUString aExtension = u"ODF"_ustr; // replace formatname (text) OUString sInfoText = m_xDialog->get_primary_text(); diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index 2f3dc01744fc..668b4e00934f 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -253,7 +253,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL BackingComp::getImplementationId() OUString SAL_CALL BackingComp::getImplementationName() { - return "com.sun.star.comp.sfx2.BackingComp"; + return u"com.sun.star.comp.sfx2.BackingComp"_ustr; } sal_Bool SAL_CALL BackingComp::supportsService( /*IN*/ const OUString& sServiceName ) @@ -263,7 +263,7 @@ sal_Bool SAL_CALL BackingComp::supportsService( /*IN*/ const OUString& sServiceN css::uno::Sequence< OUString > SAL_CALL BackingComp::getSupportedServiceNames() { - return { "com.sun.star.frame.StartModule", "com.sun.star.frame.ProtocolHandler" }; + return { u"com.sun.star.frame.StartModule"_ustr, u"com.sun.star.frame.ProtocolHandler"_ustr }; } @@ -328,12 +328,12 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // check some required states if (m_xFrame.is()) throw css::uno::RuntimeException( - "already attached", + u"already attached"_ustr, getXWeak()); if (!xFrame.is()) throw css::uno::RuntimeException( - "invalid frame reference", + u"invalid frame reference"_ustr, getXWeak()); if (!m_xWindow.is()) @@ -357,18 +357,18 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // create the menu bar for the backing component css::uno::Reference< css::beans::XPropertySet > xPropSet(m_xFrame, css::uno::UNO_QUERY_THROW); css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; if (xLayoutManager.is()) { xLayoutManager->lock(); - xLayoutManager->createElement("private:resource/menubar/menubar"); + xLayoutManager->createElement(u"private:resource/menubar/menubar"_ustr); xLayoutManager->unlock(); } if (pWindow) { // set help ID for our canvas - pWindow->SetHelpId("FWK_HID_BACKINGWINDOW"); + pWindow->SetHelpId(u"FWK_HID_BACKINGWINDOW"_ustr); } // inform BackingWindow about frame @@ -512,7 +512,7 @@ void SAL_CALL BackingComp::disposing( /*IN*/ const css::lang::EventObject& aEven if (!aEvent.Source.is() || aEvent.Source!=m_xWindow || !m_xWindow.is()) throw css::uno::RuntimeException( - "unexpected source or called twice", + u"unexpected source or called twice"_ustr, getXWeak()); m_xWindow.clear(); @@ -574,7 +574,7 @@ void SAL_CALL BackingComp::dispose() void SAL_CALL BackingComp::addEventListener( /*IN*/ const css::uno::Reference< css::lang::XEventListener >& ) { throw css::uno::RuntimeException( - "not supported", + u"not supported"_ustr, getXWeak()); } @@ -617,7 +617,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno if (m_xWindow.is()) throw css::uno::Exception( - "already initialized", + u"already initialized"_ustr, getXWeak()); css::uno::Reference< css::awt::XWindow > xParentWindow; @@ -628,7 +628,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno ) { throw css::uno::Exception( - "wrong or corrupt argument list", + u"wrong or corrupt argument list"_ustr, getXWeak()); } @@ -639,7 +639,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno if (!m_xWindow.is()) throw css::uno::RuntimeException( - "couldn't create component window", + u"couldn't create component window"_ustr, getXWeak()); // start listening for window disposing diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index b1eb7a31f7e9..0cb8bc258023 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -149,34 +149,34 @@ public: float const g_fMultiplier = 1.2f; BackingWindow::BackingWindow(vcl::Window* i_pParent) - : InterimItemWindow(i_pParent, "sfx/ui/startcenter.ui", "StartCenter", false) - , mxOpenButton(m_xBuilder->weld_button("open_all")) - , mxRecentButton(m_xBuilder->weld_toggle_button("open_recent")) - , mxRemoteButton(m_xBuilder->weld_button("open_remote")) - , mxTemplateButton(m_xBuilder->weld_toggle_button("templates_all")) - , mxCreateLabel(m_xBuilder->weld_label("create_label")) - , mxAltHelpLabel(m_xBuilder->weld_label("althelplabel")) - , mxFilter(m_xBuilder->weld_combo_box("cbFilter")) - , mxActions(m_xBuilder->weld_menu_button("mbActions")) - , mxWriterAllButton(m_xBuilder->weld_button("writer_all")) - , mxCalcAllButton(m_xBuilder->weld_button("calc_all")) - , mxImpressAllButton(m_xBuilder->weld_button("impress_all")) - , mxDrawAllButton(m_xBuilder->weld_button("draw_all")) - , mxDBAllButton(m_xBuilder->weld_button("database_all")) - , mxMathAllButton(m_xBuilder->weld_button("math_all")) + : InterimItemWindow(i_pParent, u"sfx/ui/startcenter.ui"_ustr, u"StartCenter"_ustr, false) + , mxOpenButton(m_xBuilder->weld_button(u"open_all"_ustr)) + , mxRecentButton(m_xBuilder->weld_toggle_button(u"open_recent"_ustr)) + , mxRemoteButton(m_xBuilder->weld_button(u"open_remote"_ustr)) + , mxTemplateButton(m_xBuilder->weld_toggle_button(u"templates_all"_ustr)) + , mxCreateLabel(m_xBuilder->weld_label(u"create_label"_ustr)) + , mxAltHelpLabel(m_xBuilder->weld_label(u"althelplabel"_ustr)) + , mxFilter(m_xBuilder->weld_combo_box(u"cbFilter"_ustr)) + , mxActions(m_xBuilder->weld_menu_button(u"mbActions"_ustr)) + , mxWriterAllButton(m_xBuilder->weld_button(u"writer_all"_ustr)) + , mxCalcAllButton(m_xBuilder->weld_button(u"calc_all"_ustr)) + , mxImpressAllButton(m_xBuilder->weld_button(u"impress_all"_ustr)) + , mxDrawAllButton(m_xBuilder->weld_button(u"draw_all"_ustr)) + , mxDBAllButton(m_xBuilder->weld_button(u"database_all"_ustr)) + , mxMathAllButton(m_xBuilder->weld_button(u"math_all"_ustr)) , mxBrandImage(new BrandImage) - , mxBrandImageWeld(new weld::CustomWeld(*m_xBuilder, "daBrand", *mxBrandImage)) - , mxHelpButton(m_xBuilder->weld_button("help")) - , mxExtensionsButton(m_xBuilder->weld_button("extensions")) - , mxAllButtonsBox(m_xBuilder->weld_container("all_buttons_box")) - , mxButtonsBox(m_xBuilder->weld_container("buttons_box")) - , mxSmallButtonsBox(m_xBuilder->weld_container("small_buttons_box")) - , mxAllRecentThumbnails(new sfx2::RecentDocsView(m_xBuilder->weld_scrolled_window("scrollrecent", true), - m_xBuilder->weld_menu("recentmenu"))) - , mxAllRecentThumbnailsWin(new weld::CustomWeld(*m_xBuilder, "all_recent", *mxAllRecentThumbnails)) - , mxLocalView(new TemplateDefaultView(m_xBuilder->weld_scrolled_window("scrolllocal", true), - m_xBuilder->weld_menu("localmenu"))) - , mxLocalViewWin(new weld::CustomWeld(*m_xBuilder, "local_view", *mxLocalView)) + , mxBrandImageWeld(new weld::CustomWeld(*m_xBuilder, u"daBrand"_ustr, *mxBrandImage)) + , mxHelpButton(m_xBuilder->weld_button(u"help"_ustr)) + , mxExtensionsButton(m_xBuilder->weld_button(u"extensions"_ustr)) + , mxAllButtonsBox(m_xBuilder->weld_container(u"all_buttons_box"_ustr)) + , mxButtonsBox(m_xBuilder->weld_container(u"buttons_box"_ustr)) + , mxSmallButtonsBox(m_xBuilder->weld_container(u"small_buttons_box"_ustr)) + , mxAllRecentThumbnails(new sfx2::RecentDocsView(m_xBuilder->weld_scrolled_window(u"scrollrecent"_ustr, true), + m_xBuilder->weld_menu(u"recentmenu"_ustr))) + , mxAllRecentThumbnailsWin(new weld::CustomWeld(*m_xBuilder, u"all_recent"_ustr, *mxAllRecentThumbnails)) + , mxLocalView(new TemplateDefaultView(m_xBuilder->weld_scrolled_window(u"scrolllocal"_ustr, true), + m_xBuilder->weld_menu(u"localmenu"_ustr))) + , mxLocalViewWin(new weld::CustomWeld(*m_xBuilder, u"local_view"_ustr, *mxLocalView)) , mbLocalViewInitialized(false) , mbInitControls(false) { @@ -311,7 +311,7 @@ void BackingWindow::initControls() // Hide OpenRemote button on startpage if the OpenRemote uno command is not available SvtCommandOptions aCmdOptions; - if (SvtCommandOptions().HasEntriesDisabled() && aCmdOptions.LookupDisabled("OpenRemote")) + if (SvtCommandOptions().HasEntriesDisabled() && aCmdOptions.LookupDisabled(u"OpenRemote"_ustr)) mxRemoteButton->set_visible(false); else mxRemoteButton->connect_clicked(LINK(this, BackingWindow, ClickHdl)); @@ -537,7 +537,7 @@ IMPL_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, rButton,void) { uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence( { - {"nodepath", uno::Any(OUString("/org.openoffice.Office.Common/Help/StartCenter"))} + {"nodepath", uno::Any(u"/org.openoffice.Office.Common/Help/StartCenter"_ustr)} })); Reference<lang::XMultiServiceFactory> xConfig = configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() ); @@ -620,28 +620,28 @@ IMPL_LINK( BackingWindow, ClickHdl, weld::Button&, rButton, void ) { // dispatch the appropriate URL and end the dialog if( &rButton == mxWriterAllButton.get() ) - dispatchURL( "private:factory/swriter" ); + dispatchURL( u"private:factory/swriter"_ustr ); else if( &rButton == mxCalcAllButton.get() ) - dispatchURL( "private:factory/scalc" ); + dispatchURL( u"private:factory/scalc"_ustr ); else if( &rButton == mxImpressAllButton.get() ) - dispatchURL( "private:factory/simpress?slot=6686" ); + dispatchURL( u"private:factory/simpress?slot=6686"_ustr ); else if( &rButton == mxDrawAllButton.get() ) - dispatchURL( "private:factory/sdraw" ); + dispatchURL( u"private:factory/sdraw"_ustr ); else if( &rButton == mxDBAllButton.get() ) - dispatchURL( "private:factory/sdatabase?Interactive" ); + dispatchURL( u"private:factory/sdatabase?Interactive"_ustr ); else if( &rButton == mxMathAllButton.get() ) - dispatchURL( "private:factory/smath" ); + dispatchURL( u"private:factory/smath"_ustr ); else if( &rButton == mxOpenButton.get() ) { Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); - dispatchURL( ".uno:Open", OUString(), xFrame, { comphelper::makePropertyValue("Referer", OUString("private:user")) } ); + dispatchURL( u".uno:Open"_ustr, OUString(), xFrame, { comphelper::makePropertyValue(u"Referer"_ustr, u"private:user"_ustr) } ); } else if( &rButton == mxRemoteButton.get() ) { Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); - dispatchURL( ".uno:OpenRemote", OUString(), xFrame, {} ); + dispatchURL( u".uno:OpenRemote"_ustr, OUString(), xFrame, {} ); } } @@ -670,10 +670,10 @@ IMPL_LINK(BackingWindow, CreateContextMenuHdl, ThumbnailViewItem*, pItem, void) IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem, void) { uno::Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("AsTemplate", true), - comphelper::makePropertyValue("MacroExecutionMode", MacroExecMode::USE_CONFIG), - comphelper::makePropertyValue("UpdateDocMode", UpdateDocMode::ACCORDING_TO_CONFIG), - comphelper::makePropertyValue("InteractionHandler", task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr )) + comphelper::makePropertyValue(u"AsTemplate"_ustr, true), + comphelper::makePropertyValue(u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG), + comphelper::makePropertyValue(u"UpdateDocMode"_ustr, UpdateDocMode::ACCORDING_TO_CONFIG), + comphelper::makePropertyValue(u"InteractionHandler"_ustr, task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr )) }; TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem); @@ -682,7 +682,7 @@ IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem, void) try { - dispatchURL( pTemplateItem->getPath(), "_default", xFrame, aArgs ); + dispatchURL( pTemplateItem->getPath(), u"_default"_ustr, xFrame, aArgs ); } catch( const uno::Exception& ) { @@ -692,9 +692,9 @@ IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem, void) IMPL_LINK(BackingWindow, EditTemplateHdl, ThumbnailViewItem*, pItem, void) { uno::Sequence< PropertyValue > aArgs{ - comphelper::makePropertyValue("AsTemplate", false), - comphelper::makePropertyValue("MacroExecutionMode", MacroExecMode::USE_CONFIG), - comphelper::makePropertyValue("UpdateDocMode", UpdateDocMode::ACCORDING_TO_CONFIG), + comphelper::makePropertyValue(u"AsTemplate"_ustr, false), + comphelper::makePropertyValue(u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG), + comphelper::makePropertyValue(u"UpdateDocMode"_ustr, UpdateDocMode::ACCORDING_TO_CONFIG), }; TemplateViewItem *pViewItem = static_cast<TemplateViewItem*>(pItem); @@ -703,7 +703,7 @@ IMPL_LINK(BackingWindow, EditTemplateHdl, ThumbnailViewItem*, pItem, void) try { - dispatchURL( pViewItem->getPath(), "_default", xFrame, aArgs ); + dispatchURL( pViewItem->getPath(), u"_default"_ustr, xFrame, aArgs ); } catch( const uno::Exception& ) { diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index af31e250d723..9fda28572c92 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -84,7 +84,7 @@ class BackingWindow : public InterimItemWindow bool mbInitControls; std::unique_ptr<svt::AcceleratorExecute> mpAccExec; - void dispatchURL(const OUString& i_rURL, const OUString& i_rTarget = OUString("_default"), + void dispatchURL(const OUString& i_rURL, const OUString& i_rTarget = u"_default"_ustr, const css::uno::Reference<css::frame::XDispatchProvider>& i_xProv = css::uno::Reference<css::frame::XDispatchProvider>(), const css::uno::Sequence<css::beans::PropertyValue>& = css::uno::Sequence< diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index fb7c95e3cc32..9807730db7a2 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -232,8 +232,8 @@ SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent : SfxOkDialogController(pParent, rUIXMLDescription, rID) , m_pInputSet(pSet) , m_xContainer(m_xDialog->weld_content_area()) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xHelpBtn(m_xBuilder->weld_button("help")) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr)) { m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, OKHdl_Impl)); } @@ -243,8 +243,8 @@ SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent : SfxOkDialogController(pParent, rUIXMLDescription, rID) , m_pInputSet(pSet) , m_xContainer(m_xBuilder->weld_container(rContainerId)) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xHelpBtn(m_xBuilder->weld_button("help")) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr)) { m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, OKHdl_Impl)); } diff --git a/sfx2/source/dialog/charmappopup.cxx b/sfx2/source/dialog/charmappopup.cxx index 93cfa1adb281..d34e24fb6a17 100644 --- a/sfx2/source/dialog/charmappopup.cxx +++ b/sfx2/source/dialog/charmappopup.cxx @@ -55,12 +55,12 @@ VclPtr<vcl::Window> CharmapPopup::createVclPopupWindow(vcl::Window* pParent) OUString CharmapPopup::getImplementationName() { - return "com.sun.star.comp.sfx2.InsertSymbolToolBoxControl"; + return u"com.sun.star.comp.sfx2.InsertSymbolToolBoxControl"_ustr; } css::uno::Sequence<OUString> CharmapPopup::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/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx index 6d90be8af234..901c89167840 100644 --- a/sfx2/source/dialog/checkin.cxx +++ b/sfx2/source/dialog/checkin.cxx @@ -10,10 +10,10 @@ #include <checkin.hxx> SfxCheckinDialog::SfxCheckinDialog(weld::Window* pParent) - : GenericDialogController( pParent, "sfx/ui/checkin.ui", "CheckinDialog") - , m_xCommentED(m_xBuilder->weld_text_view("VersionComment")) - , m_xMajorCB(m_xBuilder->weld_check_button("MajorVersion")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + : GenericDialogController( pParent, u"sfx/ui/checkin.ui"_ustr, u"CheckinDialog"_ustr) + , m_xCommentED(m_xBuilder->weld_text_view(u"VersionComment"_ustr)) + , m_xMajorCB(m_xBuilder->weld_check_button(u"MajorVersion"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) { m_xOKBtn->connect_clicked(LINK(this, SfxCheckinDialog, OKHdl)); } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 74caea85569e..b1e5dbd92916 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -619,20 +619,20 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId ) } SfxDocumentDescPage::SfxDocumentDescPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) - : SfxTabPage(pPage, pController, "sfx/ui/descriptioninfopage.ui", "DescriptionInfoPage", &rItemSet) + : SfxTabPage(pPage, pController, u"sfx/ui/descriptioninfopage.ui"_ustr, u"DescriptionInfoPage"_ustr, &rItemSet) , m_pInfoItem(nullptr) - , m_xTitleEd(m_xBuilder->weld_entry("title")) - , m_xThemaEd(m_xBuilder->weld_entry("subject")) - , m_xKeywordsEd(m_xBuilder->weld_entry("keywords")) - , m_xContributorEd(m_xBuilder->weld_entry("contributor")) - , m_xCoverageEd(m_xBuilder->weld_entry("coverage")) - , m_xIdentifierEd(m_xBuilder->weld_entry("identifier")) - , m_xPublisherEd(m_xBuilder->weld_entry("publisher")) - , m_xRelationEd(m_xBuilder->weld_entry("relation")) - , m_xRightsEd(m_xBuilder->weld_entry("rights")) - , m_xSourceEd(m_xBuilder->weld_entry("source")) - , m_xTypeEd(m_xBuilder->weld_entry("type")) - , m_xCommentEd(m_xBuilder->weld_text_view("comments")) + , m_xTitleEd(m_xBuilder->weld_entry(u"title"_ustr)) + , m_xThemaEd(m_xBuilder->weld_entry(u"subject"_ustr)) + , m_xKeywordsEd(m_xBuilder->weld_entry(u"keywords"_ustr)) + , m_xContributorEd(m_xBuilder->weld_entry(u"contributor"_ustr)) + , m_xCoverageEd(m_xBuilder->weld_entry(u"coverage"_ustr)) + , m_xIdentifierEd(m_xBuilder->weld_entry(u"identifier"_ustr)) + , m_xPublisherEd(m_xBuilder->weld_entry(u"publisher"_ustr)) + , m_xRelationEd(m_xBuilder->weld_entry(u"relation"_ustr)) + , m_xRightsEd(m_xBuilder->weld_entry(u"rights"_ustr)) + , m_xSourceEd(m_xBuilder->weld_entry(u"source"_ustr)) + , m_xTypeEd(m_xBuilder->weld_entry(u"type"_ustr)) + , m_xCommentEd(m_xBuilder->weld_text_view(u"comments"_ustr)) { m_xCommentEd->set_size_request(m_xKeywordsEd->get_preferred_size().Width(), m_xCommentEd->get_height_rows(16)); @@ -792,29 +792,29 @@ void SfxDocumentDescPage::Reset(const SfxItemSet *rSet) } SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) - : SfxTabPage(pPage, pController, "sfx/ui/documentinfopage.ui", "DocumentInfoPage", &rItemSet) + : SfxTabPage(pPage, pController, u"sfx/ui/documentinfopage.ui"_ustr, u"DocumentInfoPage"_ustr, &rItemSet) , bEnableUseUserData( false ) , bHandleDelete( false ) - , m_xBmp(m_xBuilder->weld_image("icon")) - , m_xNameED(m_xBuilder->weld_label("nameed")) - , m_xChangePassBtn(m_xBuilder->weld_button("changepass")) - , m_xShowTypeFT(m_xBuilder->weld_label("showtype")) - , m_xFileValEd(m_xBuilder->weld_link_button("showlocation")) - , m_xShowSizeFT(m_xBuilder->weld_label("showsize")) - , m_xCreateValFt(m_xBuilder->weld_label("showcreate")) - , m_xChangeValFt(m_xBuilder->weld_label("showmodify")) - , m_xSignedValFt(m_xBuilder->weld_label("showsigned")) - , m_xSignatureBtn(m_xBuilder->weld_button("signature")) - , m_xPrintValFt(m_xBuilder->weld_label("showprint")) - , m_xTimeLogValFt(m_xBuilder->weld_label("showedittime")) - , m_xDocNoValFt(m_xBuilder->weld_label("showrevision")) - , m_xUseUserDataCB(m_xBuilder->weld_check_button("userdatacb")) - , m_xDeleteBtn(m_xBuilder->weld_button("reset")) - , m_xUseThumbnailSaveCB(m_xBuilder->weld_check_button("thumbnailsavecb")) - , m_xTemplFt(m_xBuilder->weld_label("templateft")) - , m_xTemplValFt(m_xBuilder->weld_label("showtemplate")) - , m_xImagePreferredDpiCheckButton(m_xBuilder->weld_check_button("image-preferred-dpi-checkbutton")) - , m_xImagePreferredDpiComboBox(m_xBuilder->weld_combo_box("image-preferred-dpi-combobox")) + , m_xBmp(m_xBuilder->weld_image(u"icon"_ustr)) + , m_xNameED(m_xBuilder->weld_label(u"nameed"_ustr)) + , m_xChangePassBtn(m_xBuilder->weld_button(u"changepass"_ustr)) + , m_xShowTypeFT(m_xBuilder->weld_label(u"showtype"_ustr)) + , m_xFileValEd(m_xBuilder->weld_link_button(u"showlocation"_ustr)) + , m_xShowSizeFT(m_xBuilder->weld_label(u"showsize"_ustr)) + , m_xCreateValFt(m_xBuilder->weld_label(u"showcreate"_ustr)) + , m_xChangeValFt(m_xBuilder->weld_label(u"showmodify"_ustr)) + , m_xSignedValFt(m_xBuilder->weld_label(u"showsigned"_ustr)) + , m_xSignatureBtn(m_xBuilder->weld_button(u"signature"_ustr)) + , m_xPrintValFt(m_xBuilder->weld_label(u"showprint"_ustr)) + , m_xTimeLogValFt(m_xBuilder->weld_label(u"showedittime"_ustr)) + , m_xDocNoValFt(m_xBuilder->weld_label(u"showrevision"_ustr)) + , m_xUseUserDataCB(m_xBuilder->weld_check_button(u"userdatacb"_ustr)) + , m_xDeleteBtn(m_xBuilder->weld_button(u"reset"_ustr)) + , m_xUseThumbnailSaveCB(m_xBuilder->weld_check_button(u"thumbnailsavecb"_ustr)) + , m_xTemplFt(m_xBuilder->weld_label(u"templateft"_ustr)) + , m_xTemplValFt(m_xBuilder->weld_label(u"showtemplate"_ustr)) + , m_xImagePreferredDpiCheckButton(m_xBuilder->weld_check_button(u"image-preferred-dpi-checkbutton"_ustr)) + , m_xImagePreferredDpiComboBox(m_xBuilder->weld_combo_box(u"image-preferred-dpi-combobox"_ustr)) { m_xUseUserDataCB->set_accessible_description(SfxResId(STR_A11Y_DESC_USERDATA)); @@ -836,7 +836,7 @@ SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController* // [i96288] Check if the document signature command is enabled // on the main list enable/disable the pushbutton accordingly SvtCommandOptions aCmdOptions; - if ( aCmdOptions.LookupDisabled( "Signature" ) ) + if ( aCmdOptions.LookupDisabled( u"Signature"_ustr ) ) m_xSignatureBtn->set_sensitive(false); } @@ -858,8 +858,8 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl, weld::Button&, void) DateTime now( DateTime::SYSTEM ); util::DateTime uDT( now.GetUNODateTime() ); m_xCreateValFt->set_label( ConvertDateTime_Impl( aName, uDT, rLocaleWrapper ) ); - m_xChangeValFt->set_label( "" ); - m_xPrintValFt->set_label( "" ); + m_xChangeValFt->set_label( u""_ustr ); + m_xPrintValFt->set_label( u""_ustr ); m_xTimeLogValFt->set_label( rLocaleWrapper.getDuration( tools::Duration() ) ); m_xDocNoValFt->set_label(OUString('1')); bHandleDelete = true; @@ -1057,7 +1057,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) uno::Reference<lang::XMultiServiceFactory> xFac(pDocSh->GetModel(), uno::UNO_QUERY); if (xFac.is()) { - uno::Reference<beans::XPropertySet> xProps(xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xProps(xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); if (xProps.is()) { sal_Int32 nImagePreferredDPI = 0; @@ -1066,7 +1066,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) OUString aImagePreferredDPIString = m_xImagePreferredDpiComboBox->get_active_text(); nImagePreferredDPI = aImagePreferredDPIString.toInt32(); } - xProps->setPropertyValue("ImagePreferredDPI", uno::Any(nImagePreferredDPI)); + xProps->setPropertyValue(u"ImagePreferredDPI"_ustr, uno::Any(nImagePreferredDPI)); } } } @@ -1265,9 +1265,9 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) try { uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW ); - xProps->getPropertyValue("ImagePreferredDPI") >>= nImagePreferredDPI; + xProps->getPropertyValue(u"ImagePreferredDPI"_ustr) >>= nImagePreferredDPI; } catch( uno::Exception& ) { @@ -1283,14 +1283,14 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) { m_xImagePreferredDpiCheckButton->set_state(TRISTATE_FALSE); m_xImagePreferredDpiComboBox->set_sensitive(false); - m_xImagePreferredDpiComboBox->set_entry_text(""); + m_xImagePreferredDpiComboBox->set_entry_text(u""_ustr); } } SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet) - : SfxTabDialogController(pParent, "sfx/ui/documentpropertiesdialog.ui", - "DocumentPropertiesDialog", &rItemSet) + : SfxTabDialogController(pParent, u"sfx/ui/documentpropertiesdialog.ui"_ustr, + u"DocumentPropertiesDialog"_ustr, &rItemSet) { const SfxDocumentInfoItem& rInfoItem = rItemSet.Get( SID_DOCINFO ); @@ -1328,20 +1328,20 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxIte m_xDialog->set_title(aTitle); // Property Pages - AddTabPage("general", SfxDocumentPage::Create, nullptr); - AddTabPage("description", SfxDocumentDescPage::Create, nullptr); + AddTabPage(u"general"_ustr, SfxDocumentPage::Create, nullptr); + AddTabPage(u"description"_ustr, SfxDocumentDescPage::Create, nullptr); - AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr); + AddTabPage(u"customprops"_ustr, SfxCustomPropertiesPage::Create, nullptr); if (rInfoItem.isCmisDocument()) - AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr); + AddTabPage(u"cmisprops"_ustr, SfxCmisPropertiesPage::Create, nullptr); else - RemoveTabPage("cmisprops"); + RemoveTabPage(u"cmisprops"_ustr); // Disable security page for online as not fully asynced yet if (!comphelper::LibreOfficeKit::isActive()) - AddTabPage("security", SfxSecurityPage::Create, nullptr); + AddTabPage(u"security"_ustr, SfxSecurityPage::Create, nullptr); else - RemoveTabPage("security"); + RemoveTabPage(u"security"_ustr); } void SfxDocumentInfoDialog::PageCreated(const OUString& rId, SfxTabPage &rPage) @@ -1352,7 +1352,7 @@ void SfxDocumentInfoDialog::PageCreated(const OUString& rId, SfxTabPage &rPage) void SfxDocumentInfoDialog::AddFontTabPage() { - AddTabPage("font", SfxResId(STR_FONT_TABPAGE), SfxDocumentFontsPage::Create); + AddTabPage(u"font"_ustr, SfxResId(STR_FONT_TABPAGE), SfxDocumentFontsPage::Create); } // class CustomPropertiesYesNoButton ------------------------------------- @@ -1373,15 +1373,15 @@ CustomPropertiesYesNoButton::~CustomPropertiesYesNoButton() DurationDialog_Impl::DurationDialog_Impl(weld::Widget* pParent, const util::Duration& rDuration) - : GenericDialogController(pParent, "sfx/ui/editdurationdialog.ui", "EditDurationDialog") - , m_xNegativeCB(m_xBuilder->weld_check_button("negative")) - , m_xYearNF(m_xBuilder->weld_spin_button("years")) - , m_xMonthNF(m_xBuilder->weld_spin_button("months")) - , m_xDayNF(m_xBuilder->weld_spin_button("days")) - , m_xHourNF(m_xBuilder->weld_spin_button("hours")) - , m_xMinuteNF(m_xBuilder->weld_spin_button("minutes")) - , m_xSecondNF(m_xBuilder->weld_spin_button("seconds")) - , m_xMSecondNF(m_xBuilder->weld_spin_button("milliseconds")) + : GenericDialogController(pParent, u"sfx/ui/editdurationdialog.ui"_ustr, u"EditDurationDialog"_ustr) + , m_xNegativeCB(m_xBuilder->weld_check_button(u"negative"_ustr)) + , m_xYearNF(m_xBuilder->weld_spin_button(u"years"_ustr)) + , m_xMonthNF(m_xBuilder->weld_spin_button(u"months"_ustr)) + , m_xDayNF(m_xBuilder->weld_spin_button(u"days"_ustr)) + , m_xHourNF(m_xBuilder->weld_spin_button(u"hours"_ustr)) + , m_xMinuteNF(m_xBuilder->weld_spin_button(u"minutes"_ustr)) + , m_xSecondNF(m_xBuilder->weld_spin_button(u"seconds"_ustr)) + , m_xMSecondNF(m_xBuilder->weld_spin_button(u"milliseconds"_ustr)) { m_xNegativeCB->set_active(rDuration.Negative); m_xYearNF->set_value(rDuration.Years); @@ -1480,21 +1480,21 @@ namespace // struct CustomPropertyLine --------------------------------------------- CustomPropertyLine::CustomPropertyLine(CustomPropertiesWindow* pParent, weld::Widget* pContainer) : m_pParent(pParent) - , m_xBuilder(Application::CreateBuilder(pContainer, "sfx/ui/linefragment.ui")) - , m_xLine(m_xBuilder->weld_container("lineentry")) - , m_xNameBox(m_xBuilder->weld_combo_box("namebox")) - , m_xTypeBox(m_xBuilder->weld_combo_box("typebox")) - , m_xValueEdit(m_xBuilder->weld_entry("valueedit")) - , m_xDateTimeBox(m_xBuilder->weld_widget("datetimebox")) - , m_xDateField(new CustomPropertiesDateField(new SvtCalendarBox(m_xBuilder->weld_menu_button("date")))) - , m_xTimeField(new CustomPropertiesTimeField(m_xBuilder->weld_formatted_spin_button("time"))) - , m_xDurationBox(m_xBuilder->weld_widget("durationbox")) - , m_xDurationField(new CustomPropertiesDurationField(m_xBuilder->weld_entry("duration"), - m_xBuilder->weld_button("durationbutton"))) - , m_xYesNoButton(new CustomPropertiesYesNoButton(m_xBuilder->weld_widget("yesno"), - m_xBuilder->weld_radio_button("yes"), - m_xBuilder->weld_radio_button("no"))) - , m_xRemoveButton(m_xBuilder->weld_button("remove")) + , m_xBuilder(Application::CreateBuilder(pContainer, u"sfx/ui/linefragment.ui"_ustr)) + , m_xLine(m_xBuilder->weld_container(u"lineentry"_ustr)) + , m_xNameBox(m_xBuilder->weld_combo_box(u"namebox"_ustr)) + , m_xTypeBox(m_xBuilder->weld_combo_box(u"typebox"_ustr)) + , m_xValueEdit(m_xBuilder->weld_entry(u"valueedit"_ustr)) + , m_xDateTimeBox(m_xBuilder->weld_widget(u"datetimebox"_ustr)) + , m_xDateField(new CustomPropertiesDateField(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"date"_ustr)))) + , m_xTimeField(new CustomPropertiesTimeField(m_xBuilder->weld_formatted_spin_button(u"time"_ustr))) + , m_xDurationBox(m_xBuilder->weld_widget(u"durationbox"_ustr)) + , m_xDurationField(new CustomPropertiesDurationField(m_xBuilder->weld_entry(u"duration"_ustr), + m_xBuilder->weld_button(u"durationbutton"_ustr))) + , m_xYesNoButton(new CustomPropertiesYesNoButton(m_xBuilder->weld_widget(u"yesno"_ustr), + m_xBuilder->weld_radio_button(u"yes"_ustr), + m_xBuilder->weld_radio_button(u"no"_ustr))) + , m_xRemoveButton(m_xBuilder->weld_button(u"remove"_ustr)) , m_bTypeLostFocus( false ) { fillNameBox(*m_xNameBox); @@ -2005,13 +2005,13 @@ CustomPropertiesControl::CustomPropertiesControl() void CustomPropertiesControl::Init(weld::Builder& rBuilder) { - m_xBox = rBuilder.weld_widget("box"); - m_xBody = rBuilder.weld_container("properties"); + m_xBox = rBuilder.weld_widget(u"box"_ustr); + m_xBody = rBuilder.weld_container(u"properties"_ustr); - m_xName = rBuilder.weld_label("name"); - m_xType = rBuilder.weld_label("type"); - m_xValue = rBuilder.weld_label("value"); - m_xVertScroll = rBuilder.weld_scrolled_window("scroll", true); + m_xName = rBuilder.weld_label(u"name"_ustr); + m_xType = rBuilder.weld_label(u"type"_ustr); + m_xValue = rBuilder.weld_label(u"value"_ustr); + m_xVertScroll = rBuilder.weld_scrolled_window(u"scroll"_ustr, true); m_xPropertiesWin.reset(new CustomPropertiesWindow(*m_xBody, *m_xName, *m_xType, *m_xValue)); m_xBox->set_stack_background(); @@ -2105,9 +2105,9 @@ void CustomPropertiesControl::SetCustomProperties(std::vector< std::unique_ptr<C // class SfxCustomPropertiesPage ----------------------------------------- SfxCustomPropertiesPage::SfxCustomPropertiesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet ) - : SfxTabPage(pPage, pController, "sfx/ui/custominfopage.ui", "CustomInfoPage", &rItemSet) + : SfxTabPage(pPage, pController, u"sfx/ui/custominfopage.ui"_ustr, u"CustomInfoPage"_ustr, &rItemSet) , m_xPropertiesCtrl(new CustomPropertiesControl) - , m_xAdd(m_xBuilder->weld_button("add")) + , m_xAdd(m_xBuilder->weld_button(u"add"_ustr)) { m_xPropertiesCtrl->Init(*m_xBuilder); m_xAdd->connect_clicked(LINK(this, SfxCustomPropertiesPage, AddHdl)); @@ -2214,19 +2214,19 @@ std::unique_ptr<SfxTabPage> SfxCustomPropertiesPage::Create(weld::Container* pPa } CmisValue::CmisValue(weld::Widget* pParent, const OUString& aStr) - : m_xBuilder(Application::CreateBuilder(pParent, "sfx/ui/cmisline.ui")) - , m_xFrame(m_xBuilder->weld_frame("CmisFrame")) - , m_xValueEdit(m_xBuilder->weld_entry("value")) + : m_xBuilder(Application::CreateBuilder(pParent, u"sfx/ui/cmisline.ui"_ustr)) + , m_xFrame(m_xBuilder->weld_frame(u"CmisFrame"_ustr)) + , m_xValueEdit(m_xBuilder->weld_entry(u"value"_ustr)) { m_xValueEdit->show(); m_xValueEdit->set_text(aStr); } CmisDateTime::CmisDateTime(weld::Widget* pParent, const util::DateTime& aDateTime) - : m_xBuilder(Application::CreateBuilder(pParent, "sfx/ui/cmisline.ui")) - , m_xFrame(m_xBuilder->weld_frame("CmisFrame")) - , m_xDateField(new SvtCalendarBox(m_xBuilder->weld_menu_button("date"))) - , m_xTimeField(m_xBuilder->weld_formatted_spin_button("time")) + : m_xBuilder(Application::CreateBuilder(pParent, u"sfx/ui/cmisline.ui"_ustr)) + , m_xFrame(m_xBuilder->weld_frame(u"CmisFrame"_ustr)) + , m_xDateField(new SvtCalendarBox(m_xBuilder->weld_menu_button(u"date"_ustr))) + , m_xTimeField(m_xBuilder->weld_formatted_spin_button(u"time"_ustr)) , m_xFormatter(new weld::TimeFormatter(*m_xTimeField)) { m_xFormatter->SetExtFormat(ExtTimeFieldFormat::LongDuration); @@ -2239,10 +2239,10 @@ CmisDateTime::CmisDateTime(weld::Widget* pParent, const util::DateTime& aDateTim } CmisYesNo::CmisYesNo(weld::Widget* pParent, bool bValue) - : m_xBuilder(Application::CreateBuilder(pParent, "sfx/ui/cmisline.ui")) - , m_xFrame(m_xBuilder->weld_frame("CmisFrame")) - , m_xYesButton(m_xBuilder->weld_radio_button("yes")) - , m_xNoButton(m_xBuilder->weld_radio_button("no")) + : m_xBuilder(Application::CreateBuilder(pParent, u"sfx/ui/cmisline.ui"_ustr)) + , m_xFrame(m_xBuilder->weld_frame(u"CmisFrame"_ustr)) + , m_xYesButton(m_xBuilder->weld_radio_button(u"yes"_ustr)) + , m_xNoButton(m_xBuilder->weld_radio_button(u"no"_ustr)) { m_xYesButton->show(); m_xNoButton->show(); @@ -2254,15 +2254,15 @@ CmisYesNo::CmisYesNo(weld::Widget* pParent, bool bValue) // struct CmisPropertyLine --------------------------------------------- CmisPropertyLine::CmisPropertyLine(weld::Widget* pParent) - : m_xBuilder(Application::CreateBuilder(pParent, "sfx/ui/cmisline.ui")) + : m_xBuilder(Application::CreateBuilder(pParent, u"sfx/ui/cmisline.ui"_ustr)) , m_sType(CMIS_TYPE_STRING) , m_bUpdatable(false) , m_bRequired(false) , m_bMultiValued(false) , m_bOpenChoice(false) - , m_xFrame(m_xBuilder->weld_frame("CmisFrame")) - , m_xName(m_xBuilder->weld_label("name")) - , m_xType(m_xBuilder->weld_label("type")) + , m_xFrame(m_xBuilder->weld_frame(u"CmisFrame"_ustr)) + , m_xName(m_xBuilder->weld_label(u"name"_ustr)) + , m_xType(m_xBuilder->weld_label(u"type"_ustr)) { m_xFrame->set_sensitive(true); } @@ -2486,8 +2486,8 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con } CmisPropertiesControl::CmisPropertiesControl(weld::Builder& rBuilder) - : m_aPropertiesWin(rBuilder.weld_container("CmisWindow")) - , m_xScrolledWindow(rBuilder.weld_scrolled_window("CmisScroll")) + : m_aPropertiesWin(rBuilder.weld_container(u"CmisWindow"_ustr)) + , m_xScrolledWindow(rBuilder.weld_scrolled_window(u"CmisScroll"_ustr)) { // set height to something small and force it to take the size // dictated by the other pages @@ -2511,7 +2511,7 @@ void CmisPropertiesControl::AddLine( const OUString& sId, const OUString& sName, // class SfxCmisPropertiesPage ----------------------------------------- SfxCmisPropertiesPage::SfxCmisPropertiesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) - : SfxTabPage(pPage, pController, "sfx/ui/cmisinfopage.ui", "CmisInfoPage", &rItemSet) + : SfxTabPage(pPage, pController, u"sfx/ui/cmisinfopage.ui"_ustr, u"CmisInfoPage"_ustr, &rItemSet) , m_xPropertiesCtrl(new CmisPropertiesControl(*m_xBuilder)) { } diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx index e7c0348b548f..281baf5278ed 100644 --- a/sfx2/source/dialog/documentfontsdialog.cxx +++ b/sfx2/source/dialog/documentfontsdialog.cxx @@ -33,12 +33,12 @@ std::unique_ptr<SfxTabPage> SfxDocumentFontsPage::Create(weld::Container* pPage, } SfxDocumentFontsPage::SfxDocumentFontsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& set) - : SfxTabPage(pPage, pController, "sfx/ui/documentfontspage.ui", "DocumentFontsPage", &set) - , embedFontsCheckbox(m_xBuilder->weld_check_button("embedFonts")) - , embedUsedFontsCheckbox(m_xBuilder->weld_check_button("embedUsedFonts")) - , embedLatinScriptFontsCheckbox(m_xBuilder->weld_check_button("embedLatinScriptFonts")) - , embedAsianScriptFontsCheckbox(m_xBuilder->weld_check_button("embedAsianScriptFonts")) - , embedComplexScriptFontsCheckbox(m_xBuilder->weld_check_button("embedComplexScriptFonts")) + : SfxTabPage(pPage, pController, u"sfx/ui/documentfontspage.ui"_ustr, u"DocumentFontsPage"_ustr, &set) + , embedFontsCheckbox(m_xBuilder->weld_check_button(u"embedFonts"_ustr)) + , embedUsedFontsCheckbox(m_xBuilder->weld_check_button(u"embedUsedFonts"_ustr)) + , embedLatinScriptFontsCheckbox(m_xBuilder->weld_check_button(u"embedLatinScriptFonts"_ustr)) + , embedAsianScriptFontsCheckbox(m_xBuilder->weld_check_button(u"embedAsianScriptFonts"_ustr)) + , embedComplexScriptFontsCheckbox(m_xBuilder->weld_check_button(u"embedComplexScriptFonts"_ustr)) { } @@ -61,13 +61,13 @@ void SfxDocumentFontsPage::Reset( const SfxItemSet* ) try { uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW ); - xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts; - xProps->getPropertyValue("EmbedOnlyUsedFonts") >>= bEmbedUsedFonts; - xProps->getPropertyValue("EmbedLatinScriptFonts") >>= bEmbedLatinScriptFonts; - xProps->getPropertyValue("EmbedAsianScriptFonts") >>= bEmbedAsianScriptFonts; - xProps->getPropertyValue("EmbedComplexScriptFonts") >>= bEmbedComplexScriptFonts; + xProps->getPropertyValue(u"EmbedFonts"_ustr) >>= bEmbedFonts; + xProps->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr) >>= bEmbedUsedFonts; + xProps->getPropertyValue(u"EmbedLatinScriptFonts"_ustr) >>= bEmbedLatinScriptFonts; + xProps->getPropertyValue(u"EmbedAsianScriptFonts"_ustr) >>= bEmbedAsianScriptFonts; + xProps->getPropertyValue(u"EmbedComplexScriptFonts"_ustr) >>= bEmbedComplexScriptFonts; } catch( uno::Exception& ) { @@ -96,12 +96,12 @@ bool SfxDocumentFontsPage::FillItemSet( SfxItemSet* ) try { uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW ); - xProps->setPropertyValue("EmbedFonts", uno::Any(bEmbedFonts)); - xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::Any(bEmbedUsedFonts)); - xProps->setPropertyValue("EmbedLatinScriptFonts", uno::Any(bEmbedLatinScriptFonts)); - xProps->setPropertyValue("EmbedAsianScriptFonts", uno::Any(bEmbedAsianScriptFonts)); - xProps->setPropertyValue("EmbedComplexScriptFonts", uno::Any(bEmbedComplexScriptFonts)); + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW ); + xProps->setPropertyValue(u"EmbedFonts"_ustr, uno::Any(bEmbedFonts)); + xProps->setPropertyValue(u"EmbedOnlyUsedFonts"_ustr, uno::Any(bEmbedUsedFonts)); + xProps->setPropertyValue(u"EmbedLatinScriptFonts"_ustr, uno::Any(bEmbedLatinScriptFonts)); + xProps->setPropertyValue(u"EmbedAsianScriptFonts"_ustr, uno::Any(bEmbedAsianScriptFonts)); + xProps->setPropertyValue(u"EmbedComplexScriptFonts"_ustr, uno::Any(bEmbedComplexScriptFonts)); } catch( uno::Exception& ) { diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 2d352aef03d8..2629bae49899 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -797,7 +797,7 @@ static bool lcl_isSystemFilePicker( const uno::Reference< XExecutableDialog >& _ uno::Reference< XServiceInfo > xSI( _rxFP, UNO_QUERY ); if ( !xSI.is() ) return true; - return xSI->supportsService( "com.sun.star.ui.dialogs.SystemFilePicker" ); + return xSI->supportsService( u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr ); } catch( const Exception& ) { @@ -970,7 +970,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( if( xFactory.is() ) { mxFilterCFG.set( - xFactory->createInstance( "com.sun.star.document.FilterFactory" ), + xFactory->createInstance( u"com.sun.star.document.FilterFactory"_ustr ), UNO_QUERY ); } @@ -986,7 +986,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( if ( mbExport && !mxFilterCFG.is() && xFactory.is() ) { mxFilterCFG.set( - xFactory->createInstance( "com.sun.star.document.FilterFactory" ), + xFactory->createInstance( u"com.sun.star.document.FilterFactory"_ustr ), UNO_QUERY ); } break; @@ -1066,23 +1066,23 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( else { pInitArguments[0] <<= NamedValue( - "TemplateDescription", + u"TemplateDescription"_ustr, Any( nTemplateDescription ) ); pInitArguments[1] <<= NamedValue( - "StandardDir", + u"StandardDir"_ustr, Any( sStandardDir ) ); pInitArguments[2] <<= NamedValue( - "DenyList", + u"DenyList"_ustr, Any( rDenyList ) ); if (xWindow.is()) - pInitArguments[3] <<= NamedValue("ParentWindow", Any(xWindow)); + pInitArguments[3] <<= NamedValue(u"ParentWindow"_ustr, Any(xWindow)); } try @@ -1795,7 +1795,7 @@ void FileDialogHelper_Impl::addFilters( const OUString& rFactory, uno::Reference< XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); uno::Reference< XContainerQuery > xFilterCont( - xSMGR->createInstance("com.sun.star.document.FilterFactory"), + xSMGR->createInstance(u"com.sun.star.document.FilterFactory"_ustr), UNO_QUERY); if ( ! xFilterCont.is() ) return; @@ -2011,14 +2011,14 @@ void SaveLastDirectory(OUString const& sContext, OUString const& sDirectory) if (found) { Reference<XPropertySet> el(v.get<Reference<XPropertySet>>(), UNO_SET_THROW); - el->setPropertyValue("LastPath", Any(sDirectory)); + el->setPropertyValue(u"LastPath"_ustr, Any(sDirectory)); } else { Reference<XPropertySet> el( (Reference<lang::XSingleServiceFactory>(set, UNO_QUERY_THROW)->createInstance()), UNO_QUERY_THROW); - el->setPropertyValue("LastPath", Any(sDirectory)); + el->setPropertyValue(u"LastPath"_ustr, Any(sDirectory)); Any v2(el); set->insertByName(sContext, v2); } @@ -2141,7 +2141,7 @@ OUString FileDialogHelper_Impl::getInitPath(std::u16string_view _rFallback, { v = set->getByName(sContext); Reference<XPropertySet> el(v.get<Reference<XPropertySet>>(), UNO_SET_THROW); - sPath = el->getPropertyValue("LastPath").get<OUString>(); + sPath = el->getPropertyValue(u"LastPath"_ustr).get<OUString>(); } catch (NoSuchElementException&) { @@ -2451,118 +2451,118 @@ OUString FileDialogHelper::contextToString(Context context) // Please don't change them. switch(context) { case AcceleratorConfig: - return "AcceleratorConfig"; + return u"AcceleratorConfig"_ustr; case AutoRedact: - return "AutoRedact"; + return u"AutoRedact"_ustr; case BaseDataSource: - return "BaseDataSource"; + return u"BaseDataSource"_ustr; case BaseSaveAs: - return "BaseSaveAs"; + return u"BaseSaveAs"_ustr; case BasicExportDialog: - return "BasicExportDialog"; + return u"BasicExportDialog"_ustr; case BasicExportPackage: - return "BasicExportPackage"; + return u"BasicExportPackage"_ustr; case BasicExportSource: - return "BasicExportSource"; + return u"BasicExportSource"_ustr; case BasicImportDialog: - return "BasicImportDialog"; + return u"BasicImportDialog"_ustr; case BasicImportSource: - return "BasicImportSource"; + return u"BasicImportSource"_ustr; case BasicInsertLib: - return "BasicInsertLib"; + return u"BasicInsertLib"_ustr; case BulletsAddImage: - return "BulletsAddImage"; + return u"BulletsAddImage"_ustr; case CalcDataProvider: - return "CalcDataProvider"; + return u"CalcDataProvider"_ustr; case CalcDataStream: - return "CalcDataStream"; + return u"CalcDataStream"_ustr; case CalcExport: - return "CalcExport"; + return u"CalcExport"_ustr; case CalcSaveAs: - return "CalcSaveAs"; + return u"CalcSaveAs"_ustr; case CalcXMLSource: - return "CalcXMLSource"; + return u"CalcXMLSource"_ustr; case ExportImage: - return "ExportImage"; + return u"ExportImage"_ustr; case ExtensionManager: - return "ExtensionManager"; + return u"ExtensionManager"_ustr; case FormsAddInstance: - return "FormsAddInstance"; + return u"FormsAddInstance"_ustr; case FormsInsertImage: - return "FormsInsertImage"; + return u"FormsInsertImage"_ustr; case LinkClientOLE: - return "LinkClientOLE"; + return u"LinkClientOLE"_ustr; case LinkClientFile: - return "LinkClientFile"; + return u"LinkClientFile"_ustr; case DrawImpressInsertFile: - return "DrawImpressInsertFile"; + return u"DrawImpressInsertFile"_ustr; case DrawImpressOpenSound: - return "DrawImpressOpenSound"; + return u"DrawImpressOpenSound"_ustr; case DrawExport: - return "DrawExport"; + return u"DrawExport"_ustr; case DrawSaveAs: - return "DrawSaveAs"; + return u"DrawSaveAs"_ustr; case IconImport: - return "IconImport"; + return u"IconImport"_ustr; case ImpressClickAction: - return "ImpressClickAction"; + return u"ImpressClickAction"_ustr; case ImpressExport: - return "ImpressExport"; + return u"ImpressExport"_ustr; case ImpressPhotoDialog: - return "ImpressPhotoDialog"; + return u"ImpressPhotoDialog"_ustr; case ImpressSaveAs: - return "ImpressSaveAs"; + return u"ImpressSaveAs"_ustr; case ImageMap: - return "ImageMap"; + return u"ImageMap"_ustr; case InsertDoc: - return "InsertDoc"; + return u"InsertDoc"_ustr; case InsertImage: - return "InsertImage"; + return u"InsertImage"_ustr; case InsertOLE: - return "InsertOLE"; + return u"InsertOLE"_ustr; case InsertMedia: - return "InsertMedia"; + return u"InsertMedia"_ustr; case JavaClassPath: - return "JavaClassPath"; + return u"JavaClassPath"_ustr; case ReportInsertImage: - return "ReportInsertImage"; + return u"ReportInsertImage"_ustr; case ScreenshotAnnotation: - return "ScreenshotAnnotation"; + return u"ScreenshotAnnotation"_ustr; case SignatureLine: - return "SignatureLine"; + return u"SignatureLine"_ustr; case TemplateImport: - return "TemplateImport"; + return u"TemplateImport"_ustr; case WriterCreateAddressList: - return "WriterCreateAddressList"; + return u"WriterCreateAddressList"_ustr; case WriterExport: - return "WriterExport"; + return u"WriterExport"_ustr; case WriterImportAutotext: - return "WriterImportAutotext"; + return u"WriterImportAutotext"_ustr; case WriterInsertHyperlink: - return "WriterInsertHyperlink"; + return u"WriterInsertHyperlink"_ustr; case WriterInsertImage: - return "WriterInsertImage"; + return u"WriterInsertImage"_ustr; case WriterInsertScript: - return "WriterInsertScript"; + return u"WriterInsertScript"_ustr; case WriterLoadTemplate: - return "WriterLoadTemplate"; + return u"WriterLoadTemplate"_ustr; case WriterMailMerge: - return "WriterMailMerge"; + return u"WriterMailMerge"_ustr; case WriterMailMergeSaveAs: - return "WriterMailMergeSaveAs"; + return u"WriterMailMergeSaveAs"_ustr; case WriterNewHTMLGlobalDoc: - return "WriterNewHTMLGlobalDoc"; + return u"WriterNewHTMLGlobalDoc"_ustr; case WriterRegisterDataSource: - return "WriterRegisterDataSource"; + return u"WriterRegisterDataSource"_ustr; case WriterSaveAs: - return "WriterSaveAs"; + return u"WriterSaveAs"_ustr; case WriterSaveHTML: - return "WriterSaveHTML"; + return u"WriterSaveHTML"_ustr; case XMLFilterSettings: - return "XMLFilterSettings"; + return u"XMLFilterSettings"_ustr; case UnknownContext: default: - return ""; + return u""_ustr; } } @@ -2894,8 +2894,8 @@ ErrCode SetPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, SfxI if (bOOXML) { ::comphelper::SequenceAsHashMap aHashData; - aHashData[ OUString( "OOXPassword" ) ] <<= rPasswordToOpen; - aHashData[ OUString( "CryptoType" ) ] <<= OUString( "Standard" ); + aHashData[ u"OOXPassword"_ustr ] <<= rPasswordToOpen; + aHashData[ u"CryptoType"_ustr ] <<= u"Standard"_ustr; aEncryptionData = aHashData.getAsConstNamedValueList(); } else @@ -2906,8 +2906,8 @@ ErrCode SetPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, SfxI if ( aEncryptionKey.hasElements() ) { ::comphelper::SequenceAsHashMap aHashData; - aHashData[ OUString( "STD97EncryptionKey" ) ] <<= aEncryptionKey; - aHashData[ OUString( "STD97UniqueID" ) ] <<= aUniqueID; + aHashData[ u"STD97EncryptionKey"_ustr ] <<= aEncryptionKey; + aHashData[ u"STD97UniqueID"_ustr ] <<= aUniqueID; aEncryptionData = aHashData.getAsConstNamedValueList(); } diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 5aada4d6ac69..e4f210c59765 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -315,7 +315,7 @@ namespace sfx2 // open our config node OConfigurationTreeRoot aFilterClassification = OConfigurationTreeRoot::createWithComponentContext( ::comphelper::getProcessComponentContext(), - "org.openoffice.Office.UI/FilterClassification", + u"org.openoffice.Office.UI/FilterClassification"_ustr, -1, OConfigurationTreeRoot::CM_READONLY ); @@ -857,7 +857,7 @@ namespace sfx2 { ::comphelper::SequenceAsHashMap lFilterProps (xFilterList->nextElement()); OUString sFilterName = lFilterProps.getUnpackedValueOrDefault( - "Name", + u"Name"_ustr, OUString()); if (!sFilterName.isEmpty()) m_lFilters.push_back(sFilterName); diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 58beb3892518..886cd2b77a3d 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -149,7 +149,7 @@ void SfxInfoBarWindow::SetCloseButtonImage() pProcessor->process(aSeq); - m_xCloseBtn->set_item_image("close", xDevice); + m_xCloseBtn->set_item_image(u"close"_ustr, xDevice); } class ExtraButton @@ -166,9 +166,9 @@ private: public: ExtraButton(weld::Container* pContainer, const OUString* pCommand) - : m_xBuilder(Application::CreateBuilder(pContainer, "sfx/ui/extrabutton.ui")) - , m_xContainer(m_xBuilder->weld_container("ExtraButton")) - , m_xButton(m_xBuilder->weld_button("button")) + : m_xBuilder(Application::CreateBuilder(pContainer, u"sfx/ui/extrabutton.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"ExtraButton"_ustr)) + , m_xButton(m_xBuilder->weld_button(u"button"_ustr)) { if (pCommand) { @@ -197,15 +197,15 @@ SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, OUString sId, const OUString& sPrimaryMessage, const OUString& sSecondaryMessage, InfobarType ibType, bool bShowCloseButton) - : InterimItemWindow(pParent, "sfx/ui/infobar.ui", "InfoBar") + : InterimItemWindow(pParent, u"sfx/ui/infobar.ui"_ustr, u"InfoBar"_ustr) , m_sId(std::move(sId)) , m_eType(ibType) , m_bLayingOut(false) - , m_xImage(m_xBuilder->weld_image("image")) - , m_xPrimaryMessage(m_xBuilder->weld_label("primary")) - , m_xSecondaryMessage(m_xBuilder->weld_text_view("secondary")) - , m_xButtonBox(m_xBuilder->weld_container("buttonbox")) - , m_xCloseBtn(m_xBuilder->weld_toolbar("closebar")) + , m_xImage(m_xBuilder->weld_image(u"image"_ustr)) + , m_xPrimaryMessage(m_xBuilder->weld_label(u"primary"_ustr)) + , m_xSecondaryMessage(m_xBuilder->weld_text_view(u"secondary"_ustr)) + , m_xButtonBox(m_xBuilder->weld_container(u"buttonbox"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_toolbar(u"closebar"_ustr)) { SetStyle(GetStyle() | WB_DIALOGCONTROL); diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx index 99f1b122bc25..6334240d6faa 100644 --- a/sfx2/source/dialog/inputdlg.cxx +++ b/sfx2/source/dialog/inputdlg.cxx @@ -10,11 +10,11 @@ #include <sfx2/inputdlg.hxx> InputDialog::InputDialog(weld::Widget* pParent, const OUString& rLabelText) - : GenericDialogController(pParent, "sfx/ui/inputdialog.ui", "InputDialog") - , m_xEntry(m_xBuilder->weld_entry("entry")) - , m_xLabel(m_xBuilder->weld_label("label")) - , m_xHelp(m_xBuilder->weld_button("help")) - , m_xOk(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"sfx/ui/inputdialog.ui"_ustr, u"InputDialog"_ustr) + , m_xEntry(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xLabel(m_xBuilder->weld_label(u"label"_ustr)) + , m_xHelp(m_xBuilder->weld_button(u"help"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"ok"_ustr)) { m_xLabel->set_label(rLabelText); } @@ -41,7 +41,7 @@ void InputDialog::SetEntryMessageType(weld::EntryMessageType aType) else { m_xOk->set_sensitive(true); - SetTooltip(""); + SetTooltip(u""_ustr); } } diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 05b86eae5730..d421400255cd 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -124,7 +124,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( { uno::Sequence < beans::PropertyValue > aProps; css::uno::Reference< css::container::XNameAccess > xFilterCFG( - xSMGR->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); + xSMGR->createInstance( u"com.sun.star.document.FilterFactory"_ustr ), uno::UNO_QUERY ); css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY ); if ( !xFilterCFG.is() ) @@ -157,13 +157,13 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( //string for the ok button //used in filter/source/pdf/impdialog.cxx uno::Sequence< beans::PropertyValue > aFilterDataValue{ - comphelper::makePropertyValue("_OkButtonString", + comphelper::makePropertyValue(u"_OkButtonString"_ustr, SfxResId(STR_PDF_EXPORT_SEND )) }; //add to the filterdata property, the only one the PDF export filter dialog will care for uno::Sequence< beans::PropertyValue > aPropsForDialog{ - comphelper::makePropertyValue("FilterData", aFilterDataValue) + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterDataValue) }; //when executing the dialog will merge the persistent FilterData properties @@ -303,7 +303,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( OUString aExtension; css::uno::Reference< css::container::XContainerQuery > xContainerQuery( - xSMGR->createInstance( "com.sun.star.document.FilterFactory" ), + xSMGR->createInstance( u"com.sun.star.document.FilterFactory"_ustr ), css::uno::UNO_QUERY ); if ( bStoreTo ) @@ -333,7 +333,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( { ::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() ); aFilterName = aFilterPropsHM.getUnpackedValueOrDefault( - "Name", + u"Name"_ustr, OUString() ); } @@ -342,7 +342,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( // Retrieve filter from media descriptor ::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() ); OUString aOrgFilterName = aMediaDescrPropsHM.getUnpackedValueOrDefault( - "FilterName", + u"FilterName"_ustr, OUString() ); if ( aOrgFilterName == aFilterName ) { @@ -360,7 +360,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( // Retrieve filter from media descriptor ::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() ); aFilterName = aMediaDescrPropsHM.getUnpackedValueOrDefault( - "FilterName", + u"FilterName"_ustr, OUString() ); } @@ -371,7 +371,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( { ::comphelper::SequenceAsHashMap aFilterPropsHM( xModuleManager->getByName( aModule ) ); aFilterName = aFilterPropsHM.getUnpackedValueOrDefault( - "ooSetupFactoryDefaultFilter", + u"ooSetupFactoryDefaultFilter"_ustr, OUString() ); css::uno::Reference< css::container::XNameAccess > xNameAccess( xContainerQuery, css::uno::UNO_QUERY ); @@ -379,7 +379,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( { ::comphelper::SequenceAsHashMap aFilterPropsHM2( xNameAccess->getByName( aFilterName ) ); aTypeName = aFilterPropsHM2.getUnpackedValueOrDefault( - "Type", + u"Type"_ustr, OUString() ); } } @@ -407,7 +407,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( else { css::uno::Reference< container::XNameAccess > xTypeDetection( - xSMGR->createInstance( "com.sun.star.document.TypeDetection" ), + xSMGR->createInstance( u"com.sun.star.document.TypeDetection"_ustr ), css::uno::UNO_QUERY ); @@ -417,7 +417,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( { ::comphelper::SequenceAsHashMap aTypeNamePropsHM( xTypeDetection->getByName( aTypeName ) ); uno::Sequence< OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault( - "Extensions", + u"Extensions"_ustr, ::uno::Sequence< OUString >() ); if ( aExtensions.hasElements() ) aExtension = aExtensions[0]; @@ -465,7 +465,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( sal_Int32 nNumArgs(1); static constexpr OUString aPasswordPropName( u"Password"_ustr ); css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue( - "FilterName", aFilterName) }; + u"FilterName"_ustr, aFilterName) }; ::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() ); OUString aPassword = aMediaDescrPropsHM.getUnpackedValueOrDefault( @@ -759,8 +759,8 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: SolarMutexGuard aGuard; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(Application::GetFrameWeld(xParentWindow), "sfx/ui/errorfindemaildialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("ErrorFindEmailDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(Application::GetFrameWeld(xParentWindow), u"sfx/ui/errorfindemaildialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"ErrorFindEmailDialog"_ustr)); xBox->run(); eResult = SEND_MAIL_CANCELLED; } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 8de5f57f4404..9425b5e5b437 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -46,7 +46,7 @@ * initializes the list box with the templates */ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet) - : SfxTabPage(pPage, pController, "sfx/ui/managestylepage.ui", "ManageStylePage", &rAttrSet) + : SfxTabPage(pPage, pController, u"sfx/ui/managestylepage.ui"_ustr, u"ManageStylePage"_ustr, &rAttrSet) , pStyle(&static_cast<SfxStyleDialogController*>(pController)->GetStyleSheet()) , pItem(nullptr) , bModified(false) @@ -54,17 +54,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D , aFollow(pStyle->GetFollow()) , aParent(pStyle->GetParent()) , nFlags(pStyle->GetMask()) - , m_xName(m_xBuilder->weld_entry("name")) - , m_xAutoCB(m_xBuilder->weld_check_button("autoupdate")) - , m_xFollowFt(m_xBuilder->weld_label("nextstyleft")) - , m_xFollowLb(m_xBuilder->weld_combo_box("nextstyle")) - , m_xEditStyleBtn(m_xBuilder->weld_button("editstyle")) - , m_xBaseFt(m_xBuilder->weld_label("linkedwithft")) - , m_xBaseLb(m_xBuilder->weld_combo_box("linkedwith")) - , m_xEditLinkStyleBtn(m_xBuilder->weld_button("editlinkstyle")) - , m_xFilterFt(m_xBuilder->weld_label("categoryft")) - , m_xFilterLb(m_xBuilder->weld_combo_box("category")) - , m_xDescFt(m_xBuilder->weld_label("desc")) + , m_xName(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xAutoCB(m_xBuilder->weld_check_button(u"autoupdate"_ustr)) + , m_xFollowFt(m_xBuilder->weld_label(u"nextstyleft"_ustr)) + , m_xFollowLb(m_xBuilder->weld_combo_box(u"nextstyle"_ustr)) + , m_xEditStyleBtn(m_xBuilder->weld_button(u"editstyle"_ustr)) + , m_xBaseFt(m_xBuilder->weld_label(u"linkedwithft"_ustr)) + , m_xBaseLb(m_xBuilder->weld_combo_box(u"linkedwith"_ustr)) + , m_xEditLinkStyleBtn(m_xBuilder->weld_button(u"editlinkstyle"_ustr)) + , m_xFilterFt(m_xBuilder->weld_label(u"categoryft"_ustr)) + , m_xFilterLb(m_xBuilder->weld_combo_box(u"category"_ustr)) + , m_xDescFt(m_xBuilder->weld_label(u"desc"_ustr)) { m_xFollowLb->make_sorted(); // tdf#120188 like SwCharURLPage limit the width of the style combos diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index ff9f8a9f781a..6c82ea21a522 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -42,7 +42,7 @@ SfxNavigator::SfxNavigator(SfxBindings* pBind , : SfxDockingWindow(pBind , pChildWin , pParent , - "Navigator", "sfx/ui/navigator.ui") + u"Navigator"_ustr, u"sfx/ui/navigator.ui"_ustr) { SetText(SfxResId(STR_SID_NAVIGATOR)); SetHelpId(HID_NAVIGATOR_WINDOW); diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index bc6fc7babfa1..7e6b5f62749d 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -61,11 +61,11 @@ IMPL_LINK(SfxNewStyleDlg, ModifyHdl, weld::ComboBox&, rBox, void) } SfxNewStyleDlg::SfxNewStyleDlg(weld::Widget* pParent, SfxStyleSheetBasePool& rInPool, SfxStyleFamily eFam) - : GenericDialogController(pParent, "sfx/ui/newstyle.ui", "CreateStyleDialog") + : GenericDialogController(pParent, u"sfx/ui/newstyle.ui"_ustr, u"CreateStyleDialog"_ustr) , m_rPool(rInPool) , m_eSearchFamily(eFam) - , m_xColBox(m_xBuilder->weld_entry_tree_view("stylegrid", "stylename", "styles")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + , m_xColBox(m_xBuilder->weld_entry_tree_view(u"stylegrid"_ustr, u"stylename"_ustr, u"styles"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) , m_xQueryOverwriteBox(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Question, VclButtonsType::YesNo, SfxResId(STR_QUERY_OVERWRITE))) { diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 44403298ae37..24254459b9b9 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -105,7 +105,7 @@ SfxPartDockWnd_Impl::SfxPartDockWnd_Impl { css::uno::Reference< css::beans::XPropertySet > xLMPropSet( xFrame->getLayoutManager(), css::uno::UNO_QUERY_THROW ); - xLMPropSet->setPropertyValue( "AutomaticToolbars", css::uno::Any( false )); + xLMPropSet->setPropertyValue( u"AutomaticToolbars"_ustr, css::uno::Any( false )); } catch( css::uno::RuntimeException& ) { diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index b78546722cb9..79bb50a51276 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -141,26 +141,26 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl, weld::Button&, void) // CTOR / DTOR ----------------------------------------------------------- SfxPasswordDialog::SfxPasswordDialog(weld::Widget* pParent, const OUString* pGroupText) - : GenericDialogController(pParent, "sfx/ui/password.ui", "PasswordDialog") - , m_xPassword1Box(m_xBuilder->weld_frame("password1frame")) - , m_xUserFT(m_xBuilder->weld_label("userft")) - , m_xUserED(m_xBuilder->weld_entry("usered")) - , m_xPassword1FT(m_xBuilder->weld_label("pass1ft")) - , m_xPassword1ED(m_xBuilder->weld_entry("pass1ed")) - , m_xPassword1StrengthBar(m_xBuilder->weld_level_bar("pass1bar")) - , m_xPassword1PolicyLabel(m_xBuilder->weld_label("pass1policylabel")) - , m_xConfirm1FT(m_xBuilder->weld_label("confirm1ft")) - , m_xConfirm1ED(m_xBuilder->weld_entry("confirm1ed")) - , m_xPassword2Box(m_xBuilder->weld_frame("password2frame")) - , m_xPassword2FT(m_xBuilder->weld_label("pass2ft")) - , m_xPassword2ED(m_xBuilder->weld_entry("pass2ed")) - , m_xPassword2StrengthBar(m_xBuilder->weld_level_bar("pass2bar")) - , m_xPassword2PolicyLabel(m_xBuilder->weld_label("pass2policylabel")) - , m_xConfirm2FT(m_xBuilder->weld_label("confirm2ft")) - , m_xConfirm2ED(m_xBuilder->weld_entry("confirm2ed")) - , m_xMinLengthFT(m_xBuilder->weld_label("minlenft")) - , m_xOnlyAsciiFT(m_xBuilder->weld_label("onlyascii")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) + : GenericDialogController(pParent, u"sfx/ui/password.ui"_ustr, u"PasswordDialog"_ustr) + , m_xPassword1Box(m_xBuilder->weld_frame(u"password1frame"_ustr)) + , m_xUserFT(m_xBuilder->weld_label(u"userft"_ustr)) + , m_xUserED(m_xBuilder->weld_entry(u"usered"_ustr)) + , m_xPassword1FT(m_xBuilder->weld_label(u"pass1ft"_ustr)) + , m_xPassword1ED(m_xBuilder->weld_entry(u"pass1ed"_ustr)) + , m_xPassword1StrengthBar(m_xBuilder->weld_level_bar(u"pass1bar"_ustr)) + , m_xPassword1PolicyLabel(m_xBuilder->weld_label(u"pass1policylabel"_ustr)) + , m_xConfirm1FT(m_xBuilder->weld_label(u"confirm1ft"_ustr)) + , m_xConfirm1ED(m_xBuilder->weld_entry(u"confirm1ed"_ustr)) + , m_xPassword2Box(m_xBuilder->weld_frame(u"password2frame"_ustr)) + , m_xPassword2FT(m_xBuilder->weld_label(u"pass2ft"_ustr)) + , m_xPassword2ED(m_xBuilder->weld_entry(u"pass2ed"_ustr)) + , m_xPassword2StrengthBar(m_xBuilder->weld_level_bar(u"pass2bar"_ustr)) + , m_xPassword2PolicyLabel(m_xBuilder->weld_label(u"pass2policylabel"_ustr)) + , m_xConfirm2FT(m_xBuilder->weld_label(u"confirm2ft"_ustr)) + , m_xConfirm2ED(m_xBuilder->weld_entry(u"confirm2ed"_ustr)) + , m_xMinLengthFT(m_xBuilder->weld_label(u"minlenft"_ustr)) + , m_xOnlyAsciiFT(m_xBuilder->weld_label(u"onlyascii"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) , maMinLenPwdStr(SfxResId(STR_PASSWD_MIN_LEN)) , maMinLenPwdStr1(SfxResId(STR_PASSWD_MIN_LEN1)) , maEmptyPwdStr(SfxResId(STR_PASSWD_EMPTY)) diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index d0ee19c17a1a..d1ee64911b2d 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -33,37 +33,37 @@ static bool bOutputForPrinter = true; #define DPI_COUNT SAL_N_ELEMENTS(aDPIArray) SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) - : SfxTabPage(pPage, pController, "sfx/ui/optprintpage.ui", "OptPrintPage", &rSet) - , m_xPrinterOutputRB(m_xBuilder->weld_radio_button("printer")) - , m_xPrintFileOutputRB(m_xBuilder->weld_radio_button("file")) - , m_xReduceTransparencyCB(m_xBuilder->weld_check_button("reducetrans")) - , m_xReduceTransparencyImg(m_xBuilder->weld_widget("lockreducetrans")) - , m_xReduceTransparencyAutoRB(m_xBuilder->weld_radio_button("reducetransauto")) - , m_xReduceTransparencyNoneRB(m_xBuilder->weld_radio_button("reducetransnone")) - , m_xReduceTransparencyModeImg(m_xBuilder->weld_widget("lockreducetransmode")) - , m_xReduceGradientsCB(m_xBuilder->weld_check_button("reducegrad")) - , m_xReduceGradientsImg(m_xBuilder->weld_widget("lockreducegrad")) - , m_xReduceGradientsStripesRB(m_xBuilder->weld_radio_button("reducegradstripes")) - , m_xReduceGradientsColorRB(m_xBuilder->weld_radio_button("reducegradcolor")) - , m_xReduceGradientsModeImg(m_xBuilder->weld_widget("lockreducegradmode")) - , m_xReduceGradientsStepCountNF(m_xBuilder->weld_spin_button("reducegradstep")) - , m_xReduceBitmapsCB(m_xBuilder->weld_check_button("reducebitmap")) - , m_xReduceBitmapsImg(m_xBuilder->weld_widget("lockreducebitmap")) - , m_xReduceBitmapsOptimalRB(m_xBuilder->weld_radio_button("reducebitmapoptimal")) - , m_xReduceBitmapsNormalRB(m_xBuilder->weld_radio_button("reducebitmapnormal")) - , m_xReduceBitmapsResolutionRB(m_xBuilder->weld_radio_button("reducebitmapresol")) - , m_xReduceBitmapsModeImg(m_xBuilder->weld_widget("lockreducebitmapmode")) - , m_xReduceBitmapsResolutionLB(m_xBuilder->weld_combo_box("reducebitmapdpi")) - , m_xReduceBitmapsTransparencyCB(m_xBuilder->weld_check_button("reducebitmaptrans")) - , m_xReduceBitmapsTransparencyImg(m_xBuilder->weld_widget("lockreducebitmaptrans")) - , m_xConvertToGreyscalesCB(m_xBuilder->weld_check_button("converttogray")) - , m_xConvertToGreyscalesImg(m_xBuilder->weld_widget("lockconverttogray")) - , m_xPaperSizeCB(m_xBuilder->weld_check_button("papersize")) - , m_xPaperSizeImg(m_xBuilder->weld_widget("lockpapersize")) - , m_xPaperOrientationCB(m_xBuilder->weld_check_button("paperorient")) - , m_xPaperOrientationImg(m_xBuilder->weld_widget("lockpaperorient")) - , m_xTransparencyCB(m_xBuilder->weld_check_button("trans")) - , m_xTransparencyImg(m_xBuilder->weld_widget("locktrans")) + : SfxTabPage(pPage, pController, u"sfx/ui/optprintpage.ui"_ustr, u"OptPrintPage"_ustr, &rSet) + , m_xPrinterOutputRB(m_xBuilder->weld_radio_button(u"printer"_ustr)) + , m_xPrintFileOutputRB(m_xBuilder->weld_radio_button(u"file"_ustr)) + , m_xReduceTransparencyCB(m_xBuilder->weld_check_button(u"reducetrans"_ustr)) + , m_xReduceTransparencyImg(m_xBuilder->weld_widget(u"lockreducetrans"_ustr)) + , m_xReduceTransparencyAutoRB(m_xBuilder->weld_radio_button(u"reducetransauto"_ustr)) + , m_xReduceTransparencyNoneRB(m_xBuilder->weld_radio_button(u"reducetransnone"_ustr)) + , m_xReduceTransparencyModeImg(m_xBuilder->weld_widget(u"lockreducetransmode"_ustr)) + , m_xReduceGradientsCB(m_xBuilder->weld_check_button(u"reducegrad"_ustr)) + , m_xReduceGradientsImg(m_xBuilder->weld_widget(u"lockreducegrad"_ustr)) + , m_xReduceGradientsStripesRB(m_xBuilder->weld_radio_button(u"reducegradstripes"_ustr)) + , m_xReduceGradientsColorRB(m_xBuilder->weld_radio_button(u"reducegradcolor"_ustr)) + , m_xReduceGradientsModeImg(m_xBuilder->weld_widget(u"lockreducegradmode"_ustr)) + , m_xReduceGradientsStepCountNF(m_xBuilder->weld_spin_button(u"reducegradstep"_ustr)) + , m_xReduceBitmapsCB(m_xBuilder->weld_check_button(u"reducebitmap"_ustr)) + , m_xReduceBitmapsImg(m_xBuilder->weld_widget(u"lockreducebitmap"_ustr)) + , m_xReduceBitmapsOptimalRB(m_xBuilder->weld_radio_button(u"reducebitmapoptimal"_ustr)) + , m_xReduceBitmapsNormalRB(m_xBuilder->weld_radio_button(u"reducebitmapnormal"_ustr)) + , m_xReduceBitmapsResolutionRB(m_xBuilder->weld_radio_button(u"reducebitmapresol"_ustr)) + , m_xReduceBitmapsModeImg(m_xBuilder->weld_widget(u"lockreducebitmapmode"_ustr)) + , m_xReduceBitmapsResolutionLB(m_xBuilder->weld_combo_box(u"reducebitmapdpi"_ustr)) + , m_xReduceBitmapsTransparencyCB(m_xBuilder->weld_check_button(u"reducebitmaptrans"_ustr)) + , m_xReduceBitmapsTransparencyImg(m_xBuilder->weld_widget(u"lockreducebitmaptrans"_ustr)) + , m_xConvertToGreyscalesCB(m_xBuilder->weld_check_button(u"converttogray"_ustr)) + , m_xConvertToGreyscalesImg(m_xBuilder->weld_widget(u"lockconverttogray"_ustr)) + , m_xPaperSizeCB(m_xBuilder->weld_check_button(u"papersize"_ustr)) + , m_xPaperSizeImg(m_xBuilder->weld_widget(u"lockpapersize"_ustr)) + , m_xPaperOrientationCB(m_xBuilder->weld_check_button(u"paperorient"_ustr)) + , m_xPaperOrientationImg(m_xBuilder->weld_widget(u"lockpaperorient"_ustr)) + , m_xTransparencyCB(m_xBuilder->weld_check_button(u"trans"_ustr)) + , m_xTransparencyImg(m_xBuilder->weld_widget(u"locktrans"_ustr)) { if (bOutputForPrinter) m_xPrinterOutputRB->set_active(true); @@ -93,7 +93,7 @@ std::unique_ptr<SfxTabPage> SfxCommonPrintOptionsTabPage::Create(weld::Container OUString SfxCommonPrintOptionsTabPage::GetAllStrings() { OUString sAllStrings; - OUString labels[] = { "label4", "label6", "label2", "label3", "label1", "label5" }; + OUString labels[] = { u"label4"_ustr, u"label6"_ustr, u"label2"_ustr, u"label3"_ustr, u"label1"_ustr, u"label5"_ustr }; for (const auto& label : labels) { @@ -101,8 +101,8 @@ OUString SfxCommonPrintOptionsTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString checkButton[] = { "converttogray", "reducebitmaptrans", "reducebitmap", "reducetrans", - "papersize", "paperorient", "trans", "reducegrad" }; + OUString checkButton[] = { u"converttogray"_ustr, u"reducebitmaptrans"_ustr, u"reducebitmap"_ustr, u"reducetrans"_ustr, + u"papersize"_ustr, u"paperorient"_ustr, u"trans"_ustr, u"reducegrad"_ustr }; for (const auto& check : checkButton) { @@ -110,15 +110,15 @@ OUString SfxCommonPrintOptionsTabPage::GetAllStrings() sAllStrings += pString->get_label() + " "; } - OUString radioButton[] = { "printer", - "file", - "reducebitmapresol", - "reducebitmapnormal", - "reducebitmapoptimal", - "reducetransauto", - "reducetransnone", - "reducegradstripes", - "reducegradcolor" }; + OUString radioButton[] = { u"printer"_ustr, + u"file"_ustr, + u"reducebitmapresol"_ustr, + u"reducebitmapnormal"_ustr, + u"reducebitmapoptimal"_ustr, + u"reducetransauto"_ustr, + u"reducetransnone"_ustr, + u"reducegradstripes"_ustr, + u"reducegradcolor"_ustr }; for (const auto& radio : radioButton) { diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 4240afeac669..efd9da304364 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -98,9 +98,9 @@ bool SfxRecordingFloatWrapper_Impl::QueryClose() SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(SfxBindings* pBind, SfxChildWindow* pChildWin, weld::Window* pParent) - : SfxModelessDialogController(pBind, pChildWin, pParent, "sfx/ui/floatingrecord.ui", - "FloatingRecord") - , m_xToolbar(m_xBuilder->weld_toolbar("toolbar")) + : SfxModelessDialogController(pBind, pChildWin, pParent, u"sfx/ui/floatingrecord.ui"_ustr, + u"FloatingRecord"_ustr) + , m_xToolbar(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) , m_xDispatcher(new ToolbarUnoDispatcher(*m_xToolbar, *m_xBuilder, pBind->GetActiveFrame())) , mnPostUserEventId(nullptr) , m_bFirstActivate(true) diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 9e7d16a8ad48..99b8d2517f8b 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -182,10 +182,10 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl(SfxSecurityPage &rTabPage) , m_bNewPasswordIsValid(false) , m_aEndRedliningWarning(SfxResId(RID_SVXSTR_END_REDLINING_WARNING)) , m_bEndRedliningWarningDone(false) - , m_xOpenReadonlyCB(rTabPage.GetBuilder().weld_check_button("readonly")) - , m_xRecordChangesCB(rTabPage.GetBuilder().weld_check_button("recordchanges")) - , m_xProtectPB(rTabPage.GetBuilder().weld_button("protect")) - , m_xUnProtectPB(rTabPage.GetBuilder().weld_button("unprotect")) + , m_xOpenReadonlyCB(rTabPage.GetBuilder().weld_check_button(u"readonly"_ustr)) + , m_xRecordChangesCB(rTabPage.GetBuilder().weld_check_button(u"recordchanges"_ustr)) + , m_xProtectPB(rTabPage.GetBuilder().weld_button(u"protect"_ustr)) + , m_xUnProtectPB(rTabPage.GetBuilder().weld_button(u"unprotect"_ustr)) { m_xProtectPB->show(); m_xUnProtectPB->hide(); @@ -427,7 +427,7 @@ std::unique_ptr<SfxTabPage> SfxSecurityPage::Create(weld::Container* pPage, weld } SfxSecurityPage::SfxSecurityPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet) - : SfxTabPage(pPage, pController, "sfx/ui/securityinfopage.ui", "SecurityInfoPage", &rItemSet) + : SfxTabPage(pPage, pController, u"sfx/ui/securityinfopage.ui"_ustr, u"SecurityInfoPage"_ustr, &rItemSet) { m_pImpl.reset(new SfxSecurityPage_Impl( *this )); } diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 9c7b364ffa34..1ec8a778b04f 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -38,14 +38,14 @@ namespace sfx2 { SearchDialog::SearchDialog(weld::Window* pWindow, OUString aConfigName) - : GenericDialogController(pWindow, "sfx/ui/searchdialog.ui", "SearchDialog") + : GenericDialogController(pWindow, u"sfx/ui/searchdialog.ui"_ustr, u"SearchDialog"_ustr) , m_sConfigName(std::move(aConfigName)) - , m_xSearchEdit(m_xBuilder->weld_combo_box("searchterm")) - , m_xWholeWordsBox(m_xBuilder->weld_check_button("wholewords")) - , m_xMatchCaseBox(m_xBuilder->weld_check_button("matchcase")) - , m_xWrapAroundBox(m_xBuilder->weld_check_button("wrap")) - , m_xBackwardsBox(m_xBuilder->weld_check_button("backwards")) - , m_xFindBtn(m_xBuilder->weld_button("ok")) + , m_xSearchEdit(m_xBuilder->weld_combo_box(u"searchterm"_ustr)) + , m_xWholeWordsBox(m_xBuilder->weld_check_button(u"wholewords"_ustr)) + , m_xMatchCaseBox(m_xBuilder->weld_check_button(u"matchcase"_ustr)) + , m_xWrapAroundBox(m_xBuilder->weld_check_button(u"wrap"_ustr)) + , m_xBackwardsBox(m_xBuilder->weld_check_button(u"backwards"_ustr)) + , m_xFindBtn(m_xBuilder->weld_button(u"ok"_ustr)) { // set handler m_xFindBtn->connect_clicked(LINK(this, SearchDialog, FindHdl)); @@ -65,7 +65,7 @@ void SearchDialog::LoadConfig() SvtViewOptions aViewOpt( EViewType::Dialog, m_sConfigName ); if ( aViewOpt.Exists() ) { - Any aUserItem = aViewOpt.GetUserItem( "UserItem" ); + Any aUserItem = aViewOpt.GetUserItem( u"UserItem"_ustr ); OUString sUserData; if ( aUserItem >>= sUserData ) { @@ -103,7 +103,7 @@ void SearchDialog::SaveConfig() OUString::number( m_xBackwardsBox->get_active() ? 1 : 0 ); Any aUserItem( sUserData ); - aViewOpt.SetUserItem( "UserItem", aUserItem ); + aViewOpt.SetUserItem( u"UserItem"_ustr, aUserItem ); } IMPL_LINK_NOARG(SearchDialog, FindHdl, weld::Button&, void) diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 2384e2471fb0..9e5abc01aa73 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -43,11 +43,11 @@ SfxStyleDialogController::SfxStyleDialogController if (!rStyle.HasParentSupport()) RemoveStandardButton(); - AddTabPage("organizer", SfxManageStyleSheetPage::Create, nullptr); + AddTabPage(u"organizer"_ustr, SfxManageStyleSheetPage::Create, nullptr); // With new template always set the management page as the current page if (rStyle.GetName().isEmpty()) - SetCurPageId("organizer"); + SetCurPageId(u"organizer"_ustr); else { OUString sTxt = m_xDialog->get_title() + ": " + rStyle.GetName(); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d38be362dbea..c8bda80385f0 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -335,13 +335,13 @@ SfxTabDialogController::SfxTabDialogController bool bEditFmt // when yes -> additional Button for standard ) : SfxOkDialogController(pParent, rUIXMLDescription, rID) - , m_xTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) - , m_xOKBtn(m_xBuilder->weld_button("ok")) - , m_xApplyBtn(m_xBuilder->weld_button("apply")) - , m_xUserBtn(m_xBuilder->weld_button("user")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) - , m_xResetBtn(m_xBuilder->weld_button("reset")) - , m_xBaseFmtBtn(m_xBuilder->weld_button("standard")) + , m_xTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr)) + , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xApplyBtn(m_xBuilder->weld_button(u"apply"_ustr)) + , m_xUserBtn(m_xBuilder->weld_button(u"user"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xResetBtn(m_xBuilder->weld_button(u"reset"_ustr)) + , m_xBaseFmtBtn(m_xBuilder->weld_button(u"standard"_ustr)) , m_pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr) , m_bStandardPushed(false) { @@ -946,7 +946,7 @@ void SfxTabDialogController::setPreviewsToSamePlace() continue; if (!pDataObject->xTabPage->m_xBuilder) continue; - std::unique_ptr<weld::Widget> pGrid = pDataObject->xTabPage->m_xBuilder->weld_widget("maingrid"); + std::unique_ptr<weld::Widget> pGrid = pDataObject->xTabPage->m_xBuilder->weld_widget(u"maingrid"_ustr); if (!pGrid) continue; aGrids.emplace_back(std::move(pGrid)); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 02981e7f7672..7fbb3b45d1de 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -105,7 +105,7 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, OnAsyncExecuteDrop, void*, pStyleList, v { StyleList* pStyle = static_cast<StyleList*>(pStyleList); if (pStyle == &m_aStyleList) - ActionSelect("new", m_aStyleList); + ActionSelect(u"new"_ustr, m_aStyleList); } namespace SfxTemplate @@ -148,7 +148,7 @@ namespace SfxTemplate } SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, weld::Widget* pParent) - : PanelLayout(pParent, "TemplatePanel", "sfx/ui/templatepanel.ui") + : PanelLayout(pParent, u"TemplatePanel"_ustr, u"sfx/ui/templatepanel.ui"_ustr) , m_aSpotlightParaStyles(SID_SPOTLIGHT_PARASTYLES, *pBindings, *this) , m_aSpotlightCharStyles(SID_SPOTLIGHT_CHARSTYLES, *pBindings, *this) , pImpl(new SfxTemplateDialog_Impl(pBindings, this)) @@ -240,10 +240,10 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld : pBindings(pB) , xModuleManager(frame::ModuleManager::create(::comphelper::getProcessComponentContext())) , m_pDeletionWatcher(nullptr) - , m_aStyleList(pBuilder, pB, this, pC, "treeview", "flatview") - , mxPreviewCheckbox(pBuilder->weld_check_button("showpreview")) - , mxHighlightCheckbox(pBuilder->weld_check_button("highlightstyles")) - , mxFilterLb(pBuilder->weld_combo_box("filter")) + , m_aStyleList(pBuilder, pB, this, pC, u"treeview"_ustr, u"flatview"_ustr) + , mxPreviewCheckbox(pBuilder->weld_check_button(u"showpreview"_ustr)) + , mxHighlightCheckbox(pBuilder->weld_check_button(u"highlightstyles"_ustr)) + , mxFilterLb(pBuilder->weld_combo_box(u"filter"_ustr)) , nActFamily(0xffff) , nActFilter(0) , bIsWater(false) @@ -262,7 +262,7 @@ void SfxTemplateDialog_Impl::EnableEdit(bool bEnable, StyleList* rStyleList) if(rStyleList == &m_aStyleList || rStyleList == nullptr) SfxCommonTemplateDialog_Impl::EnableEdit( bEnable, &m_aStyleList ); if( !bEnable || !bUpdateByExampleDisabled ) - EnableItem("update", bEnable); + EnableItem(u"update"_ustr, bEnable); } IMPL_LINK(SfxCommonTemplateDialog_Impl, ReadResource_Hdl, StyleList&, rStyleList, void) @@ -388,7 +388,7 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, UpdateStyles_Hdl, StyleFlags, nFlags, vo if (!(nFlags & StyleFlags::UpdateFamilyList)) return; - EnableItem("watercan", false); + EnableItem(u"watercan"_ustr, false); } SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() @@ -409,7 +409,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() } if ( bIsWater ) - Execute_Impl(SID_STYLE_WATERCAN, "", "", 0, m_aStyleList); + Execute_Impl(SID_STYLE_WATERCAN, u""_ustr, u""_ustr, 0, m_aStyleList); m_aStyleListClear.Call(nullptr); m_aStyleListCleanup.Call(nullptr); if ( m_pDeletionWatcher ) @@ -455,15 +455,15 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) if(pItem && !bWaterDisabled) { - CheckItem("watercan", pItem->GetValue()); - EnableItem("watercan"); + CheckItem(u"watercan"_ustr, pItem->GetValue()); + EnableItem(u"watercan"_ustr); } else { if(!bWaterDisabled) - EnableItem("watercan"); + EnableItem(u"watercan"_ustr); else - EnableItem("watercan", false); + EnableItem(u"watercan"_ustr, false); } // Ignore while in watercan mode statusupdates @@ -639,13 +639,13 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(const OUString& rEntry, StyleLis if (!bOldState && m_aStyleListHasSelectedStyle.Call(nullptr)) { const OUString aTemplName(rStyleList.GetSelectedEntry()); - Execute_Impl(SID_STYLE_WATERCAN, aTemplName, "", + Execute_Impl(SID_STYLE_WATERCAN, aTemplName, u""_ustr, static_cast<sal_uInt16>(m_aStyleList.GetFamilyItem()->GetFamily()), rStyleList); bCheck = true; } else { - Execute_Impl(SID_STYLE_WATERCAN, "", "", 0, rStyleList); + Execute_Impl(SID_STYLE_WATERCAN, u""_ustr, u""_ustr, 0, rStyleList); bCheck = false; } CheckItem(rEntry, bCheck); @@ -659,7 +659,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(const OUString& rEntry, StyleLis else if (rEntry == "update") { Execute_Impl(SID_STYLE_UPDATE_BY_EXAMPLE, - "", "", + u""_ustr, u""_ustr, static_cast<sal_uInt16>(m_aStyleList.GetFamilyItem()->GetFamily()), rStyleList); } else if (rEntry == "load") @@ -697,7 +697,7 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, LoadFactoryStyleFilter_Hdl, SfxObjectShe ::comphelper::SequenceAsHashMap aFactoryProps( xModuleManager->getByName( getModuleIdentifier( xModuleManager, i_pObjSh ) ) ); - sal_Int32 nFilter = aFactoryProps.getUnpackedValueOrDefault( "ooSetupFactoryStyleFilter", sal_Int32(-1) ); + sal_Int32 nFilter = aFactoryProps.getUnpackedValueOrDefault( u"ooSetupFactoryStyleFilter"_ustr, sal_Int32(-1) ); m_bWantHierarchical = (nFilter & 0x1000) != 0; nFilter &= ~0x1000; // clear it @@ -709,7 +709,7 @@ void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell const { OSL_ENSURE( i_pObjSh, "SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter(): no ObjectShell" ); Sequence< PropertyValue > lProps{ comphelper::makePropertyValue( - "ooSetupFactoryStyleFilter", i_nFilter | (m_bWantHierarchical ? 0x1000 : 0)) }; + u"ooSetupFactoryStyleFilter"_ustr, i_nFilter | (m_bWantHierarchical ? 0x1000 : 0)) }; xModuleManager->replaceByName( getModuleIdentifier( xModuleManager, i_pObjSh ), Any( lProps ) ); } @@ -748,7 +748,7 @@ IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl, HighlightHdl, weld::Toggleable&, v IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl, UpdateStyleDependents_Hdl, void*, void) { m_aStyleListUpdateStyleDependents.Call(nullptr); - EnableItem("watercan", !bWaterDisabled); + EnableItem(u"watercan"_ustr, !bWaterDisabled); m_aStyleListEnableDelete.Call(nullptr); } @@ -759,13 +759,13 @@ void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, bool bEnab { bNewByExampleDisabled = bDisable; m_aStyleList.EnableNewByExample(bNewByExampleDisabled); - EnableItem("new", bEnable); - EnableItem("newmenu", bEnable); + EnableItem(u"new"_ustr, bEnable); + EnableItem(u"newmenu"_ustr, bEnable); } else if( nId == SID_STYLE_UPDATE_BY_EXAMPLE ) { bUpdateByExampleDisabled = bDisable; - EnableItem("update", bEnable); + EnableItem(u"update"_ustr, bEnable); } } @@ -794,18 +794,18 @@ public: SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanelControl* pDlgWindow) : SfxCommonTemplateDialog_Impl(pB, pDlgWindow->get_container(), pDlgWindow->get_builder()) - , m_xActionTbL(pDlgWindow->get_builder()->weld_toolbar("left")) - , m_xActionTbR(pDlgWindow->get_builder()->weld_toolbar("right")) - , m_xToolMenu(pDlgWindow->get_builder()->weld_menu("toolmenu")) + , m_xActionTbL(pDlgWindow->get_builder()->weld_toolbar(u"left"_ustr)) + , m_xActionTbR(pDlgWindow->get_builder()->weld_toolbar(u"right"_ustr)) + , m_xToolMenu(pDlgWindow->get_builder()->weld_menu(u"toolmenu"_ustr)) , m_nActionTbLVisible(0) { - m_xActionTbR->set_item_help_id("watercan", HID_TEMPLDLG_WATERCAN); + m_xActionTbR->set_item_help_id(u"watercan"_ustr, HID_TEMPLDLG_WATERCAN); // shown/hidden in SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu() - m_xActionTbR->set_item_help_id("new", HID_TEMPLDLG_NEWBYEXAMPLE); - m_xActionTbR->set_item_help_id("newmenu", HID_TEMPLDLG_NEWBYEXAMPLE); - m_xActionTbR->set_item_menu("newmenu", m_xToolMenu.get()); + m_xActionTbR->set_item_help_id(u"new"_ustr, HID_TEMPLDLG_NEWBYEXAMPLE); + m_xActionTbR->set_item_help_id(u"newmenu"_ustr, HID_TEMPLDLG_NEWBYEXAMPLE); + m_xActionTbR->set_item_menu(u"newmenu"_ustr, m_xToolMenu.get()); m_xToolMenu->connect_activate(LINK(this, SfxTemplateDialog_Impl, ToolMenuSelectHdl)); - m_xActionTbR->set_item_help_id("update", HID_TEMPLDLG_UPDATEBYEXAMPLE); + m_xActionTbR->set_item_help_id(u"update"_ustr, HID_TEMPLDLG_UPDATEBYEXAMPLE); Initialize(); } @@ -851,9 +851,9 @@ void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 nId, const SfxStyleFami void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu() { - m_xActionTbR->set_item_visible("update", false); - m_xActionTbR->set_item_visible("new", false); - m_xActionTbR->set_item_visible("newmenu", true); + m_xActionTbR->set_item_visible(u"update"_ustr, false); + m_xActionTbR->set_item_visible(u"new"_ustr, false); + m_xActionTbR->set_item_visible(u"newmenu"_ustr, true); FillToolMenu(); } @@ -873,8 +873,8 @@ SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl() void SfxTemplateDialog_Impl::EnableItem(const OUString& rMesId, bool bCheck) { - if (rMesId == "watercan" && !bCheck && IsCheckedItem("watercan")) - Execute_Impl(SID_STYLE_WATERCAN, "", "", 0, m_aStyleList); + if (rMesId == "watercan" && !bCheck && IsCheckedItem(u"watercan"_ustr)) + Execute_Impl(SID_STYLE_WATERCAN, u""_ustr, u""_ustr, 0, m_aStyleList); m_xActionTbR->set_item_sensitive(rMesId, bCheck); } @@ -883,7 +883,7 @@ void SfxTemplateDialog_Impl::CheckItem(const OUString &rMesId, bool bCheck) if (rMesId == "watercan") { bIsWater=bCheck; - m_xActionTbR->set_item_active("watercan", bCheck); + m_xActionTbR->set_item_active(u"watercan"_ustr, bCheck); } else m_xActionTbL->set_item_active(rMesId, bCheck); @@ -892,7 +892,7 @@ void SfxTemplateDialog_Impl::CheckItem(const OUString &rMesId, bool bCheck) bool SfxTemplateDialog_Impl::IsCheckedItem(const OUString& rMesId) { if (rMesId == "watercan") - return m_xActionTbR->get_item_active("watercan"); + return m_xActionTbR->get_item_active(u"watercan"_ustr); return m_xActionTbL->get_item_active(rMesId); } @@ -912,19 +912,19 @@ IMPL_LINK(SfxTemplateDialog_Impl, ToolBoxRSelect, const OUString&, rEntry, void) void SfxTemplateDialog_Impl::FillToolMenu() { //create a popup menu in Writer - OUString sTextDoc("com.sun.star.text.TextDocument"); + OUString sTextDoc(u"com.sun.star.text.TextDocument"_ustr); - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:StyleNewByExample", sTextDoc); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:StyleNewByExample"_ustr, sTextDoc); OUString sLabel = vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties); - m_xToolMenu->append("new", sLabel); - aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:StyleUpdateByExample", sTextDoc); + m_xToolMenu->append(u"new"_ustr, sLabel); + aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:StyleUpdateByExample"_ustr, sTextDoc); sLabel = vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties); - m_xToolMenu->append("update", sLabel); - m_xToolMenu->append_separator("separator"); + m_xToolMenu->append(u"update"_ustr, sLabel); + m_xToolMenu->append_separator(u"separator"_ustr); - aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:LoadStyles", sTextDoc); + aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:LoadStyles"_ustr, sTextDoc); sLabel = vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties); - m_xToolMenu->append("load", sLabel); + m_xToolMenu->append(u"load"_ustr, sLabel); } IMPL_LINK(SfxTemplateDialog_Impl, ToolMenuSelectHdl, const OUString&, rMenuId, void) @@ -950,7 +950,7 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, UpdateFamily_Hdl, StyleList&, rStyleList bWaterDisabled = false; bUpdateByExampleDisabled = false; - if (IsCheckedItem("watercan") && + if (IsCheckedItem(u"watercan"_ustr) && // only if that area is allowed rStyleList.CurrentFamilyHasState()) { diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index defa731b4fdd..e63721ffecde 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -145,17 +145,17 @@ namespace } SfxVersionDialog::SfxVersionDialog(weld::Window* pParent, SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose) - : SfxDialogController(pParent, "sfx/ui/versionsofdialog.ui", "VersionsOfDialog") + : SfxDialogController(pParent, u"sfx/ui/versionsofdialog.ui"_ustr, u"VersionsOfDialog"_ustr) , m_pViewFrame(pVwFrame) , m_bIsSaveVersionOnClose(bIsSaveVersionOnClose) - , m_xSaveButton(m_xBuilder->weld_button("save")) - , m_xSaveCheckBox(m_xBuilder->weld_check_button("always")) - , m_xOpenButton(m_xBuilder->weld_button("open")) - , m_xViewButton(m_xBuilder->weld_button("show")) - , m_xDeleteButton(m_xBuilder->weld_button("delete")) - , m_xCompareButton(m_xBuilder->weld_button("compare")) - , m_xCmisButton(m_xBuilder->weld_button("cmis")) - , m_xVersionBox(m_xBuilder->weld_tree_view("versions")) + , m_xSaveButton(m_xBuilder->weld_button(u"save"_ustr)) + , m_xSaveCheckBox(m_xBuilder->weld_check_button(u"always"_ustr)) + , m_xOpenButton(m_xBuilder->weld_button(u"open"_ustr)) + , m_xViewButton(m_xBuilder->weld_button(u"show"_ustr)) + , m_xDeleteButton(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xCompareButton(m_xBuilder->weld_button(u"compare"_ustr)) + , m_xCmisButton(m_xBuilder->weld_button(u"cmis"_ustr)) + , m_xVersionBox(m_xBuilder->weld_tree_view(u"versions"_ustr)) { m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 90, m_xVersionBox->get_height_rows(15)); @@ -260,8 +260,8 @@ void SfxVersionDialog::Open_Impl() auto nPos = m_xVersionBox->get_selected_index(); SfxInt16Item aItem( SID_VERSION, nPos + 1); - SfxStringItem aTarget( SID_TARGETNAME, "_blank" ); - SfxStringItem aReferer( SID_REFERER, "private:user" ); + SfxStringItem aTarget( SID_TARGETNAME, u"_blank"_ustr ); + SfxStringItem aReferer( SID_REFERER, u"private:user"_ustr ); SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ); uno::Sequence< beans::NamedValue > aEncryptionData; @@ -382,14 +382,14 @@ IMPL_LINK(SfxVersionDialog, ToggleHdl_Impl, weld::Toggleable&, rButton, void) } SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(weld::Window *pParent, SfxVersionInfo& rInfo, bool bEdit) - : SfxDialogController(pParent, "sfx/ui/versioncommentdialog.ui", "VersionCommentDialog") + : SfxDialogController(pParent, u"sfx/ui/versioncommentdialog.ui"_ustr, u"VersionCommentDialog"_ustr) , m_rInfo(rInfo) - , m_xDateTimeText(m_xBuilder->weld_label("timestamp")) - , m_xSavedByText(m_xBuilder->weld_label("author")) - , m_xEdit(m_xBuilder->weld_text_view("textview")) - , m_xOKButton(m_xBuilder->weld_button("ok")) - , m_xCancelButton(m_xBuilder->weld_button("cancel")) - , m_xCloseButton(m_xBuilder->weld_button("close")) + , m_xDateTimeText(m_xBuilder->weld_label(u"timestamp"_ustr)) + , m_xSavedByText(m_xBuilder->weld_label(u"author"_ustr)) + , m_xEdit(m_xBuilder->weld_text_view(u"textview"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCancelButton(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xCloseButton(m_xBuilder->weld_button(u"close"_ustr)) { OUString sAuthor = rInfo.aAuthor.isEmpty() ? SfxResId(STR_NO_NAME_SET) : rInfo.aAuthor; @@ -426,9 +426,9 @@ IMPL_LINK(SfxViewVersionDialog_Impl, ButtonHdl, weld::Button&, rButton, void) } SfxCmisVersionsDialog::SfxCmisVersionsDialog(weld::Window* pParent, SfxViewFrame* pVwFrame) - : SfxDialogController(pParent, "sfx/ui/versionscmis.ui", "VersionsCmisDialog") + : SfxDialogController(pParent, u"sfx/ui/versionscmis.ui"_ustr, u"VersionsCmisDialog"_ustr) , m_pViewFrame(pVwFrame) - , m_xVersionBox(m_xBuilder->weld_tree_view("versions")) + , m_xVersionBox(m_xBuilder->weld_tree_view(u"versions"_ustr)) { m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 90, m_xVersionBox->get_height_rows(15)); |