diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-20 10:55:53 +0200 |
commit | 6ece645435f823aae5d6532fd3e3d43eec46b5fe (patch) | |
tree | 9c5c372e071b0eb1180bb90641142c85de4d5025 /sfx2 | |
parent | 58e5e3208a4257a8d9f2e28d8e2d304677aa6980 (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sfx2
Change-Id: Ied8f0aff05ffd2f9e187fcb690789baf5fcf0c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158220
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
29 files changed, 209 insertions, 209 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7290ec77eb78..386cce711c7c 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -95,66 +95,66 @@ SfxFormalArgument const aFormalArgs[] = { sal_uInt16 const nMediaArgsCount = SAL_N_ELEMENTS(aFormalArgs); -constexpr OUStringLiteral sTemplateRegionName = u"TemplateRegionName"; -constexpr OUStringLiteral sTemplateName = u"TemplateName"; -constexpr OUStringLiteral sAsTemplate = u"AsTemplate"; -constexpr OUStringLiteral sOpenNewView = u"OpenNewView"; -constexpr OUStringLiteral sViewId = u"ViewId"; -constexpr OUStringLiteral sPluginMode = u"PluginMode"; -constexpr OUStringLiteral sReadOnly = u"ReadOnly"; -constexpr OUStringLiteral sDdeReconnect = u"DDEReconnect"; -constexpr OUStringLiteral sStartPresentation = u"StartPresentation"; -constexpr OUStringLiteral sFrameName = u"FrameName"; -constexpr OUStringLiteral sMediaType = u"MediaType"; -constexpr OUStringLiteral sPostData = u"PostData"; -constexpr OUStringLiteral sCharacterSet = u"CharacterSet"; -constexpr OUStringLiteral sInputStream = u"InputStream"; -constexpr OUStringLiteral sStream = u"Stream"; -constexpr OUStringLiteral sOutputStream = u"OutputStream"; -constexpr OUStringLiteral sHidden = u"Hidden"; -constexpr OUStringLiteral sPreview = u"Preview"; -constexpr OUStringLiteral sViewOnly = u"ViewOnly"; -constexpr OUStringLiteral sDontEdit = u"DontEdit"; -constexpr OUStringLiteral sSilent = u"Silent"; -constexpr OUStringLiteral sJumpMark = u"JumpMark"; -constexpr OUStringLiteral sSalvagedFile = u"SalvagedFile"; -constexpr OUStringLiteral sStatusInd = u"StatusIndicator"; -constexpr OUStringLiteral sModel = u"Model"; -constexpr OUStringLiteral sFrame = u"Frame"; -constexpr OUStringLiteral sViewData = u"ViewData"; -constexpr OUStringLiteral sFilterData = u"FilterData"; -constexpr OUStringLiteral sSelectionOnly = u"SelectionOnly"; -constexpr OUStringLiteral sMacroExecMode = u"MacroExecutionMode"; -constexpr OUStringLiteral sUpdateDocMode = u"UpdateDocMode"; -constexpr OUStringLiteral sMinimized = u"Minimized"; -constexpr OUStringLiteral sInteractionHdl = u"InteractionHandler"; -constexpr OUStringLiteral sUCBContent = u"UCBContent"; -constexpr OUStringLiteral sRepairPackage = u"RepairPackage"; -constexpr OUStringLiteral sDocumentTitle = u"DocumentTitle"; -constexpr OUStringLiteral sComponentData = u"ComponentData"; -constexpr OUStringLiteral sComponentContext = u"ComponentContext"; -constexpr OUStringLiteral sDocumentBaseURL = u"DocumentBaseURL"; -constexpr OUStringLiteral sHierarchicalDocumentName = u"HierarchicalDocumentName"; -constexpr OUStringLiteral sCopyStreamIfPossible = u"CopyStreamIfPossible"; -constexpr OUStringLiteral sNoAutoSave = u"NoAutoSave"; -constexpr OUStringLiteral sFolderName = u"FolderName"; -constexpr OUStringLiteral sUseSystemDialog = u"UseSystemDialog"; -constexpr OUStringLiteral sStandardDir = u"StandardDir"; -constexpr OUStringLiteral sDenyList = u"DenyList"; -constexpr OUStringLiteral sModifyPasswordInfo = u"ModifyPasswordInfo"; -constexpr OUStringLiteral sSuggestedSaveAsDir = u"SuggestedSaveAsDir"; -constexpr OUStringLiteral sSuggestedSaveAsName = u"SuggestedSaveAsName"; -constexpr OUStringLiteral sEncryptionData = u"EncryptionData"; -constexpr OUStringLiteral sFailOnWarning = u"FailOnWarning"; -constexpr OUStringLiteral sDocumentService = u"DocumentService"; -constexpr OUStringLiteral sFilterProvider = u"FilterProvider"; -constexpr OUStringLiteral sImageFilter = u"ImageFilter"; -constexpr OUStringLiteral sLockContentExtraction = u"LockContentExtraction"; -constexpr OUStringLiteral sLockExport = u"LockExport"; -constexpr OUStringLiteral sLockPrint = u"LockPrint"; -constexpr OUStringLiteral sLockSave = u"LockSave"; -constexpr OUStringLiteral sLockEditDoc = u"LockEditDoc"; -constexpr OUStringLiteral sReplaceable = u"Replaceable"; +constexpr OUString sTemplateRegionName = u"TemplateRegionName"_ustr; +constexpr OUString sTemplateName = u"TemplateName"_ustr; +constexpr OUString sAsTemplate = u"AsTemplate"_ustr; +constexpr OUString sOpenNewView = u"OpenNewView"_ustr; +constexpr OUString sViewId = u"ViewId"_ustr; +constexpr OUString sPluginMode = u"PluginMode"_ustr; +constexpr OUString sReadOnly = u"ReadOnly"_ustr; +constexpr OUString sDdeReconnect = u"DDEReconnect"_ustr; +constexpr OUString sStartPresentation = u"StartPresentation"_ustr; +constexpr OUString sFrameName = u"FrameName"_ustr; +constexpr OUString sMediaType = u"MediaType"_ustr; +constexpr OUString sPostData = u"PostData"_ustr; +constexpr OUString sCharacterSet = u"CharacterSet"_ustr; +constexpr OUString sInputStream = u"InputStream"_ustr; +constexpr OUString sStream = u"Stream"_ustr; +constexpr OUString sOutputStream = u"OutputStream"_ustr; +constexpr OUString sHidden = u"Hidden"_ustr; +constexpr OUString sPreview = u"Preview"_ustr; +constexpr OUString sViewOnly = u"ViewOnly"_ustr; +constexpr OUString sDontEdit = u"DontEdit"_ustr; +constexpr OUString sSilent = u"Silent"_ustr; +constexpr OUString sJumpMark = u"JumpMark"_ustr; +constexpr OUString sSalvagedFile = u"SalvagedFile"_ustr; +constexpr OUString sStatusInd = u"StatusIndicator"_ustr; +constexpr OUString sModel = u"Model"_ustr; +constexpr OUString sFrame = u"Frame"_ustr; +constexpr OUString sViewData = u"ViewData"_ustr; +constexpr OUString sFilterData = u"FilterData"_ustr; +constexpr OUString sSelectionOnly = u"SelectionOnly"_ustr; +constexpr OUString sMacroExecMode = u"MacroExecutionMode"_ustr; +constexpr OUString sUpdateDocMode = u"UpdateDocMode"_ustr; +constexpr OUString sMinimized = u"Minimized"_ustr; +constexpr OUString sInteractionHdl = u"InteractionHandler"_ustr; +constexpr OUString sUCBContent = u"UCBContent"_ustr; +constexpr OUString sRepairPackage = u"RepairPackage"_ustr; +constexpr OUString sDocumentTitle = u"DocumentTitle"_ustr; +constexpr OUString sComponentData = u"ComponentData"_ustr; +constexpr OUString sComponentContext = u"ComponentContext"_ustr; +constexpr OUString sDocumentBaseURL = u"DocumentBaseURL"_ustr; +constexpr OUString sHierarchicalDocumentName = u"HierarchicalDocumentName"_ustr; +constexpr OUString sCopyStreamIfPossible = u"CopyStreamIfPossible"_ustr; +constexpr OUString sNoAutoSave = u"NoAutoSave"_ustr; +constexpr OUString sFolderName = u"FolderName"_ustr; +constexpr OUString sUseSystemDialog = u"UseSystemDialog"_ustr; +constexpr OUString sStandardDir = u"StandardDir"_ustr; +constexpr OUString sDenyList = u"DenyList"_ustr; +constexpr OUString sModifyPasswordInfo = u"ModifyPasswordInfo"_ustr; +constexpr OUString sSuggestedSaveAsDir = u"SuggestedSaveAsDir"_ustr; +constexpr OUString sSuggestedSaveAsName = u"SuggestedSaveAsName"_ustr; +constexpr OUString sEncryptionData = u"EncryptionData"_ustr; +constexpr OUString sFailOnWarning = u"FailOnWarning"_ustr; +constexpr OUString sDocumentService = u"DocumentService"_ustr; +constexpr OUString sFilterProvider = u"FilterProvider"_ustr; +constexpr OUString sImageFilter = u"ImageFilter"_ustr; +constexpr OUString sLockContentExtraction = u"LockContentExtraction"_ustr; +constexpr OUString sLockExport = u"LockExport"_ustr; +constexpr OUString sLockPrint = u"LockPrint"_ustr; +constexpr OUString sLockSave = u"LockSave"_ustr; +constexpr OUString sLockEditDoc = u"LockEditDoc"_ustr; +constexpr OUString sReplaceable = u"Replaceable"_ustr; static bool isMediaDescriptor( sal_uInt16 nSlotId ) { diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 3752cfbc41d1..7e51602371c1 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -110,23 +110,23 @@ using namespace ::comphelper; // defines --------------------------------------------------------------- -constexpr OUStringLiteral CONFIGNAME_HELPWIN = u"OfficeHelp"; -constexpr OUStringLiteral CONFIGNAME_INDEXWIN = u"OfficeHelpIndex"; -constexpr OUStringLiteral CONFIGNAME_SEARCHPAGE = u"OfficeHelpSearch"; -constexpr OUStringLiteral IMAGE_URL = u"private:factory/"; - -constexpr OUStringLiteral PROPERTY_KEYWORDLIST = u"KeywordList"; -constexpr OUStringLiteral PROPERTY_KEYWORDREF = u"KeywordRef"; -constexpr OUStringLiteral PROPERTY_ANCHORREF = u"KeywordAnchorForRef"; -constexpr OUStringLiteral PROPERTY_TITLEREF = u"KeywordTitleForRef"; -constexpr OUStringLiteral PROPERTY_TITLE = u"Title"; -constexpr OUStringLiteral HELP_URL = u"vnd.sun.star.help://"; +constexpr OUString CONFIGNAME_HELPWIN = u"OfficeHelp"_ustr; +constexpr OUString CONFIGNAME_INDEXWIN = u"OfficeHelpIndex"_ustr; +constexpr OUString CONFIGNAME_SEARCHPAGE = u"OfficeHelpSearch"_ustr; +constexpr OUString IMAGE_URL = u"private:factory/"_ustr; + +constexpr OUString PROPERTY_KEYWORDLIST = u"KeywordList"_ustr; +constexpr OUString PROPERTY_KEYWORDREF = u"KeywordRef"_ustr; +constexpr OUString PROPERTY_ANCHORREF = u"KeywordAnchorForRef"_ustr; +constexpr OUString PROPERTY_TITLEREF = u"KeywordTitleForRef"_ustr; +constexpr OUString PROPERTY_TITLE = u"Title"_ustr; +constexpr OUString HELP_URL = u"vnd.sun.star.help://"_ustr; constexpr OUStringLiteral HELP_SEARCH_TAG = u"/?Query="; -constexpr OUStringLiteral USERITEM_NAME = u"UserItem"; +constexpr OUString USERITEM_NAME = u"UserItem"_ustr; constexpr OUStringLiteral PACKAGE_SETUP = u"/org.openoffice.Setup"; -constexpr OUStringLiteral PATH_OFFICE_FACTORIES = u"Office/Factories/"; -constexpr OUStringLiteral KEY_HELP_ON_OPEN = u"ooSetupFactoryHelpOnOpen"; +constexpr OUString PATH_OFFICE_FACTORIES = u"Office/Factories/"_ustr; +constexpr OUString KEY_HELP_ON_OPEN = u"ooSetupFactoryHelpOnOpen"_ustr; constexpr OUStringLiteral KEY_UI_NAME = u"ooSetupFactoryUIName"; namespace sfx2 diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 2980336bcea1..b596a4e33efa 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -207,7 +207,7 @@ static OUString const & HelpLocaleString() if (!aLocaleStr.isEmpty()) return aLocaleStr; - static constexpr OUStringLiteral aEnglish(u"en-US"); + static constexpr OUString aEnglish(u"en-US"_ustr); // detect installed locale aLocaleStr = utl::ConfigManager::getUILocale(); @@ -709,7 +709,7 @@ bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget) /// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org static bool impl_showOnlineHelp(const OUString& rURL, weld::Widget* pDialogParent) { - static constexpr OUStringLiteral aInternal(u"vnd.sun.star.help://"); + static constexpr OUString aInternal(u"vnd.sun.star.help://"_ustr); if ( rURL.getLength() <= aInternal.getLength() || !rURL.startsWith(aInternal) ) return false; @@ -866,7 +866,7 @@ bool rewriteFlatpakHelpRootUrl(OUString * helpRootUrl) { // /.../runtime/org.libreoffice.LibreOffice.Help/<arch>/<branch>/<sha>/files // because the extension's files are stored at a different place than the app's files, // so use this hack until flatpak itself provides a better solution: - static constexpr OUStringLiteral segments = u"/app/org.libreoffice.LibreOffice/"; + static constexpr OUString segments = u"/app/org.libreoffice.LibreOffice/"_ustr; auto const i1 = path.lastIndexOf(segments); // use lastIndexOf instead of indexOf, in case the user-controlled prefix /.../ // happens to contain such segments diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index aadc401a8ee1..6ff260f2f88e 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -127,7 +127,7 @@ const ResIdToResName pToolBarResToName[] = // Sort the Children according their alignment // The order corresponds to the enum SfxChildAlignment (->CHILDWIN.HXX). -constexpr OUStringLiteral g_aLayoutManagerPropName = u"LayoutManager"; +constexpr OUString g_aLayoutManagerPropName = u"LayoutManager"_ustr; // Help to make changes to the alignment compatible! LayoutManagerListener::LayoutManagerListener( @@ -436,9 +436,9 @@ void SfxWorkWindow::Sort_Impl() bSorted = true; } -constexpr OUStringLiteral g_aStatusBarResName( u"private:resource/statusbar/statusbar" ); -constexpr OUStringLiteral g_aTbxTypeName( u"private:resource/toolbar/" ); -constexpr OUStringLiteral g_aProgressBarResName( u"private:resource/progressbar/progressbar" ); +constexpr OUString g_aStatusBarResName( u"private:resource/statusbar/statusbar"_ustr ); +constexpr OUString g_aTbxTypeName( u"private:resource/toolbar/"_ustr ); +constexpr OUString g_aProgressBarResName( u"private:resource/progressbar/progressbar"_ustr ); // constructor for workwin of a Frame diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index acbed68f87bc..29f0cf6532cb 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::uno; -constexpr OUStringLiteral USERITEM_NAME = u"UserItem"; +constexpr OUString USERITEM_NAME = u"UserItem"_ustr; class SfxModelessDialog_Impl : public SfxListener { diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d4cb97becf5d..c11419dc02d9 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -160,7 +160,7 @@ OUString ConvertDateTime_Impl( std::u16string_view rName, { Date aD(uDT); tools::Time aT(uDT); - static constexpr OUStringLiteral aDelim( u", " ); + static constexpr OUString aDelim( u", "_ustr ); OUString aStr = rWrapper.getDate( aD ) + aDelim + rWrapper.getTime( aT ); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 49a8a5b9a08f..96955837c8a6 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -108,9 +108,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::cppu; -constexpr OUStringLiteral IODLG_CONFIGNAME = u"FilePicker_Save"; -constexpr OUStringLiteral IMPGRF_CONFIGNAME = u"FilePicker_Graph"; -constexpr OUStringLiteral USERITEM_NAME = u"UserItem"; +constexpr OUString IODLG_CONFIGNAME = u"FilePicker_Save"_ustr; +constexpr OUString IMPGRF_CONFIGNAME = u"FilePicker_Graph"_ustr; +constexpr OUString USERITEM_NAME = u"UserItem"_ustr; namespace sfx2 { @@ -1947,7 +1947,7 @@ void FileDialogHelper_Impl::addGraphicFilter() } constexpr OUStringLiteral GRF_CONFIG_STR = u" "; -constexpr OUStringLiteral STD_CONFIG_STR = u"1 "; +constexpr OUString STD_CONFIG_STR = u"1 "_ustr; static void SetToken( OUString& rOrigStr, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rStr) { diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 75dfa8e8da7f..f98baad01b8a 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -464,7 +464,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); sal_Int32 nNumArgs(1); - static constexpr OUStringLiteral aPasswordPropName( u"Password" ); + static constexpr OUString aPasswordPropName( u"Password"_ustr ); css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue( "FilterName", aFilterName) }; diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index aac6c294b7ff..210a9dbeaaff 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno; #define VERSION 1 #define nPixel 30L -constexpr OUStringLiteral USERITEM_NAME = u"UserItem"; +constexpr OUString USERITEM_NAME = u"UserItem"_ustr; namespace { // helper class to deactivate UpdateMode, if needed, for the life time of an instance diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 57e266a3f198..39d0245637ca 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno; -constexpr OUStringLiteral USERITEM_NAME = u"UserItem"; +constexpr OUString USERITEM_NAME = u"UserItem"_ustr; struct TabPageImpl diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index ea038791781a..51dd84baff16 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -87,9 +87,9 @@ bool isValidNCName(std::u16string_view i_rIdref) } -constexpr OUStringLiteral s_content = u"content.xml"; -constexpr OUStringLiteral s_styles = u"styles.xml"; -constexpr OUStringLiteral s_manifest = u"manifest.rdf"; +constexpr OUString s_content = u"content.xml"_ustr; +constexpr OUString s_styles = u"styles.xml"_ustr; +constexpr OUString s_manifest = u"manifest.rdf"_ustr; const char s_odfmime [] = "application/vnd.oasis.opendocument."; diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 493491a9f7c4..b10cc35cafa7 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -113,8 +113,8 @@ using ::sfx2::isValidXmlId; namespace sfx2 { -constexpr OUStringLiteral s_content = u"content.xml"; -constexpr OUStringLiteral s_styles = u"styles.xml"; +constexpr OUString s_content = u"content.xml"_ustr; +constexpr OUString s_styles = u"styles.xml"_ustr; static bool isContentFile(std::u16string_view i_rPath) { @@ -724,7 +724,7 @@ XmlIdRegistryDocument::RegisterMetadatableAndCreateID(Metadatable & i_rObject) const bool isInContent( i_rObject.IsInContent() ); const OUString stream( - isInContent ? OUString(s_content) : OUString(s_styles) ); + isInContent ? s_content : s_styles ); // check if we have a latent xmlid, and if yes, remove it OUString old_path; OUString old_idref; @@ -1138,7 +1138,7 @@ XmlIdRegistryClipboard::RegisterMetadatableAndCreateID(Metadatable & i_rObject) bool isInContent( i_rObject.IsInContent() ); OUString stream( - isInContent ? OUString(s_content) : OUString(s_styles) ); + isInContent ? s_content : s_styles ); OUString old_path; OUString old_idref; @@ -1296,7 +1296,7 @@ void Metadatable::SetMetadataReference( const css::beans::StringPair & i_rRefere { // handle empty stream name as auto-detect. // necessary for importing flat file format. - streamName = IsInContent() ? OUString(s_content) : OUString(s_styles); + streamName = IsInContent() ? s_content : s_styles; } XmlIdRegistry & rReg( dynamic_cast<XmlIdRegistry&>( GetRegistry() ) ); if (!rReg.TryRegisterMetadatable(*this, streamName, i_rReference.Second)) diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 37f1fc16aa8e..35f769dd14a5 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -356,21 +356,21 @@ public: } }; -constexpr OUStringLiteral sMetaPageCount = u"meta:page-count"; -constexpr OUStringLiteral sMetaTableCount = u"meta:table-count"; -constexpr OUStringLiteral sMetaDrawCount = u"meta:draw-count"; -constexpr OUStringLiteral sMetaImageCount = u"meta:image-count"; -constexpr OUStringLiteral sMetaObjectCount = u"meta:object-count"; -constexpr OUStringLiteral sMetaOleObjectCount = u"meta:ole-object-count"; -constexpr OUStringLiteral sMetaParagraphCount = u"meta:paragraph-count"; -constexpr OUStringLiteral sMetaWordCount = u"meta:word-count"; -constexpr OUStringLiteral sMetaCharacterCount = u"meta:character-count"; -constexpr OUStringLiteral sMetaRowCount = u"meta:row-count"; -constexpr OUStringLiteral sMetaFrameCount = u"meta:frame-count"; -constexpr OUStringLiteral sMetaSentenceCount = u"meta:sentence-count"; -constexpr OUStringLiteral sMetaSyllableCount = u"meta:syllable-count"; -constexpr OUStringLiteral sMetaNonWhitespaceCharacterCount = u"meta:non-whitespace-character-count"; -constexpr OUStringLiteral sMetaCellCount = u"meta:cell-count"; +constexpr OUString sMetaPageCount = u"meta:page-count"_ustr; +constexpr OUString sMetaTableCount = u"meta:table-count"_ustr; +constexpr OUString sMetaDrawCount = u"meta:draw-count"_ustr; +constexpr OUString sMetaImageCount = u"meta:image-count"_ustr; +constexpr OUString sMetaObjectCount = u"meta:object-count"_ustr; +constexpr OUString sMetaOleObjectCount = u"meta:ole-object-count"_ustr; +constexpr OUString sMetaParagraphCount = u"meta:paragraph-count"_ustr; +constexpr OUString sMetaWordCount = u"meta:word-count"_ustr; +constexpr OUString sMetaCharacterCount = u"meta:character-count"_ustr; +constexpr OUString sMetaRowCount = u"meta:row-count"_ustr; +constexpr OUString sMetaFrameCount = u"meta:frame-count"_ustr; +constexpr OUString sMetaSentenceCount = u"meta:sentence-count"_ustr; +constexpr OUString sMetaSyllableCount = u"meta:syllable-count"_ustr; +constexpr OUString sMetaNonWhitespaceCharacterCount = u"meta:non-whitespace-character-count"_ustr; +constexpr OUString sMetaCellCount = u"meta:cell-count"_ustr; // NB: keep these two arrays in sync! constexpr OUString s_stdStatAttrs[] = { @@ -437,11 +437,11 @@ const char* s_stdMeta[] = { nullptr }; -constexpr OUStringLiteral sMetaKeyword = u"meta:keyword"; -constexpr OUStringLiteral sMetaUserDefined = u"meta:user-defined"; -constexpr OUStringLiteral sDCContributor = u"dc:contributor"; -constexpr OUStringLiteral sDCPublisher = u"dc:publisher"; -constexpr OUStringLiteral sDCRelation = u"dc:relation"; +constexpr OUString sMetaKeyword = u"meta:keyword"_ustr; +constexpr OUString sMetaUserDefined = u"meta:user-defined"_ustr; +constexpr OUString sDCContributor = u"dc:contributor"_ustr; +constexpr OUString sDCPublisher = u"dc:publisher"_ustr; +constexpr OUString sDCRelation = u"dc:relation"_ustr; constexpr OUString s_stdMetaList[] { sMetaKeyword, // string* sMetaUserDefined, // ...* @@ -451,12 +451,12 @@ constexpr OUString s_stdMetaList[] { }; constexpr OUStringLiteral s_nsXLink = u"http://www.w3.org/1999/xlink"; -constexpr OUStringLiteral s_nsDC = u"http://purl.org/dc/elements/1.1/"; -constexpr OUStringLiteral s_nsODF = u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"; -constexpr OUStringLiteral s_nsODFMeta = u"urn:oasis:names:tc:opendocument:xmlns:meta:1.0"; +constexpr OUString s_nsDC = u"http://purl.org/dc/elements/1.1/"_ustr; +constexpr OUString s_nsODF = u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"_ustr; +constexpr OUString s_nsODFMeta = u"urn:oasis:names:tc:opendocument:xmlns:meta:1.0"_ustr; // constexpr OUStringLiteral s_nsOOo = "http://openoffice.org/2004/office"; // not used (yet?) -constexpr OUStringLiteral s_meta = u"meta.xml"; +constexpr OUString s_meta = u"meta.xml"_ustr; bool isValidDate(const css::util::Date & i_rDate) { @@ -632,7 +632,7 @@ SfxDocumentMetaData::getURLProperties( } xPropArg->addProperty("StreamName", css::beans::PropertyAttribute::MAYBEVOID, - css::uno::Any(OUString(s_meta))); + css::uno::Any(s_meta)); } catch (const css::uno::Exception &) { // ignore } @@ -880,7 +880,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet) const css::uno::Type & type = any.getValueType(); std::vector<std::pair<OUString, OUString> > as; as.emplace_back("meta:name", name); - static constexpr OUStringLiteral vt = u"meta:value-type"; + static constexpr OUString vt = u"meta:value-type"_ustr; // convert according to type if (type == ::cppu::UnoType<bool>::get()) { @@ -1231,8 +1231,8 @@ void SfxDocumentMetaData::init( } // initialize members corresponding to attributes from DOM nodes - static constexpr OUStringLiteral sMetaTemplate = u"meta:template"; - static constexpr OUStringLiteral sMetaAutoReload = u"meta:auto-reload"; + static constexpr OUString sMetaTemplate = u"meta:template"_ustr; + static constexpr OUString sMetaAutoReload = u"meta:auto-reload"_ustr; static constexpr OUStringLiteral sMetaHyperlinkBehaviour = u"meta:hyperlink-behaviour"; m_TemplateName = getMetaAttr(sMetaTemplate, "xlink:title"); m_TemplateURL = getMetaAttr(sMetaTemplate, "xlink:href"); diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index b1df5ad2c7cd..ee667ed5d0bd 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -135,8 +135,8 @@ void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OU static const int nMaxPathSize = 16000; const OUString sConfPath = "Office/Factories/" + rServiceName; - static constexpr OUStringLiteral PROP_DEF_TEMPL_CHANGED - = u"ooSetupFactorySystemDefaultTemplateChanged"; + static constexpr OUString PROP_DEF_TEMPL_CHANGED + = u"ooSetupFactorySystemDefaultTemplateChanged"_ustr; static const char DEF_TPL_STR[] = "/soffice."; diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 949e1f19f361..6369131fe6ba 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -37,8 +37,8 @@ // stream names -constexpr OUStringLiteral STREAM_SUMMARYINFO = u"\005SummaryInformation"; -constexpr OUStringLiteral STREAM_DOCSUMMARYINFO = u"\005DocumentSummaryInformation"; +constexpr OUString STREAM_SUMMARYINFO = u"\005SummaryInformation"_ustr; +constexpr OUString STREAM_DOCSUMMARYINFO = u"\005DocumentSummaryInformation"_ustr; // usings using namespace ::com::sun::star; diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 05e517319e92..283b7cd49bd2 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -396,8 +396,8 @@ namespace sfx2 { try { - static constexpr OUStringLiteral s_sBasicStorageName( u"Basic" ); - static constexpr OUStringLiteral s_sScriptsStorageName( u"Scripts" ); + static constexpr OUString s_sBasicStorageName( u"Basic"_ustr ); + static constexpr OUString s_sScriptsStorageName( u"Scripts"_ustr ); bHasMacros =( ( rxStorage->hasByName( s_sBasicStorageName ) && rxStorage->isStorageElement( s_sBasicStorageName ) diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 1934c6acaf3e..63d83f12985c 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -81,8 +81,8 @@ using namespace ::com::sun::star::document; using namespace ::rtl; using namespace ::ucbhelper; -constexpr OUStringLiteral TITLE = u"Title"; -constexpr OUStringLiteral TARGET_URL = u"TargetURL"; +constexpr OUString TITLE = u"Title"_ustr; +constexpr OUString TARGET_URL = u"TargetURL"_ustr; constexpr OUStringLiteral COMMAND_TRANSFER = u"transfer"; diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 9b71addc5fe2..20aecdd028a6 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -92,25 +92,25 @@ constexpr OUStringLiteral SERVICENAME_TYPEDETECTION = u"com.sun.star.document.TypeDetection"; constexpr OUStringLiteral TEMPLATE_ROOT_URL = u"vnd.sun.star.hier:/templates"; -constexpr OUStringLiteral TITLE = u"Title"; -constexpr OUStringLiteral IS_FOLDER = u"IsFolder"; -constexpr OUStringLiteral IS_DOCUMENT = u"IsDocument"; -constexpr OUStringLiteral TARGET_URL = u"TargetURL"; +constexpr OUString TITLE = u"Title"_ustr; +constexpr OUString IS_FOLDER = u"IsFolder"_ustr; +constexpr OUString IS_DOCUMENT = u"IsDocument"_ustr; +constexpr OUString TARGET_URL = u"TargetURL"_ustr; constexpr OUStringLiteral TEMPLATE_VERSION = u"TemplateComponentVersion"; constexpr OUStringLiteral TEMPLATE_VERSION_VALUE = u"2"; constexpr OUStringLiteral TYPE_FOLDER = u"application/vnd.sun.star.hier-folder"; constexpr OUStringLiteral TYPE_LINK = u"application/vnd.sun.star.hier-link"; -constexpr OUStringLiteral TYPE_FSYS_FOLDER = u"application/vnd.sun.staroffice.fsys-folder"; +constexpr OUString TYPE_FSYS_FOLDER = u"application/vnd.sun.staroffice.fsys-folder"_ustr; constexpr OUStringLiteral TYPE_FSYS_FILE = u"application/vnd.sun.staroffice.fsys-file"; -constexpr OUStringLiteral PROPERTY_DIRLIST = u"DirectoryList"; -constexpr OUStringLiteral PROPERTY_NEEDSUPDATE = u"NeedsUpdate"; -constexpr OUStringLiteral PROPERTY_TYPE = u"TypeDescription"; +constexpr OUString PROPERTY_DIRLIST = u"DirectoryList"_ustr; +constexpr OUString PROPERTY_NEEDSUPDATE = u"NeedsUpdate"_ustr; +constexpr OUString PROPERTY_TYPE = u"TypeDescription"_ustr; -constexpr OUStringLiteral TARGET_DIR_URL = u"TargetDirURL"; +constexpr OUString TARGET_DIR_URL = u"TargetDirURL"_ustr; constexpr OUStringLiteral COMMAND_DELETE = u"delete"; -constexpr OUStringLiteral STANDARD_FOLDER = u"standard"; +constexpr OUString STANDARD_FOLDER = u"standard"_ustr; #define C_DELIM ';' @@ -1950,7 +1950,7 @@ sal_Bool SfxDocTplService::addTemplate( const OUString& rGroupName, Content aResultContent; if ( Content::create( aNewTemplateTargetURL, xEnv, comphelper::getProcessComponentContext(), aResultContent ) ) { - static constexpr OUStringLiteral aPropertyName( u"IsReadOnly" ); + static constexpr OUString aPropertyName( u"IsReadOnly"_ustr ); uno::Any aProperty; bool bReadOnly = false; if ( getProperty( aResultContent, aPropertyName, aProperty ) && ( aProperty >>= bReadOnly ) && bReadOnly ) diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index 7a7e4fbe554b..71d4c69aa585 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -35,10 +35,10 @@ namespace { // Relations info related strings -constexpr OUStringLiteral g_sGroupListElement(u"groupuinames:template-group-list"); -constexpr OUStringLiteral g_sGroupElement(u"groupuinames:template-group"); -constexpr OUStringLiteral g_sNameAttr(u"groupuinames:name"); -constexpr OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name"); +constexpr OUString g_sGroupListElement(u"groupuinames:template-group-list"_ustr); +constexpr OUString g_sGroupElement(u"groupuinames:template-group"_ustr); +constexpr OUString g_sNameAttr(u"groupuinames:name"_ustr); +constexpr OUString g_sUINameAttr(u"groupuinames:default-ui-name"_ustr); } @@ -58,7 +58,7 @@ void DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference< xWriterHandler->setOutputStream( xOutStream ); - static constexpr OUStringLiteral aWhiteSpace( u" " ); + static constexpr OUString aWhiteSpace( u" "_ustr ); // write the namespace rtl::Reference<::comphelper::AttributeList> pRootAttrList = new ::comphelper::AttributeList; diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index fea914e0b7ba..1c013c4a382b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -119,9 +119,9 @@ #define STATUS_SAVEAS 2 #define STATUS_SAVEAS_STANDARDNAME 3 -constexpr OUStringLiteral aFilterNameString = u"FilterName"; -constexpr OUStringLiteral aFilterOptionsString = u"FilterOptions"; -constexpr OUStringLiteral aFilterDataString = u"FilterData"; +constexpr OUString aFilterNameString = u"FilterName"_ustr; +constexpr OUString aFilterOptionsString = u"FilterOptions"_ustr; +constexpr OUString aFilterDataString = u"FilterData"_ustr; using namespace ::com::sun::star; using namespace css::system; @@ -443,7 +443,7 @@ OUString ModelData_Impl::GetDocServiceName() void ModelData_Impl::CheckInteractionHandler() { - static constexpr OUStringLiteral sInteractionHandler {u"InteractionHandler"}; + static constexpr OUString sInteractionHandler {u"InteractionHandler"_ustr}; ::comphelper::SequenceAsHashMap::const_iterator aInteractIter = m_aMediaDescrHM.find( sInteractionHandler ); @@ -726,13 +726,13 @@ sal_Int8 ModelData_Impl::CheckStateForSave() // check acceptable entries for media descriptor ::comphelper::SequenceAsHashMap aAcceptedArgs; - static constexpr OUStringLiteral aVersionCommentString(u"VersionComment"); - static constexpr OUStringLiteral aAuthorString(u"Author"); - static constexpr OUStringLiteral aDontTerminateEdit(u"DontTerminateEdit"); - static constexpr OUStringLiteral aInteractionHandlerString(u"InteractionHandler"); - static constexpr OUStringLiteral aStatusIndicatorString(u"StatusIndicator"); - static constexpr OUStringLiteral aFailOnWarningString(u"FailOnWarning"); - static constexpr OUStringLiteral aNoFileSync(u"NoFileSync"); + static constexpr OUString aVersionCommentString(u"VersionComment"_ustr); + static constexpr OUString aAuthorString(u"Author"_ustr); + static constexpr OUString aDontTerminateEdit(u"DontTerminateEdit"_ustr); + static constexpr OUString aInteractionHandlerString(u"InteractionHandler"_ustr); + static constexpr OUString aStatusIndicatorString(u"StatusIndicator"_ustr); + static constexpr OUString aFailOnWarningString(u"FailOnWarning"_ustr); + static constexpr OUString aNoFileSync(u"NoFileSync"_ustr); if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() ) aAcceptedArgs[ aVersionCommentString ] = GetMediaDescr()[ aVersionCommentString ]; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 28cda91b6bd7..904b09ab31c7 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -727,7 +727,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) && !bPdfiumImport) { uno::Reference < beans::XPropertySet > xSet( GetModel(), uno::UNO_QUERY ); - static constexpr OUStringLiteral sLockUpdates(u"LockUpdates"); + static constexpr OUString sLockUpdates(u"LockUpdates"_ustr); bool bSetProperty = true; try { @@ -777,9 +777,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) css::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties(); if ( xProps.is() ) { - static constexpr OUStringLiteral aAuthor( u"Author" ); - static constexpr OUStringLiteral aKeywords( u"Keywords" ); - static constexpr OUStringLiteral aSubject( u"Subject" ); + static constexpr OUString aAuthor( u"Author"_ustr ); + static constexpr OUString aKeywords( u"Keywords"_ustr ); + static constexpr OUString aSubject( u"Subject"_ustr ); Any aAny; OUString aValue; uno::Reference<document::XDocumentPropertiesSupplier> xDPS( @@ -1045,8 +1045,8 @@ bool SfxObjectShell::DoSave() if ( !xTmpStorage.is() ) throw uno::RuntimeException(); - static constexpr OUStringLiteral aBasicStorageName( u"Basic" ); - static constexpr OUStringLiteral aDialogsStorageName( u"Dialogs" ); + static constexpr OUString aBasicStorageName( u"Basic"_ustr ); + static constexpr OUString aDialogsStorageName( u"Dialogs"_ustr ); if ( GetMedium()->GetStorage()->hasByName( aBasicStorageName ) ) GetMedium()->GetStorage()->copyElementTo( aBasicStorageName, xTmpStorage, aBasicStorageName ); if ( GetMedium()->GetStorage()->hasByName( aDialogsStorageName ) ) @@ -1119,7 +1119,7 @@ private: static OUString lcl_strip_template(const OUString &aString) { - static constexpr OUStringLiteral sPostfix(u"_template"); + static constexpr OUString sPostfix(u"_template"_ustr); OUString sRes(aString); if (sRes.endsWith(sPostfix)) sRes = sRes.copy(0, sRes.getLength() - sPostfix.getLength()); @@ -1484,7 +1484,7 @@ bool SfxObjectShell::SaveTo_Impl if ( aVersions.hasElements() ) { // copy the version streams - static constexpr OUStringLiteral aVersionsName( u"Versions" ); + static constexpr OUString aVersionsName( u"Versions"_ustr ); uno::Reference< embed::XStorage > xNewVerStor = xMedStorage->openStorageElement( aVersionsName, embed::ElementModes::READWRITE ); @@ -1721,9 +1721,9 @@ bool SfxObjectShell::SaveTo_Impl css::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties(); if ( xProps.is() ) { - static constexpr OUStringLiteral aAuthor( u"Author" ); - static constexpr OUStringLiteral aKeywords( u"Keywords" ); - static constexpr OUStringLiteral aSubject( u"Subject" ); + static constexpr OUString aAuthor( u"Author"_ustr ); + static constexpr OUString aKeywords( u"Keywords"_ustr ); + static constexpr OUString aSubject( u"Subject"_ustr ); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -2225,7 +2225,7 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, css::uno::Sequence < css::beans::PropertyValue > aArgs ( lDescriptor.getLength() ); css::beans::PropertyValue * pNewValue = aArgs.getArray(); const css::beans::PropertyValue * pOldValue = lDescriptor.getConstArray(); - static constexpr OUStringLiteral sInputStream ( u"InputStream" ); + static constexpr OUString sInputStream ( u"InputStream"_ustr ); bool bHasInputStream = false; bool bHasBaseURL = false; @@ -2404,8 +2404,8 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) css::beans::PropertyValue * pNewValue = aArgs.getArray(); // put in the REAL file name, and copy all PropertyValues - static constexpr OUStringLiteral sOutputStream ( u"OutputStream" ); - static constexpr OUStringLiteral sStream ( u"StreamForOutput" ); + static constexpr OUString sOutputStream ( u"OutputStream"_ustr ); + static constexpr OUString sStream ( u"StreamForOutput"_ustr ); bool bHasOutputStream = false; bool bHasStream = false; bool bHasBaseURL = false; @@ -3431,7 +3431,7 @@ static bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embe if ( xSource->isStorageElement( rSubElement ) ) { OUString aMediaType; - static constexpr OUStringLiteral aMediaTypePropName( u"MediaType" ); + static constexpr OUString aMediaTypePropName( u"MediaType"_ustr ); bool bGotMediaType = false; try @@ -3574,7 +3574,7 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType(const uno::Reference< embed: else if (xSource->isStorageElement(rSubElement)) { OUString aMediaType; - static constexpr OUStringLiteral aMediaTypePropName( u"MediaType" ); + static constexpr OUString aMediaTypePropName( u"MediaType"_ustr ); bool bGotMediaType = false; try diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 99901fdac73f..b085342b1912 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2778,7 +2778,7 @@ void SfxBaseModel::loadCmisProperties( ) utl::UCBContentHelper::getDefaultCommandEnvironment(), comphelper::getProcessComponentContext() ); Reference < beans::XPropertySetInfo > xProps = aContent.getProperties(); - static constexpr OUStringLiteral aCmisProps( u"CmisProperties" ); + static constexpr OUString aCmisProps( u"CmisProperties"_ustr ); if ( xProps->hasPropertyByName( aCmisProps ) ) { Sequence< document::CmisProperty> aCmisProperties; @@ -2885,7 +2885,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC , && m_pData->m_pObjectShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) { Reference< embed::XStorage > xConfigStorage; - static constexpr OUStringLiteral aUIConfigFolderName( u"Configurations2" ); + static constexpr OUString aUIConfigFolderName( u"Configurations2"_ustr ); xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, embed::ElementModes::READWRITE ); if ( !xConfigStorage.is() ) @@ -3055,7 +3055,7 @@ void SfxBaseModel::impl_store( const OUString& sURL { // this is the same file URL as the current document location, try to use storeOwn if possible - static constexpr OUStringLiteral aFilterString( u"FilterName" ); + static constexpr OUString aFilterString( u"FilterName"_ustr ); const OUString aFilterName( aArgHash.getUnpackedValueOrDefault( aFilterString, OUString() ) ); if ( !aFilterName.isEmpty() ) { @@ -3657,7 +3657,7 @@ Reference< ui::XUIConfigurationManager2 > SfxBaseModel::getUIConfigurationManage xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, embed::ElementModes::READWRITE ); if ( xConfigStorage.is() ) { - static constexpr OUStringLiteral aMediaTypeProp( u"MediaType" ); + static constexpr OUString aMediaTypeProp( u"MediaType"_ustr ); OUString aMediaType; Reference< beans::XPropertySet > xPropSet( xConfigStorage, UNO_QUERY ); Any a = xPropSet->getPropertyValue( aMediaTypeProp ); @@ -4033,7 +4033,7 @@ OUString SAL_CALL SfxBaseModel::getTitle() = aContent.getProperties(); if ( xProps.is() ) { - static constexpr OUStringLiteral aServerTitle( u"TitleOnServer" ); + static constexpr OUString aServerTitle( u"TitleOnServer"_ustr ); if ( xProps->hasPropertyByName( aServerTitle ) ) { Any aAny = aContent.getPropertyValue( aServerTitle ); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index dec37dd0c406..65873895d780 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -53,21 +53,21 @@ #include <sfx2/strings.hrc> #include <bitmaps.hlst> -constexpr OUStringLiteral TM_SETTING_MANAGER = u"TemplateManager"; -constexpr OUStringLiteral TM_SETTING_LASTFOLDER = u"LastFolder"; -constexpr OUStringLiteral TM_SETTING_LASTAPPLICATION = u"LastApplication"; -constexpr OUStringLiteral TM_SETTING_VIEWMODE = u"ViewMode"; - -constexpr OUStringLiteral MNI_ACTION_NEW_FOLDER = u"new"; -constexpr OUStringLiteral MNI_ACTION_RENAME_FOLDER = u"rename"; -constexpr OUStringLiteral MNI_ACTION_DELETE_FOLDER = u"delete"; -constexpr OUStringLiteral MNI_ACTION_DEFAULT = u"default"; -constexpr OUStringLiteral MNI_ACTION_DEFAULT_WRITER = u"default_writer"; -constexpr OUStringLiteral MNI_ACTION_DEFAULT_CALC = u"default_calc"; -constexpr OUStringLiteral MNI_ACTION_DEFAULT_IMPRESS = u"default_impress"; -constexpr OUStringLiteral MNI_ACTION_DEFAULT_DRAW = u"default_draw"; -constexpr OUStringLiteral MNI_ACTION_IMPORT = u"import_template"; -constexpr OUStringLiteral MNI_ACTION_EXTENSIONS = u"extensions"; +constexpr OUString TM_SETTING_MANAGER = u"TemplateManager"_ustr; +constexpr OUString TM_SETTING_LASTFOLDER = u"LastFolder"_ustr; +constexpr OUString TM_SETTING_LASTAPPLICATION = u"LastApplication"_ustr; +constexpr OUString TM_SETTING_VIEWMODE = u"ViewMode"_ustr; + +constexpr OUString MNI_ACTION_NEW_FOLDER = u"new"_ustr; +constexpr OUString MNI_ACTION_RENAME_FOLDER = u"rename"_ustr; +constexpr OUString MNI_ACTION_DELETE_FOLDER = u"delete"_ustr; +constexpr OUString MNI_ACTION_DEFAULT = u"default"_ustr; +constexpr OUString MNI_ACTION_DEFAULT_WRITER = u"default_writer"_ustr; +constexpr OUString MNI_ACTION_DEFAULT_CALC = u"default_calc"_ustr; +constexpr OUString MNI_ACTION_DEFAULT_IMPRESS = u"default_impress"_ustr; +constexpr OUString MNI_ACTION_DEFAULT_DRAW = u"default_draw"_ustr; +constexpr OUString MNI_ACTION_IMPORT = u"import_template"_ustr; +constexpr OUString MNI_ACTION_EXTENSIONS = u"extensions"_ustr; #define MNI_ALL_APPLICATIONS 0 #define MNI_WRITER 1 #define MNI_CALC 2 diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index a1c407aa6d72..e4c160712b1d 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -29,9 +29,9 @@ SfxPoolItem* SvxZoomItem::CreateDefault() { return new SvxZoomItem; } -constexpr OUStringLiteral ZOOM_PARAM_VALUE = u"Value"; -constexpr OUStringLiteral ZOOM_PARAM_VALUESET = u"ValueSet"; -constexpr OUStringLiteral ZOOM_PARAM_TYPE = u"Type"; +constexpr OUString ZOOM_PARAM_VALUE = u"Value"_ustr; +constexpr OUString ZOOM_PARAM_VALUESET = u"ValueSet"_ustr; +constexpr OUString ZOOM_PARAM_TYPE = u"Type"_ustr; #define ZOOM_PARAMS 3 diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index 3d52c0a2fa0d..d246f22cb676 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -39,7 +39,7 @@ #include <cppuhelper/implbase.hxx> #define ICON_SIZE 25 -constexpr OUStringLiteral TOOLBAR_STR = u"private:resource/toolbar/notebookbarshortcuts"; +constexpr OUString TOOLBAR_STR = u"private:resource/toolbar/notebookbarshortcuts"_ustr; using namespace css::uno; using namespace css::ui; diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 4937e278c73d..0a21ffa98c8a 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -36,7 +36,7 @@ using namespace css::uno; using namespace css::ui; using namespace css; -constexpr OUStringLiteral MENUBAR_STR = u"private:resource/menubar/menubar"; +constexpr OUString MENUBAR_STR = u"private:resource/menubar/menubar"_ustr; const char MERGE_NOTEBOOKBAR_URL[] = "URL"; diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx index 5666c4cb574e..17bc54ba9439 100644 --- a/sfx2/source/sidebar/Context.cxx +++ b/sfx2/source/sidebar/Context.cxx @@ -20,8 +20,8 @@ #include <utility> -constexpr OUStringLiteral AnyApplicationName = u"any"; -constexpr OUStringLiteral AnyContextName = u"any"; +constexpr OUString AnyApplicationName = u"any"_ustr; +constexpr OUString AnyContextName = u"any"_ustr; namespace sfx2::sidebar { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c6137d94d0e8..3e76cb2b14af 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -66,7 +66,7 @@ using namespace css::uno; namespace { - constexpr OUStringLiteral gsReadOnlyCommandName = u".uno:EditDoc"; + constexpr OUString gsReadOnlyCommandName = u".uno:EditDoc"_ustr; const sal_Int32 gnWidthCloseThreshold (70); const sal_Int32 gnWidthOpenThreshold (40); @@ -104,7 +104,7 @@ namespace { /** When in doubt, show this deck. */ - constexpr OUStringLiteral gsDefaultDeckId(u"PropertyDeck"); + constexpr OUString gsDefaultDeckId(u"PropertyDeck"_ustr); } SidebarController::SidebarController ( diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index d447c8396971..40ee7bd2f962 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -143,7 +143,7 @@ using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::document::XViewDataSupplier; using ::com::sun::star::container::XIndexContainer; -constexpr OUStringLiteral CHANGES_STR = u"private:resource/toolbar/changes"; +constexpr OUString CHANGES_STR = u"private:resource/toolbar/changes"_ustr; SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewFrame,SfxShell) @@ -3137,7 +3137,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) case SID_RECORDMACRO : { // try to find any active recorder on this frame - static constexpr OUStringLiteral sProperty(u"DispatchRecorderSupplier"); + static constexpr OUString sProperty(u"DispatchRecorderSupplier"_ustr); css::uno::Reference< css::frame::XFrame > xFrame = GetFrame().GetFrameInterface(); @@ -3199,7 +3199,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { if ( auto xLayoutManager = getLayoutManager(GetFrame()) ) { - static constexpr OUStringLiteral aStatusbarResString( u"private:resource/statusbar/statusbar" ); + static constexpr OUString aStatusbarResString( u"private:resource/statusbar/statusbar"_ustr ); // Evaluate parameter. const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(rReq.GetSlot()); bool bShow( true ); |