diff options
Diffstat (limited to 'sw/source/uibase')
65 files changed, 638 insertions, 636 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 28c766b3d3b1..9e5ada1b0101 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -309,7 +309,7 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL) if(!rURL.isEmpty()) { SfxStringItem aURL(SID_FILE_NAME, rURL); - SfxStringItem aTargetFrameName( SID_TARGETNAME, "_blank" ); + SfxStringItem aTargetFrameName( SID_TARGETNAME, u"_blank"_ustr ); SfxBoolItem aHidden( SID_HIDDEN, true ); SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle()); const SfxPoolItemHolder aResult( @@ -411,7 +411,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs using namespace org::freedesktop::PackageKit; using namespace svtools; css::uno::Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); - const css::uno::Sequence< OUString > vPackages{ "libreoffice-base" }; + const css::uno::Sequence< OUString > vPackages{ u"libreoffice-base"_ustr }; xSyncDbusSessionHelper->InstallPackageNames(vPackages, OUString()); SolarMutexGuard aGuard; (void)executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL); @@ -484,7 +484,7 @@ void SwMailMergeWizardExecutor::ExecutionFinished() pDbManager->CommitLastRegistrations(); // Show the toolbar - m_pView->ShowUIElement("private:resource/toolbar/mailmerge"); + m_pView->ShowUIElement(u"private:resource/toolbar/mailmerge"_ustr); // Update Mail Merge controls const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY, @@ -907,7 +907,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) bUpdateFields = false; if(bUpdateFields) { - comphelper::dispatchCommand(".uno:UpdateInputFields", {}); + comphelper::dispatchCommand(u".uno:UpdateInputFields"_ustr, {}); // Are database fields contained? // Get all used databases for the first time diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index f440fefe86e1..5fe8816cb079 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -334,7 +334,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) MASTER_LABEL; aSect.SetLinkFileName(sLinkName); aSect.SetProtectFlag(true); - pSh->Insert("."); // Dummytext to allocate the Section + pSh->Insert(u"."_ustr); // Dummytext to allocate the Section pSh->StartOfSection(); pSh->EndOfSection(true); // Select everything in the frame pSh->InsertSection(aSect); @@ -372,7 +372,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) pSh->GotoFly(pFirstFlyFormat->GetName(), FLYCNTTYPE_ALL, false); if (pSh->IsAnyDatabaseFieldInDoc()) - pSh->GetView().ShowUIElement("private:resource/toolbar/mailmerge"); + pSh->GetView().ShowUIElement(u"private:resource/toolbar/mailmerge"_ustr); pSh->EndAllAction(); pSh->DoUndo(); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 739be04c6de4..6f8673eaff12 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -118,7 +118,7 @@ void SwDocShell::InitInterface_Impl() } -SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), "swriter" ) +SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), u"swriter"_ustr ) bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium, uno::Reference<text::XTextRange> const& xInsertPosition) @@ -616,7 +616,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" ); if ( !xStg->GetError() ) { - nVBWarning = SaveOrDelMSVBAStorage( static_cast<SfxObjectShell&>(*this), *xStg, bSave, "Macros" ); + nVBWarning = SaveOrDelMSVBAStorage( static_cast<SfxObjectShell&>(*this), *xStg, bSave, u"Macros"_ustr ); xStg->Commit(); m_xDoc->SetContainsMSVBasic( true ); } @@ -718,7 +718,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // TODO/MBA: testing uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue("MediaType", uno::Any( SotExchange::GetFormatMimeType( nSaveClipId ) ) ); + xSet->setPropertyValue(u"MediaType"_ustr, uno::Any( SotExchange::GetFormatMimeType( nSaveClipId ) ) ); } catch (const uno::Exception&) { diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 285ef0a46c0e..ee079554cbe5 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -144,7 +144,7 @@ std::shared_ptr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(weld { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); xDlg->AddFontTabPage(); - xDlg->AddTabPage("writerstats", SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT)); + xDlg->AddTabPage(u"writerstats"_ustr, SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT)); } } return xDlg; @@ -252,7 +252,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) case SfxEventHintId::OpenDoc: { uno::Sequence< css::uno::Any > aArgs; - SW_MOD()->CallAutomationApplicationEventSinks( "DocumentChange", aArgs ); + SW_MOD()->CallAutomationApplicationEventSinks( u"DocumentChange"_ustr, aArgs ); break; } default: @@ -266,7 +266,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) uno::Any aDocument; aDocument <<= mxAutomationDocumentObject; uno::Sequence< uno::Any > aArgs{ aDocument }; - SW_MOD()->CallAutomationApplicationEventSinks( "NewDocument", aArgs ); + SW_MOD()->CallAutomationApplicationEventSinks( u"NewDocument"_ustr, aArgs ); } break; case SfxEventHintId::OpenDoc: @@ -274,7 +274,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) uno::Any aDocument; aDocument <<= mxAutomationDocumentObject; uno::Sequence< uno::Any > aArgs{ aDocument }; - SW_MOD()->CallAutomationApplicationEventSinks( "DocumentOpen", aArgs ); + SW_MOD()->CallAutomationApplicationEventSinks( u"DocumentOpen"_ustr, aArgs ); } break; default: @@ -365,7 +365,7 @@ bool SwDocShell::PrepareClose( bool bUI ) uno::Any(false) }; - SW_MOD()->CallAutomationApplicationEventSinks( "DocumentBeforeClose", aArgs ); + SW_MOD()->CallAutomationApplicationEventSinks( u"DocumentBeforeClose"_ustr, aArgs ); // If the Cancel argument was set to True by an event handler, return false. bool bCancel(false); @@ -579,7 +579,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bool bWeb = dynamic_cast< SwWebDocShell *>( this ) != nullptr; std::shared_ptr<const SfxFilter> pOwnFlt = SwDocShell::Factory().GetFilterContainer()-> - GetFilter4FilterName("writer8"); + GetFilter4FilterName(u"writer8"_ustr); // make sure the default file format is also available if(bWeb) @@ -659,8 +659,8 @@ void SwDocShell::Execute(SfxRequest& rReq) std::shared_ptr<const SfxFilter> pFlt = GetMedium()->GetFilter(); if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData()) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(rViewFrame.GetFrameWeld(), "modules/swriter/ui/saveashtmldialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("SaveAsHTMLDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(rViewFrame.GetFrameWeld(), u"modules/swriter/ui/saveashtmldialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"SaveAsHTMLDialog"_ustr)); if (RET_YES == xQuery->run()) bLocalHasName = false; else @@ -786,9 +786,9 @@ void SwDocShell::Execute(SfxRequest& rReq) pStrm->ReadBytes( aSeq.getArray(), aSeq.getLength() ); uno::Sequence< beans::PropertyValue > aArgs{ - comphelper::makePropertyValue("RtfOutline", aSeq) + comphelper::makePropertyValue(u"RtfOutline"_ustr, aSeq) }; - xHelper->executeDispatch( xProv, "SendOutlineToImpress", OUString(), 0, aArgs ); + xHelper->executeDispatch( xProv, u"SendOutlineToImpress"_ustr, OUString(), 0, aArgs ); } else ErrorHandler::HandleError( eErr ); @@ -844,9 +844,9 @@ void SwDocShell::Execute(SfxRequest& rReq) pStrm->ReadBytes( aSeq.getArray(), aSeq.getLength() ); uno::Sequence< beans::PropertyValue > aArgs{ - comphelper::makePropertyValue("RtfOutline", aSeq) + comphelper::makePropertyValue(u"RtfOutline"_ustr, aSeq) }; - xHelper->executeDispatch( xProv, "SendOutlineToImpress", OUString(), 0, aArgs ); + xHelper->executeDispatch( xProv, u"SendOutlineToImpress"_ustr, OUString(), 0, aArgs ); } else { @@ -989,7 +989,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for Global-documents we now only offer the current one. pFlt = SwGlobalDocShell::Factory().GetFilterContainer()-> - GetFilter4Extension( "odm" ); + GetFilter4Extension( u"odm"_ustr ); pStrId = STR_LOAD_GLOBAL_DOC; } @@ -1190,8 +1190,8 @@ void SwDocShell::Execute(SfxRequest& rReq) if (SfxDispatcher* pDispatch = pViewShell->GetDispatcher()) { - SfxStringItem aApp(SID_DOC_SERVICE, "com.sun.star.text.TextDocument"); - SfxStringItem aTarget(SID_TARGETNAME, "_blank"); + SfxStringItem aApp(SID_DOC_SERVICE, u"com.sun.star.text.TextDocument"_ustr); + SfxStringItem aTarget(SID_TARGETNAME, u"_blank"_ustr); pDispatch->ExecuteList(SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, { &aApp, &aTarget }); } } @@ -1286,7 +1286,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxBindings& rBindings( pViewShell->GetViewFrame().GetBindings() ); if ( SfxNotebookBar::IsActive() ) - sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : "" ); + sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : u""_ustr ); else { sfx2::SfxNotebookBar::CloseMethod( rBindings ); @@ -1629,7 +1629,7 @@ ErrCodeMsg SwDocShell::LoadStylesFromFile(const OUString& rURL, SwgReaderOption& try { uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( "MediaType" ); + xProps->getPropertyValue( u"MediaType"_ustr ); bImport = true; } catch (const uno::Exception&) diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index a952e0224690..5d54d9c1af1c 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -584,7 +584,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium ) do { // middle check loop ErrCodeMsg nErr = ERR_SWG_READ_ERROR; - OUString aStreamName = "styles.xml"; + OUString aStreamName = u"styles.xml"_ustr; uno::Reference < container::XNameAccess > xAccess = rMedium.GetStorage(); if ( xAccess->hasByName( aStreamName ) && rMedium.GetStorage()->isStreamElement( aStreamName ) ) { diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 2b2c1b340403..4df37c96d590 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -119,7 +119,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) { // determine current template to every family OUString aName; - SwTableAutoFormat aTableAutoFormat("dummy"); // needed to check if can take a table auto format at current cursor position + SwTableAutoFormat aTableAutoFormat(u"dummy"_ustr); // needed to check if can take a table auto format at current cursor position switch (nWhich) { case SID_STYLE_APPLY: @@ -362,7 +362,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xInfo; xStyles->getByName( pNameItem->GetValue() ) >>= xInfo; OUString aUIName; - xInfo->getPropertyValue("DisplayName") >>= aUIName; + xInfo->getPropertyValue(u"DisplayName"_ustr) >>= aUIName; if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } @@ -514,7 +514,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { case SID_STYLE_EDIT: case SID_STYLE_FONT: - Edit(rReq.GetFrameWeld(), aParam, {}, nFamily, nMask, false, (nSlot == SID_STYLE_FONT) ? "font" : OUString(), pActShell); + Edit(rReq.GetFrameWeld(), aParam, {}, nFamily, nMask, false, (nSlot == SID_STYLE_FONT) ? u"font"_ustr : OUString(), pActShell); break; case SID_STYLE_DELETE: Delete(aParam, nFamily); @@ -654,7 +654,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void) if (const SfxGrabBagItem* pGrabBagItem = aTmpSet.GetItemIfSet(SID_ATTR_CHAR_GRABBAG)) { bool bGutterAtTop{}; - auto it = pGrabBagItem->GetGrabBag().find("GutterAtTop"); + auto it = pGrabBagItem->GetGrabBag().find(u"GutterAtTop"_ustr); if (it != pGrabBagItem->GetGrabBag().end()) { it->second >>= bGutterAtTop; @@ -731,20 +731,20 @@ void syncEndnoteOrientation(const uno::Reference< style::XStyleFamiliesSupplier if (!xStyleFamilies.is()) return; - uno::Reference<container::XNameAccess> xPageStyles(xStyleFamilies->getByName("PageStyles"), + uno::Reference<container::XNameAccess> xPageStyles(xStyleFamilies->getByName(u"PageStyles"_ustr), uno::UNO_QUERY); if (!xPageStyles.is()) return; - uno::Reference<css::style::XStyle> xEndnotePageStyle(xPageStyles->getByName("Endnote"), + uno::Reference<css::style::XStyle> xEndnotePageStyle(xPageStyles->getByName(u"Endnote"_ustr), uno::UNO_QUERY); if (!xEndnotePageStyle.is()) return; // Language-independent name of the "Default Style" is "Standard" - uno::Reference<css::style::XStyle> xDefaultPageStyle(xPageStyles->getByName("Standard"), + uno::Reference<css::style::XStyle> xDefaultPageStyle(xPageStyles->getByName(u"Standard"_ustr), uno::UNO_QUERY); if (!xDefaultPageStyle.is()) return; @@ -752,8 +752,8 @@ void syncEndnoteOrientation(const uno::Reference< style::XStyleFamiliesSupplier if (xEndnotePageStyle->isUserDefined() || !xEndnotePageStyle->isInUse()) return; - uno::Reference<beans::XPropertySet> xEndnotePagePropSet(xPageStyles->getByName("Endnote"), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> xDefaultPagePropSet(xPageStyles->getByName("Standard"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xEndnotePagePropSet(xPageStyles->getByName(u"Endnote"_ustr), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xDefaultPagePropSet(xPageStyles->getByName(u"Standard"_ustr), uno::UNO_QUERY); if (!xEndnotePagePropSet.is() || !xDefaultPagePropSet.is()) { @@ -762,19 +762,19 @@ void syncEndnoteOrientation(const uno::Reference< style::XStyleFamiliesSupplier } auto const bIsDefLandScape = *o3tl::doAccess<bool>( - xDefaultPagePropSet->getPropertyValue("IsLandscape")); + xDefaultPagePropSet->getPropertyValue(u"IsLandscape"_ustr)); auto const bIsEndLandScape = *o3tl::doAccess<bool>( - xEndnotePagePropSet->getPropertyValue("IsLandscape")); + xEndnotePagePropSet->getPropertyValue(u"IsLandscape"_ustr)); if (bIsDefLandScape == bIsEndLandScape) return; - auto const nWidth = xEndnotePagePropSet->getPropertyValue("Width"); - auto const nHeight = xEndnotePagePropSet->getPropertyValue("Height"); + auto const nWidth = xEndnotePagePropSet->getPropertyValue(u"Width"_ustr); + auto const nHeight = xEndnotePagePropSet->getPropertyValue(u"Height"_ustr); - xEndnotePagePropSet->setPropertyValue("IsLandscape", css::uno::toAny(bIsDefLandScape)); - xEndnotePagePropSet->setPropertyValue("Width", nHeight); - xEndnotePagePropSet->setPropertyValue("Height", nWidth); + xEndnotePagePropSet->setPropertyValue(u"IsLandscape"_ustr, css::uno::toAny(bIsDefLandScape)); + xEndnotePagePropSet->setPropertyValue(u"Width"_ustr, nHeight); + xEndnotePagePropSet->setPropertyValue(u"Height"_ustr, nWidth); } } @@ -950,7 +950,7 @@ void SwDocShell::Edit( } bool bGutterAtTop = GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::GUTTER_AT_TOP); - oGrabBag->GetGrabBag()["GutterAtTop"] <<= bGutterAtTop; + oGrabBag->GetGrabBag()[u"GutterAtTop"_ustr] <<= bGutterAtTop; rSet.Put(*oGrabBag); } diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx index 10b16d6c1052..ec258cac6dd6 100644 --- a/sw/source/uibase/app/swdll.cxx +++ b/sw/source/uibase/app/swdll.cxx @@ -103,12 +103,12 @@ SwDLL::SwDLL() SwModule* pModule = pUniqueModule.get(); SfxApplication::SetModule(SfxToolsModule::Writer, std::move(pUniqueModule)); - pWDocFact->SetDocumentServiceName("com.sun.star.text.WebDocument"); + pWDocFact->SetDocumentServiceName(u"com.sun.star.text.WebDocument"_ustr); if (!xOpt || xOpt->IsWriter()) { - pGlobDocFact->SetDocumentServiceName("com.sun.star.text.GlobalDocument"); - pDocFact->SetDocumentServiceName("com.sun.star.text.TextDocument"); + pGlobDocFact->SetDocumentServiceName(u"com.sun.star.text.GlobalDocument"_ustr); + pDocFact->SetDocumentServiceName(u"com.sun.star.text.TextDocument"_ustr); } // register 3D-object-Factory diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 8c08c1f11781..4f4bcd780e31 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -366,7 +366,7 @@ void SwModule::ShowDBObj(SwView const & rView, const SwDBData& rData) { Reference<XFrame> xFrame = rView.GetViewFrame().GetFrame().GetFrameInterface(); - uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame("_beamer", FrameSearchFlag::CHILDREN); + uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame(u"_beamer"_ustr, FrameSearchFlag::CHILDREN); if (!xBeamerFrame.is()) return; @@ -416,7 +416,7 @@ OUString const & SwModule::GetRedlineAuthor(std::size_t nPos) OSL_ENSURE(nPos < m_pAuthorNames.size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash while(nPos >= m_pAuthorNames.size()) { - InsertRedlineAuthor("nn"); + InsertRedlineAuthor(u"nn"_ustr); } return m_pAuthorNames[nPos]; } diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index e8bb17f37f79..3d351cf492e1 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -135,7 +135,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, m_pDragDrop( nullptr ), m_pXSelection( nullptr ) { - SetName( "StarWriter" ); + SetName( u"StarWriter"_ustr ); SvxErrorHandler::ensure(); m_pErrorHandler.reset( new SfxErrorHandler( RID_SW_ERRHDL, ErrCodeArea::Sw, @@ -202,7 +202,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & SwModule::GetLanguageGu SwModule::~SwModule() { css::uno::Sequence< css::uno::Any > aArgs; - CallAutomationApplicationEventSinks( "Quit", aArgs ); + CallAutomationApplicationEventSinks( u"Quit"_ustr, aArgs ); m_pErrorHandler.reset(); EndListening( *SfxGetpApp() ); } diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index a74f7329b26f..1aefb38bc359 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -128,7 +128,7 @@ public: OUString dummy; // pass in empty HeadingStyleName - can't import anyway uno::Sequence<beans::PropertyValue> const ret( SwXNumberingRules::GetPropertiesForNumFormat( - *pNumFormat, *pCharStyleName, &dummy, "")); + *pNumFormat, *pCharStyleName, &dummy, u""_ustr)); return uno::Any(ret); } @@ -140,7 +140,7 @@ public: throw lang::IndexOutOfBoundsException(); uno::Sequence<beans::PropertyValue> props; if (!(rElement >>= props)) - throw lang::IllegalArgumentException("invalid type", + throw lang::IllegalArgumentException(u"invalid type"_ustr, getXWeak(), 1); SolarMutexGuard g; @@ -166,7 +166,7 @@ public: uno::Reference<uno::XComponentContext> const& xContext, OUString const& rFileName, uno::Reference<xml::sax::XDocumentHandler> const& xHandler) - : SvXMLExport(xContext, "sw::StoredChapterNumberingExport", rFileName, + : SvXMLExport(xContext, u"sw::StoredChapterNumberingExport"_ustr, rFileName, util::MeasureUnit::CM, xHandler) { GetNamespaceMap_().Add(GetXMLToken(XML_NP_OFFICE), @@ -367,7 +367,7 @@ public: StoredChapterNumberingImport( uno::Reference<uno::XComponentContext> const& xContext, SwChapterNumRules & rNumRules) - : SvXMLImport(xContext, "sw::StoredChapterNumberingImport", SvXMLImportFlags::ALL) + : SvXMLImport(xContext, u"sw::StoredChapterNumberingImport"_ustr, SvXMLImportFlags::ALL) , m_rNumRules(rNumRules) { } @@ -442,7 +442,7 @@ void ImportStoredChapterNumberingRules(SwChapterNumRules & rRules, rtl::Reference<StoredChapterNumberingImport> const xImport(new StoredChapterNumberingImport(xContext, rRules)); - xml::sax::InputSource const source(xInStream, "", "", rFileName); + xml::sax::InputSource const source(xInStream, u""_ustr, u""_ustr, rFileName); try { diff --git a/sw/source/uibase/config/barcfg.cxx b/sw/source/uibase/config/barcfg.cxx index 021b36cb733f..2c04369d6dcc 100644 --- a/sw/source/uibase/config/barcfg.cxx +++ b/sw/source/uibase/config/barcfg.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star::uno; #define SEL_TYPE_GRAPHIC 4 SwToolbarConfigItem::SwToolbarConfigItem( bool bWeb ) : - ConfigItem(bWeb ? OUString("Office.WriterWeb/ObjectBar") : OUString("Office.Writer/ObjectBar"), + ConfigItem(bWeb ? u"Office.WriterWeb/ObjectBar"_ustr : u"Office.Writer/ObjectBar"_ustr, ConfigItemMode::ReleaseTree) { for(int i = 0; i <= SEL_TYPE_GRAPHIC; ++i) diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx index d023bd836f82..262fe27cff38 100644 --- a/sw/source/uibase/config/caption.cxx +++ b/sw/source/uibase/config/caption.cxx @@ -25,10 +25,10 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI m_bUseCaption(false), m_eObjType(eType), m_nNumType(SVX_NUM_ARABIC), - m_sNumberSeparator(". "), + m_sNumberSeparator(u". "_ustr), m_nPos(1), m_nLevel(0), - m_sSeparator( OUString(": ") ), + m_sSeparator( u": "_ustr ), m_bIgnoreSeqOpts(false), m_bCopyAttributes(false) { diff --git a/sw/source/uibase/config/dbconfig.cxx b/sw/source/uibase/config/dbconfig.cxx index 669bda65a4a7..a52b98f83274 100644 --- a/sw/source/uibase/config/dbconfig.cxx +++ b/sw/source/uibase/config/dbconfig.cxx @@ -28,18 +28,18 @@ using namespace com::sun::star::uno; const Sequence<OUString>& SwDBConfig::GetPropertyNames() { static Sequence<OUString> aNames { - "AddressBook/DataSourceName", // 0 - "AddressBook/Command", // 1 - "AddressBook/CommandType", // 2 - "Bibliography/CurrentDataSource/DataSourceName", // 4 - "Bibliography/CurrentDataSource/Command", // 5 - "Bibliography/CurrentDataSource/CommandType" // 6 + u"AddressBook/DataSourceName"_ustr, // 0 + u"AddressBook/Command"_ustr, // 1 + u"AddressBook/CommandType"_ustr, // 2 + u"Bibliography/CurrentDataSource/DataSourceName"_ustr, // 4 + u"Bibliography/CurrentDataSource/Command"_ustr, // 5 + u"Bibliography/CurrentDataSource/CommandType"_ustr // 6 }; return aNames; } SwDBConfig::SwDBConfig() : - ConfigItem("Office.DataAccess", ConfigItemMode::ReleaseTree) + ConfigItem(u"Office.DataAccess"_ustr, ConfigItemMode::ReleaseTree) { }; diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 52d7bbdb7349..a17104f4803f 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -40,42 +40,42 @@ static LanguageType lcl_LanguageOfType(sal_Int16 nType, LanguageType eWestern, L Sequence<OUString> const & SwStdFontConfig::GetPropertyNames() { static Sequence<OUString> aNames { - "DefaultFont/Standard", // 0 - "DefaultFont/Heading", // 1 - "DefaultFont/List", // 2 - "DefaultFont/Caption", // 3 - "DefaultFont/Index", // 4 - "DefaultFontCJK/Standard", // 5 - "DefaultFontCJK/Heading", // 6 - "DefaultFontCJK/List", // 7 - "DefaultFontCJK/Caption", // 8 - "DefaultFontCJK/Index", // 9 - "DefaultFontCTL/Standard", // 10 - "DefaultFontCTL/Heading", // 11 - "DefaultFontCTL/List", // 12 - "DefaultFontCTL/Caption", // 13 - "DefaultFontCTL/Index", // 14 - "DefaultFont/StandardHeight", // 15 - "DefaultFont/HeadingHeight", // 16 - "DefaultFont/ListHeight", // 17 - "DefaultFont/CaptionHeight", // 18 - "DefaultFont/IndexHeight", // 19 - "DefaultFontCJK/StandardHeight", // 20 - "DefaultFontCJK/HeadingHeight", // 21 - "DefaultFontCJK/ListHeight", // 22 - "DefaultFontCJK/CaptionHeight", // 23 - "DefaultFontCJK/IndexHeight", // 24 - "DefaultFontCTL/StandardHeight", // 25 - "DefaultFontCTL/HeadingHeight", // 26 - "DefaultFontCTL/ListHeight", // 27 - "DefaultFontCTL/CaptionHeight", // 28 - "DefaultFontCTL/IndexHeight" // 29 + u"DefaultFont/Standard"_ustr, // 0 + u"DefaultFont/Heading"_ustr, // 1 + u"DefaultFont/List"_ustr, // 2 + u"DefaultFont/Caption"_ustr, // 3 + u"DefaultFont/Index"_ustr, // 4 + u"DefaultFontCJK/Standard"_ustr, // 5 + u"DefaultFontCJK/Heading"_ustr, // 6 + u"DefaultFontCJK/List"_ustr, // 7 + u"DefaultFontCJK/Caption"_ustr, // 8 + u"DefaultFontCJK/Index"_ustr, // 9 + u"DefaultFontCTL/Standard"_ustr, // 10 + u"DefaultFontCTL/Heading"_ustr, // 11 + u"DefaultFontCTL/List"_ustr, // 12 + u"DefaultFontCTL/Caption"_ustr, // 13 + u"DefaultFontCTL/Index"_ustr, // 14 + u"DefaultFont/StandardHeight"_ustr, // 15 + u"DefaultFont/HeadingHeight"_ustr, // 16 + u"DefaultFont/ListHeight"_ustr, // 17 + u"DefaultFont/CaptionHeight"_ustr, // 18 + u"DefaultFont/IndexHeight"_ustr, // 19 + u"DefaultFontCJK/StandardHeight"_ustr, // 20 + u"DefaultFontCJK/HeadingHeight"_ustr, // 21 + u"DefaultFontCJK/ListHeight"_ustr, // 22 + u"DefaultFontCJK/CaptionHeight"_ustr, // 23 + u"DefaultFontCJK/IndexHeight"_ustr, // 24 + u"DefaultFontCTL/StandardHeight"_ustr, // 25 + u"DefaultFontCTL/HeadingHeight"_ustr, // 26 + u"DefaultFontCTL/ListHeight"_ustr, // 27 + u"DefaultFontCTL/CaptionHeight"_ustr, // 28 + u"DefaultFontCTL/IndexHeight"_ustr // 29 }; return aNames; } SwStdFontConfig::SwStdFontConfig() : - utl::ConfigItem("Office.Writer") + utl::ConfigItem(u"Office.Writer"_ustr) { SvtLinguOptions aLinguOpt; diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 23ec87364d97..8fe3bca246d2 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -217,20 +217,20 @@ const Sequence<OUString>& SwRevisionConfig::GetPropertyNames() { static Sequence<OUString> const aNames { - "TextDisplay/Insert/Attribute", // 0 - "TextDisplay/Insert/Color", // 1 - "TextDisplay/Delete/Attribute", // 2 - "TextDisplay/Delete/Color", // 3 - "TextDisplay/ChangedAttribute/Attribute", // 4 - "TextDisplay/ChangedAttribute/Color", // 5 - "LinesChanged/Mark", // 6 - "LinesChanged/Color" // 7 + u"TextDisplay/Insert/Attribute"_ustr, // 0 + u"TextDisplay/Insert/Color"_ustr, // 1 + u"TextDisplay/Delete/Attribute"_ustr, // 2 + u"TextDisplay/Delete/Color"_ustr, // 3 + u"TextDisplay/ChangedAttribute/Attribute"_ustr, // 4 + u"TextDisplay/ChangedAttribute/Color"_ustr, // 5 + u"LinesChanged/Mark"_ustr, // 6 + u"LinesChanged/Color"_ustr // 7 }; return aNames; } SwRevisionConfig::SwRevisionConfig() - : ConfigItem("Office.Writer/Revision", ConfigItemMode::ReleaseTree) + : ConfigItem(u"Office.Writer/Revision"_ustr, ConfigItemMode::ReleaseTree) , m_nMarkAlign(0) { m_aInsertAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE; @@ -461,107 +461,107 @@ const Sequence<OUString>& SwInsertConfig::GetPropertyNames() const { static Sequence<OUString> aNames { - "Table/Header", // 0 - "Table/RepeatHeader", // 1 - "Table/Border", // 2 - "Table/Split", // 3 from here not in writer/web - "Caption/Automatic", // 4 - "Caption/CaptionOrderNumberingFirst", // 5 - "Caption/WriterObject/Table/Enable", // 6 - "Caption/WriterObject/Table/Settings/Category", // 7 - "Caption/WriterObject/Table/Settings/Numbering", // 8 - "Caption/WriterObject/Table/Settings/NumberingSeparator", // 9 - "Caption/WriterObject/Table/Settings/CaptionText", //10 - "Caption/WriterObject/Table/Settings/Delimiter", //11 - "Caption/WriterObject/Table/Settings/Level", //12 - "Caption/WriterObject/Table/Settings/Position", //13 - "Caption/WriterObject/Table/Settings/CharacterStyle", //14 - "Caption/WriterObject/Frame/Enable", //15 - "Caption/WriterObject/Frame/Settings/Category", //16 - "Caption/WriterObject/Frame/Settings/Numbering", //17 - "Caption/WriterObject/Frame/Settings/NumberingSeparator", //18 - "Caption/WriterObject/Frame/Settings/CaptionText", //19 - "Caption/WriterObject/Frame/Settings/Delimiter", //20 - "Caption/WriterObject/Frame/Settings/Level", //21 - "Caption/WriterObject/Frame/Settings/Position", //22 - "Caption/WriterObject/Frame/Settings/CharacterStyle", //23 - "Caption/WriterObject/Graphic/Enable", //24 - "Caption/WriterObject/Graphic/Settings/Category", //25 - "Caption/WriterObject/Graphic/Settings/Numbering", //26 - "Caption/WriterObject/Graphic/Settings/NumberingSeparator", //27 - "Caption/WriterObject/Graphic/Settings/CaptionText", //28 - "Caption/WriterObject/Graphic/Settings/Delimiter", //29 - "Caption/WriterObject/Graphic/Settings/Level", //30 - "Caption/WriterObject/Graphic/Settings/Position", //31 - "Caption/WriterObject/Graphic/Settings/CharacterStyle", //32 - "Caption/WriterObject/Graphic/Settings/ApplyAttributes", //33 - "Caption/OfficeObject/Calc/Enable", //34 - "Caption/OfficeObject/Calc/Settings/Category", //35 - "Caption/OfficeObject/Calc/Settings/Numbering", //36 - "Caption/OfficeObject/Calc/Settings/NumberingSeparator", //37 - "Caption/OfficeObject/Calc/Settings/CaptionText", //38 - "Caption/OfficeObject/Calc/Settings/Delimiter", //39 - "Caption/OfficeObject/Calc/Settings/Level", //40 - "Caption/OfficeObject/Calc/Settings/Position", //41 - "Caption/OfficeObject/Calc/Settings/CharacterStyle", //42 - "Caption/OfficeObject/Calc/Settings/ApplyAttributes", //43 - "Caption/OfficeObject/Impress/Enable", //44 - "Caption/OfficeObject/Impress/Settings/Category", //45 - "Caption/OfficeObject/Impress/Settings/Numbering", //46 - "Caption/OfficeObject/Impress/Settings/NumberingSeparator", //47 - "Caption/OfficeObject/Impress/Settings/CaptionText", //48 - "Caption/OfficeObject/Impress/Settings/Delimiter", //49 - "Caption/OfficeObject/Impress/Settings/Level", //50 - "Caption/OfficeObject/Impress/Settings/Position", //51 - "Caption/OfficeObject/Impress/Settings/CharacterStyle", //52 - "Caption/OfficeObject/Impress/Settings/ApplyAttributes", //53 - "Caption/OfficeObject/Chart/Enable", //54 - "Caption/OfficeObject/Chart/Settings/Category", //55 - "Caption/OfficeObject/Chart/Settings/Numbering", //56 - "Caption/OfficeObject/Chart/Settings/NumberingSeparator", //57 - "Caption/OfficeObject/Chart/Settings/CaptionText", //58 - "Caption/OfficeObject/Chart/Settings/Delimiter", //59 - "Caption/OfficeObject/Chart/Settings/Level", //60 - "Caption/OfficeObject/Chart/Settings/Position", //61 - "Caption/OfficeObject/Chart/Settings/CharacterStyle", //62 - "Caption/OfficeObject/Chart/Settings/ApplyAttributes", //63 - "Caption/OfficeObject/Formula/Enable", //64 - "Caption/OfficeObject/Formula/Settings/Category", //65 - "Caption/OfficeObject/Formula/Settings/Numbering", //66 - "Caption/OfficeObject/Formula/Settings/NumberingSeparator", //67 - "Caption/OfficeObject/Formula/Settings/CaptionText", //68 - "Caption/OfficeObject/Formula/Settings/Delimiter", //69 - "Caption/OfficeObject/Formula/Settings/Level", //70 - "Caption/OfficeObject/Formula/Settings/Position", //71 - "Caption/OfficeObject/Formula/Settings/CharacterStyle", //72 - "Caption/OfficeObject/Formula/Settings/ApplyAttributes", //73 - "Caption/OfficeObject/Draw/Enable", //74 - "Caption/OfficeObject/Draw/Settings/Category", //75 - "Caption/OfficeObject/Draw/Settings/Numbering", //76 - "Caption/OfficeObject/Draw/Settings/NumberingSeparator", //77 - "Caption/OfficeObject/Draw/Settings/CaptionText", //78 - "Caption/OfficeObject/Draw/Settings/Delimiter", //79 - "Caption/OfficeObject/Draw/Settings/Level", //80 - "Caption/OfficeObject/Draw/Settings/Position", //81 - "Caption/OfficeObject/Draw/Settings/CharacterStyle", //82 - "Caption/OfficeObject/Draw/Settings/ApplyAttributes", //83 - "Caption/OfficeObject/OLEMisc/Enable", //84 - "Caption/OfficeObject/OLEMisc/Settings/Category", //85 - "Caption/OfficeObject/OLEMisc/Settings/Numbering", //86 - "Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator", //87 - "Caption/OfficeObject/OLEMisc/Settings/CaptionText", //88 - "Caption/OfficeObject/OLEMisc/Settings/Delimiter", //89 - "Caption/OfficeObject/OLEMisc/Settings/Level", //90 - "Caption/OfficeObject/OLEMisc/Settings/Position", //91 - "Caption/OfficeObject/OLEMisc/Settings/CharacterStyle", //92 - "Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes" //93 + u"Table/Header"_ustr, // 0 + u"Table/RepeatHeader"_ustr, // 1 + u"Table/Border"_ustr, // 2 + u"Table/Split"_ustr, // 3 from here not in writer/web + u"Caption/Automatic"_ustr, // 4 + u"Caption/CaptionOrderNumberingFirst"_ustr, // 5 + u"Caption/WriterObject/Table/Enable"_ustr, // 6 + u"Caption/WriterObject/Table/Settings/Category"_ustr, // 7 + u"Caption/WriterObject/Table/Settings/Numbering"_ustr, // 8 + u"Caption/WriterObject/Table/Settings/NumberingSeparator"_ustr, // 9 + u"Caption/WriterObject/Table/Settings/CaptionText"_ustr, //10 + u"Caption/WriterObject/Table/Settings/Delimiter"_ustr, //11 + u"Caption/WriterObject/Table/Settings/Level"_ustr, //12 + u"Caption/WriterObject/Table/Settings/Position"_ustr, //13 + u"Caption/WriterObject/Table/Settings/CharacterStyle"_ustr, //14 + u"Caption/WriterObject/Frame/Enable"_ustr, //15 + u"Caption/WriterObject/Frame/Settings/Category"_ustr, //16 + u"Caption/WriterObject/Frame/Settings/Numbering"_ustr, //17 + u"Caption/WriterObject/Frame/Settings/NumberingSeparator"_ustr, //18 + u"Caption/WriterObject/Frame/Settings/CaptionText"_ustr, //19 + u"Caption/WriterObject/Frame/Settings/Delimiter"_ustr, //20 + u"Caption/WriterObject/Frame/Settings/Level"_ustr, //21 + u"Caption/WriterObject/Frame/Settings/Position"_ustr, //22 + u"Caption/WriterObject/Frame/Settings/CharacterStyle"_ustr, //23 + u"Caption/WriterObject/Graphic/Enable"_ustr, //24 + u"Caption/WriterObject/Graphic/Settings/Category"_ustr, //25 + u"Caption/WriterObject/Graphic/Settings/Numbering"_ustr, //26 + u"Caption/WriterObject/Graphic/Settings/NumberingSeparator"_ustr, //27 + u"Caption/WriterObject/Graphic/Settings/CaptionText"_ustr, //28 + u"Caption/WriterObject/Graphic/Settings/Delimiter"_ustr, //29 + u"Caption/WriterObject/Graphic/Settings/Level"_ustr, //30 + u"Caption/WriterObject/Graphic/Settings/Position"_ustr, //31 + u"Caption/WriterObject/Graphic/Settings/CharacterStyle"_ustr, //32 + u"Caption/WriterObject/Graphic/Settings/ApplyAttributes"_ustr, //33 + u"Caption/OfficeObject/Calc/Enable"_ustr, //34 + u"Caption/OfficeObject/Calc/Settings/Category"_ustr, //35 + u"Caption/OfficeObject/Calc/Settings/Numbering"_ustr, //36 + u"Caption/OfficeObject/Calc/Settings/NumberingSeparator"_ustr, //37 + u"Caption/OfficeObject/Calc/Settings/CaptionText"_ustr, //38 + u"Caption/OfficeObject/Calc/Settings/Delimiter"_ustr, //39 + u"Caption/OfficeObject/Calc/Settings/Level"_ustr, //40 + u"Caption/OfficeObject/Calc/Settings/Position"_ustr, //41 + u"Caption/OfficeObject/Calc/Settings/CharacterStyle"_ustr, //42 + u"Caption/OfficeObject/Calc/Settings/ApplyAttributes"_ustr, //43 + u"Caption/OfficeObject/Impress/Enable"_ustr, //44 + u"Caption/OfficeObject/Impress/Settings/Category"_ustr, //45 + u"Caption/OfficeObject/Impress/Settings/Numbering"_ustr, //46 + u"Caption/OfficeObject/Impress/Settings/NumberingSeparator"_ustr, //47 + u"Caption/OfficeObject/Impress/Settings/CaptionText"_ustr, //48 + u"Caption/OfficeObject/Impress/Settings/Delimiter"_ustr, //49 + u"Caption/OfficeObject/Impress/Settings/Level"_ustr, //50 + u"Caption/OfficeObject/Impress/Settings/Position"_ustr, //51 + u"Caption/OfficeObject/Impress/Settings/CharacterStyle"_ustr, //52 + u"Caption/OfficeObject/Impress/Settings/ApplyAttributes"_ustr, //53 + u"Caption/OfficeObject/Chart/Enable"_ustr, //54 + u"Caption/OfficeObject/Chart/Settings/Category"_ustr, //55 + u"Caption/OfficeObject/Chart/Settings/Numbering"_ustr, //56 + u"Caption/OfficeObject/Chart/Settings/NumberingSeparator"_ustr, //57 + u"Caption/OfficeObject/Chart/Settings/CaptionText"_ustr, //58 + u"Caption/OfficeObject/Chart/Settings/Delimiter"_ustr, //59 + u"Caption/OfficeObject/Chart/Settings/Level"_ustr, //60 + u"Caption/OfficeObject/Chart/Settings/Position"_ustr, //61 + u"Caption/OfficeObject/Chart/Settings/CharacterStyle"_ustr, //62 + u"Caption/OfficeObject/Chart/Settings/ApplyAttributes"_ustr, //63 + u"Caption/OfficeObject/Formula/Enable"_ustr, //64 + u"Caption/OfficeObject/Formula/Settings/Category"_ustr, //65 + u"Caption/OfficeObject/Formula/Settings/Numbering"_ustr, //66 + u"Caption/OfficeObject/Formula/Settings/NumberingSeparator"_ustr, //67 + u"Caption/OfficeObject/Formula/Settings/CaptionText"_ustr, //68 + u"Caption/OfficeObject/Formula/Settings/Delimiter"_ustr, //69 + u"Caption/OfficeObject/Formula/Settings/Level"_ustr, //70 + u"Caption/OfficeObject/Formula/Settings/Position"_ustr, //71 + u"Caption/OfficeObject/Formula/Settings/CharacterStyle"_ustr, //72 + u"Caption/OfficeObject/Formula/Settings/ApplyAttributes"_ustr, //73 + u"Caption/OfficeObject/Draw/Enable"_ustr, //74 + u"Caption/OfficeObject/Draw/Settings/Category"_ustr, //75 + u"Caption/OfficeObject/Draw/Settings/Numbering"_ustr, //76 + u"Caption/OfficeObject/Draw/Settings/NumberingSeparator"_ustr, //77 + u"Caption/OfficeObject/Draw/Settings/CaptionText"_ustr, //78 + u"Caption/OfficeObject/Draw/Settings/Delimiter"_ustr, //79 + u"Caption/OfficeObject/Draw/Settings/Level"_ustr, //80 + u"Caption/OfficeObject/Draw/Settings/Position"_ustr, //81 + u"Caption/OfficeObject/Draw/Settings/CharacterStyle"_ustr, //82 + u"Caption/OfficeObject/Draw/Settings/ApplyAttributes"_ustr, //83 + u"Caption/OfficeObject/OLEMisc/Enable"_ustr, //84 + u"Caption/OfficeObject/OLEMisc/Settings/Category"_ustr, //85 + u"Caption/OfficeObject/OLEMisc/Settings/Numbering"_ustr, //86 + u"Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator"_ustr, //87 + u"Caption/OfficeObject/OLEMisc/Settings/CaptionText"_ustr, //88 + u"Caption/OfficeObject/OLEMisc/Settings/Delimiter"_ustr, //89 + u"Caption/OfficeObject/OLEMisc/Settings/Level"_ustr, //90 + u"Caption/OfficeObject/OLEMisc/Settings/Position"_ustr, //91 + u"Caption/OfficeObject/OLEMisc/Settings/CharacterStyle"_ustr, //92 + u"Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes"_ustr //93 }; static Sequence<OUString> const aWebNames(aNames.getArray(), INS_PROP_TABLE_BORDER + 1); return m_bIsWeb ? aWebNames : aNames; } SwInsertConfig::SwInsertConfig(bool bWeb) : - ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"), + ConfigItem(bWeb ? u"Office.WriterWeb/Insert"_ustr : u"Office.Writer/Insert"_ustr, ConfigItemMode::ReleaseTree), m_bInsWithCaption( false ), m_bCaptionOrderNumberingFirst( false ), @@ -1069,21 +1069,21 @@ const Sequence<OUString>& SwTableConfig::GetPropertyNames() { static Sequence<OUString> const aNames { - "Shift/Row", // 0 - "Shift/Column", // 1 - "Insert/Row", // 2 - "Insert/Column", // 3 - "Change/Effect", // 4 - "Input/NumberRecognition", // 5 - "Input/NumberFormatRecognition",// 6 - "Input/Alignment", // 7 - "Input/SplitVerticalByDefault" // 8 + u"Shift/Row"_ustr, // 0 + u"Shift/Column"_ustr, // 1 + u"Insert/Row"_ustr, // 2 + u"Insert/Column"_ustr, // 3 + u"Change/Effect"_ustr, // 4 + u"Input/NumberRecognition"_ustr, // 5 + u"Input/NumberFormatRecognition"_ustr,// 6 + u"Input/Alignment"_ustr, // 7 + u"Input/SplitVerticalByDefault"_ustr // 8 }; return aNames; } SwTableConfig::SwTableConfig(bool bWeb) - : ConfigItem(bWeb ? OUString("Office.WriterWeb/Table") : OUString("Office.Writer/Table"), + : ConfigItem(bWeb ? u"Office.WriterWeb/Table"_ustr : u"Office.Writer/Table"_ustr, ConfigItemMode::ReleaseTree) , m_nTableHMove(0) , m_nTableVMove(0) @@ -1156,7 +1156,7 @@ void SwTableConfig::Load() } SwMiscConfig::SwMiscConfig() : - ConfigItem("Office.Writer", ConfigItemMode::ReleaseTree), + ConfigItem(u"Office.Writer"_ustr, ConfigItemMode::ReleaseTree), m_bDefaultFontsInCurrDocOnly(false), m_bShowIndexPreview(false), m_bGrfToGalleryAsLnk(true), @@ -1177,19 +1177,19 @@ const Sequence<OUString>& SwMiscConfig::GetPropertyNames() { static Sequence<OUString> const aNames { - "Statistics/WordNumber/Delimiter", // 0 - "DefaultFont/Document", // 1 - "Index/ShowPreview", // 2 - "Misc/GraphicToGalleryAsLink", // 3 - "Numbering/Graphic/KeepRatio", // 4 - "FormLetter/MailingOutput/Format", // 5 - "FormLetter/FileOutput/FileName/FromDatabaseField", // 6 - "FormLetter/FileOutput/Path", // 7 - "FormLetter/FileOutput/FileName/FromManualSetting", // 8 - "FormLetter/FileOutput/FileName/Generation",//9 - "FormLetter/PrintOutput/AskForMerge", //10 - "FormLetter/FileOutput/FilePassword/FromDatabaseField", // 11 - "FormLetter/FileOutput/FilePassword/Generation" //12 + u"Statistics/WordNumber/Delimiter"_ustr, // 0 + u"DefaultFont/Document"_ustr, // 1 + u"Index/ShowPreview"_ustr, // 2 + u"Misc/GraphicToGalleryAsLink"_ustr, // 3 + u"Numbering/Graphic/KeepRatio"_ustr, // 4 + u"FormLetter/MailingOutput/Format"_ustr, // 5 + u"FormLetter/FileOutput/FileName/FromDatabaseField"_ustr, // 6 + u"FormLetter/FileOutput/Path"_ustr, // 7 + u"FormLetter/FileOutput/FileName/FromManualSetting"_ustr, // 8 + u"FormLetter/FileOutput/FileName/Generation"_ustr,//9 + u"FormLetter/PrintOutput/AskForMerge"_ustr, //10 + u"FormLetter/FileOutput/FilePassword/FromDatabaseField"_ustr, // 11 + u"FormLetter/FileOutput/FilePassword/Generation"_ustr //12 }; return aNames; } @@ -1264,17 +1264,17 @@ const Sequence<OUString>& SwCompareConfig::GetPropertyNames() { static Sequence<OUString> const aNames { - "Mode", // 0 - "UseRSID", // 1 - "IgnorePieces", // 2 - "IgnoreLength", // 3 - "StoreRSID" // 4 + u"Mode"_ustr, // 0 + u"UseRSID"_ustr, // 1 + u"IgnorePieces"_ustr, // 2 + u"IgnoreLength"_ustr, // 3 + u"StoreRSID"_ustr // 4 }; return aNames; } SwCompareConfig::SwCompareConfig() : - ConfigItem("Office.Writer/Comparison", ConfigItemMode::ReleaseTree) + ConfigItem(u"Office.Writer/Comparison"_ustr, ConfigItemMode::ReleaseTree) ,m_bStoreRsid(true) { m_eCmpMode = SwCompareMode::Auto; diff --git a/sw/source/uibase/config/prtopt.cxx b/sw/source/uibase/config/prtopt.cxx index 6a7f64fd4283..de370b087aac 100644 --- a/sw/source/uibase/config/prtopt.cxx +++ b/sw/source/uibase/config/prtopt.cxx @@ -57,7 +57,7 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames() const } SwPrintOptions::SwPrintOptions(bool bWeb) : - ConfigItem(bWeb ? OUString("Office.WriterWeb/Print") : OUString("Office.Writer/Print"), + ConfigItem(bWeb ? u"Office.WriterWeb/Print"_ustr : u"Office.Writer/Print"_ustr, ConfigItemMode::ReleaseTree), m_bIsWeb(bWeb) { diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 0d1ee2859a5d..4c375f0c513b 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -131,7 +131,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() const } SwContentViewConfig::SwContentViewConfig(bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Content") : OUString("Office.Writer/Content")), + ConfigItem(bIsWeb ? u"Office.WriterWeb/Content"_ustr : u"Office.Writer/Content"_ustr), m_rParent(rPar), m_bWeb(bIsWeb) { @@ -289,7 +289,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() const } SwLayoutViewConfig::SwLayoutViewConfig(bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Layout") : OUString("Office.Writer/Layout"), + ConfigItem(bIsWeb ? u"Office.WriterWeb/Layout"_ustr : u"Office.Writer/Layout"_ustr, ConfigItemMode::ReleaseTree), m_rParent(rPar), m_bWeb(bIsWeb) @@ -425,7 +425,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames() } SwGridConfig::SwGridConfig(bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Grid") : OUString("Office.Writer/Grid"), + ConfigItem(bIsWeb ? u"Office.WriterWeb/Grid"_ustr : u"Office.Writer/Grid"_ustr, ConfigItemMode::ReleaseTree), m_rParent(rPar) { @@ -510,7 +510,7 @@ Sequence<OUString> SwCursorConfig::GetPropertyNames() } SwCursorConfig::SwCursorConfig(SwMasterUsrPref& rPar) : - ConfigItem("Office.Writer/Cursor", ConfigItemMode::ReleaseTree), + ConfigItem(u"Office.Writer/Cursor"_ustr, ConfigItemMode::ReleaseTree), m_rParent(rPar) { } @@ -584,7 +584,7 @@ Sequence<OUString> SwFmtAidsAutoComplConfig::GetPropertyNames() } SwFmtAidsAutoComplConfig::SwFmtAidsAutoComplConfig(SwMasterUsrPref& rPar) - : ConfigItem("Office.Writer/FmtAidsAutocomplete", ConfigItemMode::ReleaseTree) + : ConfigItem(u"Office.Writer/FmtAidsAutocomplete"_ustr, ConfigItemMode::ReleaseTree) , m_rParent(rPar) { } @@ -640,7 +640,7 @@ void SwFmtAidsAutoComplConfig::Load() void SwFmtAidsAutoComplConfig::Notify(const css::uno::Sequence<OUString>&) {} SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) : - ConfigItem("Office.WriterWeb/Background", ConfigItemMode::ReleaseTree), + ConfigItem(u"Office.WriterWeb/Background"_ustr, ConfigItemMode::ReleaseTree), m_rParent(rPar), m_aPropNames(1) { diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 342a9b408127..658aeb181d14 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -234,8 +234,8 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool b } SwViewOption::SwViewOption() : - m_sThemeName( "Default" ), - m_sSymbolFont( "symbol" ), + m_sThemeName( u"Default"_ustr ), + m_sSymbolFont( u"symbol"_ustr ), m_aRetouchColor( COL_TRANSPARENT ), mnViewLayoutColumns( 0 ), m_nPagePreviewRow( 1 ), @@ -593,7 +593,7 @@ bool SwViewOption::IsAppearanceFlag(ViewOptFlags nFlag) const namespace{ rtl::Reference<comphelper::ConfigurationListener> const & getWCOptionListener() { - static rtl::Reference<comphelper::ConfigurationListener> xListener(new comphelper::ConfigurationListener("/org.openoffice.Office.Writer/Cursor/Option")); + static rtl::Reference<comphelper::ConfigurationListener> xListener(new comphelper::ConfigurationListener(u"/org.openoffice.Office.Writer/Cursor/Option"_ustr)); return xListener; } } @@ -602,7 +602,7 @@ bool SwViewOption::IsIgnoreProtectedArea() { if (comphelper::IsFuzzing()) return false; - static comphelper::ConfigurationListenerProperty<bool> gIgnoreProtectedArea(getWCOptionListener(), "IgnoreProtectedArea"); + static comphelper::ConfigurationListenerProperty<bool> gIgnoreProtectedArea(getWCOptionListener(), u"IgnoreProtectedArea"_ustr); return gIgnoreProtectedArea.get(); } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 23f9c89ebd7c..a85cc1dbf563 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -187,14 +187,14 @@ static bool lcl_getCountFromResultSet( sal_Int32& rCount, const SwDSParam* pPara try { bool bFinal = false; - uno::Any aFinal = xPrSet->getPropertyValue("IsRowCountFinal"); + uno::Any aFinal = xPrSet->getPropertyValue(u"IsRowCountFinal"_ustr); aFinal >>= bFinal; if(!bFinal) { pParam->xResultSet->last(); pParam->xResultSet->first(); } - uno::Any aCount = xPrSet->getPropertyValue("RowCount"); + uno::Any aCount = xPrSet->getPropertyValue(u"RowCount"_ustr); if( aCount >>= rCount ) return true; } @@ -335,7 +335,7 @@ static void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<sdbc::XDat if(!xSourceProps.is()) return; - uno::Any aFormats = xSourceProps->getPropertyValue("NumberFormatsSupplier"); + uno::Any aFormats = xSourceProps->getPropertyValue(u"NumberFormatsSupplier"_ustr); if(!aFormats.hasValue()) return; @@ -344,7 +344,7 @@ static void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<sdbc::XDat if(xSuppl.is()) { uno::Reference< beans::XPropertySet > xSettings = xSuppl->getNumberFormatSettings(); - uno::Any aNull = xSettings->getPropertyValue("NullDate"); + uno::Any aNull = xSettings->getPropertyValue(u"NullDate"_ustr); aNull >>= rParam.aNullDate; if(rParam.xFormatter.is()) rParam.xFormatter->attachNumberFormatsSupplier(xSuppl); @@ -654,7 +654,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName) uno::Reference<container::XNameAccess> xTables = xTSupplier->getTables(); const uno::Sequence<OUString> aTables = xTables->getElementNames(); for (const OUString& rTable : aTables) - rBox.append("0", rTable); + rBox.append(u"0"_ustr, rTable); } uno::Reference<sdb::XQueriesSupplier> xQSupplier(xConnection, uno::UNO_QUERY); if(xQSupplier.is()) @@ -662,7 +662,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName) uno::Reference<container::XNameAccess> xQueries = xQSupplier->getQueries(); const uno::Sequence<OUString> aQueries = xQueries->getElementNames(); for (const OUString& rQuery : aQueries) - rBox.append("1", rQuery); + rBox.append(u"1"_ustr, rQuery); } if (!sOldTableName.isEmpty()) rBox.set_active_text(sOldTableName); @@ -854,7 +854,7 @@ static void lcl_PreparePrinterOptions( // printing should be done synchronously otherwise the document // might already become invalid during the process - rOutPrintOptions = { comphelper::makePropertyValue("Wait", true) }; + rOutPrintOptions = { comphelper::makePropertyValue(u"Wait"_ustr, true) }; // copy print options sal_Int32 nIndex = 1; @@ -879,8 +879,8 @@ static void lcl_PrepareSaveFilterDataOptions( const OUString& sPassword) { rOutSaveFilterDataOptions - = { comphelper::makePropertyValue("EncryptFile", true), - comphelper::makePropertyValue("DocumentOpenPassword", sPassword) }; + = { comphelper::makePropertyValue(u"EncryptFile"_ustr, true), + comphelper::makePropertyValue(u"DocumentOpenPassword"_ustr, sPassword) }; // copy other options sal_Int32 nIndex = 2; @@ -1155,7 +1155,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, // if a save_to filter is set then use it - otherwise use the default if( bMT_EMAIL && !rMergeDescriptor.bSendAsAttachment ) { - OUString sExtension = rMergeDescriptor.bSendAsHTML ? OUString("html") : OUString("txt"); + OUString sExtension = rMergeDescriptor.bSendAsHTML ? u"html"_ustr : u"txt"_ustr; pStoreToFilter = pFilterContainer->GetFilter4Extension(sExtension, SfxFilterFlags::EXPORT); } else if( !rMergeDescriptor.sSaveToFilter.isEmpty()) @@ -1452,7 +1452,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, SwDocMergeInfo aMergeInfo; // Name of the mark is actually irrelevant, UNO bookmarks have internals names. aMergeInfo.startPageInTarget = pTargetDoc->getIDocumentMarkAccess()->makeMark( - SwPaM(appendedDocStart), "", IDocumentMarkAccess::MarkType::UNO_BOOKMARK, + SwPaM(appendedDocStart), u""_ustr, IDocumentMarkAccess::MarkType::UNO_BOOKMARK, ::sw::mark::InsertMode::New); aMergeInfo.nDBRow = nStartRow; rMergeDescriptor.pMailMergeConfigItem->AddMergedDocument( aMergeInfo ); @@ -1781,7 +1781,7 @@ sal_uInt32 SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> cons uno::Reference< util::XNumberFormats > xNumberFormats; if(xSourceProps.is()) { - uno::Any aFormats = xSourceProps->getPropertyValue("NumberFormatsSupplier"); + uno::Any aFormats = xSourceProps->getPropertyValue(u"NumberFormatsSupplier"_ustr); if(aFormats.hasValue()) { uno::Reference<util::XNumberFormatsSupplier> xSuppl; @@ -1795,7 +1795,7 @@ sal_uInt32 SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> cons bool bUseDefault = true; try { - uno::Any aFormatKey = xColumn->getPropertyValue("FormatKey"); + uno::Any aFormatKey = xColumn->getPropertyValue(u"FormatKey"_ustr); if(aFormatKey.hasValue()) { sal_Int32 nFormat = 0; @@ -1805,8 +1805,8 @@ sal_uInt32 SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> cons try { uno::Reference<beans::XPropertySet> xNumProps = xNumberFormats->getByKey( nFormat ); - uno::Any aFormatString = xNumProps->getPropertyValue("FormatString"); - uno::Any aLocaleVal = xNumProps->getPropertyValue("Locale"); + uno::Any aFormatString = xNumProps->getPropertyValue(u"FormatString"_ustr); + uno::Any aLocaleVal = xNumProps->getPropertyValue(u"Locale"_ustr); OUString sFormat; aFormatString >>= sFormat; lang::Locale aLoc; @@ -1870,7 +1870,7 @@ sal_Int32 SwDBManager::GetColumnType( const OUString& rDBName, uno::Any aCol = xCols->getByName(rColNm); uno::Reference<beans::XPropertySet> xCol; aCol >>= xCol; - uno::Any aType = xCol->getPropertyValue("Type"); + uno::Any aType = xCol->getPropertyValue(u"Type"_ustr); aType >>= nRet; } if(bDispose) @@ -1923,22 +1923,22 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref sal_Int32 nCommandType = SwDBSelect::TABLE == eTableOrQuery ? sdb::CommandType::TABLE : sdb::CommandType::QUERY; uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); - uno::Reference<sdbc::XRowSet> xRowSet(xMgr->createInstance("com.sun.star.sdb.RowSet"), uno::UNO_QUERY); + uno::Reference<sdbc::XRowSet> xRowSet(xMgr->createInstance(u"com.sun.star.sdb.RowSet"_ustr), uno::UNO_QUERY); OUString sDataSource; uno::Reference<sdbc::XDataSource> xSource = SwDBManager::getDataSourceAsParent(xConnection, sDataSource); uno::Reference<beans::XPropertySet> xSourceProperties(xSource, uno::UNO_QUERY); if(xSourceProperties.is()) { - xSourceProperties->getPropertyValue("Name") >>= sDataSource; + xSourceProperties->getPropertyValue(u"Name"_ustr) >>= sDataSource; } uno::Reference<beans::XPropertySet> xRowProperties(xRowSet, uno::UNO_QUERY); - xRowProperties->setPropertyValue("DataSourceName", uno::Any(sDataSource)); - xRowProperties->setPropertyValue("Command", uno::Any(rTableOrQuery)); - xRowProperties->setPropertyValue("CommandType", uno::Any(nCommandType)); - xRowProperties->setPropertyValue("FetchSize", uno::Any(sal_Int32(10))); - xRowProperties->setPropertyValue("ActiveConnection", uno::Any(xConnection)); + xRowProperties->setPropertyValue(u"DataSourceName"_ustr, uno::Any(sDataSource)); + xRowProperties->setPropertyValue(u"Command"_ustr, uno::Any(rTableOrQuery)); + xRowProperties->setPropertyValue(u"CommandType"_ustr, uno::Any(nCommandType)); + xRowProperties->setPropertyValue(u"FetchSize"_ustr, uno::Any(sal_Int32(10))); + xRowProperties->setPropertyValue(u"ActiveConnection"_ustr, uno::Any(xConnection)); xRowSet->execute(); xRet.set( xRowSet, uno::UNO_QUERY ); } @@ -1960,7 +1960,7 @@ OUString SwDBManager::GetDBField(uno::Reference<beans::XPropertySet> const & xCo if(!xColumn.is()) return sRet; - uno::Any aType = xColumnProps->getPropertyValue("Type"); + uno::Any aType = xColumnProps->getPropertyValue(u"Type"_ustr); sal_Int32 eDataType = sdbc::DataType::SQLNULL; aType >>= eDataType; switch(eDataType) @@ -2151,7 +2151,7 @@ bool SwDBManager::FillCalcWithMergeData( SvNumberFormatter *pDocFormatter, uno::Any aCol = xCols->getByName( rColName ); uno::Reference<beans::XPropertySet> xColumnProps; aCol >>= xColumnProps; - uno::Any aType = xColumnProps->getPropertyValue( "Type" ); + uno::Any aType = xColumnProps->getPropertyValue( u"Type"_ustr ); aType >>= nColumnType; double aNumber = DBL_MAX; @@ -2722,21 +2722,21 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference uno::Reference<beans::XPropertySet> xDataProperties(xNewInstance, uno::UNO_QUERY); if (aURLAny.hasValue()) - xDataProperties->setPropertyValue("URL", aURLAny); + xDataProperties->setPropertyValue(u"URL"_ustr, aURLAny); if (aTableFilterAny.hasValue()) - xDataProperties->setPropertyValue("TableFilter", aTableFilterAny); + xDataProperties->setPropertyValue(u"TableFilter"_ustr, aTableFilterAny); if (aSuppressVersionsAny.hasValue()) - xDataProperties->setPropertyValue("SuppressVersionColumns", aSuppressVersionsAny); + xDataProperties->setPropertyValue(u"SuppressVersionColumns"_ustr, aSuppressVersionsAny); if (aInfoAny.hasValue()) - xDataProperties->setPropertyValue("Info", aInfoAny); + xDataProperties->setPropertyValue(u"Info"_ustr, aInfoAny); if (DBConnURIType::FLAT == type && pSettings) { - uno::Any aSettings = xDataProperties->getPropertyValue("Settings"); + uno::Any aSettings = xDataProperties->getPropertyValue(u"Settings"_ustr); uno::Reference < beans::XPropertySet > xDSSettings; aSettings >>= xDSSettings; ::comphelper::copyProperties(*pSettings, xDSSettings); - xDSSettings->setPropertyValue("Extension", uno::Any(sExt)); + xDSSettings->setPropertyValue(u"Extension"_ustr, uno::Any(sExt)); } uno::Reference<sdb::XDocumentDataSource> xDS(xNewInstance, uno::UNO_QUERY_THROW); @@ -2752,14 +2752,14 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference else { // Embed. - OUString aStreamRelPath = "EmbeddedDatabase"; + OUString aStreamRelPath = u"EmbeddedDatabase"_ustr; uno::Reference<embed::XStorage> xStorage = pDocShell->GetStorage(); // Refer to the sub-storage name in the document settings, so // we can load it again next time the file is imported. uno::Reference<lang::XMultiServiceFactory> xFactory(pDocShell->GetModel(), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::Any(aStreamRelPath)); + uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); + xPropertySet->setPropertyValue(u"EmbeddedDatabaseName"_ustr, uno::Any(aStreamRelPath)); // Store it only after setting the above property, so that only one data source gets registered. SwDBManager::StoreEmbeddedDataSource(xStore, xStorage, aStreamRelPath, aOwnURL); @@ -2807,7 +2807,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel sAllDataFilter.append(filter); } - xFP->appendFilter( sFilterAll, "*" ); + xFP->appendFilter( sFilterAll, u"*"_ustr ); xFP->appendFilter( sFilterAllData, sAllDataFilter.makeStringAndClear()); // Similar to sfx2::addExtension from sfx2/source/dialog/filtergrouping.cxx @@ -3116,14 +3116,14 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); if( xMgr.is() ) { - uno::Reference<uno::XInterface> xInstance = xMgr->createInstance("com.sun.star.sdb.RowSet"); + uno::Reference<uno::XInterface> xInstance = xMgr->createInstance(u"com.sun.star.sdb.RowSet"_ustr); uno::Reference<beans::XPropertySet> xRowSetPropSet(xInstance, uno::UNO_QUERY); if(xRowSetPropSet.is()) { - xRowSetPropSet->setPropertyValue("DataSourceName", uno::Any(_sDataSourceName)); - xRowSetPropSet->setPropertyValue("ActiveConnection", uno::Any(_xConnection)); - xRowSetPropSet->setPropertyValue("Command", uno::Any(_sCommand)); - xRowSetPropSet->setPropertyValue("CommandType", uno::Any(_nCommandType)); + xRowSetPropSet->setPropertyValue(u"DataSourceName"_ustr, uno::Any(_sDataSourceName)); + xRowSetPropSet->setPropertyValue(u"ActiveConnection"_ustr, uno::Any(_xConnection)); + xRowSetPropSet->setPropertyValue(u"Command"_ustr, uno::Any(_sCommand)); + xRowSetPropSet->setPropertyValue(u"CommandType"_ustr, uno::Any(_nCommandType)); uno::Reference< sdb::XCompletedExecution > xRowSet(xInstance, uno::UNO_QUERY); diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index 7b420d5f86db..fcac31282acb 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -20,11 +20,11 @@ #include <dbui.hxx> SaveMonitor::SaveMonitor(weld::Window *pParent) - : GenericDialogController(pParent, "modules/swriter/ui/savemonitordialog.ui", - "SaveMonitorDialog") - , m_xDocName(m_xBuilder->weld_label("docname")) - , m_xPrinter(m_xBuilder->weld_label("printer")) - , m_xPrintInfo(m_xBuilder->weld_label("printinfo")) + : GenericDialogController(pParent, u"modules/swriter/ui/savemonitordialog.ui"_ustr, + u"SaveMonitorDialog"_ustr) + , m_xDocName(m_xBuilder->weld_label(u"docname"_ustr)) + , m_xPrinter(m_xBuilder->weld_label(u"printer"_ustr)) + , m_xPrintInfo(m_xBuilder->weld_label(u"printinfo"_ustr)) { } @@ -33,10 +33,10 @@ SaveMonitor::~SaveMonitor() } PrintMonitor::PrintMonitor(weld::Window *pParent) - : GenericDialogController(pParent, "modules/swriter/ui/printmonitordialog.ui", - "PrintMonitorDialog") - , m_xPrinter(m_xBuilder->weld_label("printer")) - , m_xPrintInfo(m_xBuilder->weld_label("printinfo")) + : GenericDialogController(pParent, u"modules/swriter/ui/printmonitordialog.ui"_ustr, + u"PrintMonitorDialog"_ustr) + , m_xPrinter(m_xBuilder->weld_label(u"printer"_ustr)) + , m_xPrintInfo(m_xBuilder->weld_label(u"printinfo"_ustr)) { } @@ -46,14 +46,14 @@ PrintMonitor::~PrintMonitor() // Progress Indicator for Creation of personalized Mail Merge documents: CreateMonitor::CreateMonitor(weld::Window *pParent) - : GenericDialogController(pParent, "modules/swriter/ui/mmcreatingdialog.ui", - "MMCreatingDialog") + : GenericDialogController(pParent, u"modules/swriter/ui/mmcreatingdialog.ui"_ustr, + u"MMCreatingDialog"_ustr) , m_nTotalCount(0) , m_nCurrentPosition(0) - , m_xCounting(m_xBuilder->weld_label("progress")) + , m_xCounting(m_xBuilder->weld_label(u"progress"_ustr)) { m_sCountingPattern = m_xCounting->get_label(); - m_xCounting->set_label("..."); + m_xCounting->set_label(u"..."_ustr); } CreateMonitor::~CreateMonitor() diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index a82ba2c3d7fe..1facde9b3a3a 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -126,7 +126,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer( new SwConnectionContext( rConfigItem.GetInServerName(), rConfigItem.GetInServerPort(), - "Insecure"); + u"Insecure"_ustr); xInMailService->connect(xConnectionContext, xAuthenticator); rxInMailService = xInMailService; } @@ -153,7 +153,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer( new SwConnectionContext( rConfigItem.GetMailServer(), rConfigItem.GetMailPort(), - rConfigItem.IsSecureConnection() ? OUString("Ssl") : OUString("Insecure") ); + rConfigItem.IsSecureConnection() ? u"Ssl"_ustr : u"Insecure"_ustr ); xSmtpServer->connect(xConnectionContext, xAuthenticator); rxInMailService = xSmtpServer; } diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx index a6496a12c16b..ec2b86ba7157 100644 --- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx +++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx @@ -44,8 +44,8 @@ private: DECL_LINK(KeyInputHdl, const KeyEvent&, bool); public: CurrentEdit(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/swriter/ui/editbox.ui", "EditBox") - , m_xWidget(m_xBuilder->weld_entry("entry")) + : InterimItemWindow(pParent, u"modules/swriter/ui/editbox.ui"_ustr, u"EditBox"_ustr) + , m_xWidget(m_xBuilder->weld_entry(u"entry"_ustr)) { InitControlBase(m_xWidget.get()); @@ -114,7 +114,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "lo.writer.MMCurrentEntryController"; + return u"lo.writer.MMCurrentEntryController"_ustr; } virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override @@ -124,7 +124,7 @@ public: virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -145,8 +145,8 @@ private: DECL_LINK(KeyInputHdl, const KeyEvent&, bool); public: ExcludeCheckBox(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/swriter/ui/checkbox.ui", "CheckBox") - , m_xWidget(m_xBuilder->weld_check_button("checkbutton")) + : InterimItemWindow(pParent, u"modules/swriter/ui/checkbox.ui"_ustr, u"CheckBox"_ustr) + , m_xWidget(m_xBuilder->weld_check_button(u"checkbutton"_ustr)) { InitControlBase(m_xWidget.get()); @@ -206,7 +206,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "lo.writer.MMExcludeEntryController"; + return u"lo.writer.MMExcludeEntryController"_ustr; } virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override @@ -216,7 +216,7 @@ public: virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -266,7 +266,7 @@ IMPL_LINK(MMCurrentEntryController, CurrentEditUpdatedHdl, weld::Entry&, rEdit, { xConfigItem->MoveResultSet(nEntry); // notify about the change - dispatchCommand(".uno:MailMergeCurrentEntry", uno::Sequence<beans::PropertyValue>()); + dispatchCommand(u".uno:MailMergeCurrentEntry"_ustr, uno::Sequence<beans::PropertyValue>()); } return true; }; @@ -283,7 +283,7 @@ void MMCurrentEntryController::statusChanged(const frame::FeatureStateEvent& rEv if (!xConfigItem || !rEvent.IsEnabled) { m_xCurrentEdit->set_sensitive(false); - m_xCurrentEdit->set_text(""); + m_xCurrentEdit->set_text(u""_ustr); } else { diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index c8f89a44d4c0..efa53439bf40 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -184,7 +184,7 @@ public: }; SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : - ConfigItem("Office.Writer/MailMergeWizard", ConfigItemMode::NONE), + ConfigItem(u"Office.Writer/MailMergeWizard"_ustr, ConfigItemMode::NONE), m_nResultSetCursorPos(-1), m_nCurrentAddressBlock(0), m_bIsAddressBlock(true), @@ -420,46 +420,46 @@ static void lcl_ConvertFromNumbers(OUString& rBlock, const std::vector<std::pair const Sequence<OUString>& SwMailMergeConfigItem_Impl::GetPropertyNames() { static Sequence<OUString> aNames { - "OutputToLetter", // 0 - "IncludeCountry", // 1 - "ExcludeCountry", // 2 - "AddressBlockSettings", // 3 - "IsAddressBlock", // 4 - "IsGreetingLine", // 5 - "IsIndividualGreetingLine", // 6 - "FemaleGreetingLines", // 7 - "MaleGreetingLines", // 8 - "NeutralGreetingLines", // 9 - "CurrentFemaleGreeting", // 10 - "CurrentMaleGreeting", // 11 - "CurrentNeutralGreeting", // 12 - "FemaleGenderValue", // 13 - "MailDisplayName", // 14 - "MailAddress", // 15 - "IsMailReplyTo", // 16 - "MailReplyTo", // 17 - "MailServer", // 18 - "MailPort", // 19 - "IsSecureConnection", // 20 - "IsAuthentication", // 21 - "MailUserName", // 22 - "MailPassword", // 23 - "DataSource/DataSourceName", // 24 - "DataSource/DataTableName", // 25 - "DataSource/DataCommandType",// 26 - "Filter", // 27 - "SavedDocuments", // 28 - "EMailSupported", // 29 - "IsEMailGreetingLine", //30 - "IsEMailIndividualGreetingLine", //31 - "IsSMPTAfterPOP", //32 - "InServerName", //33 - "InServerPort", //34 - "InServerIsPOP", //35 - "InServerUserName", //36 - "InServerPassword", //37 - "IsHideEmptyParagraphs", //38 - "CurrentAddressBlock" //39 + u"OutputToLetter"_ustr, // 0 + u"IncludeCountry"_ustr, // 1 + u"ExcludeCountry"_ustr, // 2 + u"AddressBlockSettings"_ustr, // 3 + u"IsAddressBlock"_ustr, // 4 + u"IsGreetingLine"_ustr, // 5 + u"IsIndividualGreetingLine"_ustr, // 6 + u"FemaleGreetingLines"_ustr, // 7 + u"MaleGreetingLines"_ustr, // 8 + u"NeutralGreetingLines"_ustr, // 9 + u"CurrentFemaleGreeting"_ustr, // 10 + u"CurrentMaleGreeting"_ustr, // 11 + u"CurrentNeutralGreeting"_ustr, // 12 + u"FemaleGenderValue"_ustr, // 13 + u"MailDisplayName"_ustr, // 14 + u"MailAddress"_ustr, // 15 + u"IsMailReplyTo"_ustr, // 16 + u"MailReplyTo"_ustr, // 17 + u"MailServer"_ustr, // 18 + u"MailPort"_ustr, // 19 + u"IsSecureConnection"_ustr, // 20 + u"IsAuthentication"_ustr, // 21 + u"MailUserName"_ustr, // 22 + u"MailPassword"_ustr, // 23 + u"DataSource/DataSourceName"_ustr, // 24 + u"DataSource/DataTableName"_ustr, // 25 + u"DataSource/DataCommandType"_ustr,// 26 + u"Filter"_ustr, // 27 + u"SavedDocuments"_ustr, // 28 + u"EMailSupported"_ustr, // 29 + u"IsEMailGreetingLine"_ustr, //30 + u"IsEMailIndividualGreetingLine"_ustr, //31 + u"IsSMPTAfterPOP"_ustr, //32 + u"InServerName"_ustr, //33 + u"InServerPort"_ustr, //34 + u"InServerIsPOP"_ustr, //35 + u"InServerUserName"_ustr, //36 + u"InServerPassword"_ustr, //37 + u"IsHideEmptyParagraphs"_ustr, //38 + u"CurrentAddressBlock"_ustr //39 }; return aNames; } @@ -557,7 +557,7 @@ void SwMailMergeConfigItem_Impl::ImplCommit() OUString sNewNode = !rAssignment.sConfigNodeName.isEmpty() ? rAssignment.sConfigNodeName : lcl_CreateNodeName(aAssignments); - OUString sSlash = "/"; + OUString sSlash = u"/"_ustr; OUString sNodePath = cAddressDataAssignments + sSlash + sNewNode + sSlash; //only one new entry is written Sequence< PropertyValue > aNewValues @@ -853,17 +853,17 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const { Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); - Reference<XRowSet> xRowSet( xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY ); + Reference<XRowSet> xRowSet( xMgr->createInstance(u"com.sun.star.sdb.RowSet"_ustr), UNO_QUERY ); Reference<XPropertySet> xRowProperties(xRowSet, UNO_QUERY); - xRowProperties->setPropertyValue("DataSourceName", Any(m_pImpl->m_aDBData.sDataSource)); - xRowProperties->setPropertyValue("Command", Any(m_pImpl->m_aDBData.sCommand)); - xRowProperties->setPropertyValue("CommandType", Any(m_pImpl->m_aDBData.nCommandType)); - xRowProperties->setPropertyValue("FetchSize", Any(sal_Int32(10))); - xRowProperties->setPropertyValue("ActiveConnection", Any(m_pImpl->m_xConnection.getTyped())); + xRowProperties->setPropertyValue(u"DataSourceName"_ustr, Any(m_pImpl->m_aDBData.sDataSource)); + xRowProperties->setPropertyValue(u"Command"_ustr, Any(m_pImpl->m_aDBData.sCommand)); + xRowProperties->setPropertyValue(u"CommandType"_ustr, Any(m_pImpl->m_aDBData.nCommandType)); + xRowProperties->setPropertyValue(u"FetchSize"_ustr, Any(sal_Int32(10))); + xRowProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(m_pImpl->m_xConnection.getTyped())); try { - xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty())); - xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter)); + xRowProperties->setPropertyValue(u"ApplyFilter"_ustr, Any(!m_pImpl->m_sFilter.isEmpty())); + xRowProperties->setPropertyValue(u"Filter"_ustr, Any(m_pImpl->m_sFilter)); } catch (const Exception&) { @@ -909,8 +909,8 @@ void SwMailMergeConfigItem::SetFilter(OUString const & rFilter) try { - xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty())); - xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter)); + xRowProperties->setPropertyValue(u"ApplyFilter"_ustr, Any(!m_pImpl->m_sFilter.isEmpty())); + xRowProperties->setPropertyValue(u"Filter"_ustr, Any(m_pImpl->m_sFilter)); uno::Reference<XRowSet> xRowSet( m_pImpl->m_xResultSet, UNO_QUERY_THROW ); xRowSet->execute(); } diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx index bfe03c3e94df..a4fc7959ea38 100644 --- a/sw/source/uibase/dialog/watermarkdialog.cxx +++ b/sw/source/uibase/dialog/watermarkdialog.cxx @@ -32,23 +32,23 @@ static bool isLOKMobilePhone() } SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindings) - : SfxDialogController(pParent, "modules/swriter/ui/watermarkdialog.ui", "WatermarkDialog") + : SfxDialogController(pParent, u"modules/swriter/ui/watermarkdialog.ui"_ustr, u"WatermarkDialog"_ustr) , m_rBindings(rBindings) - , m_xTextInput(m_xBuilder->weld_entry("TextInput")) - , m_xOKButton(m_xBuilder->weld_button("ok")) - , m_xFont(m_xBuilder->weld_combo_box("FontBox")) - , m_xAngle(m_xBuilder->weld_metric_spin_button("Angle", FieldUnit::DEGREE)) - , m_xTransparency(m_xBuilder->weld_metric_spin_button("Transparency", FieldUnit::PERCENT)) - , m_xColor(new ColorListBox(m_xBuilder->weld_menu_button("Color"), [this]{ return m_xDialog.get(); })) + , m_xTextInput(m_xBuilder->weld_entry(u"TextInput"_ustr)) + , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xFont(m_xBuilder->weld_combo_box(u"FontBox"_ustr)) + , m_xAngle(m_xBuilder->weld_metric_spin_button(u"Angle"_ustr, FieldUnit::DEGREE)) + , m_xTransparency(m_xBuilder->weld_metric_spin_button(u"Transparency"_ustr, FieldUnit::PERCENT)) + , m_xColor(new ColorListBox(m_xBuilder->weld_menu_button(u"Color"_ustr), [this]{ return m_xDialog.get(); })) { InitFields(); if (isLOKMobilePhone()) { - m_xBuilder->weld_label("ColorLabel")->hide(); + m_xBuilder->weld_label(u"ColorLabel"_ustr)->hide(); m_xColor->hide(); - m_xBuilder->weld_button("cancel")->hide(); - m_xBuilder->weld_button("help")->hide(); + m_xBuilder->weld_button(u"cancel"_ustr)->hide(); + m_xBuilder->weld_button(u"help"_ustr)->hide(); } } @@ -117,7 +117,7 @@ IMPL_LINK_NOARG(SwWatermarkDialog, OKButtonHdl, weld::Button&, void) { "Transparency", css::uno::Any( static_cast<sal_Int16>( m_xTransparency->get_value(FieldUnit::PERCENT) ) ) }, { "Color", css::uno::Any( static_cast<sal_uInt32>( m_xColor->GetSelectEntryColor().GetRGBColor() ) ) } } ) ); - comphelper::dispatchCommand( ".uno:Watermark", aPropertyValues ); + comphelper::dispatchCommand( u".uno:Watermark"_ustr, aPropertyValues ); m_xDialog->response(RET_OK); } diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index dcc90033cd9b..c30defd08df8 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -705,7 +705,7 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName ) { std::shared_ptr<const SfxFilter> pFilter; SfxMedium aMed( rName, StreamMode::READ, nullptr, nullptr ); - SfxFilterMatcher aMatcher( "swriter" ); + SfxFilterMatcher aMatcher( u"swriter"_ustr ); aMed.UseInteractionHandler( true ); if (aMatcher.GuessFilter(aMed, pFilter, SfxFilterFlags::NONE) == ERRCODE_NONE) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index e1a82a48bd86..29e3d74984be 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -792,7 +792,7 @@ bool SwTransferable::WriteObject( SvStream& rOStream, case SWTRANSFER_OBJECTTYPE_HTML: { // LOK is interested in getting images embedded for copy/paste support. - GetHTMLWriter( comphelper::LibreOfficeKit::isActive() ? OUString("EmbedImages;NoPrettyPrint") : OUString(), OUString(), xWrt ); + GetHTMLWriter( comphelper::LibreOfficeKit::isActive() ? u"EmbedImages;NoPrettyPrint"_ustr : OUString(), OUString(), xWrt ); break; } @@ -846,7 +846,7 @@ int SwTransferable::Cut() int nRet = Copy( true ); if( nRet ) DeleteSelection(); - collectUIInformation("CUT", "parameter"); + collectUIInformation(u"CUT"_ustr, u"parameter"_ustr); return nRet; } @@ -1207,7 +1207,7 @@ int SwTransferable::Copy( bool bIsCut ) } if( !bIsCut ){ - collectUIInformation("COPY", "parameter"); + collectUIInformation(u"COPY"_ustr, u"parameter"_ustr); } return nRet; @@ -1611,7 +1611,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt bool bShifted = lcl_getLevel(aExpand, aExpand.indexOf("<thead")) == nTableLevel + 1; // calculate count of selected rows or columns sal_Int32 nSelectedRowsOrCols = 0; - const OUString sSearchRowOrCol = bRowMode ? OUString("</tr>") : OUString("<col "); + const OUString sSearchRowOrCol = bRowMode ? u"</tr>"_ustr : u"<col "_ustr; while((nIdx = aExpand.indexOf(sSearchRowOrCol, nIdx)) > -1) { // skip rows/columns of nested tables, based on HTML indentation @@ -1690,7 +1690,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt // while not in sot/ code. SwTransferable::SelectPasteFormat(rData, nAction, nFormat); - collectUIInformation("PASTE", "parameter"); + collectUIInformation(u"PASTE"_ustr, u"parameter"_ustr); return EXCHG_INOUT_ACTION_NONE != nAction && SwTransferable::PasteData( rData, rSh, nAction, nActionFlags, nFormat, @@ -2355,7 +2355,7 @@ bool SwTransferable::PasteOLE( const TransferableDataHelper& rData, SwWrtShell& embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard( xTmpStor, - "DummyName", + u"DummyName"_ustr, uno::Sequence< beans::PropertyValue >() ); // TODO/LATER: in future InsertedObjectInfo will be used to get container related information @@ -2374,7 +2374,7 @@ bool SwTransferable::PasteOLE( const TransferableDataHelper& rData, SwWrtShell& { // Copied from sd::View::DropInsertFileHdl uno::Sequence< beans::PropertyValue > aMedium{ comphelper::makePropertyValue( - "URL", sFile) }; + u"URL"_ustr, sFile) }; SwDocShell* pDocSh = rSh.GetDoc()->GetDocShell(); xObj = pDocSh->GetEmbeddedObjectContainer().InsertEmbeddedObject(aMedium, aName); } @@ -2626,7 +2626,7 @@ bool SwTransferable::PasteDDE( const TransferableDataHelper& rData, bool bRet = rData.GetGraphic( nFormat, aGrf ); if( bRet ) { - OUString sLnkTyp("DDE"); + OUString sLnkTyp(u"DDE"_ustr); if ( bReReadGrf ) rWrtShell.ReRead( aCmd, sLnkTyp, &aGrf ); else @@ -3115,7 +3115,7 @@ bool SwTransferable::PasteFileName( const TransferableDataHelper& rData, aMediaURL.SetSmartURL( sFile ); const OUString aMediaURLStr( aMediaURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); - if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, ""/*TODO?*/ ) ) + if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, u""_ustr/*TODO?*/ ) ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aMediaURLStr ); rSh.GetView().GetViewFrame().GetDispatcher()->ExecuteList( diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index 5e42d15c879e..345e57d4b084 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -69,29 +69,29 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, weld::Toggleable&, void) bool bReadOnly = IsReadOnly(); if (bReadOnly) { - mxMenuButton->set_item_visible("reply", false); - mxMenuButton->set_item_visible("sep1", false); // Separator after reply button. - mxMenuButton->set_item_visible("resolve", false); - mxMenuButton->set_item_visible("unresolve", false); - mxMenuButton->set_item_visible("resolvethread", false); - mxMenuButton->set_item_visible("unresolvethread", false); - mxMenuButton->set_item_visible("delete", false ); + mxMenuButton->set_item_visible(u"reply"_ustr, false); + mxMenuButton->set_item_visible(u"sep1"_ustr, false); // Separator after reply button. + mxMenuButton->set_item_visible(u"resolve"_ustr, false); + mxMenuButton->set_item_visible(u"unresolve"_ustr, false); + mxMenuButton->set_item_visible(u"resolvethread"_ustr, false); + mxMenuButton->set_item_visible(u"unresolvethread"_ustr, false); + mxMenuButton->set_item_visible(u"delete"_ustr, false ); } else { - mxMenuButton->set_item_visible("reply", !IsReadOnlyOrProtected()); - mxMenuButton->set_item_visible("sep1", !IsReadOnlyOrProtected()); - mxMenuButton->set_item_visible("resolve", !IsResolved()); - mxMenuButton->set_item_visible("unresolve", IsResolved()); - mxMenuButton->set_item_visible("resolvethread", !IsThreadResolved()); - mxMenuButton->set_item_visible("unresolvethread", IsThreadResolved()); - mxMenuButton->set_item_visible("delete", !IsReadOnlyOrProtected()); + mxMenuButton->set_item_visible(u"reply"_ustr, !IsReadOnlyOrProtected()); + mxMenuButton->set_item_visible(u"sep1"_ustr, !IsReadOnlyOrProtected()); + mxMenuButton->set_item_visible(u"resolve"_ustr, !IsResolved()); + mxMenuButton->set_item_visible(u"unresolve"_ustr, IsResolved()); + mxMenuButton->set_item_visible(u"resolvethread"_ustr, !IsThreadResolved()); + mxMenuButton->set_item_visible(u"unresolvethread"_ustr, IsThreadResolved()); + mxMenuButton->set_item_visible(u"delete"_ustr, !IsReadOnlyOrProtected()); } - mxMenuButton->set_item_visible("deletethread", !bReadOnly); - mxMenuButton->set_item_visible("deleteby", !bReadOnly); - mxMenuButton->set_item_visible("deleteall", !bReadOnly); - mxMenuButton->set_item_visible("formatall", !bReadOnly); + mxMenuButton->set_item_visible(u"deletethread"_ustr, !bReadOnly); + mxMenuButton->set_item_visible(u"deleteby"_ustr, !bReadOnly); + mxMenuButton->set_item_visible(u"deleteall"_ustr, !bReadOnly); + mxMenuButton->set_item_visible(u"formatall"_ustr, !bReadOnly); } IMPL_LINK(SwAnnotationWin, KeyInputHdl, const KeyEvent&, rKeyEvt, bool) diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index db54099486af..d30a160f31f8 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -92,7 +92,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, SwPostItMgr& aMgr, SwSidebarItem& rSidebarItem, SwFormatField* aField ) - : InterimItemWindow(&rEditWin, "modules/swriter/ui/annotation.ui", "Annotation") + : InterimItemWindow(&rEditWin, u"modules/swriter/ui/annotation.ui"_ustr, u"Annotation"_ustr) , mrMgr(aMgr) , mrView(rEditWin.GetView()) , mnDeleteEventId(nullptr) @@ -237,7 +237,7 @@ void SwAnnotationWin::SetResolved(bool resolved) mbResolvedStateUpdated = true; UpdateData(); Invalidate(); - collectUIInformation("SETRESOLVED",get_id()); + collectUIInformation(u"SETRESOLVED"_ustr,get_id()); } void SwAnnotationWin::ToggleResolved() @@ -343,7 +343,7 @@ void SwAnnotationWin::UpdateData() void SwAnnotationWin::Delete() { - collectUIInformation("DELETE",get_id()); + collectUIInformation(u"DELETE"_ustr,get_id()); SwWrtShell* pWrtShell = mrView.GetWrtShellPtr(); if (!(pWrtShell && pWrtShell->GotoField(*mpFormatField))) return; @@ -423,8 +423,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject const & rText) if (rText.GetTextObject().HasText(0)) GetOutlinerView()->GetEditView().InsertText(rText.GetTextObject()); else - GetOutlinerView()->InsertText("..."); - GetOutlinerView()->InsertText("\"\n"); + GetOutlinerView()->InsertText(u"..."_ustr); + GetOutlinerView()->InsertText(u"\"\n"_ustr); GetOutlinerView()->SetSelection(ESelection(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL)); SfxItemSet aAnswerSet( mrView.GetDocShell()->GetPool() ); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 378d35b174d4..debca6ca43a6 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -244,7 +244,7 @@ void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const Point& rPt) int x, y, width, height; mxMenuButton->get_extents_relative_to(*m_xContainer, x, y, width, height); Point aPos(rPt + PixelToLogic(Point(x, y))); - pDev->DrawText(aPos, "..."); + pDev->DrawText(aPos, u"..."_ustr); } pDev->Pop(); @@ -302,7 +302,7 @@ void SwAnnotationWin::ShowAnchorOnly(const Point &aPoint) void SwAnnotationWin::InitControls() { // window controls for author and date - mxMetadataAuthor = m_xBuilder->weld_label("author"); + mxMetadataAuthor = m_xBuilder->weld_label(u"author"_ustr); mxMetadataAuthor->set_accessible_name( SwResId( STR_ACCESS_ANNOTATION_AUTHOR_NAME ) ); mxMetadataAuthor->set_direction(AllSettings::GetLayoutRTL()); @@ -313,7 +313,7 @@ void SwAnnotationWin::InitControls() // with variable meta size height mxMetadataAuthor->set_font(maLabelFont); - mxMetadataDate = m_xBuilder->weld_label("date"); + mxMetadataDate = m_xBuilder->weld_label(u"date"_ustr); mxMetadataDate->set_accessible_name( SwResId( STR_ACCESS_ANNOTATION_DATE_NAME ) ); mxMetadataDate->set_direction(AllSettings::GetLayoutRTL()); mxMetadataDate->connect_mouse_move(LINK(this, SwAnnotationWin, MouseMoveHdl)); @@ -322,7 +322,7 @@ void SwAnnotationWin::InitControls() // with variable meta size height mxMetadataDate->set_font(maLabelFont); - mxMetadataResolved = m_xBuilder->weld_label("resolved"); + mxMetadataResolved = m_xBuilder->weld_label(u"resolved"_ustr); mxMetadataResolved->set_accessible_name( SwResId( STR_ACCESS_ANNOTATION_RESOLVED_NAME ) ); mxMetadataResolved->set_direction(AllSettings::GetLayoutRTL()); mxMetadataResolved->connect_mouse_move(LINK(this, SwAnnotationWin, MouseMoveHdl)); @@ -342,14 +342,14 @@ void SwAnnotationWin::InitControls() mpOutliner->InsertView(mpOutlinerView.get()); //create Scrollbars - mxVScrollbar = m_xBuilder->weld_scrolled_window("scrolledwindow", true); + mxVScrollbar = m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true); - mxMenuButton = m_xBuilder->weld_menu_button("menubutton"); + mxMenuButton = m_xBuilder->weld_menu_button(u"menubutton"_ustr); mxMenuButton->set_size_request(METABUTTON_WIDTH, METABUTTON_HEIGHT); // actual window which holds the user text mxSidebarTextControl.reset(new SidebarTextControl(*this, mrView, mrMgr)); - mxSidebarTextControlWin.reset(new weld::CustomWeld(*m_xBuilder, "editview", *mxSidebarTextControl)); + mxSidebarTextControlWin.reset(new weld::CustomWeld(*m_xBuilder, u"editview"_ustr, *mxSidebarTextControl)); mxSidebarTextControl->SetPointer(PointerStyle::Text); Rescale(); @@ -390,11 +390,11 @@ void SwAnnotationWin::InitControls() CheckMetaText(); // expand %1 "Author" - OUString aText = mxMenuButton->get_item_label("deleteby"); + OUString aText = mxMenuButton->get_item_label(u"deleteby"_ustr); SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, GetAuthor()); aText = aRewriter.Apply(aText); - mxMenuButton->set_item_label("deleteby", aText); + mxMenuButton->set_item_label(u"deleteby"_ustr, aText); mxMenuButton->set_accessible_name(SwResId(STR_ACCESS_ANNOTATION_BUTTON_NAME)); mxMenuButton->set_accessible_description(SwResId(STR_ACCESS_ANNOTATION_BUTTON_DESC)); @@ -945,7 +945,7 @@ void SwAnnotationWin::ShowNote() if (mpTextRangeOverlay && !mpTextRangeOverlay->isVisible()) mpTextRangeOverlay->setVisible(true); - collectUIInformation("SHOW",get_id()); + collectUIInformation(u"SHOW"_ustr,get_id()); } void SwAnnotationWin::HideNote() @@ -963,7 +963,7 @@ void SwAnnotationWin::HideNote() mpShadow->setVisible(false); if (mpTextRangeOverlay && mpTextRangeOverlay->isVisible()) mpTextRangeOverlay->setVisible(false); - collectUIInformation("HIDE",get_id()); + collectUIInformation(u"HIDE"_ustr,get_id()); } void SwAnnotationWin::ActivatePostIt() @@ -1388,7 +1388,7 @@ void SwAnnotationWin::SwitchToFieldPos() if (aCount) mrView.GetDocShell()->GetWrtShell()->SwCursorShell::Right(aCount, SwCursorSkipMode::Chars); GrabFocusToDocument(); - collectUIInformation("LEAVE",get_id()); + collectUIInformation(u"LEAVE"_ustr,get_id()); } void SwAnnotationWin::SetChangeTracking( const SwPostItHelper::SwLayoutStatus aLayoutStatus, diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 8035c73cebc3..c20c39dcb6e4 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -227,9 +227,9 @@ void SwHeaderFooterDashedLine::SetOffset(Point aOffset, tools::Long nXLineStart, } SwHeaderFooterWin::SwHeaderFooterWin(SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) : - InterimItemWindow(pEditWin, "modules/swriter/ui/hfmenubutton.ui", "HFMenuButton"), - m_xMenuButton(m_xBuilder->weld_menu_button("menubutton")), - m_xPushButton(m_xBuilder->weld_button("button")), + InterimItemWindow(pEditWin, u"modules/swriter/ui/hfmenubutton.ui"_ustr, u"HFMenuButton"_ustr), + m_xMenuButton(m_xBuilder->weld_menu_button(u"menubutton"_ustr)), + m_xPushButton(m_xBuilder->weld_button(u"button"_ustr)), m_pEditWin(pEditWin), m_pFrame(pFrame), m_bIsHeader( bHeader ), @@ -247,13 +247,13 @@ SwHeaderFooterWin::SwHeaderFooterWin(SwEditWin* pEditWin, const SwFrame *pFrame, // Rewrite the menu entries' text if (m_bIsHeader) { - m_xMenuButton->set_item_label("edit", SwResId(STR_FORMAT_HEADER)); - m_xMenuButton->set_item_label("delete", SwResId(STR_DELETE_HEADER)); + m_xMenuButton->set_item_label(u"edit"_ustr, SwResId(STR_FORMAT_HEADER)); + m_xMenuButton->set_item_label(u"delete"_ustr, SwResId(STR_DELETE_HEADER)); } else { - m_xMenuButton->set_item_label("edit", SwResId(STR_FORMAT_FOOTER)); - m_xMenuButton->set_item_label("delete", SwResId(STR_DELETE_FOOTER)); + m_xMenuButton->set_item_label(u"edit"_ustr, SwResId(STR_FORMAT_FOOTER)); + m_xMenuButton->set_item_label(u"delete"_ustr, SwResId(STR_DELETE_FOOTER)); } m_aFadeTimer.SetTimeout(50); @@ -483,7 +483,7 @@ void SwHeaderFooterWin::ExecuteCommand(std::u16string_view rIdent) const OUString& rStyleName = pPageFrame->GetPageDesc()->GetName(); if (rIdent == u"edit") { - OUString sPageId = m_bIsHeader ? OUString("header") : OUString("footer"); + OUString sPageId = m_bIsHeader ? u"header"_ustr : u"footer"_ustr; rView.GetDocShell()->FormatPage(rView.GetFrameWeld(), rStyleName, sPageId, rSh); } else if (rIdent == u"borderback") diff --git a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx index b7a21add98be..eebc0e905f14 100644 --- a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx +++ b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx @@ -26,9 +26,10 @@ SwOutlineContentVisibilityWin::SwOutlineContentVisibilityWin(SwEditWin* pEditWin, const SwFrame* pFrame) - : InterimItemWindow(pEditWin, "modules/swriter/ui/outlinebutton.ui", "OutlineButton") - , m_xShowBtn(m_xBuilder->weld_button("show")) - , m_xHideBtn(m_xBuilder->weld_button("hide")) + : InterimItemWindow(pEditWin, u"modules/swriter/ui/outlinebutton.ui"_ustr, + u"OutlineButton"_ustr) + , m_xShowBtn(m_xBuilder->weld_button(u"show"_ustr)) + , m_xHideBtn(m_xBuilder->weld_button(u"hide"_ustr)) , m_pEditWin(pEditWin) , m_pFrame(pFrame) , m_nDelayAppearing(0) diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index c71dc62ecc3a..41aca8454d7a 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -64,7 +64,7 @@ SwBreakDashedLine::SwBreakDashedLine(SwEditWin* pEditWin, const SwFrame *pFrame) , m_pEditWin(pEditWin) , m_pFrame(pFrame) { - set_id("PageBreak"); // for uitest + set_id(u"PageBreak"_ustr); // for uitest } SwPageBreakWin& SwBreakDashedLine::GetOrCreateWin() @@ -123,8 +123,8 @@ bool SwBreakDashedLine::Contains(const Point &rDocPt) const } SwPageBreakWin::SwPageBreakWin(SwBreakDashedLine* pLine, SwEditWin* pEditWin, const SwFrame *pFrame) : - InterimItemWindow(pEditWin, "modules/swriter/ui/pbmenubutton.ui", "PBMenuButton"), - m_xMenuButton(m_xBuilder->weld_menu_button("menubutton")), + InterimItemWindow(pEditWin, u"modules/swriter/ui/pbmenubutton.ui"_ustr, u"PBMenuButton"_ustr), + m_xMenuButton(m_xBuilder->weld_menu_button(u"menubutton"_ustr)), m_pLine(pLine), m_pEditWin(pEditWin), m_pFrame(pFrame), @@ -312,7 +312,7 @@ void SwBreakDashedLine::execute(std::u16string_view rIdent) rSh.SetSelection( SwPaM(rNd) ); - SfxStringItem aItem(m_pEditWin->GetView().GetPool().GetWhichIDFromSlotID(FN_FORMAT_TABLE_DLG), "textflow"); + SfxStringItem aItem(m_pEditWin->GetView().GetPool().GetWhichIDFromSlotID(FN_FORMAT_TABLE_DLG), u"textflow"_ustr); m_pEditWin->GetView().GetViewFrame().GetDispatcher()->ExecuteList( FN_FORMAT_TABLE_DLG, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, @@ -324,7 +324,7 @@ void SwBreakDashedLine::execute(std::u16string_view rIdent) { SwPaM aPaM( rNd ); SwPaMItem aPaMItem( m_pEditWin->GetView().GetPool( ).GetWhichIDFromSlotID( FN_PARAM_PAM ), &aPaM ); - SfxStringItem aItem( SID_PARA_DLG, "textflow" ); + SfxStringItem aItem( SID_PARA_DLG, u"textflow"_ustr ); m_pEditWin->GetView().GetViewFrame().GetDispatcher()->ExecuteList( SID_PARA_DLG, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, diff --git a/sw/source/uibase/docvw/UnfloatTableButton.cxx b/sw/source/uibase/docvw/UnfloatTableButton.cxx index c9169102f14e..d5331aeec3ee 100644 --- a/sw/source/uibase/docvw/UnfloatTableButton.cxx +++ b/sw/source/uibase/docvw/UnfloatTableButton.cxx @@ -46,9 +46,9 @@ #define BUTTON_WIDTH 12 UnfloatTableButton::UnfloatTableButton(SwEditWin* pEditWin, const SwFrame* pFrame) - : SwFrameMenuButtonBase(pEditWin, pFrame, "modules/swriter/ui/unfloatbutton.ui", - "UnfloatButton") - , m_xPushButton(m_xBuilder->weld_button("button")) + : SwFrameMenuButtonBase(pEditWin, pFrame, u"modules/swriter/ui/unfloatbutton.ui"_ustr, + u"UnfloatButton"_ustr) + , m_xPushButton(m_xBuilder->weld_button(u"button"_ustr)) , m_sLabel(SwResId(STR_UNFLOAT_TABLE)) { m_xPushButton->set_accessible_name(m_sLabel); @@ -137,7 +137,7 @@ IMPL_LINK_NOARG(UnfloatTableButton, ClickHdl, weld::Button&, void) if (const SfxGrabBagItem* pGrabBagItem = pTableFormat->GetAttrSet().GetItem(RES_FRMATR_GRABBAG)) { SfxGrabBagItem aGrabBagItem(*pGrabBagItem); // Editable copy - if (aGrabBagItem.GetGrabBag().erase("TablePosition")) + if (aGrabBagItem.GetGrabBag().erase(u"TablePosition"_ustr)) { css::uno::Any aVal; aGrabBagItem.QueryValue(aVal); diff --git a/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx b/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx index a22deda2d4ee..67d83ed35a29 100644 --- a/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx +++ b/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx @@ -32,9 +32,10 @@ SwContentControlAliasButton::SwContentControlAliasButton(SwEditWin* pEditWin, SwContentControl* pContentControl) - : SwFrameMenuButtonBase(pEditWin, nullptr, "modules/swriter/ui/contentcontrolaliasbutton.ui", - "ContentControlAliasButton") - , m_xPushButton(m_xBuilder->weld_button("button")) + : SwFrameMenuButtonBase(pEditWin, nullptr, + u"modules/swriter/ui/contentcontrolaliasbutton.ui"_ustr, + u"ContentControlAliasButton"_ustr) + , m_xPushButton(m_xBuilder->weld_button(u"button"_ustr)) , m_sLabel(pContentControl->GetAlias()) { m_xPushButton->set_accessible_name(m_sLabel); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 3752d4a418f4..8c41e02a98bc 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5481,7 +5481,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_nKS_NUMINDENTINC_Count(0), m_pFrameControlsManager(new SwFrameControlsManager(this)) { - set_id("writer_edit"); + set_id(u"writer_edit"_ustr); SetHelpId(HID_EDIT_WIN); EnableChildTransparentMode(); SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus ); @@ -5720,7 +5720,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) aEvent.ExecutePosition.Y = aPixPos.Y(); rtl::Reference<VCLXPopupMenu> xMenu; rtl::Reference<VCLXPopupMenu> xMenuInterface = aROPopup.CreateMenuInterface(); - if (GetView().TryContextMenuInterception(xMenuInterface, "private:resource/ReadonlyContextMenu", xMenu, aEvent)) + if (GetView().TryContextMenuInterception(xMenuInterface, u"private:resource/ReadonlyContextMenu"_ustr, xMenu, aEvent)) { if (xMenu.is()) { diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 4107d2a05c0b..24f801f88cb5 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -142,7 +142,7 @@ bool PSCSDFPropsQuickHelp(const HelpEvent &rEvt, SwWrtShell& rSh) { // check if in CS formatting highlighted area OUString sCharStyle; - xRange->getPropertyValue("CharStyleName") >>= sCharStyle; + xRange->getPropertyValue(u"CharStyleName"_ustr) >>= sCharStyle; if (!sCharStyle.isEmpty()) sText = SwStyleNameMapper::GetUIName(sCharStyle, SwGetPoolIdFromName::ChrFmt); } @@ -217,7 +217,7 @@ bool PSCSDFPropsQuickHelp(const HelpEvent &rEvt, SwWrtShell& rSh) if (aFrameAreaRect.Contains(aPt)) { OUString sParaStyle; - xRange->getPropertyValue("ParaStyleName") >>= sParaStyle; + xRange->getPropertyValue(u"ParaStyleName"_ustr) >>= sParaStyle; sText = SwStyleNameMapper::GetUIName(sParaStyle, SwGetPoolIdFromName::TxtColl); // check for paragraph direct formatting if (SwDoc::HasParagraphDirectFormatting(aPos)) diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 7baea26be154..fb8d20d0e525 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -73,7 +73,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher con #define MN_READONLY_BACKGROUNDTOGALLERY 2000 SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView &rV) - : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/readonlymenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), u"modules/swriter/ui/readonlymenu.ui"_ustr, u""_ustr) , m_xMenu(m_aBuilder.get_menu(u"menu")) , m_nReadonlyOpenurl(m_xMenu->GetItemId(u"openurl")) , m_nReadonlyOpendoc(m_xMenu->GetItemId(u"opendoc")) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index b4196d97f1bf..8fd5e2f3b797 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -252,7 +252,7 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ) std::unique_lock g(mutex_); m_xNotifier = n; } - n->addPropertiesChangeListener({ "FontHeight", "FontName" }, m_xListener); + n->addPropertiesChangeListener({ u"FontHeight"_ustr, u"FontName"_ustr }, m_xListener); } SwSrcEditWindow::~SwSrcEditWindow() diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index b36cfdfa51f3..ddbee828fba0 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -150,7 +150,7 @@ SwEnvItem* SwEnvItem::Clone(SfxItemPool*) const } SwEnvCfgItem::SwEnvCfgItem() : - ConfigItem("Office.Writer/Envelope") + ConfigItem(u"Office.Writer/Envelope"_ustr) { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index f974a3e799db..c103439bc674 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -69,9 +69,9 @@ static Sequence<OUString> lcl_CreatePropertyNames(const OUString& rPrefix) } SwLabelConfig::SwLabelConfig() : - ConfigItem("Office.Labels/Manufacturer") + ConfigItem(u"Office.Labels/Manufacturer"_ustr) { - OUString uri("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/labels/labels.xml"); + OUString uri(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/labels/labels.xml"_ustr); rtl::Bootstrap::expandMacros(uri); xmlreader::XmlReader reader(uri); int nsId; @@ -210,7 +210,7 @@ static Sequence<PropertyValue> lcl_CreateProperties( const OUString* pNames = rPropNames.getConstArray(); Sequence<PropertyValue> aRet(rPropNames.getLength()); PropertyValue* pValues = aRet.getArray(); - OUString sColon(";"); + OUString sColon(u";"_ustr); for(sal_Int32 nProp = 0; nProp < rPropNames.getLength(); nProp++) { @@ -283,7 +283,7 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer, // type does not yet exist, add to config const Sequence<OUString> aLabels = GetNodeNames( rManufacturer ); sal_Int32 nIndex = aLabels.getLength(); - OUString sPrefix( "Label" ); + OUString sPrefix( u"Label"_ustr ); sFoundNode = sPrefix + OUString::number( nIndex ); while ( comphelper::findValue(aLabels, sFoundNode) != -1 ) { diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index b87f9bf5fb29..aab428d59426 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -257,7 +257,7 @@ Sequence<OUString> SwLabCfgItem::GetPropertyNames() const } SwLabCfgItem::SwLabCfgItem(bool bLabel) : - ConfigItem(bLabel ? OUString("Office.Writer/Label") : OUString("Office.Writer/BusinessCard")), + ConfigItem(bLabel ? u"Office.Writer/Label"_ustr : u"Office.Writer/BusinessCard"_ustr), m_bIsLabel(bLabel) { Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx index 715d769633f0..5fd3bfa71914 100644 --- a/sw/source/uibase/envelp/syncbtn.cxx +++ b/sw/source/uibase/envelp/syncbtn.cxx @@ -67,8 +67,8 @@ SwSyncChildWin::SwSyncChildWin(vcl::Window* _pParent, SwSyncBtnDlg::SwSyncBtnDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window *pParent) - : SfxModelessDialogController(pBindings, pChild, pParent, "modules/swriter/ui/floatingsync.ui", "FloatingSync") - , m_xSyncBtn(m_xBuilder->weld_button("sync")) + : SfxModelessDialogController(pBindings, pChild, pParent, u"modules/swriter/ui/floatingsync.ui"_ustr, u"FloatingSync"_ustr) + , m_xSyncBtn(m_xBuilder->weld_button(u"sync"_ustr)) { m_xSyncBtn->connect_clicked(LINK(this, SwSyncBtnDlg, BtnHdl)); } diff --git a/sw/source/uibase/fldui/xfldui.cxx b/sw/source/uibase/fldui/xfldui.cxx index 711276d59ad7..41f072418f52 100644 --- a/sw/source/uibase/fldui/xfldui.cxx +++ b/sw/source/uibase/fldui/xfldui.cxx @@ -123,7 +123,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry Any aCol = xCols->getByName(rFieldName); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue("Type"); + Any aType = xCol->getPropertyValue(u"Type"_ustr); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) diff --git a/sw/source/uibase/globdoc/globdoc.cxx b/sw/source/uibase/globdoc/globdoc.cxx index 283b5a016a45..bd067a528f2a 100644 --- a/sw/source/uibase/globdoc/globdoc.cxx +++ b/sw/source/uibase/globdoc/globdoc.cxx @@ -29,7 +29,7 @@ // Description: Register all filters -SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), "swriter/GlobalDocument" ) +SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), u"swriter/GlobalDocument"_ustr ) SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) : SwDocShell(eMode) diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx index 05d181a88623..63d691152eeb 100644 --- a/sw/source/uibase/inc/inputwin.hxx +++ b/sw/source/uibase/inc/inputwin.hxx @@ -42,8 +42,8 @@ private: DECL_LINK(ActivateHdl, weld::Entry&, bool); public: InputEdit(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/swriter/ui/inputeditbox.ui", "InputEditBox") - , m_xWidget(m_xBuilder->weld_entry("entry")) + : InterimItemWindow(pParent, u"modules/swriter/ui/inputeditbox.ui"_ustr, u"InputEditBox"_ustr) + , m_xWidget(m_xBuilder->weld_entry(u"entry"_ustr)) { InitControlBase(m_xWidget.get()); @@ -113,8 +113,8 @@ private: DECL_LINK(KeyInputHdl, const KeyEvent&, bool); public: PosEdit(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/swriter/ui/poseditbox.ui", "PosEditBox") - , m_xWidget(m_xBuilder->weld_entry("entry")) + : InterimItemWindow(pParent, u"modules/swriter/ui/poseditbox.ui"_ustr, u"PosEditBox"_ustr) + , m_xWidget(m_xBuilder->weld_entry(u"entry"_ustr)) { InitControlBase(m_xWidget.get()); diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index a979ce3f045e..e0398265c4b8 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -199,7 +199,7 @@ SwSpellPopup::SwSpellPopup( SwWrtShell* pWrtSh, uno::Reference< linguistic2::XSpellAlternatives > xAlt, const OUString &rParaText) - : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), u"modules/swriter/ui/spellmenu.ui"_ustr, u""_ustr) , m_xPopupMenu(m_aBuilder.get_menu(u"menu")) , m_nIgnoreWordId(m_xPopupMenu->GetItemId(u"ignoreall")) , m_nAddMenuId(m_xPopupMenu->GetItemId(u"addmenu")) @@ -275,12 +275,12 @@ SwSpellPopup::SwSpellPopup( OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); { - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:SpellingAndGrammarDialog", aModuleName); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:SpellingAndGrammarDialog"_ustr, aModuleName); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties)); } { - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AutoCorrectDlg", aModuleName); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:AutoCorrectDlg"_ustr, aModuleName); m_xPopupMenu->SetItemText(m_nCorrectDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties)); } @@ -376,7 +376,7 @@ SwSpellPopup::SwSpellPopup( aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use - OUString aCurrentLang("*"); + OUString aCurrentLang(u"*"_ustr); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); @@ -397,7 +397,7 @@ SwSpellPopup::SwSpellPopup( if (bUseImagesInMenus) m_xPopupMenu->SetItemImage(m_nSpellDialogId, - vcl::CommandInfoProvider::GetImageForCommand(".uno:SpellingAndGrammarDialog", xFrame)); + vcl::CommandInfoProvider::GetImageForCommand(u".uno:SpellingAndGrammarDialog"_ustr, xFrame)); checkRedline(); m_xPopupMenu->RemoveDisabledEntries( true ); @@ -411,7 +411,7 @@ SwSpellPopup::SwSpellPopup( sal_Int32 nErrorInResult, const uno::Sequence< OUString > &rSuggestions, const OUString &rParaText ) - : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), u"modules/swriter/ui/spellmenu.ui"_ustr, u""_ustr) , m_xPopupMenu(m_aBuilder.get_menu(u"menu")) , m_nIgnoreWordId(m_xPopupMenu->GetItemId(u"ignoreall")) , m_nAddMenuId(m_xPopupMenu->GetItemId(u"addmenu")) @@ -492,7 +492,7 @@ SwSpellPopup::SwSpellPopup( OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) ); - auto aCommandProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:SpellingAndGrammarDialog", aModuleName); + auto aCommandProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:SpellingAndGrammarDialog"_ustr, aModuleName); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aCommandProperties)); sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId); @@ -533,7 +533,7 @@ SwSpellPopup::SwSpellPopup( aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use - OUString aCurrentLang("*"); + OUString aCurrentLang(u"*"_ustr); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); @@ -554,7 +554,7 @@ SwSpellPopup::SwSpellPopup( if (bUseImagesInMenus) m_xPopupMenu->SetItemImage(m_nSpellDialogId, - vcl::CommandInfoProvider::GetImageForCommand(".uno:SpellingAndGrammarDialog", xFrame)); + vcl::CommandInfoProvider::GetImageForCommand(u".uno:SpellingAndGrammarDialog"_ustr, xFrame)); checkRedline(); m_xPopupMenu->RemoveDisabledEntries(true); @@ -572,21 +572,21 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge return; // None is added only for LOK, it means there is no need to execute anything - m_xPopupMenu->SetItemCommand(MN_SHORT_COMMENT, ".uno:None"); - m_xPopupMenu->SetItemCommand(m_nSpellDialogId, ".uno:SpellingAndGrammarDialog"); + m_xPopupMenu->SetItemCommand(MN_SHORT_COMMENT, u".uno:None"_ustr); + m_xPopupMenu->SetItemCommand(m_nSpellDialogId, u".uno:SpellingAndGrammarDialog"_ustr); if(m_bGrammarResults) - m_xPopupMenu->SetItemCommand(m_nIgnoreWordId, ".uno:SpellCheckIgnoreAll?Type:string=Grammar"); + m_xPopupMenu->SetItemCommand(m_nIgnoreWordId, u".uno:SpellCheckIgnoreAll?Type:string=Grammar"_ustr); else - m_xPopupMenu->SetItemCommand(m_nIgnoreWordId, ".uno:SpellCheckIgnoreAll?Type:string=Spelling"); + m_xPopupMenu->SetItemCommand(m_nIgnoreWordId, u".uno:SpellCheckIgnoreAll?Type:string=Spelling"_ustr); if(m_bGrammarResults) - m_xPopupMenu->SetItemCommand(MN_IGNORE_SELECTION, ".uno:SpellCheckIgnore?Type:string=Grammar"); + m_xPopupMenu->SetItemCommand(MN_IGNORE_SELECTION, u".uno:SpellCheckIgnore?Type:string=Grammar"_ustr); else - m_xPopupMenu->SetItemCommand(MN_IGNORE_SELECTION, ".uno:SpellCheckIgnore?Type:string=Spelling"); + m_xPopupMenu->SetItemCommand(MN_IGNORE_SELECTION, u".uno:SpellCheckIgnore?Type:string=Spelling"_ustr); for(int i = 0; i < aSuggestions.getLength(); ++i) { sal_uInt16 nItemId = MN_SUGGESTION_START + i; - OUString sCommandString = ".uno:SpellCheckApplySuggestion?ApplyRule:string="; + OUString sCommandString = u".uno:SpellCheckApplySuggestion?ApplyRule:string="_ustr; if(m_bGrammarResults) sCommandString += "Grammar_"; else if (m_xSpellAlt.is()) @@ -596,7 +596,7 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge } PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId); - m_xPopupMenu->SetItemCommand(m_nLangSelectionMenuId, ".uno:SetSelectionLanguageMenu"); + m_xPopupMenu->SetItemCommand(m_nLangSelectionMenuId, u".uno:SetSelectionLanguageMenu"_ustr); if(pMenu) { for (const auto& item : m_aLangTable_Text) @@ -605,13 +605,13 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge pMenu->SetItemCommand(item.first, sCommandString); } - pMenu->SetItemCommand(MN_SET_SELECTION_NONE, ".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"); - pMenu->SetItemCommand(MN_SET_SELECTION_RESET, ".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES"); - pMenu->SetItemCommand(MN_SET_SELECTION_MORE, ".uno:FontDialog?Page:string=font"); + pMenu->SetItemCommand(MN_SET_SELECTION_NONE, u".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"_ustr); + pMenu->SetItemCommand(MN_SET_SELECTION_RESET, u".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES"_ustr); + pMenu->SetItemCommand(MN_SET_SELECTION_MORE, u".uno:FontDialog?Page:string=font"_ustr); } pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId); - m_xPopupMenu->SetItemCommand(m_nLangParaMenuId, ".uno:SetParagraphLanguageMenu"); + m_xPopupMenu->SetItemCommand(m_nLangParaMenuId, u".uno:SetParagraphLanguageMenu"_ustr); if(pMenu) { for (const auto& item : m_aLangTable_Paragraph) @@ -620,9 +620,9 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge pMenu->SetItemCommand(item.first, sCommandString); } - pMenu->SetItemCommand(MN_SET_PARA_NONE, ".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"); - pMenu->SetItemCommand(MN_SET_PARA_RESET, ".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES"); - pMenu->SetItemCommand(MN_SET_PARA_MORE, ".uno:FontDialogForParagraph"); + pMenu->SetItemCommand(MN_SET_PARA_NONE, u".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"_ustr); + pMenu->SetItemCommand(MN_SET_PARA_RESET, u".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES"_ustr); + pMenu->SetItemCommand(MN_SET_PARA_MORE, u".uno:FontDialogForParagraph"_ustr); } } @@ -680,7 +680,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) if (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) { - OUString sApplyRule(""); + OUString sApplyRule(u""_ustr); if(m_bGrammarResults) sApplyRule += "Grammar_"; else if (m_xSpellAlt.is()) @@ -761,12 +761,12 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_IGNORE_SELECTION) { - SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? OUString("Grammar") : OUString("Spelling")); + SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? u"Grammar"_ustr : u"Spelling"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE, SfxCallMode::SYNCHRON, { &aIgnoreString }); } else if (nId == m_nIgnoreWordId) { - SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? OUString("Grammar") : OUString("Spelling")); + SfxStringItem aIgnoreString(FN_PARAM_1, m_bGrammarResults ? u"Grammar"_ustr : u"Spelling"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_SPELLCHECK_IGNORE_ALL, SfxCallMode::SYNCHRON, { &aIgnoreString }); } else if ((MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) || nId == m_nAddId) @@ -817,7 +817,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) const SolarMutexGuard guard; std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_pSh->GetView().GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, msg)); - xBox->set_title("Explanations"); + xBox->set_title(u"Explanations"_ustr); xBox->run(); } } @@ -845,17 +845,17 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_SET_SELECTION_NONE) { - SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_LANGUAGE_NONE"); + SfxStringItem aLangString(SID_LANGUAGE_STATUS, u"Current_LANGUAGE_NONE"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_SELECTION_RESET) { - SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_RESET_LANGUAGES"); + SfxStringItem aLangString(SID_LANGUAGE_STATUS, u"Current_RESET_LANGUAGES"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_SELECTION_MORE) { - SfxStringItem aDlgString(FN_PARAM_1, "font"); + SfxStringItem aDlgString(FN_PARAM_1, u"font"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_CHAR_DLG, SfxCallMode::SYNCHRON, { &aDlgString }); } else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END) @@ -865,12 +865,12 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_SET_PARA_NONE) { - SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_LANGUAGE_NONE"); + SfxStringItem aLangString(SID_LANGUAGE_STATUS, u"Paragraph_LANGUAGE_NONE"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_PARA_RESET) { - SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_RESET_LANGUAGES"); + SfxStringItem aLangString(SID_LANGUAGE_STATUS, u"Paragraph_RESET_LANGUAGES"_ustr); m_pSh->GetView().GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_PARA_MORE) diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 7047fb6b6b0e..f2d896f3af7b 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -90,7 +90,7 @@ OUString lcl_CheckFileName( const OUString& rNewFilePath, // supplies the default group's name OUString SwGlossaries::GetDefName() { - return "standard"; + return u"standard"_ustr; } @@ -417,7 +417,7 @@ void SwGlossaries::ShowError() OUString SwGlossaries::GetExtension() { - return ".bau"; + return u".bau"_ustr; } void SwGlossaries::RemoveFileFromList( const OUString& rGroup ) diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 6badb7778db6..9a5a144b4426 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -81,8 +81,8 @@ bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh) SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg( SfxBindings* _pBindings, SwChildWinWrapper* pChild, weld::Window *pParent) : SfxModelessDialogController(_pBindings, pChild, pParent, - "svx/ui/acceptrejectchangesdialog.ui", "AcceptRejectChangesDialog") - , m_xContentArea(m_xBuilder->weld_container("container")) + u"svx/ui/acceptrejectchangesdialog.ui"_ustr, u"AcceptRejectChangesDialog"_ustr) + , m_xContentArea(m_xBuilder->weld_container(u"container"_ustr)) , m_pChildWin(pChild) { m_xImplDlg.reset(new SwRedlineAcceptDlg(m_xDialog, m_xBuilder.get(), m_xContentArea.get())); @@ -159,8 +159,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(std::shared_ptr<weld::Window> xParent, we , m_bInhibitActivate(false) , m_bHasTrackedColumn(false) , m_xTabPagesCTRL(new SvxAcceptChgCtr(pContentArea)) - , m_xPopup(pBuilder->weld_menu("writermenu")) - , m_xSortMenu(pBuilder->weld_menu("writersortmenu")) + , m_xPopup(pBuilder->weld_menu(u"writermenu"_ustr)) + , m_xSortMenu(pBuilder->weld_menu(u"writersortmenu"_ustr)) { m_pTPView = m_xTabPagesCTRL->GetViewPage(); @@ -1321,10 +1321,10 @@ IMPL_LINK(SwRedlineAcceptDlg, CommandHdl, const CommandEvent&, rCEvt, bool) } } - m_xPopup->set_sensitive("writeredit", bEntry && pRed && + m_xPopup->set_sensitive(u"writeredit"_ustr, bEntry && pRed && !rTreeView.get_iter_depth(*xEntry) && rTreeView.count_selected_rows() == 1); - m_xPopup->set_sensitive("writersort", rTreeView.n_children() != 0); + m_xPopup->set_sensitive(u"writersort"_ustr, rTreeView.n_children() != 0); int nColumn = rTreeView.get_sort_column(); if (nColumn == -1) nColumn = 4; @@ -1530,8 +1530,8 @@ void SwRedlineAcceptDlg::FillInfo(OUString &rExtraData) const } SwRedlineAcceptPanel::SwRedlineAcceptPanel(weld::Widget* pParent) - : PanelLayout(pParent, "ManageChangesPanel", "modules/swriter/ui/managechangessidebar.ui") - , mxContentArea(m_xBuilder->weld_container("content_area")) + : PanelLayout(pParent, u"ManageChangesPanel"_ustr, u"modules/swriter/ui/managechangessidebar.ui"_ustr) + , mxContentArea(m_xBuilder->weld_container(u"content_area"_ustr)) { mpImplDlg.reset(new SwRedlineAcceptDlg(nullptr, m_xBuilder.get(), mxContentArea.get())); diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 92a9f3fb213c..0f01b7724ffc 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -322,8 +322,8 @@ IMPL_LINK_NOARG(SwInputWindow, DropdownClickHdl, ToolBox *, void) EndSelection(); // reset back CurItemId ! if (nCurID == FN_FORMULA_CALC) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/inputwinmenu.ui")); - std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"modules/swriter/ui/inputwinmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu(u"menu"_ustr)); tools::Rectangle aRect(GetItemRect(FN_FORMULA_CALC)); weld::Window* pParent = weld::GetPopupParent(*this, aRect); MenuHdl(xPopMenu->popup_at_rect(pParent, aRect)); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index cdfcf0d64383..050c4f7bf840 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -349,8 +349,8 @@ public: } SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) - : InterimItemWindow(pParent, "modules/swriter/ui/zoombox.ui", "ZoomBox") - , m_xWidget(m_xBuilder->weld_combo_box("zoom")) + : InterimItemWindow(pParent, u"modules/swriter/ui/zoombox.ui"_ustr, u"ZoomBox"_ustr) + , m_xWidget(m_xBuilder->weld_combo_box(u"zoom"_ustr)) , m_nSlotId(nSlot) , m_bRelease(true) { @@ -550,8 +550,8 @@ IMPL_LINK(SwJumpToSpecificBox_Impl, KeyInputHdl, const KeyEvent&, rKEvt, bool) } SwJumpToSpecificBox_Impl::SwJumpToSpecificBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) - : InterimItemWindow(pParent, "modules/swriter/ui/jumpposbox.ui", "JumpPosBox") - , m_xWidget(m_xBuilder->weld_entry("jumppos")) + : InterimItemWindow(pParent, u"modules/swriter/ui/jumpposbox.ui"_ustr, u"JumpPosBox"_ustr) + , m_xWidget(m_xBuilder->weld_entry(u"jumppos"_ustr)) , m_nSlotId(nSlot) { InitControlBase(m_xWidget.get()); @@ -613,8 +613,8 @@ NavElementBox_Base::NavElementBox_Base(std::unique_ptr<weld::ComboBox> xComboBox NavElementBox_Impl::NavElementBox_Impl(vcl::Window* pParent, const uno::Reference<frame::XFrame>& xFrame) - : InterimItemWindow(pParent, "modules/swriter/ui/combobox.ui", "ComboBox") - ,NavElementBox_Base(m_xBuilder->weld_combo_box("combobox"), xFrame) + : InterimItemWindow(pParent, u"modules/swriter/ui/combobox.ui"_ustr, u"ComboBox"_ustr) + ,NavElementBox_Base(m_xBuilder->weld_combo_box(u"combobox"_ustr), xFrame) { SetSizePixel(m_xContainer->get_preferred_size()); } @@ -689,12 +689,12 @@ sal_Bool SAL_CALL NavElementToolBoxControl::supportsService( const OUString& Ser OUString SAL_CALL NavElementToolBoxControl::getImplementationName() { - return "lo.writer.NavElementToolBoxController"; + return u"lo.writer.NavElementToolBoxController"_ustr; } uno::Sequence< OUString > SAL_CALL NavElementToolBoxControl::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent @@ -760,7 +760,7 @@ uno::Reference< awt::XWindow > SAL_CALL NavElementToolBoxControl::createItemWind { SolarMutexGuard aSolarMutexGuard; - std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("NavElementWidget")); + std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box(u"NavElementWidget"_ustr)); xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get())); @@ -820,18 +820,18 @@ private: PrevNextScrollToolboxController::PrevNextScrollToolboxController( const css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType ) : PrevNextScrollToolboxController_Base( rxContext, css::uno::Reference< css::frame::XFrame >(), - (eType == PREVIOUS) ? OUString( ".uno:ScrollToPrevious" ): OUString( ".uno:ScrollToNext" ) ), + (eType == PREVIOUS) ? u".uno:ScrollToPrevious"_ustr: u".uno:ScrollToNext"_ustr ), meType( eType ) { - addStatusListener(".uno:NavElement"); + addStatusListener(u".uno:NavElement"_ustr); } // XServiceInfo OUString SAL_CALL PrevNextScrollToolboxController::getImplementationName() { return meType == PrevNextScrollToolboxController::PREVIOUS? - OUString( "lo.writer.PreviousScrollToolboxController" ) : - OUString( "lo.writer.NextScrollToolboxController" ); + u"lo.writer.PreviousScrollToolboxController"_ustr : + u"lo.writer.NextScrollToolboxController"_ustr; } sal_Bool SAL_CALL PrevNextScrollToolboxController::supportsService( const OUString& ServiceName ) @@ -841,7 +841,7 @@ sal_Bool SAL_CALL PrevNextScrollToolboxController::supportsService( const OUStri css::uno::Sequence< OUString > SAL_CALL PrevNextScrollToolboxController::getSupportedServiceNames() { - return { "com.sun.star.frame.ToolbarController" }; + return { u"com.sun.star.frame.ToolbarController"_ustr }; } // XComponent diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 74bc534df966..cb10778be9bb 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -171,7 +171,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v uno::Reference< ui::dialogs::XAsynchronousExecutableDialog > xDialog( xMCF->createInstanceWithContext( - "com.sun.star.comp.chart2.WizardDialog", xContext), + u"com.sun.star.comp.chart2.WizardDialog"_ustr, xContext), uno::UNO_QUERY); uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xInit.is() ) @@ -192,7 +192,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue("Size") + if( xDialogProps->getPropertyValue(u"Size"_ustr) >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -204,7 +204,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v aSwRect = pFlyFrameFormat->GetAnchoredObj()->GetObjRectWithSpaces(); tools::Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); - xDialogProps->setPropertyValue("Position", + xDialogProps->setPropertyValue(u"Position"_ustr, uno::Any( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index ea2983279736..01911aa623c6 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -286,16 +286,16 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( - "CellRangeRepresentation", -1, + u"CellRangeRepresentation"_ustr, -1, uno::Any( rCellRange ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "HasCategories", -1, + u"HasCategories"_ustr, -1, uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "FirstCellAsLabel", -1, + u"FirstCellAsLabel"_ustr, -1, uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "DataRowSource", -1, + u"DataRowSource"_ustr, -1, uno::Any( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) }; xDataReceiver->setArguments( aArgs ); diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index e57afceedd70..21e248b77b6a 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -40,28 +40,28 @@ StringMap SwEditWinUIObject::get_state() { StringMap aMap = WindowUIObject::get_state(); - aMap["SelectedText"] = mxEditWin->GetView().GetSelectionText(); + aMap[u"SelectedText"_ustr] = mxEditWin->GetView().GetSelectionText(); sal_uInt16 nPageNum = 0; sal_uInt16 nVirtPageNum = 0; SwWrtShell& rWrtShell = getWrtShell(mxEditWin); rWrtShell.GetPageNum(nPageNum, nVirtPageNum); - aMap["CurrentPage"] = OUString::number(nPageNum); + aMap[u"CurrentPage"_ustr] = OUString::number(nPageNum); rWrtShell.GetPageNum(nPageNum, nVirtPageNum, false); - aMap["TopVisiblePage"] = OUString::number(nPageNum); - aMap["Zoom"] = OUString::number(rWrtShell.GetViewOptions()->GetZoom()); + aMap[u"TopVisiblePage"_ustr] = OUString::number(nPageNum); + aMap[u"Zoom"_ustr] = OUString::number(rWrtShell.GetViewOptions()->GetZoom()); sal_uInt16 nPages = rWrtShell.GetPageCnt(); - aMap["Pages"] = OUString::number(nPages); + aMap[u"Pages"_ustr] = OUString::number(nPages); - aMap["StartWord"] = OUString::boolean(rWrtShell.IsStartWord()); - aMap["EndWord"] = OUString::boolean(rWrtShell.IsEndWord()); - aMap["StartSentence"] = OUString::boolean(rWrtShell.IsStartSentence()); - aMap["EndSentence"] = OUString::boolean(rWrtShell.IsEndSentence()); - aMap["StartPara"] = OUString::boolean(rWrtShell.IsSttPara()); - aMap["EndPara"] = OUString::boolean(rWrtShell.IsEndPara()); - aMap["StartDoc"] = OUString::boolean(rWrtShell.IsStartOfDoc()); - aMap["EndDoc"] = OUString::boolean(rWrtShell.IsEndOfDoc()); + aMap[u"StartWord"_ustr] = OUString::boolean(rWrtShell.IsStartWord()); + aMap[u"EndWord"_ustr] = OUString::boolean(rWrtShell.IsEndWord()); + aMap[u"StartSentence"_ustr] = OUString::boolean(rWrtShell.IsStartSentence()); + aMap[u"EndSentence"_ustr] = OUString::boolean(rWrtShell.IsEndSentence()); + aMap[u"StartPara"_ustr] = OUString::boolean(rWrtShell.IsSttPara()); + aMap[u"EndPara"_ustr] = OUString::boolean(rWrtShell.IsEndPara()); + aMap[u"StartDoc"_ustr] = OUString::boolean(rWrtShell.IsStartOfDoc()); + aMap[u"EndDoc"_ustr] = OUString::boolean(rWrtShell.IsEndOfDoc()); return aMap; } @@ -71,9 +71,9 @@ void SwEditWinUIObject::execute(const OUString& rAction, { if (rAction == "SET") { - if (rParameters.find("ZOOM") != rParameters.end()) + if (rParameters.find(u"ZOOM"_ustr) != rParameters.end()) { - auto itr = rParameters.find("ZOOM"); + auto itr = rParameters.find(u"ZOOM"_ustr); OUString aVal = itr->second; sal_Int32 nVal = aVal.toInt32(); mxEditWin->GetView().SetZoom(SvxZoomType::PERCENT, nVal); @@ -81,9 +81,9 @@ void SwEditWinUIObject::execute(const OUString& rAction, } else if (rAction == "GOTO") { - if (rParameters.find("PAGE") != rParameters.end()) + if (rParameters.find(u"PAGE"_ustr) != rParameters.end()) { - auto itr = rParameters.find("PAGE"); + auto itr = rParameters.find(u"PAGE"_ustr); OUString aVal = itr->second; sal_Int32 nVal = aVal.toInt32(); getWrtShell(mxEditWin).GotoPage(nVal, false); @@ -91,13 +91,13 @@ void SwEditWinUIObject::execute(const OUString& rAction, } else if (rAction == "SELECT") { - if (rParameters.find("START_POS") != rParameters.end()) + if (rParameters.find(u"START_POS"_ustr) != rParameters.end()) { - auto itr = rParameters.find("START_POS"); + auto itr = rParameters.find(u"START_POS"_ustr); OUString aStartPos = itr->second; TextFrameIndex const nStartPos(aStartPos.toInt32()); - itr = rParameters.find("END_POS"); + itr = rParameters.find(u"END_POS"_ustr); assert(itr != rParameters.end()); OUString aEndPos = itr->second; TextFrameIndex const nEndPos(aEndPos.toInt32()); @@ -127,9 +127,9 @@ void SwEditWinUIObject::execute(const OUString& rAction, assert(pViewFrm && "SwEditWinUIObject::execute: no viewframe"); pViewFrm->ShowChildWindow(SID_SIDEBAR); - if (rParameters.find("PANEL") != rParameters.end()) + if (rParameters.find(u"PANEL"_ustr) != rParameters.end()) { - auto itr = rParameters.find("PANEL"); + auto itr = rParameters.find(u"PANEL"_ustr); OUString aVal = itr->second; ::sfx2::sidebar::Sidebar::ShowPanel(aVal, pViewFrm->GetFrame().GetFrameInterface()); } @@ -140,7 +140,7 @@ void SwEditWinUIObject::execute(const OUString& rAction, OUString SwEditWinUIObject::get_name() const { - return "SwEditWinUIObject"; + return u"SwEditWinUIObject"_ustr; } std::unique_ptr<UIObject> SwEditWinUIObject::create(vcl::Window* pWindow) @@ -159,13 +159,13 @@ CommentUIObject::CommentUIObject(const VclPtr<sw::annotation::SwAnnotationWin>& StringMap CommentUIObject::get_state() { StringMap aMap = WindowUIObject::get_state(); - aMap["Author"] = mxCommentUIObject->GetAuthor(); - aMap["ReadOnly"] = OUString::boolean(mxCommentUIObject->IsReadOnly()); - aMap["Resolved"] = OUString::boolean(mxCommentUIObject->IsResolved()); - aMap["Visible"] = OUString::boolean(mxCommentUIObject->IsVisible()); + aMap[u"Author"_ustr] = mxCommentUIObject->GetAuthor(); + aMap[u"ReadOnly"_ustr] = OUString::boolean(mxCommentUIObject->IsReadOnly()); + aMap[u"Resolved"_ustr] = OUString::boolean(mxCommentUIObject->IsResolved()); + aMap[u"Visible"_ustr] = OUString::boolean(mxCommentUIObject->IsVisible()); - aMap["Text"] = mxCommentUIObject->GetOutliner()->GetEditEngine().GetText(); - aMap["SelectedText"] = mxCommentUIObject->GetOutlinerView()->GetEditView().GetSelected(); + aMap[u"Text"_ustr] = mxCommentUIObject->GetOutliner()->GetEditEngine().GetText(); + aMap[u"SelectedText"_ustr] = mxCommentUIObject->GetOutlinerView()->GetEditView().GetSelected(); return aMap; } @@ -174,11 +174,11 @@ void CommentUIObject::execute(const OUString& rAction, { if (rAction == "SELECT") { - if (rParameters.find("FROM") != rParameters.end() && - rParameters.find("TO") != rParameters.end()) + if (rParameters.find(u"FROM"_ustr) != rParameters.end() && + rParameters.find(u"TO"_ustr) != rParameters.end()) { - tools::Long nMin = rParameters.find("FROM")->second.toInt32(); - tools::Long nMax = rParameters.find("TO")->second.toInt32(); + tools::Long nMin = rParameters.find(u"FROM"_ustr)->second.toInt32(); + tools::Long nMax = rParameters.find(u"TO"_ustr)->second.toInt32(); ESelection aNewSelection( 0 , nMin, mxCommentUIObject->GetOutliner()->GetParagraphCount()-1, nMax ); mxCommentUIObject->GetOutlinerView()->SetSelection( aNewSelection ); } @@ -216,7 +216,7 @@ std::unique_ptr<UIObject> CommentUIObject::create(vcl::Window* pWindow) OUString CommentUIObject::get_name() const { - return "CommentUIObject"; + return u"CommentUIObject"_ustr; } PageBreakUIObject::PageBreakUIObject(const VclPtr<SwBreakDashedLine>& xPageBreakUIObject): @@ -243,7 +243,7 @@ std::unique_ptr<UIObject> PageBreakUIObject::create(vcl::Window* pWindow) OUString PageBreakUIObject::get_name() const { - return "PageBreakUIObject"; + return u"PageBreakUIObject"_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/web/wdocsh.cxx b/sw/source/uibase/web/wdocsh.cxx index 05242544f43a..3e5e8c2933ab 100644 --- a/sw/source/uibase/web/wdocsh.cxx +++ b/sw/source/uibase/web/wdocsh.cxx @@ -43,7 +43,7 @@ void SwWebDocShell::InitInterface_Impl() } -SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), "swriter/web" ) +SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), u"swriter/web"_ustr ) SwWebDocShell::SwWebDocShell() : SwDocShell(SfxObjectCreateMode::STANDARD) diff --git a/sw/source/uibase/web/wformsh.cxx b/sw/source/uibase/web/wformsh.cxx index 1d65b62b3607..e6bc489fee9a 100644 --- a/sw/source/uibase/web/wformsh.cxx +++ b/sw/source/uibase/web/wformsh.cxx @@ -32,7 +32,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SwWebDrawFormShell, SwDrawFormShell) void SwWebDrawFormShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("form"); + GetStaticInterface()->RegisterPopupMenu(u"form"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw); } diff --git a/sw/source/uibase/web/wfrmsh.cxx b/sw/source/uibase/web/wfrmsh.cxx index a9bac1962b78..bebd05fa5604 100644 --- a/sw/source/uibase/web/wfrmsh.cxx +++ b/sw/source/uibase/web/wfrmsh.cxx @@ -32,7 +32,7 @@ SFX_IMPL_INTERFACE(SwWebFrameShell, SwFrameShell) void SwWebFrameShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("frame"); + GetStaticInterface()->RegisterPopupMenu(u"frame"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webframe_Toolbox); } diff --git a/sw/source/uibase/web/wgrfsh.cxx b/sw/source/uibase/web/wgrfsh.cxx index 66fc2235d657..d0b2b0ba1740 100644 --- a/sw/source/uibase/web/wgrfsh.cxx +++ b/sw/source/uibase/web/wgrfsh.cxx @@ -34,7 +34,7 @@ SFX_IMPL_INTERFACE(SwWebGrfShell, SwGrfShell) void SwWebGrfShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("graphic"); + GetStaticInterface()->RegisterPopupMenu(u"graphic"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webgraphic_Toolbox); } @@ -44,7 +44,7 @@ SwWebGrfShell::SwWebGrfShell(SwView &_rView) : SwGrfShell(_rView) { - SetName("Graphic"); + SetName(u"Graphic"_ustr); } SwWebGrfShell::~SwWebGrfShell() diff --git a/sw/source/uibase/web/wlistsh.cxx b/sw/source/uibase/web/wlistsh.cxx index c7789c1e419d..10394e0d2216 100644 --- a/sw/source/uibase/web/wlistsh.cxx +++ b/sw/source/uibase/web/wlistsh.cxx @@ -39,7 +39,7 @@ void SwWebListShell::InitInterface_Impl() SwWebListShell::SwWebListShell(SwView &_rView) : SwListShell(_rView) { - SetName("List"); + SetName(u"List"_ustr); } SwWebListShell::~SwWebListShell() diff --git a/sw/source/uibase/web/wolesh.cxx b/sw/source/uibase/web/wolesh.cxx index 15bab538b3d9..a058951c3cd9 100644 --- a/sw/source/uibase/web/wolesh.cxx +++ b/sw/source/uibase/web/wolesh.cxx @@ -30,7 +30,7 @@ SFX_IMPL_INTERFACE(SwWebOleShell, SwOleShell) void SwWebOleShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("oleobject"); + GetStaticInterface()->RegisterPopupMenu(u"oleobject"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webole_Toolbox); } @@ -38,7 +38,7 @@ void SwWebOleShell::InitInterface_Impl() SwWebOleShell::SwWebOleShell(SwView &_rView) : SwOleShell(_rView) { - SetName("Object"); + SetName(u"Object"_ustr); } SwWebOleShell::~SwWebOleShell() diff --git a/sw/source/uibase/web/wtabsh.cxx b/sw/source/uibase/web/wtabsh.cxx index 88008034c6bc..ce248075a142 100644 --- a/sw/source/uibase/web/wtabsh.cxx +++ b/sw/source/uibase/web/wtabsh.cxx @@ -33,7 +33,7 @@ SFX_IMPL_INTERFACE(SwWebTableShell, SwTableShell) void SwWebTableShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("table"); + GetStaticInterface()->RegisterPopupMenu(u"table"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Table_Toolbox); } @@ -42,7 +42,7 @@ SwWebTableShell::SwWebTableShell(SwView &_rView) : SwTableShell(_rView) { GetShell().UpdateTable(); - SetName("Table"); + SetName(u"Table"_ustr); } SwWebTableShell::~SwWebTableShell() diff --git a/sw/source/uibase/web/wtextsh.cxx b/sw/source/uibase/web/wtextsh.cxx index c655bdf2cb22..275083c0dd4b 100644 --- a/sw/source/uibase/web/wtextsh.cxx +++ b/sw/source/uibase/web/wtextsh.cxx @@ -35,7 +35,7 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell) void SwWebTextShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu("text"); + GetStaticInterface()->RegisterPopupMenu(u"text"_ustr); GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw); diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 8394d0086401..404ee207e5c6 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -717,10 +717,10 @@ void SwWrtShell::SetInsMode( bool bOn ) { const bool bDoAsk = officecfg::Office::Common::Misc::QuerySetInsMode::get(); if (!bOn && bDoAsk) { - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "cui/ui/querysetinsmodedialog.ui")); - std::unique_ptr<weld::Dialog> xQuery(xBuilder->weld_dialog("SetInsModeDialog")); - std::unique_ptr<weld::Image> xImage(xBuilder->weld_image("imSetInsMode")); - std::unique_ptr<weld::CheckButton> xCheckBox(xBuilder->weld_check_button("cbDontShowAgain")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), u"cui/ui/querysetinsmodedialog.ui"_ustr)); + std::unique_ptr<weld::Dialog> xQuery(xBuilder->weld_dialog(u"SetInsModeDialog"_ustr)); + std::unique_ptr<weld::Image> xImage(xBuilder->weld_image(u"imSetInsMode"_ustr)); + std::unique_ptr<weld::CheckButton> xCheckBox(xBuilder->weld_check_button(u"cbDontShowAgain"_ustr)); xImage->set_from_icon_name(RID_BMP_QUERYINSMODE); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 4337fede35d7..d7e668634851 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -567,7 +567,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame { try { - xSet->setPropertyValue("Formula", uno::Any( aMathData ) ); + xSet->setPropertyValue(u"Formula"_ustr, uno::Any( aMathData ) ); bActivate = false; } catch (const uno::Exception&) @@ -627,12 +627,12 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); if ( xProps.is() && - ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue(u"DisableDataTableDialog"_ustr) >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { - xProps->setPropertyValue("DisableDataTableDialog", + xProps->setPropertyValue(u"DisableDataTableDialog"_ustr, uno::Any( false ) ); - xProps->setPropertyValue("DisableComplexChartTypes", + xProps->setPropertyValue(u"DisableComplexChartTypes"_ustr, uno::Any( false ) ); uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); if ( xModifiable.is() ) @@ -691,7 +691,7 @@ void SwWrtShell::LaunchOLEObj(sal_Int32 nVerb) if (xOLEInit.is()) { uno::Sequence<beans::PropertyValue> aArguments - = { comphelper::makePropertyValue("ReadOnly", pCli->IsProtected()) }; + = { comphelper::makePropertyValue(u"ReadOnly"_ustr, pCli->IsProtected()) }; xOLEInit->initialize({ uno::Any(aArguments) }); } @@ -983,7 +983,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::std::optiona SetAttrItem( SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) ); EndUndo(SwUndoId::UI_INSERT_PAGE_BREAK); } - collectUIInformation("BREAK_PAGE", "parameter"); + collectUIInformation(u"BREAK_PAGE"_ustr, u"parameter"_ustr); } // Insert enclosing characters @@ -1566,7 +1566,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) aFormat.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel))); aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); // #i93908# clear suffix for bullet lists - aFormat.SetListFormat("", "", nLevel); + aFormat.SetListFormat(u""_ustr, u""_ustr, nLevel); } aNumRule.Set(o3tl::narrowing<sal_uInt16>(nLevel), aFormat); } @@ -1624,7 +1624,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) aFormat.SetBulletChar( numfunc::GetBulletChar(nLvl) ); aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); // #i93908# clear suffix for bullet lists - aFormat.SetListFormat("", "", nLvl); + aFormat.SetListFormat(u""_ustr, u""_ustr, nLvl); } // #i95907# @@ -2675,9 +2675,9 @@ void SwWrtShell::InfoReadOnlyDialog(bool bAsync) const { std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), - "modules/swriter/ui/inforeadonlydialog.ui")); + u"modules/swriter/ui/inforeadonlydialog.ui"_ustr)); std::unique_ptr<weld::MessageDialog> - xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog")); + xInfo(xBuilder->weld_message_dialog(u"InfoReadonlyDialog"_ustr)); if (GetViewOptions()->IsShowOutlineContentVisibilityButton() && HasFoldedOutlineContentSelected()) { @@ -2691,9 +2691,9 @@ void SwWrtShell::InfoReadOnlyDialog(bool bAsync) const bool SwWrtShell::WarnHiddenSectionDialog() const { std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder( - GetView().GetFrameWeld(), "modules/swriter/ui/warnhiddensectiondialog.ui")); + GetView().GetFrameWeld(), u"modules/swriter/ui/warnhiddensectiondialog.ui"_ustr)); std::unique_ptr<weld::MessageDialog> xQuery( - xBuilder->weld_message_dialog("WarnHiddenSectionDialog")); + xBuilder->weld_message_dialog(u"WarnHiddenSectionDialog"_ustr)); if (GetViewOptions()->IsShowOutlineContentVisibilityButton() && HasFoldedOutlineContentSelected()) { diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index bed67797ea59..780a7352ac9d 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -600,7 +600,7 @@ static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, SfxBoolItem aBrowse( SID_BROWSE, true ); if ((nFilter & LoadUrlFlags::NewView) && !comphelper::LibreOfficeKit::isActive()) - aTargetFrameName.SetValue( "_blank" ); + aTargetFrameName.SetValue( u"_blank"_ustr ); rViewFrame.GetDispatcher()->ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, @@ -703,58 +703,58 @@ void SwWrtShell::NavigatorPaste(const NaviContentBookmark& rBkmk) vcl::Window* pWin = GetWin(); std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder( - pWin->GetFrameWeld(), "modules/swriter/ui/navigatordraginsertmenu.ui")); - std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu("insertmenu"); - - xPop->append("hyperlink", SwResId(STR_HYPERLINK)); - xPop->append("sectionlink", SwResId(STR_SECTIONLINK)); - xPop->append("sectioncopy", SwResId(STR_SECTIONCOPY)); - xPop->append("refpage", SwResId(FMT_REF_PAGE)); - xPop->append("refchapter", SwResId(FMT_REF_CHAPTER)); - xPop->append("refcontent", SwResId(FMT_REF_TEXT)); - xPop->append("refupdown", SwResId(FMT_REF_UPDOWN)); - xPop->append("refpagepgdsc", SwResId(FMT_REF_PAGE_PGDSC)); - xPop->append("refnumberentry", SwResId(FMT_REF_NUMBER)); - xPop->append("refnumbernocontext", SwResId(FMT_REF_NUMBER_NO_CONTEXT)); - xPop->append("refnumberfullcontext", SwResId(FMT_REF_NUMBER_FULL_CONTEXT)); - xPop->append("refonlynumber", SwResId(FMT_REF_ONLYNUMBER)); - xPop->append("refonlycaption", SwResId(FMT_REF_ONLYCAPTION)); - xPop->append("refonlyseqnoentry", SwResId(FMT_REF_ONLYSEQNO)); + pWin->GetFrameWeld(), u"modules/swriter/ui/navigatordraginsertmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu(u"insertmenu"_ustr); + + xPop->append(u"hyperlink"_ustr, SwResId(STR_HYPERLINK)); + xPop->append(u"sectionlink"_ustr, SwResId(STR_SECTIONLINK)); + xPop->append(u"sectioncopy"_ustr, SwResId(STR_SECTIONCOPY)); + xPop->append(u"refpage"_ustr, SwResId(FMT_REF_PAGE)); + xPop->append(u"refchapter"_ustr, SwResId(FMT_REF_CHAPTER)); + xPop->append(u"refcontent"_ustr, SwResId(FMT_REF_TEXT)); + xPop->append(u"refupdown"_ustr, SwResId(FMT_REF_UPDOWN)); + xPop->append(u"refpagepgdsc"_ustr, SwResId(FMT_REF_PAGE_PGDSC)); + xPop->append(u"refnumberentry"_ustr, SwResId(FMT_REF_NUMBER)); + xPop->append(u"refnumbernocontext"_ustr, SwResId(FMT_REF_NUMBER_NO_CONTEXT)); + xPop->append(u"refnumberfullcontext"_ustr, SwResId(FMT_REF_NUMBER_FULL_CONTEXT)); + xPop->append(u"refonlynumber"_ustr, SwResId(FMT_REF_ONLYNUMBER)); + xPop->append(u"refonlycaption"_ustr, SwResId(FMT_REF_ONLYCAPTION)); + xPop->append(u"refonlyseqnoentry"_ustr, SwResId(FMT_REF_ONLYSEQNO)); if (!officecfg::Office::Common::View::Menu::DontHideDisabledEntry::get() || Application::GetSettings().GetStyleSettings().GetHideDisabledMenuItems()) { - xPop->set_visible("hyperlink", bSensitiveHyperlinkEntry); - xPop->set_visible("sectionlink", bSensitiveSectionLinkEntry); - xPop->set_visible("sectioncopy", bSensitiveSectionCopyEntry); - xPop->set_visible("refpage", bSensitiveRefPageEntry); - xPop->set_visible("refchapter", bSensitiveRefChapterEntry); - xPop->set_visible("refcontent", bSensitiveRefContentEntry); - xPop->set_visible("refupdown", bSensitiveRefUpDownEntry); - xPop->set_visible("refpagepgdsc", bSensitiveRefPagePgDscEntry); - xPop->set_visible("refnumberentry", bSensitiveRefNumberEntry); - xPop->set_visible("refnumbernocontext", bSensitiveRefNumberNoContextEntry); - xPop->set_visible("refnumberfullcontext", bSensitiveRefNumberFullContextEntry); - xPop->set_visible("refonlynumber", bSensitiveRefOnlyNumberEntry); - xPop->set_visible("refonlycaption", bSensitiveRefOnlyCaptionEntry); - xPop->set_visible("refonlyseqnoentry", bSensitiveRefOnlySeqNoEntry); + xPop->set_visible(u"hyperlink"_ustr, bSensitiveHyperlinkEntry); + xPop->set_visible(u"sectionlink"_ustr, bSensitiveSectionLinkEntry); + xPop->set_visible(u"sectioncopy"_ustr, bSensitiveSectionCopyEntry); + xPop->set_visible(u"refpage"_ustr, bSensitiveRefPageEntry); + xPop->set_visible(u"refchapter"_ustr, bSensitiveRefChapterEntry); + xPop->set_visible(u"refcontent"_ustr, bSensitiveRefContentEntry); + xPop->set_visible(u"refupdown"_ustr, bSensitiveRefUpDownEntry); + xPop->set_visible(u"refpagepgdsc"_ustr, bSensitiveRefPagePgDscEntry); + xPop->set_visible(u"refnumberentry"_ustr, bSensitiveRefNumberEntry); + xPop->set_visible(u"refnumbernocontext"_ustr, bSensitiveRefNumberNoContextEntry); + xPop->set_visible(u"refnumberfullcontext"_ustr, bSensitiveRefNumberFullContextEntry); + xPop->set_visible(u"refonlynumber"_ustr, bSensitiveRefOnlyNumberEntry); + xPop->set_visible(u"refonlycaption"_ustr, bSensitiveRefOnlyCaptionEntry); + xPop->set_visible(u"refonlyseqnoentry"_ustr, bSensitiveRefOnlySeqNoEntry); } else { - xPop->set_sensitive("hyperlink", bSensitiveHyperlinkEntry); - xPop->set_sensitive("sectionlink", bSensitiveSectionLinkEntry); - xPop->set_sensitive("sectioncopy", bSensitiveSectionCopyEntry); - xPop->set_sensitive("refpage", bSensitiveRefPageEntry); - xPop->set_sensitive("refchapter", bSensitiveRefChapterEntry); - xPop->set_sensitive("refcontent", bSensitiveRefContentEntry); - xPop->set_sensitive("refupdown", bSensitiveRefUpDownEntry); - xPop->set_sensitive("refpagepgdsc", bSensitiveRefPagePgDscEntry); - xPop->set_sensitive("refnumberentry", bSensitiveRefNumberEntry); - xPop->set_sensitive("refnumbernocontext", bSensitiveRefNumberNoContextEntry); - xPop->set_sensitive("refnumberfullcontext", bSensitiveRefNumberFullContextEntry); - xPop->set_sensitive("refonlynumber", bSensitiveRefOnlyNumberEntry); - xPop->set_sensitive("refonlycaption", bSensitiveRefOnlyCaptionEntry); - xPop->set_sensitive("refonlyseqnoentry", bSensitiveRefOnlySeqNoEntry); + xPop->set_sensitive(u"hyperlink"_ustr, bSensitiveHyperlinkEntry); + xPop->set_sensitive(u"sectionlink"_ustr, bSensitiveSectionLinkEntry); + xPop->set_sensitive(u"sectioncopy"_ustr, bSensitiveSectionCopyEntry); + xPop->set_sensitive(u"refpage"_ustr, bSensitiveRefPageEntry); + xPop->set_sensitive(u"refchapter"_ustr, bSensitiveRefChapterEntry); + xPop->set_sensitive(u"refcontent"_ustr, bSensitiveRefContentEntry); + xPop->set_sensitive(u"refupdown"_ustr, bSensitiveRefUpDownEntry); + xPop->set_sensitive(u"refpagepgdsc"_ustr, bSensitiveRefPagePgDscEntry); + xPop->set_sensitive(u"refnumberentry"_ustr, bSensitiveRefNumberEntry); + xPop->set_sensitive(u"refnumbernocontext"_ustr, bSensitiveRefNumberNoContextEntry); + xPop->set_sensitive(u"refnumberfullcontext"_ustr, bSensitiveRefNumberFullContextEntry); + xPop->set_sensitive(u"refonlynumber"_ustr, bSensitiveRefOnlyNumberEntry); + xPop->set_sensitive(u"refonlycaption"_ustr, bSensitiveRefOnlyCaptionEntry); + xPop->set_sensitive(u"refonlyseqnoentry"_ustr, bSensitiveRefOnlySeqNoEntry); } tools::Rectangle aRect(pWin->LogicToPixel(GetCursorDocPos()), Size(1, 1)); diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 0907794d7c2c..d441dcf89659 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -358,15 +358,15 @@ bool SwWrtShell::GetURLFromButton( OUString& rURL, OUString& rDescr ) const uno::Any aTmp; uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - if(xInfo->hasPropertyByName( "ButtonType" )) + if(xInfo->hasPropertyByName( u"ButtonType"_ustr )) { - aTmp = xPropSet->getPropertyValue( "ButtonType" ); + aTmp = xPropSet->getPropertyValue( u"ButtonType"_ustr ); form::FormButtonType eTmpButtonType; aTmp >>= eTmpButtonType; if( form::FormButtonType_URL == eTmpButtonType) { // Label - aTmp = xPropSet->getPropertyValue( "Label" ); + aTmp = xPropSet->getPropertyValue( u"Label"_ustr ); OUString uTmp; if( (aTmp >>= uTmp) && !uTmp.isEmpty()) { @@ -374,7 +374,7 @@ bool SwWrtShell::GetURLFromButton( OUString& rURL, OUString& rDescr ) const } // util::URL - aTmp = xPropSet->getPropertyValue( "TargetURL" ); + aTmp = xPropSet->getPropertyValue( u"TargetURL"_ustr ); if( (aTmp >>= uTmp) && !uTmp.isEmpty()) { rURL = uTmp; |