sw/source/uibase/uiview/pview.cxx | 10 ++++---- sw/source/uibase/uiview/srcview.cxx | 24 ++++++++++---------- sw/source/uibase/uiview/view.cxx | 42 +++++++++++++++++------------------ sw/source/uibase/uiview/view0.cxx | 4 +-- sw/source/uibase/uiview/view2.cxx | 34 ++++++++++++++-------------- sw/source/uibase/uiview/viewdlg2.cxx | 2 - sw/source/uibase/uiview/viewling.cxx | 18 +++++++-------- sw/source/uibase/uiview/viewprt.cxx | 4 +-- sw/source/uibase/uiview/viewstat.cxx | 2 - xmloff/source/text/txtparai.cxx | 3 ++ 10 files changed, 73 insertions(+), 70 deletions(-)
New commits: commit 78eb0a3c67ba2285f3737a584a133536beee3b17 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jun 5 10:19:03 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Jun 5 19:35:11 2024 +0200 loplugin:ostr in sw/.../uiview Change-Id: Id50d9549bb925f3ff2f4db79058b600a25349576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168426 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 833d2de7e6c0..60d536bec43a 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -84,7 +84,7 @@ SFX_IMPL_INTERFACE(SwPagePreview, SfxViewShell) void SwPagePreview::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("preview"); + GetStaticInterface()->RegisterPopupMenu(u"preview"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Client|SfxVisibilityFlags::FullScreen|SfxVisibilityFlags::ReadonlyDoc, ToolbarId::PView_Toolbox); @@ -143,10 +143,10 @@ class SwPreviewZoomDlg : public weld::GenericDialogController public: SwPreviewZoomDlg(SwPagePreviewWin& rParent) - : GenericDialogController(rParent.GetFrameWeld(), "modules/swriter/ui/previewzoomdialog.ui", "PreviewZoomDialog") + : GenericDialogController(rParent.GetFrameWeld(), u"modules/swriter/ui/previewzoomdialog.ui"_ustr, u"PreviewZoomDialog"_ustr) , m_rParent(rParent) - , m_xRowEdit(m_xBuilder->weld_spin_button("rows")) - , m_xColEdit(m_xBuilder->weld_spin_button("cols")) + , m_xRowEdit(m_xBuilder->weld_spin_button(u"rows"_ustr)) + , m_xColEdit(m_xBuilder->weld_spin_button(u"cols"_ustr)) { m_xRowEdit->set_value(rParent.GetRow()); m_xColEdit->set_value(rParent.GetCol()); @@ -1152,7 +1152,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame& rViewFrame, SfxViewShell* pOldSh): mbResetFormDesignMode( false ), mbFormDesignModeToReset( false ) { - SetName("PageView"); + SetName(u"PageView"_ustr); SetWindow( m_pViewWin ); CreateScrollbar( true ); CreateScrollbar( false ); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 713e13b5791a..173689bc3bd9 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -96,7 +96,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SwSrcView, SfxViewShell) void SwSrcView::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("source"); + GetStaticInterface()->RegisterPopupMenu(u"source"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server, @@ -226,7 +226,7 @@ void SwSrcView::SaveContentTo(SfxMedium& rMed) void SwSrcView::Init() { - SetName("Source"); + SetName(u"Source"_ustr); SetWindow( m_aEditWin.get() ); SwDocShell* pDocShell = GetDocShell(); // If the doc is still loading, then the DocShell must fire up @@ -274,7 +274,7 @@ void SwSrcView::Execute(SfxRequest& rReq) // search for an html filter for export SfxFilterContainer* pFilterCont = GetObjectShell()->GetFactory().GetFilterContainer(); std::shared_ptr<const SfxFilter> pFilter = - pFilterCont->GetFilter4Extension( "html", SfxFilterFlags::EXPORT ); + pFilterCont->GetFilter4Extension( u"html"_ustr, SfxFilterFlags::EXPORT ); if ( pFilter ) { // filter found -> use its uiname and wildcard @@ -286,8 +286,8 @@ void SwSrcView::Execute(SfxRequest& rReq) else { // filter not found - OUString sHtml("HTML"); - xFP->appendFilter( sHtml, "*.html;*.htm" ); + OUString sHtml(u"HTML"_ustr); + xFP->appendFilter( sHtml, u"*.html;*.htm"_ustr ); xFP->setCurrentFilter( sHtml ) ; } @@ -594,8 +594,8 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if(bNotFoundMessage) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/infonotfounddialog.ui")); - std::unique_ptr<weld::MessageDialog> xInfoBox(xBuilder->weld_message_dialog("InfoNotFoundDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/infonotfounddialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xInfoBox(xBuilder->weld_message_dialog(u"InfoNotFoundDialog"_ustr)); xInfoBox->run(); } else if(!bRecursive) @@ -604,14 +604,14 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if (!bForward) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/querycontinueenddialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryContinueEndDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/querycontinueenddialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"QueryContinueEndDialog"_ustr)); nRet = xQueryBox->run(); } else { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/querycontinuebegindialog.ui")); - std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryContinueBeginDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/querycontinuebegindialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog(u"QueryContinueBeginDialog"_ustr)); nRet = xQueryBox->run(); } @@ -687,7 +687,7 @@ sal_Int32 SwSrcView::PrintSource( // nLinepPage is not true, if lines have to be wrapped... const tools::Long nLinespPage = nLineHeight ? aPaperSz.Height() / nLineHeight : 1; - const tools::Long nCharWidth = pOutDev->GetTextWidth("X"); + const tools::Long nCharWidth = pOutDev->GetTextWidth(u"X"_ustr); const sal_Int32 nCharspLine = nCharWidth ? static_cast<sal_Int32>(aPaperSz.Width() / nCharWidth) : 1; const sal_uInt32 nParas = pTextEngine->GetParagraphCount(); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 29fa3f3281ef..4cace8a3d729 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -236,7 +236,7 @@ uno::Reference<frame::XLayoutManager> getLayoutManager(const SfxViewFrame& rView { try { - xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"), uno::UNO_QUERY); + xLayoutManager.set(xPropSet->getPropertyValue(u"LayoutManager"_ustr), uno::UNO_QUERY); } catch (const Exception& e) { @@ -488,7 +488,7 @@ void SwView::SelectShell() // Show Mail Merge toolbar initially for documents with Database fields if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc() && !comphelper::IsFuzzing()) - ShowUIElement("private:resource/toolbar/mailmerge"); + ShowUIElement(u"private:resource/toolbar/mailmerge"_ustr); // Activate the toolbar to the new selection which also was active last time. // Before a flush () must be, but does not affect the UI according to MBA and @@ -832,7 +832,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh) } m_pViewImpl.reset(new SwView_Impl(this)); - SetName("View"); + SetName(u"View"_ustr); SetWindow( m_pEditWin ); m_aTimer.SetTimeout( 120 ); @@ -1078,7 +1078,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh) uno::Reference< frame::XFrame > xFrame = rVFrame.GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( - "_beamer", frame::FrameSearchFlag::CHILDREN); + u"_beamer"_ustr, frame::FrameSearchFlag::CHILDREN); if(xBeamerFrame.is()) { SwDBData aData = m_pWrtShell->GetDBData(); @@ -1491,7 +1491,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > if (bGotBrowseMode) { // delegate further - GetViewImpl()->GetUNOObject_Impl()->getViewSettings()->setPropertyValue("ShowOnlineLayout", uno::Any(bBrowseMode)); + GetViewImpl()->GetUNOObject_Impl()->getViewSettings()->setPropertyValue(u"ShowOnlineLayout"_ustr, uno::Any(bBrowseMode)); } SelectShell(); @@ -1627,41 +1627,41 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe std::vector<beans::PropertyValue> aVector; sal_uInt16 nViewID( GetViewFrame().GetCurViewId()); - aVector.push_back(comphelper::makePropertyValue("ViewId", "view" + OUString::number(nViewID))); + aVector.push_back(comphelper::makePropertyValue(u"ViewId"_ustr, "view" + OUString::number(nViewID))); - aVector.push_back(comphelper::makePropertyValue("ViewLeft", convertTwipToMm100 ( rRect.Left() ))); + aVector.push_back(comphelper::makePropertyValue(u"ViewLeft"_ustr, convertTwipToMm100 ( rRect.Left() ))); - aVector.push_back(comphelper::makePropertyValue("ViewTop", convertTwipToMm100 ( rRect.Top() ))); + aVector.push_back(comphelper::makePropertyValue(u"ViewTop"_ustr, convertTwipToMm100 ( rRect.Top() ))); auto visibleLeft = convertTwipToMm100 ( rVis.Left() ); - aVector.push_back(comphelper::makePropertyValue("VisibleLeft", visibleLeft)); + aVector.push_back(comphelper::makePropertyValue(u"VisibleLeft"_ustr, visibleLeft)); auto visibleTop = convertTwipToMm100 ( rVis.Top() ); - aVector.push_back(comphelper::makePropertyValue("VisibleTop", visibleTop)); + aVector.push_back(comphelper::makePropertyValue(u"VisibleTop"_ustr, visibleTop)); // We don't read VisibleRight and VisibleBottom anymore, but write them, // because older versions rely on their presence to restore position auto visibleRight = rVis.IsWidthEmpty() ? visibleLeft : convertTwipToMm100 ( rVis.Right() ); - aVector.push_back(comphelper::makePropertyValue("VisibleRight", visibleRight)); + aVector.push_back(comphelper::makePropertyValue(u"VisibleRight"_ustr, visibleRight)); auto visibleBottom = rVis.IsHeightEmpty() ? visibleTop : convertTwipToMm100 ( rVis.Bottom() ); - aVector.push_back(comphelper::makePropertyValue("VisibleBottom", visibleBottom)); + aVector.push_back(comphelper::makePropertyValue(u"VisibleBottom"_ustr, visibleBottom)); const sal_Int16 nZoomType = static_cast< sal_Int16 >(m_pWrtShell->GetViewOptions()->GetZoomType()); - aVector.push_back(comphelper::makePropertyValue("ZoomType", nZoomType)); + aVector.push_back(comphelper::makePropertyValue(u"ZoomType"_ustr, nZoomType)); const sal_Int16 nViewLayoutColumns = static_cast< sal_Int16 >(m_pWrtShell->GetViewOptions()->GetViewLayoutColumns()); - aVector.push_back(comphelper::makePropertyValue("ViewLayoutColumns", nViewLayoutColumns)); + aVector.push_back(comphelper::makePropertyValue(u"ViewLayoutColumns"_ustr, nViewLayoutColumns)); - aVector.push_back(comphelper::makePropertyValue("ViewLayoutBookMode", m_pWrtShell->GetViewOptions()->IsViewLayoutBookMode())); + aVector.push_back(comphelper::makePropertyValue(u"ViewLayoutBookMode"_ustr, m_pWrtShell->GetViewOptions()->IsViewLayoutBookMode())); - aVector.push_back(comphelper::makePropertyValue("ZoomFactor", static_cast < sal_Int16 > (m_pWrtShell->GetViewOptions()->GetZoom()))); + aVector.push_back(comphelper::makePropertyValue(u"ZoomFactor"_ustr, static_cast < sal_Int16 > (m_pWrtShell->GetViewOptions()->GetZoom()))); - aVector.push_back(comphelper::makePropertyValue("IsSelectedFrame", FrameTypeFlags::NONE != m_pWrtShell->GetSelFrameType())); + aVector.push_back(comphelper::makePropertyValue(u"IsSelectedFrame"_ustr, FrameTypeFlags::NONE != m_pWrtShell->GetSelFrameType())); aVector.push_back( - comphelper::makePropertyValue("KeepRatio", m_pWrtShell->GetViewOptions()->IsKeepRatio())); + comphelper::makePropertyValue(u"KeepRatio"_ustr, m_pWrtShell->GetViewOptions()->IsKeepRatio())); rSequence = comphelper::containerToSequence(aVector); @@ -2003,9 +2003,9 @@ OUString SwView::GetDataSourceName() const { uno::Reference<lang::XMultiServiceFactory> xFactory(GetDocShell()->GetModel(), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xSettings( - xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - OUString sDataSourceName = ""; - xSettings->getPropertyValue("CurrentDatabaseDataSource") >>= sDataSourceName; + xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); + OUString sDataSourceName = u""_ustr; + xSettings->getPropertyValue(u"CurrentDatabaseDataSource"_ustr) >>= sDataSourceName; return sDataSourceName; } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 488b32cc5fee..8d236be3ce87 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -551,7 +551,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case SID_SPOTLIGHT_PARASTYLES: if (!pArgs || (pArgs && !pArgs->HasItem(FN_PARAM_1))) { - const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "StyleListDeck"); + const SfxStringItem sDeckName(SID_SIDEBAR_DECK, u"StyleListDeck"_ustr); GetDispatcher().ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::SYNCHRON, { &sDeckName }); } if (STATE_TOGGLE == eState) @@ -562,7 +562,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case SID_SPOTLIGHT_CHARSTYLES: if (!pArgs || (pArgs && !pArgs->HasItem(FN_PARAM_1))) { - const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "StyleListDeck"); + const SfxStringItem sDeckName(SID_SIDEBAR_DECK, u"StyleListDeck"_ustr); GetDispatcher().ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::SYNCHRON, { &sDeckName }); } if (STATE_TOGGLE == eState) diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index db00d02b1933..988c31b5d238 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -191,11 +191,11 @@ public: SwNumberInputDlg(weld::Window* pParent, const OUString& rTitle, const OUString& rLabel1, const sal_Int64 nValue, const sal_Int64 min, const sal_Int64 max, OUString rLabel2 = OUString()) - : SfxDialogController(pParent, "modules/swriter/ui/numberinput.ui", "NumberInputDialog") - , m_xLabel1(m_xBuilder->weld_label("label1")) - , m_xSpinButton(m_xBuilder->weld_spin_button("spinbutton")) - , m_xLabel2(m_xBuilder->weld_label("label2")) - , m_xOKButton(m_xBuilder->weld_button("ok")) + : SfxDialogController(pParent, u"modules/swriter/ui/numberinput.ui"_ustr, u"NumberInputDialog"_ustr) + , m_xLabel1(m_xBuilder->weld_label(u"label1"_ustr)) + , m_xSpinButton(m_xBuilder->weld_spin_button(u"spinbutton"_ustr)) + , m_xLabel2(m_xBuilder->weld_label(u"label2"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) { m_xDialog->set_title(rTitle); m_xLabel1->set_label(rLabel1); @@ -1529,9 +1529,9 @@ void SwView::Execute(SfxRequest &rReq) Sequence<PropertyValue> aProperties { - comphelper::makePropertyValue("DataSourceName", aData.sDataSource), - comphelper::makePropertyValue("Command", aData.sCommand), - comphelper::makePropertyValue("CommandType", aData.nCommandType) + comphelper::makePropertyValue(u"DataSourceName"_ustr, aData.sDataSource), + comphelper::makePropertyValue(u"Command"_ustr, aData.sCommand), + comphelper::makePropertyValue(u"CommandType"_ustr, aData.nCommandType) }; pDBManager->ExecuteFormLetter(rSh, aProperties); } @@ -2227,7 +2227,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case FN_STAT_ACCESSIBILITY_CHECK: { - const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "A11yCheckDeck"); + const SfxStringItem sDeckName(SID_SIDEBAR_DECK, u"A11yCheckDeck"_ustr); GetViewFrame().GetDispatcher()->ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::RECORD, { &sDeckName }); } @@ -2764,7 +2764,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) if ( !pItem ) { - InsertDoc( nSlot, "", "" ); + InsertDoc( nSlot, u""_ustr, u""_ustr ); } else { @@ -3006,8 +3006,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) if ( lcl_NeedAdditionalDataSource( xDBContext ) ) { // no data sources are available - create a new one - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/datasourcesunavailabledialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("DataSourcesUnavailableDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"modules/swriter/ui/datasourcesunavailabledialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"DataSourcesUnavailableDialog"_ustr)); // no cancel allowed if (RET_OK != xQuery->run()) return; @@ -3052,8 +3052,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) OUString sSource; if(!GetWrtShell().IsFieldDataSourceAvailable(sSource)) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/warndatasourcedialog.ui")); - std::unique_ptr<weld::MessageDialog> xWarning(xBuilder->weld_message_dialog("WarnDataSourceDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), u"modules/swriter/ui/warndatasourcedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xWarning(xBuilder->weld_message_dialog(u"WarnDataSourceDialog"_ustr)); OUString sTmp(xWarning->get_primary_text()); xWarning->set_primary_text(sTmp.replaceFirst("%1", sSource)); if (RET_OK == xWarning->run()) @@ -3093,9 +3093,9 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) { Sequence<PropertyValue> aProperties { - comphelper::makePropertyValue("DataSourceName", aData.sDataSource), - comphelper::makePropertyValue("Command", aData.sCommand), - comphelper::makePropertyValue("CommandType", aData.nCommandType), + comphelper::makePropertyValue(u"DataSourceName"_ustr, aData.sDataSource), + comphelper::makePropertyValue(u"Command"_ustr, aData.sCommand), + comphelper::makePropertyValue(u"CommandType"_ustr, aData.nCommandType), }; pDBManager->ExecuteFormLetter(GetWrtShell(), aProperties); } diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index 6a583d18ad97..61415b7badb4 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -94,7 +94,7 @@ void SwView::ExecDlgExt(SfxRequest& rReq) } case SID_ADDITIONS_DIALOG: { - OUString sAdditionsTag = ""; + OUString sAdditionsTag = u""_ustr; const SfxStringItem* pStringArg = rReq.GetArg<SfxStringItem>(FN_PARAM_ADDITIONS_TAG); if (pStringArg) diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 4cf6505b9de2..1231837ae657 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -115,7 +115,7 @@ void SwView::ExecLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - "com.sun.star.linguistic2.ChineseTranslationDialog", xContext), + u"com.sun.star.linguistic2.ChineseTranslationDialog"_ustr, xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -143,9 +143,9 @@ void SwView::ExecLingu(SfxRequest &rReq) { try { - xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified; - xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants; - xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms; + xProp->getPropertyValue( u"IsDirectionToSimplified"_ustr ) >>= bToSimplified; + xProp->getPropertyValue( u"IsUseCharacterVariants"_ustr ) >>= bUseVariants; + xProp->getPropertyValue( u"IsTranslateCommonTerms"_ustr ) >>= bCommonTerms; } catch (const Exception&) { @@ -727,7 +727,7 @@ bool SwView::ExecSpellPopup(const Point& rPt) rtl::Reference<VCLXPopupMenu> xMenu; OUString sMenuName = bUseGrammarContext ? - OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu"); + u"private:resource/GrammarContextMenu"_ustr : u"private:resource/SpellContextMenu"_ustr; rtl::Reference<VCLXPopupMenu> xMenuInterface = xPopup->CreateMenuInterface(); if (TryContextMenuInterception(xMenuInterface, sMenuName, xMenu, aEvent)) { @@ -817,17 +817,17 @@ void SwView::ExecSmartTagPopup( const Point& rPt ) m_pWrtShell->Push(); css::uno::Sequence< css::uno::Any > aArgs{ - css::uno::Any(comphelper::makePropertyValue( "Frame", GetDispatcher().GetFrame()->GetFrame().GetFrameInterface() )), - css::uno::Any(comphelper::makePropertyValue( "CommandURL", OUString( ".uno:OpenSmartTagMenuOnCursor" ) )) + css::uno::Any(comphelper::makePropertyValue( u"Frame"_ustr, GetDispatcher().GetFrame()->GetFrame().GetFrameInterface() )), + css::uno::Any(comphelper::makePropertyValue( u"CommandURL"_ustr, u".uno:OpenSmartTagMenuOnCursor"_ustr )) }; css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); css::uno::Reference< css::frame::XPopupMenuController > xPopupController( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.comp.svx.SmartTagMenuController", aArgs, xContext ), css::uno::UNO_QUERY ); + u"com.sun.star.comp.svx.SmartTagMenuController"_ustr, aArgs, xContext ), css::uno::UNO_QUERY ); css::uno::Reference< css::awt::XPopupMenu > xPopupMenu( xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.awt.PopupMenu", xContext ), css::uno::UNO_QUERY ); + u"com.sun.star.awt.PopupMenu"_ustr, xContext ), css::uno::UNO_QUERY ); if ( xPopupController.is() && xPopupMenu.is() ) { diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index bc9c5e19b840..aec5c9b224e3 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -215,8 +215,8 @@ void SwView::ExecutePrint(SfxRequest& rReq) if(!bSilent && !bFromMerge && SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc()) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetEditWin().GetFrameWeld(), "modules/swriter/ui/printmergedialog.ui")); - std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("PrintMergeDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetEditWin().GetFrameWeld(), u"modules/swriter/ui/printmergedialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"PrintMergeDialog"_ustr)); short nRet = xBox->run(); if(RET_NO != nRet) { diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 77182fa44efa..06fe55464b49 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -339,7 +339,7 @@ void SwView::GetState(SfxItemSet &rSet) if ( isRecording || hasRecorded ) { GetDocShell()->AppendInfoBarWhenReady( - "hiddentrackchanges", SwResId(STR_HIDDEN_CHANGES), + u"hiddentrackchanges"_ustr, SwResId(STR_HIDDEN_CHANGES), SwResId( (isRecording && hasRecorded) ? STR_HIDDEN_CHANGES_DETAIL : isRecording commit 20ba17a928acbba022b2f19b7a88a6cc5cdebfde Author: Noel Grandin <[email protected]> AuthorDate: Wed Jun 5 10:47:37 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Jun 5 19:35:00 2024 +0200 reduce some SAL_WARN spam Change-Id: I175677bc41c4113e030094afbc45d57ace773b90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168450 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 5de1e3313a32..e6c4fa3bd8f5 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -351,6 +351,9 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl( case XML_ELEMENT(TEXT, XML_VISITED_STYLE_NAME): mpHint->SetVisitedStyleName( sValue ); break; + case XML_ELEMENT(XLINK, XML_TYPE): + // don't show warning for this + break; default: XMLOFF_WARN_UNKNOWN("xmloff", aIter); }
