sw/source/uibase/uno/SwXDocumentSettings.cxx | 82 +++++++-------- sw/source/uibase/uno/SwXFilterOptions.cxx | 8 - sw/source/uibase/uno/loktxdoc.cxx | 24 ++-- sw/source/uibase/uno/unoatxt.cxx | 20 +-- sw/source/uibase/uno/unodispatch.cxx | 2 sw/source/uibase/uno/unomailmerge.cxx | 42 +++---- sw/source/uibase/uno/unomod.cxx | 146 +++++++++++++-------------- sw/source/uibase/uno/unomodule.cxx | 4 sw/source/uibase/uno/unotxdoc.cxx | 102 +++++++++--------- sw/source/uibase/uno/unotxvw.cxx | 58 +++++----- 10 files changed, 244 insertions(+), 244 deletions(-)
New commits: commit 309768c2f54ce0ff5fa4b3409996733afa96bc02 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jun 5 10:19:27 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Jun 5 13:19:40 2024 +0200 loplugin:ostr in sw/.../uno Change-Id: I70205955fdfa261fdf2b8d66d546eded549464a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168427 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index b46c9c4316ed..e932610066c7 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -170,45 +170,45 @@ static rtl::Reference<MasterPropertySetInfo> lcl_createSettingsInfo() { static PropertyInfo const aWriterSettingsInfoMap[] = { - { OUString("ForbiddenCharacters"), HANDLE_FORBIDDEN_CHARS, cppu::UnoType<css::i18n::XForbiddenCharacters>::get(), 0}, - { OUString("LinkUpdateMode"), HANDLE_LINK_UPDATE_MODE, cppu::UnoType<sal_Int16>::get(), 0}, - { OUString("FieldAutoUpdate"), HANDLE_FIELD_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0}, - { OUString("ChartAutoUpdate"), HANDLE_CHART_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0}, - { OUString("AddParaTableSpacing"), HANDLE_ADD_PARA_TABLE_SPACING, cppu::UnoType<bool>::get(), 0}, - { OUString("AddParaTableSpacingAtStart"), HANDLE_ADD_PARA_TABLE_SPACING_AT_START, cppu::UnoType<bool>::get(), 0}, - { OUString("AlignTabStopPosition"), HANDLE_ALIGN_TAB_STOP_POSITION, cppu::UnoType<bool>::get(), 0}, - { OUString("PrinterName"), HANDLE_PRINTER_NAME, cppu::UnoType<OUString>::get(), 0}, - { OUString("PrinterSetup"), HANDLE_PRINTER_SETUP, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0}, - { OUString("PrinterPaperFromSetup"), HANDLE_PRINTER_PAPER, cppu::UnoType<bool>::get(), 0}, - { OUString("IsKernAsianPunctuation"), HANDLE_IS_KERN_ASIAN_PUNCTUATION, cppu::UnoType<bool>::get(), 0}, - { OUString("CharacterCompressionType"), HANDLE_CHARACTER_COMPRESSION_TYPE, cppu::UnoType<sal_Int16>::get(), 0}, - { OUString("ApplyUserData"), HANDLE_APPLY_USER_DATA, cppu::UnoType<bool>::get(), 0 }, - { OUString("SaveThumbnail"), HANDLE_SAVE_THUMBNAIL, cppu::UnoType<bool>::get(), 0 }, - { OUString("SaveGlobalDocumentLinks"), HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS, cppu::UnoType<bool>::get(), 0}, - { OUString("CurrentDatabaseDataSource"), HANDLE_CURRENT_DATABASE_DATA_SOURCE, cppu::UnoType<OUString>::get(), 0}, - { OUString("CurrentDatabaseCommand"), HANDLE_CURRENT_DATABASE_COMMAND, cppu::UnoType<OUString>::get(), 0}, - { OUString("CurrentDatabaseCommandType"), HANDLE_CURRENT_DATABASE_COMMAND_TYPE, cppu::UnoType<sal_Int32>::get(), 0}, - { OUString("EmbeddedDatabaseName"), HANDLE_EMBEDDED_DATABASE_NAME, cppu::UnoType<OUString>::get(), 0}, - { OUString("SaveVersionOnClose"), HANDLE_SAVE_VERSION_ON_CLOSE, cppu::UnoType<bool>::get(), 0}, - { OUString("UpdateFromTemplate"), HANDLE_UPDATE_FROM_TEMPLATE, cppu::UnoType<bool>::get(), 0}, + { u"ForbiddenCharacters"_ustr, HANDLE_FORBIDDEN_CHARS, cppu::UnoType<css::i18n::XForbiddenCharacters>::get(), 0}, + { u"LinkUpdateMode"_ustr, HANDLE_LINK_UPDATE_MODE, cppu::UnoType<sal_Int16>::get(), 0}, + { u"FieldAutoUpdate"_ustr, HANDLE_FIELD_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0}, + { u"ChartAutoUpdate"_ustr, HANDLE_CHART_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0}, + { u"AddParaTableSpacing"_ustr, HANDLE_ADD_PARA_TABLE_SPACING, cppu::UnoType<bool>::get(), 0}, + { u"AddParaTableSpacingAtStart"_ustr, HANDLE_ADD_PARA_TABLE_SPACING_AT_START, cppu::UnoType<bool>::get(), 0}, + { u"AlignTabStopPosition"_ustr, HANDLE_ALIGN_TAB_STOP_POSITION, cppu::UnoType<bool>::get(), 0}, + { u"PrinterName"_ustr, HANDLE_PRINTER_NAME, cppu::UnoType<OUString>::get(), 0}, + { u"PrinterSetup"_ustr, HANDLE_PRINTER_SETUP, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0}, + { u"PrinterPaperFromSetup"_ustr, HANDLE_PRINTER_PAPER, cppu::UnoType<bool>::get(), 0}, + { u"IsKernAsianPunctuation"_ustr, HANDLE_IS_KERN_ASIAN_PUNCTUATION, cppu::UnoType<bool>::get(), 0}, + { u"CharacterCompressionType"_ustr, HANDLE_CHARACTER_COMPRESSION_TYPE, cppu::UnoType<sal_Int16>::get(), 0}, + { u"ApplyUserData"_ustr, HANDLE_APPLY_USER_DATA, cppu::UnoType<bool>::get(), 0 }, + { u"SaveThumbnail"_ustr, HANDLE_SAVE_THUMBNAIL, cppu::UnoType<bool>::get(), 0 }, + { u"SaveGlobalDocumentLinks"_ustr, HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS, cppu::UnoType<bool>::get(), 0}, + { u"CurrentDatabaseDataSource"_ustr, HANDLE_CURRENT_DATABASE_DATA_SOURCE, cppu::UnoType<OUString>::get(), 0}, + { u"CurrentDatabaseCommand"_ustr, HANDLE_CURRENT_DATABASE_COMMAND, cppu::UnoType<OUString>::get(), 0}, + { u"CurrentDatabaseCommandType"_ustr, HANDLE_CURRENT_DATABASE_COMMAND_TYPE, cppu::UnoType<sal_Int32>::get(), 0}, + { u"EmbeddedDatabaseName"_ustr, HANDLE_EMBEDDED_DATABASE_NAME, cppu::UnoType<OUString>::get(), 0}, + { u"SaveVersionOnClose"_ustr, HANDLE_SAVE_VERSION_ON_CLOSE, cppu::UnoType<bool>::get(), 0}, + { u"UpdateFromTemplate"_ustr, HANDLE_UPDATE_FROM_TEMPLATE, cppu::UnoType<bool>::get(), 0}, - { OUString("PrinterIndependentLayout"), HANDLE_PRINTER_INDEPENDENT_LAYOUT, cppu::UnoType<sal_Int16>::get(), 0}, - { OUString("IsLabelDocument"), HANDLE_IS_LABEL_DOC, cppu::UnoType<bool>::get(), 0}, - { OUString("AddFrameOffsets"), HANDLE_IS_ADD_FLY_OFFSET, cppu::UnoType<bool>::get(), 0}, - { OUString("AddVerticalFrameOffsets"), HANDLE_IS_ADD_VERTICAL_FLY_OFFSET, cppu::UnoType<bool>::get(), 0}, - { OUString("AddExternalLeading"), HANDLE_IS_ADD_EXTERNAL_LEADING, cppu::UnoType<bool>::get(), 0}, - { OUString("UseOldNumbering"), HANDLE_OLD_NUMBERING, cppu::UnoType<bool>::get(), 0}, - { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType<bool>::get(), 0}, + { u"PrinterIndependentLayout"_ustr, HANDLE_PRINTER_INDEPENDENT_LAYOUT, cppu::UnoType<sal_Int16>::get(), 0}, + { u"IsLabelDocument"_ustr, HANDLE_IS_LABEL_DOC, cppu::UnoType<bool>::get(), 0}, + { u"AddFrameOffsets"_ustr, HANDLE_IS_ADD_FLY_OFFSET, cppu::UnoType<bool>::get(), 0}, + { u"AddVerticalFrameOffsets"_ustr, HANDLE_IS_ADD_VERTICAL_FLY_OFFSET, cppu::UnoType<bool>::get(), 0}, + { u"AddExternalLeading"_ustr, HANDLE_IS_ADD_EXTERNAL_LEADING, cppu::UnoType<bool>::get(), 0}, + { u"UseOldNumbering"_ustr, HANDLE_OLD_NUMBERING, cppu::UnoType<bool>::get(), 0}, + { u"OutlineLevelYieldsNumbering"_ustr, HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType<bool>::get(), 0}, /* Stampit It disable the print cancel button of the shown progress dialog. */ - { OUString("AllowPrintJobCancel"), HANDLE_ALLOW_PRINTJOB_CANCEL, cppu::UnoType<bool>::get(), 0}, - { OUString("UseFormerLineSpacing"), HANDLE_USE_FORMER_LINE_SPACING, cppu::UnoType<bool>::get(), 0}, - { OUString("AddParaSpacingToTableCells"), HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(), 0}, - { OUString("AddParaLineSpacingToTableCells"), HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(), 0}, - { OUString("UseFormerObjectPositioning"), HANDLE_USE_FORMER_OBJECT_POSITIONING, cppu::UnoType<bool>::get(), 0}, - { OUString("UseFormerTextWrapping"), HANDLE_USE_FORMER_TEXT_WRAPPING, cppu::UnoType<bool>::get(), 0}, - { OUString("RedlineProtectionKey"), HANDLE_CHANGES_PASSWORD, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0}, - { OUString("ConsiderTextWrapOnObjPos"), HANDLE_CONSIDER_WRAP_ON_OBJPOS, cppu::UnoType<bool>::get(), 0}, - { OUString("IgnoreFirstLineIndentInNumbering"), HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, cppu::UnoType<bool>::get(), 0}, + { u"AllowPrintJobCancel"_ustr, HANDLE_ALLOW_PRINTJOB_CANCEL, cppu::UnoType<bool>::get(), 0}, + { u"UseFormerLineSpacing"_ustr, HANDLE_USE_FORMER_LINE_SPACING, cppu::UnoType<bool>::get(), 0}, + { u"AddParaSpacingToTableCells"_ustr, HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(), 0}, + { u"AddParaLineSpacingToTableCells"_ustr, HANDLE_ADD_PARA_LINE_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(), 0}, + { u"UseFormerObjectPositioning"_ustr, HANDLE_USE_FORMER_OBJECT_POSITIONING, cppu::UnoType<bool>::get(), 0}, + { u"UseFormerTextWrapping"_ustr, HANDLE_USE_FORMER_TEXT_WRAPPING, cppu::UnoType<bool>::get(), 0}, + { u"RedlineProtectionKey"_ustr, HANDLE_CHANGES_PASSWORD, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0}, + { u"ConsiderTextWrapOnObjPos"_ustr, HANDLE_CONSIDER_WRAP_ON_OBJPOS, cppu::UnoType<bool>::get(), 0}, + { u"IgnoreFirstLineIndentInNumbering"_ustr, HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, cppu::UnoType<bool>::get(), 0}, { u"NoGapAfterNoteNumber"_ustr, HANDLE_NO_GAP_AFTER_NOTE_NUMBER, cppu::UnoType<bool>::get(), 0}, { OUString("DoNotJustifyLinesWithManualBreak"), HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, cppu::UnoType<bool>::get(), 0}, { OUString("DoNotResetParaAttrsForNumFont"), HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, cppu::UnoType<bool>::get(), 0}, @@ -812,13 +812,13 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Sequence< beans::PropertyValue > aInfo; if ( !( rValue >>= aInfo ) ) throw lang::IllegalArgumentException( - "Value of type Sequence<PropertyValue> expected!", + u"Value of type Sequence<PropertyValue> expected!"_ustr, uno::Reference< uno::XInterface >(), 2 ); if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) ) throw beans::PropertyVetoException( - "The hash is not allowed to be changed now!", + u"The hash is not allowed to be changed now!"_ustr, uno::Reference< uno::XInterface >() ); } break; @@ -1758,7 +1758,7 @@ void SwXDocumentSettings::_postGetValues () // XServiceInfo OUString SAL_CALL SwXDocumentSettings::getImplementationName( ) { - return "SwXDocumentSettings"; + return u"SwXDocumentSettings"_ustr; } sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName ) @@ -1768,7 +1768,7 @@ sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceN Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( ) { - return { "com.sun.star.document.Settings", "com.sun.star.text.DocumentSettings", "com.sun.star.text.PrintSettings" }; + return { u"com.sun.star.document.Settings"_ustr, u"com.sun.star.text.DocumentSettings"_ustr, u"com.sun.star.text.PrintSettings"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx index f73a4b0dd023..44d6c65c2375 100644 --- a/sw/source/uibase/uno/SwXFilterOptions.cxx +++ b/sw/source/uibase/uno/SwXFilterOptions.cxx @@ -113,13 +113,13 @@ void SwXFilterOptions::setSourceDocument( const uno::Reference<XComponent >& x void SAL_CALL SwXFilterOptions::initialize(const uno::Sequence<uno::Any>& rArguments) { ::comphelper::NamedValueCollection aProperties(rArguments); - if (aProperties.has("ParentWindow")) - aProperties.get("ParentWindow") >>= m_xDialogParent; + if (aProperties.has(u"ParentWindow"_ustr)) + aProperties.get(u"ParentWindow"_ustr) >>= m_xDialogParent; } OUString SwXFilterOptions::getImplementationName() { - return "com.sun.star.comp.Writer.FilterOptionsDialog"; + return u"com.sun.star.comp.Writer.FilterOptionsDialog"_ustr; } sal_Bool SwXFilterOptions::supportsService( const OUString& rServiceName ) @@ -129,7 +129,7 @@ sal_Bool SwXFilterOptions::supportsService( const OUString& rServiceName ) uno::Sequence< OUString > SwXFilterOptions::getSupportedServiceNames() { - return { "com.sun.star.ui.dialogs.FilterOptionsDialog" }; + return { u"com.sun.star.ui.dialogs.FilterOptionsDialog"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/sw/source/uibase/uno/loktxdoc.cxx b/sw/source/uibase/uno/loktxdoc.cxx index 36c7de04e848..ff9819e97529 100644 --- a/sw/source/uibase/uno/loktxdoc.cxx +++ b/sw/source/uibase/uno/loktxdoc.cxx @@ -55,13 +55,13 @@ void GetTextFormFields(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, OUString aType; OUString aCommandPrefix; { - auto it = rArguments.find("type"); + auto it = rArguments.find(u"type"_ustr); if (it != rArguments.end()) { aType = it->second; } - it = rArguments.find("commandPrefix"); + it = rArguments.find(u"commandPrefix"_ustr); if (it != rArguments.end()) { aCommandPrefix = it->second; @@ -110,13 +110,13 @@ void GetTextFormField(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aType; OUString aCommandPrefix; - auto it = rArguments.find("type"); + auto it = rArguments.find(u"type"_ustr); if (it != rArguments.end()) { aType = it->second; } - it = rArguments.find("commandPrefix"); + it = rArguments.find(u"commandPrefix"_ustr); if (it != rArguments.end()) { aCommandPrefix = it->second; @@ -163,7 +163,7 @@ void GetDocumentProperties(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell const std::map<OUString, OUString>& rArguments) { OUString aNamePrefix; - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; @@ -208,7 +208,7 @@ void GetBookmarks(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aNamePrefix; { - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; @@ -240,7 +240,7 @@ void GetBookmark(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aNamePrefix; { - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; @@ -276,7 +276,7 @@ void GetFields(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aTypeName; { - auto it = rArguments.find("typeName"); + auto it = rArguments.find(u"typeName"_ustr); if (it != rArguments.end()) { aTypeName = it->second; @@ -290,7 +290,7 @@ void GetFields(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, OUString aNamePrefix; { - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; @@ -337,7 +337,7 @@ void GetField(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aTypeName; { - auto it = rArguments.find("typeName"); + auto it = rArguments.find(u"typeName"_ustr); if (it != rArguments.end()) { aTypeName = it->second; @@ -351,7 +351,7 @@ void GetField(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, OUString aNamePrefix; { - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; @@ -388,7 +388,7 @@ void GetSections(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, { OUString aNamePrefix; { - auto it = rArguments.find("namePrefix"); + auto it = rArguments.find(u"namePrefix"_ustr); if (it != rArguments.end()) { aNamePrefix = it->second; diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 22de9f34a175..809b9d388f65 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -148,7 +148,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName( //check for non-ASCII characters if(aGroupName.isEmpty()) { - throw lang::IllegalArgumentException("group name must not be empty", nullptr, 0); + throw lang::IllegalArgumentException(u"group name must not be empty"_ustr, nullptr, 0); } for(sal_Int32 nPos = 0; nPos < aGroupName.getLength(); nPos++) { @@ -160,7 +160,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName( { continue; } - throw lang::IllegalArgumentException("group name must contain a-z, A-z, '_', ' ' only", nullptr, 0); + throw lang::IllegalArgumentException(u"group name must contain a-z, A-z, '_', ' ' only"_ustr, nullptr, 0); } OUString sGroup(aGroupName); if (sGroup.indexOf(GLOS_DELIM)<0) @@ -188,7 +188,7 @@ void SwXAutoTextContainer::removeByName(const OUString& aGroupName) OUString SwXAutoTextContainer::getImplementationName() { - return "SwXAutoTextContainer"; + return u"SwXAutoTextContainer"_ustr; } sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) @@ -198,7 +198,7 @@ sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SwXAutoTextContainer::getSupportedServiceNames() { - return { "com.sun.star.text.AutoTextContainer" }; + return { u"com.sun.star.text.AutoTextContainer"_ustr }; } SwXAutoTextGroup::SwXAutoTextGroup(const OUString& rName, @@ -383,7 +383,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetRuntimeException( - "Error Getting AutoText!", + u"Error Getting AutoText!"_ustr, getXWeak(), anyEx ); } @@ -626,7 +626,7 @@ void SwXAutoTextGroup::Invalidate() OUString SwXAutoTextGroup::getImplementationName() { - return "SwXAutoTextGroup"; + return u"SwXAutoTextGroup"_ustr; } sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) @@ -636,7 +636,7 @@ sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames() { - uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextGroup" }; + uno::Sequence<OUString> aRet { u"com.sun.star.text.AutoTextGroup"_ustr }; return aRet; } @@ -868,7 +868,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR OUString SwXAutoTextEntry::getImplementationName() { - return "SwXAutoTextEntry"; + return u"SwXAutoTextEntry"_ustr; } sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) @@ -878,7 +878,7 @@ sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames() { - uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextEntry" }; + uno::Sequence<OUString> aRet { u"com.sun.star.text.AutoTextEntry"_ustr }; return aRet; } @@ -907,7 +907,7 @@ SwAutoTextEventDescriptor::~SwAutoTextEventDescriptor() OUString SwAutoTextEventDescriptor::getImplementationName() { - return "SwAutoTextEventDescriptor"; + return u"SwAutoTextEventDescriptor"_ustr; } void SwAutoTextEventDescriptor::replaceByName( diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index a67afc31c19d..7a8876d20a20 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -94,7 +94,7 @@ uno::Sequence<OUString> SAL_CALL SwXDispatchProviderInterceptor::getInterceptedU { uno::Sequence<OUString> aRet = { - OUString(".uno:DataSourceBrowser/*") + u".uno:DataSourceBrowser/*"_ustr }; return aRet; diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 2f36394eee1d..33de8d3a1f3b 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -139,11 +139,11 @@ static bool LoadFromURL_impl( { // try to open the document readonly and hidden Reference< frame::XModel > xTmpModel; - Sequence < PropertyValue > aArgs{ comphelper::makePropertyValue("Hidden", true) }; + Sequence < PropertyValue > aArgs{ comphelper::makePropertyValue(u"Hidden"_ustr, true) }; try { Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); - xTmpModel.set( xDesktop->loadComponentFromURL( rURL, "_blank", 0, aArgs ), UNO_QUERY ); + xTmpModel.set( xDesktop->loadComponentFromURL( rURL, u"_blank"_ustr, 0, aArgs ), UNO_QUERY ); } catch (const Exception&) { @@ -574,7 +574,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( !bValid ) { throw IllegalArgumentException( - "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'.", + u"The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'."_ustr, getXWeak(), 0 ); @@ -601,7 +601,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() ) { OSL_FAIL("PropertyValues missing or unset"); - throw IllegalArgumentException("Either the ResultSet or DataSourceName and DataCommand must be set.", getXWeak(), 0 ); + throw IllegalArgumentException(u"Either the ResultSet or DataSourceName and DataCommand must be set."_ustr, getXWeak(), 0 ); } // build ResultSet from DataSourceName, DataCommand and DataCommandType @@ -609,26 +609,26 @@ uno::Any SAL_CALL SwXMailMerge::execute( Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); if (xMgr.is()) { - Reference< XInterface > xInstance = xMgr->createInstance( "com.sun.star.sdb.RowSet" ); + Reference< XInterface > xInstance = xMgr->createInstance( u"com.sun.star.sdb.RowSet"_ustr ); aRowSetDisposeHelper.reset( xInstance, SharedComponent::TakeOwnership ); Reference< XPropertySet > xRowSetPropSet( xInstance, UNO_QUERY ); OSL_ENSURE( xRowSetPropSet.is(), "failed to get XPropertySet interface from RowSet" ); if (xRowSetPropSet.is()) { if (xCurConnection.is()) - xRowSetPropSet->setPropertyValue( "ActiveConnection", Any( xCurConnection ) ); - xRowSetPropSet->setPropertyValue( "DataSourceName", Any( aCurDataSourceName ) ); - xRowSetPropSet->setPropertyValue( "Command", Any( aCurDataCommand ) ); - xRowSetPropSet->setPropertyValue( "CommandType", Any( nCurDataCommandType ) ); - xRowSetPropSet->setPropertyValue( "EscapeProcessing", Any( bCurEscapeProcessing ) ); - xRowSetPropSet->setPropertyValue( "ApplyFilter", Any( true ) ); - xRowSetPropSet->setPropertyValue( "Filter", Any( aCurFilter ) ); + xRowSetPropSet->setPropertyValue( u"ActiveConnection"_ustr, Any( xCurConnection ) ); + xRowSetPropSet->setPropertyValue( u"DataSourceName"_ustr, Any( aCurDataSourceName ) ); + xRowSetPropSet->setPropertyValue( u"Command"_ustr, Any( aCurDataCommand ) ); + xRowSetPropSet->setPropertyValue( u"CommandType"_ustr, Any( nCurDataCommandType ) ); + xRowSetPropSet->setPropertyValue( u"EscapeProcessing"_ustr, Any( bCurEscapeProcessing ) ); + xRowSetPropSet->setPropertyValue( u"ApplyFilter"_ustr, Any( true ) ); + xRowSetPropSet->setPropertyValue( u"Filter"_ustr, Any( aCurFilter ) ); Reference< sdbc::XRowSet > xRowSet( xInstance, UNO_QUERY ); if (xRowSet.is()) xRowSet->execute(); // build ResultSet from properties if( !xCurConnection.is() ) - xCurConnection.set( xRowSetPropSet->getPropertyValue( "ActiveConnection" ), UNO_QUERY ); + xCurConnection.set( xRowSetPropSet->getPropertyValue( u"ActiveConnection"_ustr ), UNO_QUERY ); xCurResultSet = xRowSet; OSL_ENSURE( xCurResultSet.is(), "failed to build ResultSet" ); } @@ -654,7 +654,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( case MailMergeType::MAIL : nMergeType = DBMGR_MERGE_EMAIL; break; case MailMergeType::SHELL : nMergeType = DBMGR_MERGE_SHELL; break; default: - throw IllegalArgumentException("Invalid value of property: OutputType", getXWeak(), 0 ); + throw IllegalArgumentException(u"Invalid value of property: OutputType"_ustr, getXWeak(), 0 ); } SwWrtShell &rSh = pView->GetWrtShell(); @@ -704,7 +704,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else // default empty document without URL { if (aCurOutputURL.isEmpty()) - throw RuntimeException("OutputURL is not set and can not be obtained.", getXWeak() ); + throw RuntimeException(u"OutputURL is not set and can not be obtained."_ustr, getXWeak() ); } aURLObj.SetSmartURL( aCurOutputURL ); @@ -731,7 +731,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { aMergeDesc.sDBcolumn = m_sAddressFromColumn; if(m_sAddressFromColumn.isEmpty()) - throw RuntimeException("Mail address column not set.", getXWeak() ); + throw RuntimeException(u"Mail address column not set."_ustr, getXWeak() ); aMergeDesc.sSaveToFilter = m_sAttachmentFilter; aMergeDesc.sSubject = m_sSubject; aMergeDesc.sMailBody = m_sMailBody; @@ -749,7 +749,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( xInService, m_sInServerPassword, m_sOutServerPassword ); if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected()) - throw RuntimeException("Failed to connect to mail server.", getXWeak() ); + throw RuntimeException(u"Failed to connect to mail server."_ustr, getXWeak() ); } break; } @@ -775,7 +775,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( } } if ( !bStoredAsTemporary ) - throw RuntimeException("Failed to save temporary file.", getXWeak() ); + throw RuntimeException(u"Failed to save temporary file."_ustr, getXWeak() ); pMgr->SetMergeSilent( true ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); @@ -796,7 +796,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // (in case it wasn't a temporary model, it will be closed in the dtor, at the latest) if (!bSucc) - throw Exception("Mail merge failed. Sorry, no further information available.", getXWeak() ); + throw Exception(u"Mail merge failed. Sorry, no further information available."_ustr, getXWeak() ); //de-initialize services if(xInService.is() && xInService->isConnected()) @@ -1140,7 +1140,7 @@ void SAL_CALL SwXMailMerge::removeMailMergeEventListener( OUString SAL_CALL SwXMailMerge::getImplementationName() { - return "SwXMailMerge"; + return u"SwXMailMerge"_ustr; } sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName ) @@ -1150,7 +1150,7 @@ sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName ) uno::Sequence< OUString > SAL_CALL SwXMailMerge::getSupportedServiceNames() { - return { "com.sun.star.text.MailMerge", "com.sun.star.sdb.DataAccessDescriptor" }; + return { u"com.sun.star.text.MailMerge"_ustr, u"com.sun.star.sdb.DataAccessDescriptor"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index e931789c41bf..f8305d3c1682 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -126,54 +126,54 @@ static rtl::Reference<ChainablePropertySetInfo> lcl_createViewSettingsInfo() { static PropertyInfo const aViewSettingsMap_Impl[] = { - { OUString( "HelpURL" ), HANDLE_VIEWSET_HELP_URL , cppu::UnoType<OUString>::get(), PROPERTY_NONE}, - { OUString( "HorizontalRulerMetric"),HANDLE_VIEWSET_HORI_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "IsRasterVisible"), HANDLE_VIEWSET_IS_RASTER_VISIBLE, cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "IsSnapToRaster"), HANDLE_VIEWSET_IS_SNAP_TO_RASTER, cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowInlineTooltips" ), HANDLE_VIEWSET_INLINECHANGES_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "UseHeaderFooterMenu" ), HANDLE_VIEWSET_USE_HEADERFOOTERMENU , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowOutlineContentVisibilityButton" ), HANDLE_VIEWSET_SHOW_OUTLINECONTENTVISIBILITYBUTTON , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "TreatSubOutlineLevelsAsContent" ), HANDLE_VIEWSET_TREAT_SUB_OUTLINE_LEVELS_AS_CONTENT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowChangesInMargin" ), HANDLE_VIEWSET_CHANGES_IN_MARGIN, cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "RasterResolutionX"), HANDLE_VIEWSET_RASTER_RESOLUTION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "RasterResolutionY"), HANDLE_VIEWSET_RASTER_RESOLUTION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "RasterSubdivisionY"), HANDLE_VIEWSET_RASTER_SUBDIVISION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowBookmarks" ), HANDLE_VIEWSET_BOOKMARKS, cppu::UnoType<bool>::get(), PROPERTY_NONE }, - { OUString( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowFieldCommands"), HANDLE_VIEWSET_FIELD_COMMANDS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowFootnoteBackground"),HANDLE_VIEWSET_FOOTNOTE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowGraphics"), HANDLE_VIEWSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowHiddenCharacters"), HANDLE_VIEWSET_HIDDEN_CHARACTERS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "HideWhitespace"), HANDLE_VIEWSET_HIDE_WHITESPACE , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowHiddenParagraphs"), HANDLE_VIEWSET_HIDDEN_PARAGRAPHS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowHiddenText"), HANDLE_VIEWSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowHoriRuler"), HANDLE_VIEWSET_HRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowHoriScrollBar"), HANDLE_VIEWSET_HSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowIndexMarkBackground"),HANDLE_VIEWSET_INDEX_MARK_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE}, - { OUString( "ShowNonprintingCharacters"),HANDLE_VIEWSET_NONPRINTING_CHARACTERS, cppu::UnoType<bool>::get(),PROPERTY_NONE}, - { OUString( "ShowOnlineLayout"), HANDLE_VIEWSET_ONLINE_LAYOUT , cppu::UnoType<bool>::get(), PropertyAttribute::MAYBEVOID}, - { OUString( "ShowParaBreaks"), HANDLE_VIEWSET_PARA_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowProtectedSpaces"), HANDLE_VIEWSET_PROTECTED_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowRulers"), HANDLE_VIEWSET_SHOW_RULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowScrollBarTips"), HANDLE_VIEWSET_SCROLLBAR_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowSoftHyphens"), HANDLE_VIEWSET_SOFT_HYPHENS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowSpaces"), HANDLE_VIEWSET_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowTableBoundaries"), HANDLE_VIEWSET_TABLE_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowTables"), HANDLE_VIEWSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowTabstops"), HANDLE_VIEWSET_TABSTOPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowTextBoundaries"), HANDLE_VIEWSET_TEXT_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowTextFieldBackground"),HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE}, - { OUString( "ShowVertRuler"), HANDLE_VIEWSET_VRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "ShowVertScrollBar"), HANDLE_VIEWSET_VSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "SmoothScrolling"), HANDLE_VIEWSET_SMOOTH_SCROLLING , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "VerticalRulerMetric"), HANDLE_VIEWSET_VERT_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, - { OUString( "ZoomType"), HANDLE_VIEWSET_ZOOM_TYPE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, - { OUString( "ZoomValue"), HANDLE_VIEWSET_ZOOM , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, + { u"HelpURL"_ustr, HANDLE_VIEWSET_HELP_URL , cppu::UnoType<OUString>::get(), PROPERTY_NONE}, + { u"HorizontalRulerMetric"_ustr,HANDLE_VIEWSET_HORI_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"IsRasterVisible"_ustr, HANDLE_VIEWSET_IS_RASTER_VISIBLE, cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"IsSnapToRaster"_ustr, HANDLE_VIEWSET_IS_SNAP_TO_RASTER, cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"IsVertRulerRightAligned"_ustr,HANDLE_VIEWSET_VRULER_RIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowContentTips"_ustr, HANDLE_VIEWSET_SHOW_CONTENT_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowInlineTooltips"_ustr, HANDLE_VIEWSET_INLINECHANGES_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"UseHeaderFooterMenu"_ustr, HANDLE_VIEWSET_USE_HEADERFOOTERMENU , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowOutlineContentVisibilityButton"_ustr, HANDLE_VIEWSET_SHOW_OUTLINECONTENTVISIBILITYBUTTON , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"TreatSubOutlineLevelsAsContent"_ustr, HANDLE_VIEWSET_TREAT_SUB_OUTLINE_LEVELS_AS_CONTENT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowChangesInMargin"_ustr, HANDLE_VIEWSET_CHANGES_IN_MARGIN, cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"RasterResolutionX"_ustr, HANDLE_VIEWSET_RASTER_RESOLUTION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"RasterResolutionY"_ustr, HANDLE_VIEWSET_RASTER_RESOLUTION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"RasterSubdivisionX"_ustr, HANDLE_VIEWSET_RASTER_SUBDIVISION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"RasterSubdivisionY"_ustr, HANDLE_VIEWSET_RASTER_SUBDIVISION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"ShowAnnotations"_ustr, HANDLE_VIEWSET_ANNOTATIONS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowBookmarks"_ustr, HANDLE_VIEWSET_BOOKMARKS, cppu::UnoType<bool>::get(), PROPERTY_NONE }, + { u"ShowBreaks"_ustr, HANDLE_VIEWSET_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowDrawings"_ustr, HANDLE_VIEWSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowFieldCommands"_ustr, HANDLE_VIEWSET_FIELD_COMMANDS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowFootnoteBackground"_ustr,HANDLE_VIEWSET_FOOTNOTE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowGraphics"_ustr, HANDLE_VIEWSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowHiddenCharacters"_ustr, HANDLE_VIEWSET_HIDDEN_CHARACTERS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"HideWhitespace"_ustr, HANDLE_VIEWSET_HIDE_WHITESPACE , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowHiddenParagraphs"_ustr, HANDLE_VIEWSET_HIDDEN_PARAGRAPHS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowHiddenText"_ustr, HANDLE_VIEWSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowHoriRuler"_ustr, HANDLE_VIEWSET_HRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowHoriScrollBar"_ustr, HANDLE_VIEWSET_HSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowIndexMarkBackground"_ustr,HANDLE_VIEWSET_INDEX_MARK_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE}, + { u"ShowNonprintingCharacters"_ustr,HANDLE_VIEWSET_NONPRINTING_CHARACTERS, cppu::UnoType<bool>::get(),PROPERTY_NONE}, + { u"ShowOnlineLayout"_ustr, HANDLE_VIEWSET_ONLINE_LAYOUT , cppu::UnoType<bool>::get(), PropertyAttribute::MAYBEVOID}, + { u"ShowParaBreaks"_ustr, HANDLE_VIEWSET_PARA_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowProtectedSpaces"_ustr, HANDLE_VIEWSET_PROTECTED_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowRulers"_ustr, HANDLE_VIEWSET_SHOW_RULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowScrollBarTips"_ustr, HANDLE_VIEWSET_SCROLLBAR_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowSoftHyphens"_ustr, HANDLE_VIEWSET_SOFT_HYPHENS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowSpaces"_ustr, HANDLE_VIEWSET_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowTableBoundaries"_ustr, HANDLE_VIEWSET_TABLE_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowTables"_ustr, HANDLE_VIEWSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowTabstops"_ustr, HANDLE_VIEWSET_TABSTOPS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowTextBoundaries"_ustr, HANDLE_VIEWSET_TEXT_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowTextFieldBackground"_ustr,HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE}, + { u"ShowVertRuler"_ustr, HANDLE_VIEWSET_VRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"ShowVertScrollBar"_ustr, HANDLE_VIEWSET_VSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"SmoothScrolling"_ustr, HANDLE_VIEWSET_SMOOTH_SCROLLING , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"VerticalRulerMetric"_ustr, HANDLE_VIEWSET_VERT_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE}, + { u"ZoomType"_ustr, HANDLE_VIEWSET_ZOOM_TYPE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, + { u"ZoomValue"_ustr, HANDLE_VIEWSET_ZOOM , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, { OUString(), 0, css::uno::Type(), 0 } }; return new ChainablePropertySetInfo ( aViewSettingsMap_Impl ); @@ -183,23 +183,23 @@ static rtl::Reference<ChainablePropertySetInfo> lcl_createPrintSettingsInfo() { static PropertyInfo const aPrintSettingsMap_Impl[] = { - { OUString( "PrintAnnotationMode" ), HANDLE_PRINTSET_ANNOTATION_MODE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, - { OUString( "PrintBlackFonts" ), HANDLE_PRINTSET_BLACK_FONTS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintControls" ), HANDLE_PRINTSET_CONTROLS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintDrawings" ), HANDLE_PRINTSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintGraphics" ), HANDLE_PRINTSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintHiddenText"), HANDLE_PRINTSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintLeftPages" ), HANDLE_PRINTSET_LEFT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintPageBackground" ), HANDLE_PRINTSET_PAGE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintProspect" ), HANDLE_PRINTSET_PROSPECT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintProspectRTL" ), HANDLE_PRINTSET_PROSPECT_RTL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintReversed" ), HANDLE_PRINTSET_REVERSED , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintRightPages" ), HANDLE_PRINTSET_RIGHT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintFaxName" ), HANDLE_PRINTSET_FAX_NAME , cppu::UnoType<OUString>::get(), PROPERTY_NONE}, - { OUString( "PrintPaperFromSetup" ), HANDLE_PRINTSET_PAPER_FROM_SETUP , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintTables" ), HANDLE_PRINTSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintTextPlaceholder"), HANDLE_PRINTSET_PLACEHOLDER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, - { OUString( "PrintEmptyPages" ), HANDLE_PRINTSET_EMPTY_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintAnnotationMode"_ustr, HANDLE_PRINTSET_ANNOTATION_MODE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE}, + { u"PrintBlackFonts"_ustr, HANDLE_PRINTSET_BLACK_FONTS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintControls"_ustr, HANDLE_PRINTSET_CONTROLS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintDrawings"_ustr, HANDLE_PRINTSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintGraphics"_ustr, HANDLE_PRINTSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintHiddenText"_ustr, HANDLE_PRINTSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintLeftPages"_ustr, HANDLE_PRINTSET_LEFT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintPageBackground"_ustr, HANDLE_PRINTSET_PAGE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintProspect"_ustr, HANDLE_PRINTSET_PROSPECT , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintProspectRTL"_ustr, HANDLE_PRINTSET_PROSPECT_RTL , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintReversed"_ustr, HANDLE_PRINTSET_REVERSED , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintRightPages"_ustr, HANDLE_PRINTSET_RIGHT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintFaxName"_ustr, HANDLE_PRINTSET_FAX_NAME , cppu::UnoType<OUString>::get(), PROPERTY_NONE}, + { u"PrintPaperFromSetup"_ustr, HANDLE_PRINTSET_PAPER_FROM_SETUP , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintTables"_ustr, HANDLE_PRINTSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintTextPlaceholder"_ustr, HANDLE_PRINTSET_PLACEHOLDER , cppu::UnoType<bool>::get(), PROPERTY_NONE}, + { u"PrintEmptyPages"_ustr, HANDLE_PRINTSET_EMPTY_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE}, { OUString(), 0, css::uno::Type(), 0} }; return new ChainablePropertySetInfo ( aPrintSettingsMap_Impl ); @@ -237,7 +237,7 @@ Reference< XPropertySet > SwXModule::getPrintSettings() OUString SwXModule::getImplementationName() { - return "SwXModule"; + return u"SwXModule"_ustr; } sal_Bool SwXModule::supportsService(const OUString& rServiceName) @@ -247,7 +247,7 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) Sequence< OUString > SwXModule::getSupportedServiceNames() { - return { "com.sun.star.text.GlobalSettings" }; + return { u"com.sun.star.text.GlobalSettings"_ustr }; } SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc) @@ -494,7 +494,7 @@ void SwXPrintSettings::_postGetValues () OUString SwXPrintSettings::getImplementationName() { - return "SwXPrintSettings"; + return u"SwXPrintSettings"_ustr; } sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) @@ -504,7 +504,7 @@ sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() { - Sequence<OUString> aRet { "com.sun.star.text.PrintSettings" }; + Sequence<OUString> aRet { u"com.sun.star.text.PrintSettings"_ustr }; return aRet; } @@ -521,7 +521,7 @@ SwXViewSettings::SwXViewSettings(SwView* pVw) { // This property only exists if we have a view (ie, not at the module ) if ( !m_pView ) - mxInfo->remove ( "HelpURL" ); + mxInfo->remove ( u"HelpURL"_ustr ); } @@ -661,7 +661,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c break; default: throw IllegalArgumentException( - "SwXViewSettings: invalid zoom type", nullptr, 0); + u"SwXViewSettings: invalid zoom type"_ustr, nullptr, 0); } mpViewOption->SetZoomType( eZoom ); mbApplyZoom = true; @@ -942,7 +942,7 @@ void SwXViewSettings::_postGetValues () OUString SwXViewSettings::getImplementationName() { - return "SwXViewSettings"; + return u"SwXViewSettings"_ustr; } sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName) @@ -952,7 +952,7 @@ sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName) Sequence< OUString > SwXViewSettings::getSupportedServiceNames() { - Sequence<OUString> aRet { "com.sun.star.text.ViewSettings" }; + Sequence<OUString> aRet { u"com.sun.star.text.ViewSettings"_ustr }; return aRet; } diff --git a/sw/source/uibase/uno/unomodule.cxx b/sw/source/uibase/uno/unomodule.cxx index f35ebe417b87..714ae5d5ec1c 100644 --- a/sw/source/uibase/uno/unomodule.cxx +++ b/sw/source/uibase/uno/unomodule.cxx @@ -133,7 +133,7 @@ uno::Reference< frame::XDispatch > SAL_CALL SwUnoModule::queryDispatch( // XServiceInfo OUString SAL_CALL SwUnoModule::getImplementationName( ) { - return "com.sun.star.comp.Writer.WriterModule"; + return u"com.sun.star.comp.Writer.WriterModule"_ustr; } sal_Bool SAL_CALL SwUnoModule::supportsService( const OUString& sServiceName ) @@ -143,7 +143,7 @@ sal_Bool SAL_CALL SwUnoModule::supportsService( const OUString& sServiceName ) uno::Sequence< OUString > SAL_CALL SwUnoModule::getSupportedServiceNames( ) { - uno::Sequence<OUString> aSeq { "com.sun.star.text.ModuleDispatcher" }; + uno::Sequence<OUString> aSeq { u"com.sun.star.text.ModuleDispatcher"_ustr }; return aSeq; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 156f9aabad1f..79e5185799a8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -505,7 +505,7 @@ void SwXTextDocument::unlockControllers() { SolarMutexGuard aGuard; if(maActionArr.empty()) - throw RuntimeException("Nothing to unlock"); + throw RuntimeException(u"Nothing to unlock"_ustr); maActionArr.pop_front(); } @@ -585,7 +585,7 @@ void SwXTextDocument::close( sal_Bool bDeliverOwnership ) if(m_pDocShell) { uno::Sequence< uno::Any > aArgs; - m_pDocShell->CallAutomationDocumentEventSinks( "Close", aArgs ); + m_pDocShell->CallAutomationDocumentEventSinks( u"Close"_ustr, aArgs ); } SolarMutexGuard aGuard; if (m_bObjectValid && m_pHiddenViewFrame) @@ -714,7 +714,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > ThrowIfInvalid(); auto* pSearch = dynamic_cast<SwXTextSearch*>(xDesc.get()); if (!pSearch) - throw DisposedException("", getXWeak()); + throw DisposedException(u""_ustr, getXWeak()); Reference< XTextCursor > xCursor; auto pUnoCursor(CreateCursorForSearch(xCursor)); @@ -896,7 +896,7 @@ Reference< XIndexAccess > Reference< XTextCursor > xCursor; auto pResultCursor(FindAny(xDesc, xCursor, true, nResult, xTmp)); if(!pResultCursor) - throw RuntimeException("No result cursor"); + throw RuntimeException(u"No result cursor"_ustr); Reference< XIndexAccess > xRet = SwXTextRanges::Create( nResult ? &(*pResultCursor) : nullptr ); return xRet; } @@ -909,7 +909,7 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear Reference< XTextCursor > xCursor; auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xTmp)); if(!pResultCursor) - throw RuntimeException("No result cursor"); + throw RuntimeException(u"No result cursor"_ustr); Reference< XInterface > xRet; if(nResult) { @@ -928,10 +928,10 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > sal_Int32 nResult = 0; Reference< XTextCursor > xCursor; if(!xStartAt.is()) - throw RuntimeException("xStartAt missing"); + throw RuntimeException(u"xStartAt missing"_ustr); auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xStartAt)); if(!pResultCursor) - throw RuntimeException("No result cursor"); + throw RuntimeException(u"No result cursor"_ustr); Reference< XInterface > xRet; if(nResult) { @@ -957,23 +957,23 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings() aData = *pData; Any aVal; aVal <<= aData.GetRow(); - pArray[0] = beans::PropertyValue("PageRows", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[0] = beans::PropertyValue(u"PageRows"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= aData.GetCol(); - pArray[1] = beans::PropertyValue("PageColumns", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[1] = beans::PropertyValue(u"PageColumns"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetLeftSpace())); - pArray[2] = beans::PropertyValue("LeftMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[2] = beans::PropertyValue(u"LeftMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetRightSpace())); - pArray[3] = beans::PropertyValue("RightMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[3] = beans::PropertyValue(u"RightMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetTopSpace())); - pArray[4] = beans::PropertyValue("TopMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[4] = beans::PropertyValue(u"TopMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetBottomSpace())); - pArray[5] = beans::PropertyValue("BottomMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[5] = beans::PropertyValue(u"BottomMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetHorzSpace())); - pArray[6] = beans::PropertyValue("HoriMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[6] = beans::PropertyValue(u"HoriMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= static_cast<sal_Int32>(convertTwipToMm100(aData.GetVertSpace())); - pArray[7] = beans::PropertyValue("VertMargin", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[7] = beans::PropertyValue(u"VertMargin"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= aData.GetLandscape(); - pArray[8] = beans::PropertyValue("IsLandscape", -1, aVal, PropertyState_DIRECT_VALUE); + pArray[8] = beans::PropertyValue(u"IsLandscape"_ustr, -1, aVal, PropertyState_DIRECT_VALUE); return aSeq; } @@ -1040,13 +1040,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue if( sName == "PageRows" ) { if(!nVal || nVal > 0xff) - throw RuntimeException("Invalid value"); + throw RuntimeException(u"Invalid value"_ustr); aData.SetRow(nVal); } else if(sName == "PageColumns") { if(!nVal || nVal > 0xff) - throw RuntimeException("Invalid value"); + throw RuntimeException(u"Invalid value"_ustr); aData.SetCol(nVal); } else if(sName == "LeftMargin") @@ -1332,7 +1332,7 @@ public: virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override { if (Index != 0) - throw css::lang::IndexOutOfBoundsException("Writer documents have only one DrawPage!"); + throw css::lang::IndexOutOfBoundsException(u"Writer documents have only one DrawPage!"_ustr); return css::uno::Any(m_xDoc->getDrawPage()); } @@ -1347,7 +1347,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "SwDrawPagesObj"; + return u"SwDrawPagesObj"_ustr; } virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override @@ -1357,7 +1357,7 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.drawing.DrawPages" }; + return { u"com.sun.star.drawing.DrawPages"_ustr }; } }; @@ -1819,7 +1819,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames() OUString SwXTextDocument::getImplementationName() { - return "SwXTextDocument"; + return u"SwXTextDocument"_ustr; /* // Matching the .component information: return dynamic_cast<SwGlobalDocShell*>( pDocShell ) != nullptr ? OUString("com.sun.star.comp.Writer.GlobalDocument") @@ -1891,7 +1891,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any& case WID_DOC_PARA_COUNT : case WID_DOC_WORD_COUNT : throw RuntimeException( - "bad WID", + u"bad WID"_ustr, getXWeak()); case WID_DOC_WORD_SEPARATOR : { @@ -2210,7 +2210,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) That constant will be equivalent to 'ThisComponent' but for each application, so e.g. a 'ThisExcelDoc' and a 'ThisWordDoc' constant can co-exist, as required by VBA. */ - aAny <<= OUString( "ThisWordDoc" ); + aAny <<= u"ThisWordDoc"_ustr; } break; case WID_DOC_RUNTIME_UID: @@ -2398,7 +2398,7 @@ static VclPtr< OutputDevice > lcl_GetOutputDevice( const SwPrintUIOptions &rPrin { VclPtr< OutputDevice > pOut; - uno::Any aAny( rPrintUIOptions.getValue( "RenderDevice" )); + uno::Any aAny( rPrintUIOptions.getValue( u"RenderDevice"_ustr )); uno::Reference< awt::XDevice > xRenderDevice; aAny >>= xRenderDevice; if (xRenderDevice.is()) @@ -2873,9 +2873,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( } sal_Int32 nLen = 3; - aRenderer = { comphelper::makePropertyValue("PageSize", aPageSize), - comphelper::makePropertyValue("PageIncludesNonprintableArea", true), - comphelper::makePropertyValue("PagePos", aPagePos) }; + aRenderer = { comphelper::makePropertyValue(u"PageSize"_ustr, aPageSize), + comphelper::makePropertyValue(u"PageIncludesNonprintableArea"_ustr, true), + comphelper::makePropertyValue(u"PagePos"_ustr, aPagePos) }; if (aPreferredPageSize.Width && aPreferredPageSize.Height) { ++nLen; @@ -3455,15 +3455,15 @@ void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter) void SwXTextDocument::executeFromFieldEvent(const StringMap& aArguments) { - auto aIter = aArguments.find("type"); + auto aIter = aArguments.find(u"type"_ustr); if (aIter == aArguments.end() || aIter->second != "drop-down") return; - aIter = aArguments.find("cmd"); + aIter = aArguments.find(u"cmd"_ustr); if (aIter == aArguments.end() || aIter->second != "selected") return; - aIter = aArguments.find("data"); + aIter = aArguments.find(u"data"_ustr); if (aIter == aArguments.end()) return; @@ -3532,7 +3532,7 @@ inline constexpr OUString SELECTED_DATE_FORMAT = u"YYYY-MM-DD"_ustr; void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) { - auto it = rArguments.find("type"); + auto it = rArguments.find(u"type"_ustr); if (it == rArguments.end()) { return; @@ -3563,7 +3563,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) return; } - it = rArguments.find("selected"); + it = rArguments.find(u"selected"_ustr); if (it == rArguments.end()) { return; @@ -3575,7 +3575,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) } else if (it->second == "picture") { - it = rArguments.find("changed"); + it = rArguments.find(u"changed"_ustr); if (it == rArguments.end()) { return; @@ -3619,7 +3619,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) return; } - it = rArguments.find("selected"); + it = rArguments.find(u"selected"_ustr); if (it == rArguments.end()) { return; @@ -3789,7 +3789,7 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: { { "NewTheme", uno::Any(sThemeName) } })); - comphelper::dispatchCommand(".uno:ChangeTheme", aPropertyValues); + comphelper::dispatchCommand(u".uno:ChangeTheme"_ustr, aPropertyValues); } } @@ -3971,7 +3971,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( const bool bComplex = 0 != (nScriptTypes & nComplex); if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex)) - throw IllegalArgumentException("nScriptTypes ranges from 1 to 7!", Reference< XInterface >(), 1); + throw IllegalArgumentException(u"nScriptTypes ranges from 1 to 7!"_ustr, Reference< XInterface >(), 1); if (!m_pDocShell) throw DisposedException(); SwDoc& rDoc = GetDocOrThrow(); @@ -4168,8 +4168,8 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) { Any aRet; if(!m_pxDoc) - throw RuntimeException("No document available"); - OUString sSuffix("|"); + throw RuntimeException(u"No document available"_ustr); + OUString sSuffix(u"|"_ustr); if(rName == m_sTables) { sSuffix += "table"; @@ -4271,7 +4271,7 @@ sal_Bool SwXLinkTargetSupplier::hasElements() OUString SwXLinkTargetSupplier::getImplementationName() { - return "SwXLinkTargetSupplier"; + return u"SwXLinkTargetSupplier"_ustr; } sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName) @@ -4281,7 +4281,7 @@ sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName) Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" }; + Sequence< OUString > aRet { u"com.sun.star.document.LinkTargets"_ustr }; return aRet; } @@ -4325,7 +4325,7 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName) { sParam = sParam.copy(0, sParam.getLength() - sSuffix.getLength()); if(!m_pxDoc->GetDocShell()) - throw RuntimeException("No document shell available"); + throw RuntimeException(u"No document shell available"_ustr); SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc(); if (sSuffix == "|outline") @@ -4371,7 +4371,7 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName) aRet = m_xRealAccess->getByName(sParam.copy(0, sParam.getLength() - sSuffix.getLength())); Reference< XInterface > xInt; if(!(aRet >>= xInt)) - throw RuntimeException("Could not retrieve property"); + throw RuntimeException(u"Could not retrieve property"_ustr); Reference< XPropertySet > xProp(xInt, UNO_QUERY); aRet <<= xProp; bFound = true; @@ -4389,7 +4389,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames() if(m_pxDoc) { if(!m_pxDoc->GetDocShell()) - throw RuntimeException("No document shell available"); + throw RuntimeException(u"No document shell available"_ustr); SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc(); if (m_sLinkSuffix == "|outline") { @@ -4444,7 +4444,7 @@ sal_Bool SwXLinkNameAccessWrapper::hasByName(const OUString& rName) if(m_pxDoc) { if(!m_pxDoc->GetDocShell()) - throw RuntimeException("No document shell available"); + throw RuntimeException(u"No document shell available"_ustr); SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc(); if (m_sLinkSuffix == "|outline") { @@ -4585,7 +4585,7 @@ Reference< XNameAccess > SwXLinkNameAccessWrapper::getLinks() OUString SwXLinkNameAccessWrapper::getImplementationName() { - return "SwXLinkNameAccessWrapper"; + return u"SwXLinkNameAccessWrapper"_ustr; } sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName) @@ -4595,7 +4595,7 @@ sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName) Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" }; + Sequence< OUString > aRet { u"com.sun.star.document.LinkTargets"_ustr }; return aRet; } @@ -4661,7 +4661,7 @@ void SwXOutlineTarget::removeVetoableChangeListener( OUString SwXOutlineTarget::getImplementationName() { - return "SwXOutlineTarget"; + return u"SwXOutlineTarget"_ustr; } sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) @@ -4671,7 +4671,7 @@ sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames() { - Sequence<OUString> aRet { "com.sun.star.document.LinkTarget" }; + Sequence<OUString> aRet { u"com.sun.star.document.LinkTarget"_ustr }; return aRet; } @@ -4728,7 +4728,7 @@ void SwXDrawingObjectTarget::removeVetoableChangeListener( OUString SwXDrawingObjectTarget::getImplementationName() { - return "SwXDrawingObjectTarget"; + return u"SwXDrawingObjectTarget"_ustr; } sal_Bool SwXDrawingObjectTarget::supportsService(const OUString& ServiceName) @@ -4738,7 +4738,7 @@ sal_Bool SwXDrawingObjectTarget::supportsService(const OUString& ServiceName) Sequence< OUString > SwXDrawingObjectTarget::getSupportedServiceNames() { - Sequence<OUString> aRet { "com.sun.star.document.LinkTarget" }; + Sequence<OUString> aRet { u"com.sun.star.document.LinkTarget"_ustr }; return aRet; } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index b0ea0d2318ac..35730b6cc492 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -777,7 +777,7 @@ void SAL_CALL SwXTextView::removeVetoableChangeListener( OUString SwXTextView::getImplementationName() { - return "SwXTextView"; + return u"SwXTextView"_ustr; } sal_Bool SwXTextView::supportsService(const OUString& rServiceName) @@ -787,7 +787,7 @@ sal_Bool SwXTextView::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextView::getSupportedServiceNames() { - return { "com.sun.star.text.TextDocumentView", "com.sun.star.view.OfficeDocumentView" }; + return { u"com.sun.star.text.TextDocumentView"_ustr, u"com.sun.star.view.OfficeDocumentView"_ustr }; } SwXTextViewCursor::SwXTextViewCursor(SwView* pVw) : @@ -866,7 +866,7 @@ void SwXTextViewCursor::collapseToStart() throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -888,7 +888,7 @@ void SwXTextViewCursor::collapseToEnd() throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -911,7 +911,7 @@ sal_Bool SwXTextViewCursor::isCollapsed() throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); const SwWrtShell& rSh = m_pView->GetWrtShell(); bRet = !rSh.HasSelection(); @@ -928,7 +928,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().Left( SwCursorSkipMode::Chars, bExpand, nCount, true ); @@ -943,7 +943,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().Right( SwCursorSkipMode::Chars, bExpand, nCount, true ); @@ -960,7 +960,7 @@ void SwXTextViewCursor::gotoRange( throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) @@ -1088,7 +1088,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); m_pView->GetWrtShell().StartOfSection( bExpand ); @@ -1102,7 +1102,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); m_pView->GetWrtShell().EndOfSection( bExpand ); @@ -1259,7 +1259,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText() throw uno::RuntimeException(); if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCursor = rSh.GetCursor(); @@ -1277,7 +1277,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart() throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCursor = rSh.GetCursor(); @@ -1295,7 +1295,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd() throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCursor = rSh.GetCursor(); @@ -1348,7 +1348,7 @@ void SwXTextViewCursor::setString(const OUString& aString) return; if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); ShellMode eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1495,7 +1495,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().Down( bExpand, nCount, true ); @@ -1511,7 +1511,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection()) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().Up( bExpand, nCount, true ); @@ -1526,7 +1526,7 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine() throw uno::RuntimeException(); if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().IsAtLeftMargin(); @@ -1541,7 +1541,7 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine() throw uno::RuntimeException(); if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); bRet = m_pView->GetWrtShell().IsAtRightMargin(); @@ -1555,7 +1555,7 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); m_pView->GetWrtShell().RightMargin(bExpand, true); @@ -1568,7 +1568,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw uno::RuntimeException(); if (!IsTextSelection( false )) - throw uno::RuntimeException("no text selection", getXWeak() ); + throw uno::RuntimeException(u"no text selection"_ustr, getXWeak() ); m_pView->GetWrtShell().LeftMargin(bExpand, true); @@ -1576,7 +1576,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) OUString SwXTextViewCursor::getImplementationName() { - return "SwXTextViewCursor"; + return u"SwXTextViewCursor"_ustr; } sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) @@ -1586,13 +1586,13 @@ sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames() { - return { "com.sun.star.text.TextViewCursor", - "com.sun.star.style.CharacterProperties", - "com.sun.star.style.CharacterPropertiesAsian", - "com.sun.star.style.CharacterPropertiesComplex", - "com.sun.star.style.ParagraphProperties", - "com.sun.star.style.ParagraphPropertiesAsian", - "com.sun.star.style.ParagraphPropertiesComplex" }; + return { u"com.sun.star.text.TextViewCursor"_ustr, + u"com.sun.star.style.CharacterProperties"_ustr, + u"com.sun.star.style.CharacterPropertiesAsian"_ustr, + u"com.sun.star.style.CharacterPropertiesComplex"_ustr, + u"com.sun.star.style.ParagraphProperties"_ustr, + u"com.sun.star.style.ParagraphPropertiesAsian"_ustr, + u"com.sun.star.style.ParagraphPropertiesComplex"_ustr }; } const SwDoc* SwXTextViewCursor::GetDoc() const @@ -1628,7 +1628,7 @@ SwXTextView::getTransferableForTextRange(uno::Reference<text::XTextRange> const& SwUnoInternalPaM aPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(aPam, xTextRange, ::sw::TextRangeMode::AllowNonTextNode)) { - throw uno::RuntimeException("invalid text range"); + throw uno::RuntimeException(u"invalid text range"_ustr); } //force immediate shell update