diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 09:53:33 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 10:06:26 +0100 |
commit | a0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch) | |
tree | c0d3443a27d9dc10266760110e96b50cce46ef02 /framework | |
parent | e9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff) |
const OUString -> const OUStringLiteral
Mostly automated rewrite
Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'framework')
11 files changed, 17 insertions, 17 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 821b1137259c..35047ef8d3d6 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -957,7 +957,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( bool bPreferred, const css: } const OUString sIsoLang = impl_ts_getLocale(); - const OUString sDefaultLocale("en-US"); + static const OUStringLiteral sDefaultLocale(u"en-US"); css::uno::Reference< css::container::XNameAccess > xKey; css::uno::Reference< css::container::XNameAccess > xCommand; diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index a8aed7ab7e4d..49eab738c1cc 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -934,7 +934,7 @@ OUString AddonsOptions_Impl::GeneratePrefixURL() void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContainer& aContainer ) { - const OUString aMenuMergeRootName( "AddonUI/OfficeMenuBarMerging/" ); + static const OUStringLiteral aMenuMergeRootName( u"AddonUI/OfficeMenuBarMerging/" ); Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName ); @@ -1011,7 +1011,7 @@ void AddonsOptions_Impl::ReadMergeMenuData( std::u16string_view aMergeAddonInstr void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstructions& rCachedToolbarMergingInstructions ) { - const OUString aToolbarMergeRootName( "AddonUI/OfficeToolbarMerging/" ); + static const OUStringLiteral aToolbarMergeRootName( u"AddonUI/OfficeToolbarMerging/" ); Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName ); sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); @@ -1088,7 +1088,7 @@ bool AddonsOptions_Impl::ReadMergeToolbarData( std::u16string_view aMergeAddonIn void AddonsOptions_Impl::ReadNotebookBarMergeInstructions( NotebookBarMergingInstructions& rCachedNotebookBarMergingInstructions) { - const OUString aNotebookBarMergeRootName("AddonUI/OfficeNotebookBarMerging/"); + static const OUStringLiteral aNotebookBarMergeRootName(u"AddonUI/OfficeNotebookBarMerging/"); Sequence<OUString> aAddonMergeNodesSeq = GetNodeNames(aNotebookBarMergeRootName); sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); @@ -1169,7 +1169,7 @@ bool AddonsOptions_Impl::ReadMergeNotebookBarData( void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& aContainer ) { - const OUString aStatusbarMergeRootName( "AddonUI/OfficeStatusbarMerging/" ); + static const OUStringLiteral aStatusbarMergeRootName( u"AddonUI/OfficeStatusbarMerging/" ); Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName ); sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 5b53720852a5..b0fbd9797368 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -105,7 +105,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq } sort(aVector.begin(), aVector.end(), lcl_I18nCompareString ); - const OUString aFontNameCommandPrefix( ".uno:CharFontName?CharFontName.FamilyName:string=" ); + static const OUStringLiteral aFontNameCommandPrefix( u".uno:CharFontName?CharFontName.FamilyName:string=" ); const sal_Int16 nCount = static_cast<sal_Int16>(aVector.size()); for ( sal_Int16 i = 0; i < nCount; i++ ) { diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index a217cc8ff9ed..edc17b084069 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -169,7 +169,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co nSizeCount++; sal_uInt16 nPos = 0; - const OUString aFontHeightCommand( ".uno:FontHeight?FontHeight.Height:float=" ); + static const OUStringLiteral aFontHeightCommand( u".uno:FontHeight?FontHeight.Height:float=" ); // first insert font size names (for simplified/traditional chinese) float fPoint; diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 6a049994852f..213aa2a94566 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -102,8 +102,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& aCmd = ".uno:InsertPageFooter"; aHeaderFooterIsOnStr = "FooterIsOn"; } - const OUString aIsPhysicalStr( "IsPhysical" ); - const OUString aDisplayNameStr( "DisplayName" ); + static const OUStringLiteral aIsPhysicalStr( u"IsPhysical" ); + static const OUStringLiteral aDisplayNameStr( u"DisplayName" ); try { diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index d19bf519a28e..edcfbae5c6c2 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -199,7 +199,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup // for aCmd_Dialog and aCmd_Language sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command - const OUString sAsterisk("*"); // multiple languages in current selection + static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE )); for (auto const& langItem : aLangItems) { diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index deccb5d77bcc..807806364f34 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -133,7 +133,7 @@ void LangSelectionStatusbarController::LangMenu( // add first few entries to main menu sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1); - const OUString sAsterisk("*"); // multiple languages in current selection + static const OUStringLiteral sAsterisk(u"*"); // multiple languages in current selection const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE )); std::map< sal_Int16, OUString > aLangMap; for (auto const& langItem : aLangItems) diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 0549ff3a0299..856e3985b1cb 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -126,9 +126,9 @@ void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& ) void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId ) { - const OUString aCmdBase(".uno:ScriptOrganizer?ScriptOrganizer.Language:string="); - const OUString ellipsis( "..." ); - const OUString providerKey("com.sun.star.script.provider.ScriptProviderFor"); + static const OUStringLiteral aCmdBase(u".uno:ScriptOrganizer?ScriptOrganizer.Language:string="); + static const OUStringLiteral ellipsis( u"..." ); + static const OUStringLiteral providerKey(u"com.sun.star.script.provider.ScriptProviderFor"); sal_uInt16 itemId = startItemId; Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY_THROW ); Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( "com.sun.star.script.provider.LanguageScriptProvider" ); diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index 80215acb8d06..00b0692f1eae 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -93,7 +93,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescri if ( !pVCLPopupMenu ) return; - const OUString aVerbCommand( ".uno:ObjectMenue?VerbID:short=" ); + static const OUStringLiteral aVerbCommand( u".uno:ObjectMenue?VerbID:short=" ); for ( sal_Int32 i = 0; i < rVerbCommandSeq.getLength(); i++ ) { const css::embed::VerbDescriptor& rVerb = pVerbCommandArray[i]; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 9e1d9d84bfdb..a5792d29b224 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -357,7 +357,7 @@ void SAL_CALL RecentFilesMenuController::dispatch( if ( nQueryPart <= 0 ) return; - const OUString aEntryArgStr( "entry=" ); + static const OUStringLiteral aEntryArgStr( u"entry=" ); sal_Int32 nEntryArg = aURL.Complete.indexOf( aEntryArgStr, nQueryPart ); sal_Int32 nEntryPos = nEntryArg + aEntryArgStr.getLength(); if (( nEntryArg <= 0 ) || ( nEntryPos >= aURL.Complete.getLength() )) diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx index 4b5d36948bc3..0566a90c1db8 100644 --- a/framework/source/uifactory/uicontrollerfactory.cxx +++ b/framework/source/uifactory/uicontrollerfactory.cxx @@ -122,7 +122,7 @@ Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithArgument const Sequence< Any >& Arguments, const Reference< XComponentContext >& ) { - const OUString aPropModuleName( "ModuleIdentifier" ); + static const OUStringLiteral aPropModuleName( u"ModuleIdentifier" ); OUString aPropName; PropertyValue aPropValue; |