diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-28 11:40:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-28 18:02:08 +0200 |
commit | 592947c1a421eae46d6268798cf3eab6bc6f0dc6 (patch) | |
tree | 0ae0460a42d4b99705a41169e2c1448166ecea6d /sc | |
parent | 2cb410d1a7e39f01bd1e8488b220d1bc6d9674a3 (diff) |
loplugin:ostr in sc/../unoobj
Change-Id: I182a5f28c872eb4dd96b930b86b9aef42459f191
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168145
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
42 files changed, 321 insertions, 321 deletions
diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx index eae58aee6f7a..4f1523d77857 100644 --- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx +++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -SC_SIMPLE_SERVICE_INFO( ScChartRangeSelectionListener, "ScChartRangeSelectionListener", +SC_SIMPLE_SERVICE_INFO( ScChartRangeSelectionListener, u"ScChartRangeSelectionListener"_ustr, SC_SERVICENAME_CHRANGEHILIGHT ) ScChartRangeSelectionListener::ScChartRangeSelectionListener( ScTabViewShell * pViewShell ) : diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index 84178fba6d56..16a8237e391b 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -130,7 +130,7 @@ std::vector<OUString> lcl_getVisiblePageMembers(const uno::Reference<uno::XInter } // end anonymous namespace -SC_SIMPLE_SERVICE_INFO(PivotTableDataProvider, "PivotTableDataProvider", SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER) +SC_SIMPLE_SERVICE_INFO(PivotTableDataProvider, u"PivotTableDataProvider"_ustr, SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER) // DataProvider ============================================================== @@ -255,7 +255,7 @@ PivotTableDataProvider::createCategoriesDataSource(bool bOrientationIsColumn) uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence(); rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, lcl_identifierForCategories(), std::vector(rCategories))); - pSequence->setRole("categories"); + pSequence->setRole(u"categories"_ustr); xResult->setValues(uno::Reference<chart2::data::XDataSequence>(pSequence)); aLabeledSequences.push_back(xResult); @@ -585,7 +585,7 @@ PivotTableDataProvider::assignValuesToDataSequence(size_t nIndex) std::vector<ValueAndFormat> const & rRowOfData = m_aDataRowVector[nIndex]; rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, sDataID, std::vector(rRowOfData))); - pSequence->setRole("values-y"); + pSequence->setRole(u"values-y"_ustr); xDataSequence = pSequence; return xDataSequence; } @@ -624,7 +624,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t nIndex) rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, std::move(sLabelID), std::move(aLabelVector))); - pSequence->setRole("values-y"); + pSequence->setRole(u"values-y"_ustr); xDataSequence = pSequence; return xDataSequence; } @@ -641,7 +641,7 @@ css::uno::Reference<css::chart2::data::XDataSequence> rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, lcl_identifierForCategories(), std::vector(rCategories))); - pSequence->setRole("categories"); + pSequence->setRole(u"categories"_ustr); xDataSequence = pSequence; return xDataSequence; @@ -686,7 +686,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL PivotTableDataProvider::detectArgum return uno::Sequence<beans::PropertyValue>(); return comphelper::InitPropertySequence({ - { "CellRangeRepresentation", uno::Any(OUString("PivotChart")) }, + { "CellRangeRepresentation", uno::Any(u"PivotChart"_ustr) }, { "DataRowSource", uno::Any(chart::ChartDataRowSource_COLUMNS) }, { "FirstCellAsLabel", uno::Any(false) }, { "HasCategories", uno::Any(true) } diff --git a/sc/source/ui/unoobj/PivotTableDataSequence.cxx b/sc/source/ui/unoobj/PivotTableDataSequence.cxx index 733a57ec63b5..352e4b80e7fd 100644 --- a/sc/source/ui/unoobj/PivotTableDataSequence.cxx +++ b/sc/source/ui/unoobj/PivotTableDataSequence.cxx @@ -25,7 +25,7 @@ using namespace css; namespace sc { -SC_SIMPLE_SERVICE_INFO( PivotTableDataSequence, "PivotTableDataSequence", "com.sun.star.chart2.data.DataSequence") +SC_SIMPLE_SERVICE_INFO( PivotTableDataSequence, u"PivotTableDataSequence"_ustr, u"com.sun.star.chart2.data.DataSequence"_ustr) static std::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap() { diff --git a/sc/source/ui/unoobj/PivotTableDataSource.cxx b/sc/source/ui/unoobj/PivotTableDataSource.cxx index 5c47f0d12799..e6d0f74768dd 100644 --- a/sc/source/ui/unoobj/PivotTableDataSource.cxx +++ b/sc/source/ui/unoobj/PivotTableDataSource.cxx @@ -21,7 +21,7 @@ using namespace css; namespace sc { -SC_SIMPLE_SERVICE_INFO(PivotTableDataSource, "PivotTableDataSource", "com.sun.star.chart2.data.DataSource") +SC_SIMPLE_SERVICE_INFO(PivotTableDataSource, u"PivotTableDataSource"_ustr, u"com.sun.star.chart2.data.DataSource"_ustr) PivotTableDataSource::PivotTableDataSource(std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>&& xLabeledSequence) : m_xLabeledSequence(std::move(xLabeledSequence)) diff --git a/sc/source/ui/unoobj/TablePivotChart.cxx b/sc/source/ui/unoobj/TablePivotChart.cxx index 107d6d5baa8f..9b17b355de9a 100644 --- a/sc/source/ui/unoobj/TablePivotChart.cxx +++ b/sc/source/ui/unoobj/TablePivotChart.cxx @@ -26,7 +26,7 @@ using namespace css; namespace sc { -SC_SIMPLE_SERVICE_INFO(TablePivotChart, "TablePivotChart", "com.sun.star.table.TablePivotChart") +SC_SIMPLE_SERVICE_INFO(TablePivotChart, u"TablePivotChart"_ustr, u"com.sun.star.table.TablePivotChart"_ustr) TablePivotChart::TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, OUString aName) : m_pDocShell(pDocShell) diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx index f69a8298c393..2142a006e8e1 100644 --- a/sc/source/ui/unoobj/TablePivotCharts.cxx +++ b/sc/source/ui/unoobj/TablePivotCharts.cxx @@ -42,7 +42,7 @@ using namespace css; namespace sc { -SC_SIMPLE_SERVICE_INFO(TablePivotCharts, "TablePivotCharts", "com.sun.star.table.TablePivotCharts") +SC_SIMPLE_SERVICE_INFO(TablePivotCharts, u"TablePivotCharts"_ustr, u"com.sun.star.table.TablePivotCharts"_ustr) TablePivotCharts::TablePivotCharts(ScDocShell* pDocShell, SCTAB nTab) : m_pDocShell(pDocShell) diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index 7a1c2b8b80b2..2c4882de36b6 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -279,7 +279,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScAddressConversionObj ) OUString SAL_CALL ScAddressConversionObj::getImplementationName() { - return "ScAddressConversionObj"; + return u"ScAddressConversionObj"_ustr; } sal_Bool SAL_CALL ScAddressConversionObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 496e35684c47..bd1776fd0760 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -122,9 +122,9 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetAutoFieldMap() constexpr OUString SCAUTOFORMATSOBJ_SERVICE = u"com.sun.star.sheet.TableAutoFormats"_ustr; -SC_SIMPLE_SERVICE_INFO( ScAutoFormatFieldObj, "ScAutoFormatFieldObj", "com.sun.star.sheet.TableAutoFormatField" ) -SC_SIMPLE_SERVICE_INFO( ScAutoFormatObj, "ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat" ) -SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, "stardiv.StarCalc.ScAutoFormatsObj", SCAUTOFORMATSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScAutoFormatFieldObj, u"ScAutoFormatFieldObj"_ustr, u"com.sun.star.sheet.TableAutoFormatField"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScAutoFormatObj, u"ScAutoFormatObj"_ustr, u"com.sun.star.sheet.TableAutoFormat"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, u"stardiv.StarCalc.ScAutoFormatsObj"_ustr, SCAUTOFORMATSOBJ_SERVICE ) static bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, std::u16string_view rName, sal_uInt16& rOutIndex ) { @@ -261,7 +261,7 @@ void SAL_CALL ScAutoFormatsObj::removeByName( const OUString& aName ) uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.TableAutoFormatEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.TableAutoFormatEnumeration"_ustr); } // container::XIndexAccess @@ -368,7 +368,7 @@ rtl::Reference<ScAutoFormatFieldObj> ScAutoFormatObj::GetObjectByIndex_Impl(sal_ uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.TableAutoFormatEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.TableAutoFormatEnumeration"_ustr); } // container::XIndexAccess diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 3ea47324bf0b..c4c6f73dc7a2 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -82,9 +82,9 @@ constexpr OUString SCFUNCTIONLISTOBJ_SERVICE = u"com.sun.star.sheet.FunctionDesc constexpr OUString SCRECENTFUNCTIONSOBJ_SERVICE = u"com.sun.star.sheet.RecentFunctions"_ustr; constexpr OUString SCSPREADSHEETSETTINGS_SERVICE = u"com.sun.star.sheet.GlobalSheetSettings"_ustr; -SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "stardiv.StarCalc.ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "stardiv.StarCalc.ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "stardiv.StarCalc.ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, u"stardiv.StarCalc.ScFunctionListObj"_ustr, SCFUNCTIONLISTOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, u"stardiv.StarCalc.ScRecentFunctionsObj"_ustr, SCRECENTFUNCTIONSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, u"stardiv.StarCalc.ScSpreadsheetSettings"_ustr, SCSPREADSHEETSETTINGS_SERVICE ) ScSpreadsheetSettings::ScSpreadsheetSettings() : @@ -173,8 +173,8 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( if (!(aValue >>= n) || n < 0 || n >= ScLkUpdMode::LM_UNKNOWN) { throw css::lang::IllegalArgumentException( - ("LinkUpdateMode property value must be a SHORT with a value in the range of 0--2" - " as documented for css::sheet::XGlobalSheetSettings attribute LinkUpdateMode"), + (u"LinkUpdateMode property value must be a SHORT with a value in the range of 0--2" + " as documented for css::sheet::XGlobalSheetSettings attribute LinkUpdateMode"_ustr), css::uno::Reference<css::uno::XInterface>(), -1); } aAppOpt.SetLinkMode( static_cast<ScLkUpdMode>(n) ); @@ -556,7 +556,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex ) uno::Reference<container::XEnumeration> SAL_CALL ScFunctionListObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.FunctionDescriptionEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.FunctionDescriptionEnumeration"_ustr); } // XElementAccess diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 446330dd832d..19a1a94822bb 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -56,7 +56,7 @@ namespace calc // register our property at the base class registerPropertyNoMember( - "CellRange", + u"CellRange"_ustr, PROP_HANDLE_RANGE_ADDRESS, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType<CellRangeAddress>::get(), @@ -121,12 +121,12 @@ namespace calc void OCellListSource::checkInitialized() { if ( !m_bInitialized ) - throw NotInitializedException("CellListSource is not initialized", getXWeak()); + throw NotInitializedException(u"CellListSource is not initialized"_ustr, getXWeak()); } OUString SAL_CALL OCellListSource::getImplementationName( ) { - return "com.sun.star.comp.sheet.OCellListSource"; + return u"com.sun.star.comp.sheet.OCellListSource"_ustr; } sal_Bool SAL_CALL OCellListSource::supportsService( const OUString& _rServiceName ) @@ -136,8 +136,8 @@ namespace calc Sequence< OUString > SAL_CALL OCellListSource::getSupportedServiceNames( ) { - return {"com.sun.star.table.CellRangeListSource", - "com.sun.star.form.binding.ListEntrySource"}; + return {u"com.sun.star.table.CellRangeListSource"_ustr, + u"com.sun.star.form.binding.ListEntrySource"_ustr}; } CellRangeAddress OCellListSource::getRangeAddress( ) const @@ -193,7 +193,7 @@ namespace calc if (xProp.is()) { sal_Int32 nResultType; - if ((xProp->getPropertyValue("FormulaResultType2") >>= nResultType) && + if ((xProp->getPropertyValue(u"FormulaResultType2"_ustr) >>= nResultType) && nResultType == FormulaResult::VALUE) *pAny <<= xCell->getValue(); else @@ -339,7 +339,7 @@ namespace calc void SAL_CALL OCellListSource::initialize( const Sequence< Any >& _rArguments ) { if ( m_bInitialized ) - throw RuntimeException("CellListSource is already initialized", getXWeak()); + throw RuntimeException(u"CellListSource is already initialized"_ustr, getXWeak()); // get the cell address CellRangeAddress aRangeAddress; @@ -362,7 +362,7 @@ namespace calc } if ( !bFoundAddress ) - throw RuntimeException("Cell not found", getXWeak()); + throw RuntimeException(u"Cell not found"_ustr, getXWeak()); // determine the range we're bound to try @@ -396,7 +396,7 @@ namespace calc } if ( !m_xRange.is() ) - throw RuntimeException("Failed to retrieve cell range", getXWeak()); + throw RuntimeException(u"Failed to retrieve cell range"_ustr, getXWeak()); Reference<XModifyBroadcaster> xBroadcaster( m_xRange, UNO_QUERY ); if ( xBroadcaster.is() ) diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 4f354f361e5b..4defe47400b2 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -818,15 +818,15 @@ constexpr OUString SCSHEETCELLRANGE_SERVICE = u"com.sun.star.sheet.SheetCellRang constexpr OUString SCSPREADSHEET_SERVICE = u"com.sun.star.sheet.Spreadsheet"_ustr; constexpr OUString SCSHEETCELL_SERVICE = u"com.sun.star.sheet.SheetCell"_ustr; -SC_SIMPLE_SERVICE_INFO( ScCellFormatsEnumeration, "ScCellFormatsEnumeration", "com.sun.star.sheet.CellFormatRangesEnumeration" ) -SC_SIMPLE_SERVICE_INFO( ScCellFormatsObj, "ScCellFormatsObj", "com.sun.star.sheet.CellFormatRanges" ) -SC_SIMPLE_SERVICE_INFO( ScUniqueCellFormatsEnumeration, "ScUniqueCellFormatsEnumeration", "com.sun.star.sheet.UniqueCellFormatRangesEnumeration" ) -SC_SIMPLE_SERVICE_INFO( ScUniqueCellFormatsObj, "ScUniqueCellFormatsObj", "com.sun.star.sheet.UniqueCellFormatRanges" ) -SC_SIMPLE_SERVICE_INFO( ScCellRangesBase, "ScCellRangesBase", "stardiv.unknown" ) -SC_SIMPLE_SERVICE_INFO( ScCellsEnumeration, "ScCellsEnumeration", "com.sun.star.sheet.CellsEnumeration" ) -SC_SIMPLE_SERVICE_INFO( ScCellsObj, "ScCellsObj", "com.sun.star.sheet.Cells" ) -SC_SIMPLE_SERVICE_INFO( ScTableColumnObj, "ScTableColumnObj", "com.sun.star.table.TableColumn" ) -SC_SIMPLE_SERVICE_INFO( ScTableRowObj, "ScTableRowObj", "com.sun.star.table.TableRow" ) +SC_SIMPLE_SERVICE_INFO( ScCellFormatsEnumeration, u"ScCellFormatsEnumeration"_ustr, u"com.sun.star.sheet.CellFormatRangesEnumeration"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScCellFormatsObj, u"ScCellFormatsObj"_ustr, u"com.sun.star.sheet.CellFormatRanges"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScUniqueCellFormatsEnumeration, u"ScUniqueCellFormatsEnumeration"_ustr, u"com.sun.star.sheet.UniqueCellFormatRangesEnumeration"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScUniqueCellFormatsObj, u"ScUniqueCellFormatsObj"_ustr, u"com.sun.star.sheet.UniqueCellFormatRanges"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScCellRangesBase, u"ScCellRangesBase"_ustr, u"stardiv.unknown"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScCellsEnumeration, u"ScCellsEnumeration"_ustr, u"com.sun.star.sheet.CellsEnumeration"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScCellsObj, u"ScCellsObj"_ustr, u"com.sun.star.sheet.Cells"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableColumnObj, u"ScTableColumnObj"_ustr, u"com.sun.star.table.TableColumn"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableRowObj, u"ScTableRowObj"_ustr, u"com.sun.star.table.TableRow"_ustr ) //! move ScLinkListener into another file !!! @@ -4422,7 +4422,7 @@ sal_Bool SAL_CALL ScCellRangesObj::hasByName( const OUString& aName ) uno::Reference<container::XEnumeration> SAL_CALL ScCellRangesObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.SheetCellRangesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.SheetCellRangesEnumeration"_ustr); } // XIndexAccess @@ -4460,7 +4460,7 @@ sal_Bool SAL_CALL ScCellRangesObj::hasElements() // XServiceInfo OUString SAL_CALL ScCellRangesObj::getImplementationName() { - return "ScCellRangesObj"; + return u"ScCellRangesObj"_ustr; } sal_Bool SAL_CALL ScCellRangesObj::supportsService( const OUString& rServiceName ) @@ -5680,7 +5680,7 @@ const SfxItemPropertyMap& ScCellRangeObj::GetItemPropertyMap() OUString SAL_CALL ScCellRangeObj::getImplementationName() { - return "ScCellRangeObj"; + return u"ScCellRangeObj"_ustr; } sal_Bool SAL_CALL ScCellRangeObj::supportsService( const OUString& rServiceName ) @@ -6382,7 +6382,7 @@ const SfxItemPropertyMap& ScCellObj::GetItemPropertyMap() OUString SAL_CALL ScCellObj::getImplementationName() { - return "ScCellObj"; + return u"ScCellObj"_ustr; } sal_Bool SAL_CALL ScCellObj::supportsService( const OUString& rServiceName ) @@ -7229,7 +7229,7 @@ void SAL_CALL ScTableSheetObj::setLinkMode( sheet::SheetLinkMode nLinkMode ) OUString aUrl(getLinkUrl()); OUString aSheet(getLinkSheetName()); - link( aUrl, aSheet, "", "", nLinkMode ); + link( aUrl, aSheet, u""_ustr, u""_ustr, nLinkMode ); } OUString SAL_CALL ScTableSheetObj::getLinkUrl() @@ -7251,7 +7251,7 @@ void SAL_CALL ScTableSheetObj::setLinkUrl( const OUString& aLinkUrl ) sheet::SheetLinkMode eMode = getLinkMode(); OUString aSheet(getLinkSheetName()); - link( aLinkUrl, aSheet, "", "", eMode ); + link( aLinkUrl, aSheet, u""_ustr, u""_ustr, eMode ); } OUString SAL_CALL ScTableSheetObj::getLinkSheetName() @@ -7273,7 +7273,7 @@ void SAL_CALL ScTableSheetObj::setLinkSheetName( const OUString& aLinkSheetName sheet::SheetLinkMode eMode = getLinkMode(); OUString aUrl(getLinkUrl()); - link( aUrl, aLinkSheetName, "", "", eMode ); + link( aUrl, aLinkSheetName, u""_ustr, u""_ustr, eMode ); } void SAL_CALL ScTableSheetObj::link( const OUString& aUrl, const OUString& aSheetName, @@ -8214,7 +8214,7 @@ const SfxItemPropertyMap& ScTableSheetObj::GetItemPropertyMap() OUString SAL_CALL ScTableSheetObj::getImplementationName() { - return "ScTableSheetObj"; + return u"ScTableSheetObj"_ustr; } sal_Bool SAL_CALL ScTableSheetObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index c728f503a856..d817c9a970b4 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -60,7 +60,7 @@ namespace calc { // register our property at the base class registerPropertyNoMember( - "BoundCell", + u"BoundCell"_ustr, PROP_HANDLE_BOUND_CELL, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType<CellAddress>::get(), @@ -219,7 +219,7 @@ namespace calc if ( xProp.is() ) { sal_Int32 nResultType; - if ( (xProp->getPropertyValue("FormulaResultType2") >>= nResultType) + if ( (xProp->getPropertyValue(u"FormulaResultType2"_ustr) >>= nResultType) && nResultType == FormulaResult::VALUE ) bHasValue = true; } @@ -380,7 +380,7 @@ namespace calc { // set boolean number format if not already set - OUString sPropName( "NumberFormat" ); + OUString sPropName( u"NumberFormat"_ustr ); Reference<XPropertySet> xCellProp( m_xCell, UNO_QUERY ); Reference<XNumberFormatsSupplier> xSupplier( m_xDocument, UNO_QUERY ); if ( !(xSupplier.is() && xCellProp.is()) ) @@ -407,10 +407,10 @@ namespace calc if ( xOldFormat.is() ) { // use the locale of the existing format - xOldFormat->getPropertyValue("Locale") >>= aLocale; + xOldFormat->getPropertyValue(u"Locale"_ustr) >>= aLocale; sal_Int16 nOldType = ::comphelper::getINT16( - xOldFormat->getPropertyValue("Type") ); + xOldFormat->getPropertyValue(u"Type"_ustr) ); if ( nOldType & NumberFormat::LOGICAL ) bWasBoolean = true; } @@ -425,7 +425,7 @@ namespace calc void OCellValueBinding::checkInitialized() { if ( !m_bInitialized ) - throw NotInitializedException("CellValueBinding is not initialized", getXWeak()); + throw NotInitializedException(u"CellValueBinding is not initialized"_ustr, getXWeak()); } void OCellValueBinding::checkValueType( std::unique_lock<std::mutex>& rGuard, const Type& _rType ) const @@ -444,7 +444,7 @@ namespace calc OUString SAL_CALL OCellValueBinding::getImplementationName( ) { - return "com.sun.star.comp.sheet.OCellValueBinding"; + return u"com.sun.star.comp.sheet.OCellValueBinding"_ustr; } sal_Bool SAL_CALL OCellValueBinding::supportsService( const OUString& _rServiceName ) @@ -524,7 +524,7 @@ namespace calc void SAL_CALL OCellValueBinding::initialize( const Sequence< Any >& _rArguments ) { if ( m_bInitialized ) - throw RuntimeException("CellValueBinding is already initialized", getXWeak()); + throw RuntimeException(u"CellValueBinding is already initialized"_ustr, getXWeak()); // get the cell address CellAddress aAddress; @@ -547,7 +547,7 @@ namespace calc } if ( !bFoundAddress ) - throw RuntimeException("Cell not found", getXWeak()); + throw RuntimeException(u"Cell not found"_ustr, getXWeak()); // get the cell object try @@ -579,7 +579,7 @@ namespace calc } if ( !m_xCell.is() ) - throw RuntimeException("Failed to retrieve cell object", getXWeak()); + throw RuntimeException(u"Failed to retrieve cell object"_ustr, getXWeak()); m_xCellText.set(m_xCell, css::uno::UNO_QUERY); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 76c3f294b08d..5c35d8739b0d 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -62,12 +62,12 @@ #include <limits> -SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider", - "com.sun.star.chart2.data.DataProvider") -SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, "ScChart2DataSource", - "com.sun.star.chart2.data.DataSource") -SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, "ScChart2DataSequence", - "com.sun.star.chart2.data.DataSequence") +SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, u"ScChart2DataProvider"_ustr, + u"com.sun.star.chart2.data.DataProvider"_ustr) +SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, u"ScChart2DataSource"_ustr, + u"com.sun.star.chart2.data.DataSource"_ustr) +SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, u"ScChart2DataSequence"_ustr, + u"com.sun.star.chart2.data.DataSequence"_ustr) using namespace ::com::sun::star; using namespace ::formula; @@ -1803,7 +1803,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum { uno::Reference< beans::XPropertySet > xSeqProp( xLS->getValues(), uno::UNO_QUERY ); OUString aRole; - if( xSeqProp.is() && (xSeqProp->getPropertyValue("Role") >>= aRole) && + if( xSeqProp.is() && (xSeqProp->getPropertyValue(u"Role"_ustr) >>= aRole) && aRole == "categories" ) bThisIsCategories = bHasCategories = true; } diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index f3e4be6863e5..4449b57d3c64 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -54,8 +54,8 @@ using namespace css; #define PROP_HANDLE_RELATED_CELLRANGES 1 -SC_SIMPLE_SERVICE_INFO( ScChartObj, "ScChartObj", "com.sun.star.table.TableChart" ) -SC_SIMPLE_SERVICE_INFO( ScChartsObj, "ScChartsObj", "com.sun.star.table.TableCharts" ) +SC_SIMPLE_SERVICE_INFO( ScChartObj, u"ScChartObj"_ustr, u"com.sun.star.table.TableChart"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScChartsObj, u"ScChartsObj"_ustr, u"com.sun.star.table.TableCharts"_ustr ) ScChartsObj::ScChartsObj(ScDocShell* pDocSh, SCTAB nT) : pDocShell( pDocSh ), @@ -228,16 +228,16 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, // set arguments uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( - "CellRangeRepresentation", -1, + u"CellRangeRepresentation"_ustr, -1, uno::Any( sRangeStr ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "HasCategories", -1, + u"HasCategories"_ustr, -1, uno::Any( bRowHeaders ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "FirstCellAsLabel", -1, + u"FirstCellAsLabel"_ustr, -1, uno::Any( bColumnHeaders ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "DataRowSource", -1, + u"DataRowSource"_ustr, -1, uno::Any( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ) }; xReceiver->setArguments( aArgs ); @@ -289,7 +289,7 @@ void SAL_CALL ScChartsObj::removeByName( const OUString& aName ) uno::Reference<container::XEnumeration> SAL_CALL ScChartsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.table.TableChartsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.table.TableChartsEnumeration"_ustr); } // XIndexAccess @@ -412,7 +412,7 @@ ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, OUString aN) { pDocShell->GetDocument().AddUnoObject(*this); - registerPropertyNoMember( "RelatedCellRanges", + registerPropertyNoMember( u"RelatedCellRanges"_ustr, PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID, cppu::UnoType<uno::Sequence<table::CellRangeAddress>>::get(), css::uno::Any(uno::Sequence<table::CellRangeAddress>()) ); diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 945752a3c561..7ddef5f0094c 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -475,8 +475,8 @@ void ScCondFormatObj::createEntry(const sal_Int32 nType, const sal_Int32 nPos) switch (nType) { case sheet::ConditionEntryType::CONDITION: - pNewEntry = new ScCondFormatEntry(ScConditionMode::Equal, "", "", - rDoc, pFormat->GetRange().GetTopLeftCorner(), ""); + pNewEntry = new ScCondFormatEntry(ScConditionMode::Equal, u""_ustr, u""_ustr, + rDoc, pFormat->GetRange().GetTopLeftCorner(), u""_ustr); break; case sheet::ConditionEntryType::COLORSCALE: pNewEntry = new ScColorScaleFormat(&rDoc); diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index a5475dba2c2c..7adf05662b9d 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -178,8 +178,8 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( n > css::document::LinkUpdateModes::GLOBAL_SETTING) { throw css::lang::IllegalArgumentException( - ("LinkUpdateMode property value must be a SHORT with a value in" - " the range of the css::document::LinkUpdateModes constants"), + (u"LinkUpdateMode property value must be a SHORT with a value in" + " the range of the css::document::LinkUpdateModes constants"_ustr), css::uno::Reference<css::uno::XInterface>(), -1); } ScLkUpdMode eMode; @@ -336,23 +336,23 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( uno::Sequence< beans::PropertyValue > aInfo; if ( !( aValue >>= aInfo ) ) throw lang::IllegalArgumentException( - "Value of type Sequence<PropertyValue> expected!", + u"Value of type Sequence<PropertyValue> expected!"_ustr, uno::Reference< uno::XInterface >(), 2 ); if ( !pDocShell->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 ); } else if (aPropertyName == SC_UNO_MODIFYPASSWORDHASH) { sal_Int32 nHash; if (!(aValue >>= nHash)) - throw lang::IllegalArgumentException("Value of type sal_Int32 expected!", + throw lang::IllegalArgumentException(u"Value of type sal_Int32 expected!"_ustr, uno::Reference<uno::XInterface>(), 2); if (!pDocShell->SetModifyPasswordHash(nHash)) - throw beans::PropertyVetoException("The hash is not allowed to be changed now!"); + throw beans::PropertyVetoException(u"The hash is not allowed to be changed now!"_ustr); } else if (aPropertyName == SC_UNO_EMBED_FONTS) { @@ -649,7 +649,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDocumentConfiguration ) // XServiceInfo OUString SAL_CALL ScDocumentConfiguration::getImplementationName() { - return "ScDocumentConfiguration"; + return u"ScDocumentConfiguration"_ustr; } sal_Bool SAL_CALL ScDocumentConfiguration::supportsService( const OUString& rServiceName ) @@ -659,8 +659,8 @@ sal_Bool SAL_CALL ScDocumentConfiguration::supportsService( const OUString& rSer uno::Sequence<OUString> SAL_CALL ScDocumentConfiguration::getSupportedServiceNames() { - return {"com.sun.star.comp.SpreadsheetSettings", - "com.sun.star.document.Settings"}; + return {u"com.sun.star.comp.SpreadsheetSettings"_ustr, + u"com.sun.star.document.Settings"_ustr}; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx index 06936ed2038d..60744f720be6 100644 --- a/sc/source/ui/unoobj/cursuno.cxx +++ b/sc/source/ui/unoobj/cursuno.cxx @@ -433,7 +433,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScCellCursorObj::getCellRangeByName( OUString SAL_CALL ScCellCursorObj::getImplementationName() { - return "ScCellCursorObj"; + return u"ScCellCursorObj"_ustr; } sal_Bool SAL_CALL ScCellCursorObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index f481a55e3aa6..dde9fded610f 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -175,17 +175,17 @@ bool lclCheckMinMaxStep( const DataPilotFieldGroupInfo& rInfo ) } // namespace -SC_SIMPLE_SERVICE_INFO( ScDataPilotDescriptor, "ScDataPilotDescriptor", "stardiv::one::sheet::DataPilotDescriptor" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldObj, "ScDataPilotFieldObj", "com.sun.star.sheet.DataPilotField" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldsObj, "ScDataPilotFieldsObj", "com.sun.star.sheet.DataPilotFields" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotTableObj, "ScDataPilotTableObj", "com.sun.star.sheet.DataPilotTable" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotTablesObj, "ScDataPilotTablesObj", "com.sun.star.sheet.DataPilotTables" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotItemsObj, "ScDataPilotItemsObj", "com.sun.star.sheet.DataPilotItems" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotItemObj, "ScDataPilotItemObj", "com.sun.star.sheet.DataPilotItem" ) - -SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupsObj, "ScDataPilotFieldGroupsObj", "com.sun.star.sheet.DataPilotFieldGroups" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupObj, "ScDataPilotFieldGroupObj", "com.sun.star.sheet.DataPilotFieldGroup" ) -SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, "ScDataPilotFieldGroupItemObj", "com.sun.star.sheet.DataPilotFieldGroupItem" ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotDescriptor, u"ScDataPilotDescriptor"_ustr, u"stardiv::one::sheet::DataPilotDescriptor"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldObj, u"ScDataPilotFieldObj"_ustr, u"com.sun.star.sheet.DataPilotField"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldsObj, u"ScDataPilotFieldsObj"_ustr, u"com.sun.star.sheet.DataPilotFields"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotTableObj, u"ScDataPilotTableObj"_ustr, u"com.sun.star.sheet.DataPilotTable"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotTablesObj, u"ScDataPilotTablesObj"_ustr, u"com.sun.star.sheet.DataPilotTables"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotItemsObj, u"ScDataPilotItemsObj"_ustr, u"com.sun.star.sheet.DataPilotItems"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotItemObj, u"ScDataPilotItemObj"_ustr, u"com.sun.star.sheet.DataPilotItem"_ustr ) + +SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupsObj, u"ScDataPilotFieldGroupsObj"_ustr, u"com.sun.star.sheet.DataPilotFieldGroups"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupObj, u"ScDataPilotFieldGroupObj"_ustr, u"com.sun.star.sheet.DataPilotFieldGroup"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, u"ScDataPilotFieldGroupItemObj"_ustr, u"com.sun.star.sheet.DataPilotFieldGroupItem"_ustr ) // name that is used in the API for the data layout field constexpr OUString SC_DATALAYOUT_NAME = u"Data"_ustr; @@ -412,15 +412,15 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, throw IllegalArgumentException("Name \"" + aNewName + "\" already exists", getXWeak(), 0); if (!pDocShell) - throw RuntimeException("DocShell is null", getXWeak()); + throw RuntimeException(u"DocShell is null"_ustr, getXWeak()); auto pImp = dynamic_cast<ScDataPilotDescriptorBase*>( xDescriptor.get() ); if (!pImp) - throw RuntimeException("Failed to get ScDataPilotDescriptor", getXWeak()); + throw RuntimeException(u"Failed to get ScDataPilotDescriptor"_ustr, getXWeak()); ScDPObject* pNewObj = pImp->GetDPObject(); if (!pNewObj) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); ScRange aOutputRange(static_cast<SCCOL>(aOutputAddress.Column), static_cast<SCROW>(aOutputAddress.Row), static_cast<SCTAB>(aOutputAddress.Sheet), static_cast<SCCOL>(aOutputAddress.Column), static_cast<SCROW>(aOutputAddress.Row), static_cast<SCTAB>(aOutputAddress.Sheet)); @@ -436,7 +436,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, ScDBDocFunc aFunc(*pDocShell); if (!aFunc.CreatePivotTable(*pNewObj, true, true)) - throw RuntimeException("Failed to create pivot table", getXWeak()); + throw RuntimeException(u"Failed to create pivot table"_ustr, getXWeak()); } void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName ) @@ -456,7 +456,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName ) Reference< XEnumeration > SAL_CALL ScDataPilotTablesObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.DataPilotTablesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.DataPilotTablesEnumeration"_ustr); } // XIndexAccess @@ -610,7 +610,7 @@ CellRangeAddress SAL_CALL ScDataPilotDescriptorBase::getSourceRange() ScDPObject* pDPObject(GetDPObject()); if (!pDPObject) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); CellRangeAddress aRet; if (pDPObject->IsSheetData()) @@ -624,7 +624,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setSourceRange( const CellRangeAddress& ScDPObject* pDPObject = GetDPObject(); if (!pDPObject) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); ScSheetSourceDesc aSheetDesc(&pDocShell->GetDocument()); if (pDPObject->IsSheetData()) @@ -768,7 +768,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp OUString aStrVal; if ( aValue >>= aStrVal ) { - ScDPServiceDesc aServiceDesc("", "", "", "", ""); + ScDPServiceDesc aServiceDesc(u""_ustr, u""_ustr, u""_ustr, u""_ustr, u""_ustr); const ScDPServiceDesc* pOldDesc = pDPObject->GetDPServiceDesc(); if (pOldDesc) @@ -784,7 +784,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp uno::Sequence<beans::PropertyValue> aArgSeq; if ( aValue >>= aArgSeq ) { - ScDPServiceDesc aServiceDesc("", "", "", "", ""); + ScDPServiceDesc aServiceDesc(u""_ustr, u""_ustr, u""_ustr, u""_ustr, u""_ustr); const ScDPServiceDesc* pOldDesc = pDPObject->GetDPServiceDesc(); if (pOldDesc) @@ -1127,7 +1127,7 @@ Sequence< Sequence<Any> > SAL_CALL ScDataPilotTableObj::getDrillDownData(const C ScAddress aAddr2(static_cast<SCCOL>(aAddr.Column), static_cast<SCROW>(aAddr.Row), aAddr.Sheet); ScDPObject* pObj = GetDPObject(); if (!pObj) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); pObj->GetDrillDownData(aAddr2, aTabData); return aTabData; @@ -1140,7 +1140,7 @@ DataPilotTablePositionData SAL_CALL ScDataPilotTableObj::getPositionData(const C ScAddress aAddr2(static_cast<SCCOL>(aAddr.Column), static_cast<SCROW>(aAddr.Row), aAddr.Sheet); ScDPObject* pObj = GetDPObject(); if (!pObj) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); pObj->GetPositionData(aAddr2, aPosData); return aPosData; @@ -1151,10 +1151,10 @@ void SAL_CALL ScDataPilotTableObj::insertDrillDownSheet(const CellAddress& aAddr SolarMutexGuard aGuard; ScDPObject* pDPObj = GetDPObject(); if (!pDPObj) - throw RuntimeException("Failed to get DPObject", getXWeak()); + throw RuntimeException(u"Failed to get DPObject"_ustr, getXWeak()); ScTabViewShell* pViewSh = GetDocShell()->GetBestViewShell(); if (!pViewSh) - throw RuntimeException("Failed to get ViewShell", getXWeak()); + throw RuntimeException(u"Failed to get ViewShell"_ustr, getXWeak()); Sequence<DataPilotFieldFilter> aFilters; pDPObj->GetDataFieldPositionData( @@ -1542,7 +1542,7 @@ rtl::Reference<ScDataPilotFieldObj> ScDataPilotFieldsObj::GetObjectByName_Impl(c Reference<XEnumeration> SAL_CALL ScDataPilotFieldsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.DataPilotFieldsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.DataPilotFieldsEnumeration"_ustr); } // XIndexAccess @@ -2386,13 +2386,13 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons SolarMutexGuard aGuard; if( !rItems.hasElements() ) - throw IllegalArgumentException("rItems is empty", getXWeak(), 0); + throw IllegalArgumentException(u"rItems is empty"_ustr, getXWeak(), 0); Reference< XMembersAccess > xMembers = GetMembers(); if (!xMembers.is()) { SAL_WARN("sc.ui", "Cannot access members of the field object."); - throw RuntimeException("Cannot access members of the field object", getXWeak()); + throw RuntimeException(u"Cannot access members of the field object"_ustr, getXWeak()); } for (const OUString& aEntryName : rItems) @@ -2554,9 +2554,9 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con using namespace ::com::sun::star::sheet::DataPilotFieldGroupBy; if( !rInfo.HasDateValues ) - throw IllegalArgumentException("HasDateValues is not set", getXWeak(), 0); + throw IllegalArgumentException(u"HasDateValues is not set"_ustr, getXWeak(), 0); if( !lclCheckMinMaxStep( rInfo ) ) - throw IllegalArgumentException("min/max/step", getXWeak(), 0); + throw IllegalArgumentException(u"min/max/step"_ustr, getXWeak(), 0); // only a single date flag is allowed if( (rInfo.GroupBy == 0) || (rInfo.GroupBy > YEARS) || ((rInfo.GroupBy & (rInfo.GroupBy - 1)) != 0) ) @@ -2754,7 +2754,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::replaceByName( const OUString& rName, c SolarMutexGuard aGuard; if( rName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); ScFieldGroups::iterator aIt = implFindByName( rName ); if( aIt == maGroups.end() ) @@ -2763,7 +2763,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::replaceByName( const OUString& rName, c // read all item names provided by the passed object ScFieldGroupMembers aMembers; if( !lclExtractGroupMembers( aMembers, rElement ) ) - throw IllegalArgumentException("Invalid element object", getXWeak(), 0); + throw IllegalArgumentException(u"Invalid element object"_ustr, getXWeak(), 0); // copy and forget, faster than vector assignment aIt->maMembers.swap( aMembers ); @@ -2776,7 +2776,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::insertByName( const OUString& rName, co SolarMutexGuard aGuard; if( rName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); ScFieldGroups::iterator aIt = implFindByName( rName ); if( aIt != maGroups.end() ) @@ -2785,7 +2785,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::insertByName( const OUString& rName, co // read all item names provided by the passed object ScFieldGroupMembers aMembers; if( !lclExtractGroupMembers( aMembers, rElement ) ) - throw IllegalArgumentException("Invalid element object", getXWeak(), 0); + throw IllegalArgumentException(u"Invalid element object"_ustr, getXWeak(), 0); // create the new entry if no error has been occurred maGroups.emplace_back(); @@ -2799,7 +2799,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::removeByName( const OUString& rName ) SolarMutexGuard aGuard; if( rName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); ScFieldGroups::iterator aIt = implFindByName( rName ); if( aIt == maGroups.end() ) @@ -2829,7 +2829,7 @@ Any SAL_CALL ScDataPilotFieldGroupsObj::getByIndex( sal_Int32 nIndex ) Reference<XEnumeration> SAL_CALL ScDataPilotFieldGroupsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration( this, "com.sun.star.sheet.DataPilotFieldGroupsEnumeration" ); + return new ScIndexEnumeration( this, u"com.sun.star.sheet.DataPilotFieldGroupsEnumeration"_ustr ); } // XElementAccess @@ -2935,7 +2935,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::replaceByName( const OUString& rName, co // it should be possible to quickly rename an item -> accept string or XNamed OUString aNewName = lclExtractMember( rElement ); if( rName.isEmpty() || aNewName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); if( rName == aNewName ) return; @@ -2957,7 +2957,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::insertByName( const OUString& rName, con // we will ignore the passed element and just try to insert the name if( rName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); ScFieldGroupMembers& rMembers = mxParent->getFieldGroup( maGroupName ).maMembers; ScFieldGroupMembers::iterator aIt = ::std::find( rMembers.begin(), rMembers.end(), rName ); @@ -2971,7 +2971,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::removeByName( const OUString& rName ) SolarMutexGuard aGuard; if( rName.isEmpty() ) - throw IllegalArgumentException("Name is empty", getXWeak(), 0); + throw IllegalArgumentException(u"Name is empty"_ustr, getXWeak(), 0); ScFieldGroupMembers& rMembers = mxParent->getFieldGroup( maGroupName ).maMembers; ScFieldGroupMembers::iterator aIt = ::std::find( rMembers.begin(), rMembers.end(), rName ); if( aIt == rMembers.end() ) @@ -3001,7 +3001,7 @@ Any SAL_CALL ScDataPilotFieldGroupObj::getByIndex( sal_Int32 nIndex ) Reference< XEnumeration > SAL_CALL ScDataPilotFieldGroupObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration( this, "com.sun.star.sheet.DataPilotFieldGroupEnumeration" ); + return new ScIndexEnumeration( this, u"com.sun.star.sheet.DataPilotFieldGroupEnumeration"_ustr ); } // XElementAccess @@ -3137,7 +3137,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName ) Reference<XEnumeration> SAL_CALL ScDataPilotItemsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.DataPilotItemsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.DataPilotItemsEnumeration"_ustr); } // XIndexAccess diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 1bbd661a4f8b..f6fcabc7f17a 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -131,11 +131,11 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetDBRangePropertyMap() return aDBRangePropertyMap_Impl; } -SC_SIMPLE_SERVICE_INFO( ScConsolidationDescriptor, "ScConsolidationDescriptor", "com.sun.star.sheet.ConsolidationDescriptor" ) -SC_SIMPLE_SERVICE_INFO( ScDatabaseRangesObj, "ScDatabaseRangesObj", "com.sun.star.sheet.DatabaseRanges" ) -SC_SIMPLE_SERVICE_INFO( ScFilterDescriptorBase, "ScFilterDescriptorBase", "com.sun.star.sheet.SheetFilterDescriptor" ) -SC_SIMPLE_SERVICE_INFO( ScSubTotalDescriptorBase, "ScSubTotalDescriptorBase", "com.sun.star.sheet.SubTotalDescriptor" ) -SC_SIMPLE_SERVICE_INFO( ScSubTotalFieldObj, "ScSubTotalFieldObj", "com.sun.star.sheet.SubTotalField" ) +SC_SIMPLE_SERVICE_INFO( ScConsolidationDescriptor, u"ScConsolidationDescriptor"_ustr, u"com.sun.star.sheet.ConsolidationDescriptor"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDatabaseRangesObj, u"ScDatabaseRangesObj"_ustr, u"com.sun.star.sheet.DatabaseRanges"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScFilterDescriptorBase, u"ScFilterDescriptorBase"_ustr, u"com.sun.star.sheet.SheetFilterDescriptor"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScSubTotalDescriptorBase, u"ScSubTotalDescriptorBase"_ustr, u"com.sun.star.sheet.SubTotalDescriptor"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScSubTotalFieldObj, u"ScSubTotalFieldObj"_ustr, u"com.sun.star.sheet.SubTotalField"_ustr ) sheet::GeneralFunction ScDataUnoConversion::SubTotalToGeneral( ScSubTotalFunc eSubTotal ) { @@ -612,7 +612,7 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew( uno::Reference<container::XEnumeration> SAL_CALL ScSubTotalDescriptorBase::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.SubTotalFieldsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.SubTotalFieldsEnumeration"_ustr); } // XIndexAccess @@ -2106,7 +2106,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDatabaseRangeObj ) // XServiceInfo OUString SAL_CALL ScDatabaseRangeObj::getImplementationName() { - return "ScDatabaseRangeObj"; + return u"ScDatabaseRangeObj"_ustr; } sal_Bool SAL_CALL ScDatabaseRangeObj::supportsService( const OUString& rServiceName ) @@ -2116,7 +2116,7 @@ sal_Bool SAL_CALL ScDatabaseRangeObj::supportsService( const OUString& rServiceN uno::Sequence<OUString> SAL_CALL ScDatabaseRangeObj::getSupportedServiceNames() { - return {"com.sun.star.sheet.DatabaseRange", + return {u"com.sun.star.sheet.DatabaseRange"_ustr, SCLINKTARGET_SERVICE}; } @@ -2208,7 +2208,7 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const OUString& aName ) uno::Reference<container::XEnumeration> SAL_CALL ScDatabaseRangesObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.DatabaseRangesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.DatabaseRangesEnumeration"_ustr); } // XIndexAccess diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index 508ec91dc48d..7b4655f3c080 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -69,7 +69,7 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetDocDefaultsMap() using sc::TwipsToEvenHMM; -SC_SIMPLE_SERVICE_INFO( ScDocDefaultsObj, "ScDocDefaultsObj", "com.sun.star.sheet.Defaults" ) +SC_SIMPLE_SERVICE_INFO( ScDocDefaultsObj, u"ScDocDefaultsObj"_ustr, u"com.sun.star.sheet.Defaults"_ustr ) ScDocDefaultsObj::ScDocDefaultsObj(ScDocShell* pDocSh) : pDocShell( pDocSh ), diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 13682da51960..82f4286353fa 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -239,13 +239,13 @@ constexpr OUString SCMODELOBJ_SERVICE = u"com.sun.star.sheet.SpreadsheetDocument constexpr OUString SCDOCSETTINGS_SERVICE = u"com.sun.star.sheet.SpreadsheetDocumentSettings"_ustr; constexpr OUString SCDOC_SERVICE = u"com.sun.star.document.OfficeDocument"_ustr; -SC_SIMPLE_SERVICE_INFO( ScAnnotationsObj, "ScAnnotationsObj", "com.sun.star.sheet.CellAnnotations" ) -SC_SIMPLE_SERVICE_INFO( ScDrawPagesObj, "ScDrawPagesObj", "com.sun.star.drawing.DrawPages" ) -SC_SIMPLE_SERVICE_INFO( ScScenariosObj, "ScScenariosObj", "com.sun.star.sheet.Scenarios" ) -SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettingsObj, "ScSpreadsheetSettingsObj", "com.sun.star.sheet.SpreadsheetDocumentSettings" ) -SC_SIMPLE_SERVICE_INFO( ScTableColumnsObj, "ScTableColumnsObj", "com.sun.star.table.TableColumns" ) -SC_SIMPLE_SERVICE_INFO( ScTableRowsObj, "ScTableRowsObj", "com.sun.star.table.TableRows" ) -SC_SIMPLE_SERVICE_INFO( ScTableSheetsObj, "ScTableSheetsObj", "com.sun.star.sheet.Spreadsheets" ) +SC_SIMPLE_SERVICE_INFO( ScAnnotationsObj, u"ScAnnotationsObj"_ustr, u"com.sun.star.sheet.CellAnnotations"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDrawPagesObj, u"ScDrawPagesObj"_ustr, u"com.sun.star.drawing.DrawPages"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScScenariosObj, u"ScScenariosObj"_ustr, u"com.sun.star.sheet.Scenarios"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettingsObj, u"ScSpreadsheetSettingsObj"_ustr, u"com.sun.star.sheet.SpreadsheetDocumentSettings"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableColumnsObj, u"ScTableColumnsObj"_ustr, u"com.sun.star.table.TableColumns"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableRowsObj, u"ScTableRowsObj"_ustr, u"com.sun.star.table.TableRows"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableSheetsObj, u"ScTableSheetsObj"_ustr, u"com.sun.star.sheet.Spreadsheets"_ustr ) class ScPrintUIOptions : public vcl::PrinterOptionsHelper { @@ -266,26 +266,26 @@ ScPrintUIOptions::ScPrintUIOptions() // load the writer PrinterOptions into the custom tab m_aUIProperties[nIdx].Name = "OptionsUIFile"; - m_aUIProperties[nIdx++].Value <<= OUString("modules/scalc/ui/printeroptions.ui"); + m_aUIProperties[nIdx++].Value <<= u"modules/scalc/ui/printeroptions.ui"_ustr; // create Section for spreadsheet (results in an extra tab page in dialog) SvtModuleOptions aOpt; OUString aAppGroupname( ScResId( SCSTR_PRINTOPT_PRODNAME ) ); aAppGroupname = aAppGroupname.replaceFirst( "%s", aOpt.GetModuleName( SvtModuleOptions::EModule::CALC ) ); - m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, OUString()); + m_aUIProperties[nIdx++].Value = setGroupControlOpt(u"tabcontrol-page2"_ustr, aAppGroupname, OUString()); // show subgroup for pages - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pages", ScResId( SCSTR_PRINTOPT_PAGES ), OUString()); + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(u"pages"_ustr, ScResId( SCSTR_PRINTOPT_PAGES ), OUString()); // create a bool option for empty pages - m_aUIProperties[nIdx++].Value = setBoolControlOpt("suppressemptypages", ScResId( SCSTR_PRINTOPT_SUPPRESSEMPTY ), - ".HelpID:vcl:PrintDialog:IsSuppressEmptyPages:CheckBox", - "IsSuppressEmptyPages", + m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"suppressemptypages"_ustr, ScResId( SCSTR_PRINTOPT_SUPPRESSEMPTY ), + u".HelpID:vcl:PrintDialog:IsSuppressEmptyPages:CheckBox"_ustr, + u"IsSuppressEmptyPages"_ustr, bSuppress); // show Subgroup for print content vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = "PrintRange"; - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", ScResId( SCSTR_PRINTOPT_PAGES ), + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(u"printrange"_ustr, ScResId( SCSTR_PRINTOPT_PAGES ), OUString(), aPrintRangeOpt); @@ -295,23 +295,23 @@ ScPrintUIOptions::ScPrintUIOptions() ScResId( SCSTR_PRINTOPT_SELECTEDSHEETS ), ScResId( SCSTR_PRINTOPT_SELECTEDCELLS )}; uno::Sequence< OUString > aHelpIds{ - ".HelpID:vcl:PrintDialog:PrintContent:ListBox"}; - m_aUIProperties[nIdx++].Value = setChoiceListControlOpt( "printextrabox", OUString(), - aHelpIds, "PrintContent", + u".HelpID:vcl:PrintDialog:PrintContent:ListBox"_ustr}; + m_aUIProperties[nIdx++].Value = setChoiceListControlOpt( u"printextrabox"_ustr, OUString(), + aHelpIds, u"PrintContent"_ustr, aChoices, nContent ); // show Subgroup for print range aPrintRangeOpt.mbInternalOnly = true; - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("fromwhich", ScResId( SCSTR_PRINTOPT_FROMWHICH ), + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(u"fromwhich"_ustr, ScResId( SCSTR_PRINTOPT_FROMWHICH ), OUString(), aPrintRangeOpt); // create a choice for the range to print - OUString aPrintRangeName( "PrintRange" ); + OUString aPrintRangeName( u"PrintRange"_ustr ); aChoices = { ScResId( SCSTR_PRINTOPT_PRINTALLPAGES ), ScResId( SCSTR_PRINTOPT_PRINTPAGES ) }; - aHelpIds = { ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0", - ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" }; - uno::Sequence< OUString > aWidgetIds{ "rbAllPages", "rbRangePages" }; + aHelpIds = { u".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0"_ustr, + u".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1"_ustr }; + uno::Sequence< OUString > aWidgetIds{ u"rbAllPages"_ustr, u"rbRangePages"_ustr }; m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), aHelpIds, aPrintRangeName, @@ -320,15 +320,15 @@ ScPrintUIOptions::ScPrintUIOptions() // create an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); - m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(), - ".HelpID:vcl:PrintDialog:PageRange:Edit", - "PageRange", OUString(), aPageRangeOpt); + m_aUIProperties[nIdx++].Value = setEditControlOpt(u"pagerange"_ustr, OUString(), + u".HelpID:vcl:PrintDialog:PageRange:Edit"_ustr, + u"PageRange"_ustr, OUString(), aPageRangeOpt); vcl::PrinterOptionsHelper::UIControlOptions aEvenOddOpt(aPrintRangeName, 0, true); - m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("evenoddbox", + m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt(u"evenoddbox"_ustr, OUString(), uno::Sequence<OUString>(), - "EvenOdd", + u"EvenOdd"_ustr, uno::Sequence<OUString>(), 0, uno::Sequence< sal_Bool >(), @@ -1350,7 +1350,7 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans { { "NewTheme", uno::Any(sThemeName) } })); - comphelper::dispatchCommand(".uno:ChangeTheme", aPropertyValues); + comphelper::dispatchCommand(u".uno:ChangeTheme"_ustr, aPropertyValues); } } @@ -2226,7 +2226,7 @@ static void lcl_PDFExportHelper(const OutputDevice* pDev, const OUString& rTabNa if (pPDF->GetIsExportTaggedPDF()) { if (bIsFirstPage) - pPDF->WrapBeginStructureElement(vcl::PDFWriter::Document, "Workbook"); + pPDF->WrapBeginStructureElement(vcl::PDFWriter::Document, u"Workbook"_ustr); else { // if there is a new worksheet(not first), delete and add new ScPDFState assert(pPDF->GetScPDFState()); @@ -2353,7 +2353,7 @@ static void lcl_SetMediaScreen(const uno::Reference<drawing::XShape>& xMediaShap { OUString sMediaURL; uno::Reference<beans::XPropertySet> xPropSet(xMediaShape, uno::UNO_QUERY); - xPropSet->getPropertyValue("MediaURL") >>= sMediaURL; + xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= sMediaURL; if (sMediaURL.isEmpty()) return; vcl::PDFExtOutDevData* pPDF = dynamic_cast<vcl::PDFExtOutDevData*>(pDev->GetExtOutDevData()); @@ -2361,23 +2361,23 @@ static void lcl_SetMediaScreen(const uno::Reference<drawing::XShape>& xMediaShap return; OUString sTitle; - xPropSet->getPropertyValue("Title") >>= sTitle; + xPropSet->getPropertyValue(u"Title"_ustr) >>= sTitle; OUString sDescription; - xPropSet->getPropertyValue("Description") >>= sDescription; + xPropSet->getPropertyValue(u"Description"_ustr) >>= sDescription; OUString const altText(sTitle.isEmpty() ? sDescription : sDescription.isEmpty() ? sTitle : OUString::Concat(sTitle) + OUString::Concat("\n") + OUString::Concat(sDescription)); - OUString const mimeType(xPropSet->getPropertyValue("MediaMimeType").get<OUString>()); + OUString const mimeType(xPropSet->getPropertyValue(u"MediaMimeType"_ustr).get<OUString>()); SdrObject* pSdrObj(SdrObject::getSdrObjectFromXShape(xMediaShape)); sal_Int32 nScreenId = pPDF->CreateScreen(aRect, altText, mimeType, nPageNumb, pSdrObj); if (sMediaURL.startsWith("vnd.sun.star.Package:")) { // Embedded media OUString aTempFileURL; - xPropSet->getPropertyValue("PrivateTempFileURL") >>= aTempFileURL; + xPropSet->getPropertyValue(u"PrivateTempFileURL"_ustr) >>= aTempFileURL; pPDF->SetScreenStream(nScreenId, aTempFileURL); } else // Linked media @@ -3359,7 +3359,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName ) 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. */ - aRet <<= OUString( "ThisExcelDoc" ); + aRet <<= u"ThisExcelDoc"_ustr; } else if ( aPropertyName == SC_UNO_RUNTIMEUID ) { @@ -3561,7 +3561,7 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getAvailableServiceNames() // XServiceInfo OUString SAL_CALL ScModelObj::getImplementationName() { - return "ScModelObj"; + return u"ScModelObj"_ustr; /* // Matching the .component information: return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" ); */ @@ -4176,7 +4176,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int1 bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aName, true, true ); } if (!bDone) - throw uno::RuntimeException("ScTableSheetsObj::insertNewByName(): Illegal object name or bad index. Duplicate name?"); // no other exceptions specified + throw uno::RuntimeException(u"ScTableSheetsObj::insertNewByName(): Illegal object name or bad index. Duplicate name?"_ustr); // no other exceptions specified } void SAL_CALL ScTableSheetsObj::moveByName( const OUString& aName, sal_Int16 nDestination ) @@ -4218,7 +4218,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const OUString& aName, } } if (!bDone) - throw uno::RuntimeException("ScTableSheetsObj::copyByName(): Illegal object name or bad index. Duplicate name?"); // no other exceptions specified + throw uno::RuntimeException(u"ScTableSheetsObj::copyByName(): Illegal object name or bad index. Duplicate name?"_ustr); // no other exceptions specified } void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno::Any& aElement ) @@ -4414,7 +4414,7 @@ uno::Sequence < uno::Reference< table::XCellRange > > SAL_CALL ScTableSheetsObj: uno::Reference<container::XEnumeration> SAL_CALL ScTableSheetsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.SpreadsheetsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.SpreadsheetsEnumeration"_ustr); } // XIndexAccess @@ -4587,7 +4587,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou uno::Reference<container::XEnumeration> SAL_CALL ScTableColumnsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.table.TableColumnsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.table.TableColumnsEnumeration"_ustr); } // XIndexAccess @@ -4829,7 +4829,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount uno::Reference<container::XEnumeration> SAL_CALL ScTableRowsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.table.TableRowsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.table.TableRowsEnumeration"_ustr); } // XIndexAccess @@ -5131,7 +5131,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera //! iterate directly (more efficiently)? SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.CellAnnotationsEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.CellAnnotationsEnumeration"_ustr); } // XIndexAccess @@ -5277,7 +5277,7 @@ void SAL_CALL ScScenariosObj::removeByName( const OUString& aName ) uno::Reference<container::XEnumeration> SAL_CALL ScScenariosObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.ScenariosEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.ScenariosEnumeration"_ustr); } // XIndexAccess diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx index 8541cd0c031b..9802bb5539ec 100644 --- a/sc/source/ui/unoobj/eventuno.cxx +++ b/sc/source/ui/unoobj/eventuno.cxx @@ -27,7 +27,7 @@ using namespace ::com::sun::star; -SC_SIMPLE_SERVICE_INFO( ScSheetEventsObj, "ScSheetEventsObj", "com.sun.star.document.Events" ) +SC_SIMPLE_SERVICE_INFO( ScSheetEventsObj, u"ScSheetEventsObj"_ustr, u"com.sun.star.document.Events"_ustr ) ScSheetEventsObj::ScSheetEventsObj(ScDocShell* pDocSh, SCTAB nT) : mpDocShell( pDocSh ), @@ -132,7 +132,7 @@ uno::Any SAL_CALL ScSheetEventsObj::getByName( const OUString& aName ) if (pScript) { uno::Sequence<beans::PropertyValue> aPropSeq( comphelper::InitPropertySequence({ - { "EventType", uno::Any( OUString("Script") ) }, + { "EventType", uno::Any( u"Script"_ustr ) }, { "Script", uno::Any( *pScript ) } })); aRet <<= aPropSeq; diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx index d14a7d52eef8..cb0b3293e551 100644 --- a/sc/source/ui/unoobj/exceldetect.cxx +++ b/sc/source/ui/unoobj/exceldetect.cxx @@ -27,7 +27,7 @@ ScExcelBiffDetect::~ScExcelBiffDetect() {} OUString ScExcelBiffDetect::getImplementationName() { - return "com.sun.star.comp.calc.ExcelBiffFormatDetector"; + return u"com.sun.star.comp.calc.ExcelBiffFormatDetector"_ustr; } sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) @@ -37,7 +37,7 @@ sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) uno::Sequence<OUString> ScExcelBiffDetect::getSupportedServiceNames() { - return { "com.sun.star.frame.ExtendedTypeDetection" }; + return { u"com.sun.star.frame.ExtendedTypeDetection"_ustr }; } namespace { @@ -145,29 +145,29 @@ OUString ScExcelBiffDetect::detect( uno::Sequence<beans::PropertyValue>& lDescri if (aType == "calc_MS_Excel_97" || aType == "calc_MS_Excel_97_VorlageTemplate") { // See if this stream is an Excel 97/XP/2003 (BIFF8) stream. - if (!hasStream(xInStream, "Workbook")) + if (!hasStream(xInStream, u"Workbook"_ustr)) // BIFF8 is expected to contain a stream named "Workbook". return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 97 Vorlage/Template") : OUString("MS Excel 97"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? u"MS Excel 97 Vorlage/Template"_ustr : u"MS Excel 97"_ustr; } else if (aType == "calc_MS_Excel_95" || aType == "calc_MS_Excel_95_VorlageTemplate") { // See if this stream is an Excel 95 (BIFF5) stream. - if (!hasStream(xInStream, "Book")) + if (!hasStream(xInStream, u"Book"_ustr)) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 95 Vorlage/Template") : OUString("MS Excel 95"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? u"MS Excel 95 Vorlage/Template"_ustr : u"MS Excel 95"_ustr; } else if (aType == "calc_MS_Excel_5095" || aType == "calc_MS_Excel_5095_VorlageTemplate") { // See if this stream is an Excel 5.0/95 stream. - if (!hasStream(xInStream, "Book")) + if (!hasStream(xInStream, u"Book"_ustr)) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 5.0/95 Vorlage/Template") : OUString("MS Excel 5.0/95"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? u"MS Excel 5.0/95 Vorlage/Template"_ustr : u"MS Excel 5.0/95"_ustr; } else if (aType == "calc_MS_Excel_40" || aType == "calc_MS_Excel_40_VorlageTemplate") @@ -176,7 +176,7 @@ OUString ScExcelBiffDetect::detect( uno::Sequence<beans::PropertyValue>& lDescri if (!isExcel40(xInStream)) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 4.0 Vorlage/Template") : OUString("MS Excel 4.0"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? u"MS Excel 4.0 Vorlage/Template"_ustr : u"MS Excel 4.0"_ustr; } else diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index bdd3271a8b8b..e3359d02d0e4 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -137,8 +137,8 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue ) } -SC_SIMPLE_SERVICE_INFO( ScCellFieldsObj, "ScCellFieldsObj", "com.sun.star.text.TextFields" ) -SC_SIMPLE_SERVICE_INFO( ScHeaderFieldsObj, "ScHeaderFieldsObj", "com.sun.star.text.TextFields" ) +SC_SIMPLE_SERVICE_INFO( ScCellFieldsObj, u"ScCellFieldsObj"_ustr, u"com.sun.star.text.TextFields"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScHeaderFieldsObj, u"ScHeaderFieldsObj"_ustr, u"com.sun.star.text.TextFields"_ustr ) namespace { @@ -367,7 +367,7 @@ sal_Bool SAL_CALL ScCellFieldsObj::hasElements() uno::Reference<container::XEnumeration> SAL_CALL ScCellFieldsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.text.TextFieldEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.text.TextFieldEnumeration"_ustr); } void SAL_CALL ScCellFieldsObj::addContainerListener( @@ -451,7 +451,7 @@ uno::Reference<text::XTextField> ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_In uno::Reference<text::XTextRange> xTextRange; uno::Reference<sheet::XHeaderFooterContent> xContentObj = mrData.GetContentObj(); if (!xContentObj.is()) - throw uno::RuntimeException(""); + throw uno::RuntimeException(u""_ustr); rtl::Reference<ScHeaderFooterContentObj> pContentObj = ScHeaderFooterContentObj::getImplementation(xContentObj); uno::Reference<text::XText> xText; @@ -515,7 +515,7 @@ sal_Bool SAL_CALL ScHeaderFieldsObj::hasElements() uno::Reference<container::XEnumeration> SAL_CALL ScHeaderFieldsObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.text.TextFieldEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.text.TextFieldEnumeration"_ustr); } void SAL_CALL ScHeaderFieldsObj::addContainerListener( @@ -1254,7 +1254,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScEditFieldObj ) OUString SAL_CALL ScEditFieldObj::getImplementationName() { - return "ScEditFieldObj"; + return u"ScEditFieldObj"_ustr; } sal_Bool SAL_CALL ScEditFieldObj::supportsService( const OUString& rServiceName ) @@ -1264,8 +1264,8 @@ sal_Bool SAL_CALL ScEditFieldObj::supportsService( const OUString& rServiceName uno::Sequence<OUString> SAL_CALL ScEditFieldObj::getSupportedServiceNames() { - return {"com.sun.star.text.TextField", - "com.sun.star.text.TextContent"}; + return {u"com.sun.star.text.TextField"_ustr, + u"com.sun.star.text.TextContent"_ustr}; } uno::Sequence<uno::Type> SAL_CALL ScEditFieldObj::getTypes() diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index b5e9421b5440..e5ee8de17d29 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -374,8 +374,8 @@ void SAL_CALL ScFilterOptionsObj::setSourceDocument( const uno::Reference<lang:: void SAL_CALL ScFilterOptionsObj::initialize(const uno::Sequence<uno::Any>& rArguments) { ::comphelper::NamedValueCollection aProperties(rArguments); - if (aProperties.has("ParentWindow")) - aProperties.get("ParentWindow") >>= xDialogParent; + if (aProperties.has(u"ParentWindow"_ustr)) + aProperties.get(u"ParentWindow"_ustr) >>= xDialogParent; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 2fb8624571a5..efb09de2272b 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -63,9 +63,9 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetValidatePropertyMap() return aValidatePropertyMap_Impl; } -SC_SIMPLE_SERVICE_INFO( ScTableConditionalEntry, "ScTableConditionalEntry", "com.sun.star.sheet.TableConditionalEntry" ) -SC_SIMPLE_SERVICE_INFO( ScTableConditionalFormat, "ScTableConditionalFormat", "com.sun.star.sheet.TableConditionalFormat" ) -SC_SIMPLE_SERVICE_INFO( ScTableValidationObj, "ScTableValidationObj", "com.sun.star.sheet.TableValidation" ) +SC_SIMPLE_SERVICE_INFO( ScTableConditionalEntry, u"ScTableConditionalEntry"_ustr, u"com.sun.star.sheet.TableConditionalEntry"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableConditionalFormat, u"ScTableConditionalFormat"_ustr, u"com.sun.star.sheet.TableConditionalFormat"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScTableValidationObj, u"ScTableValidationObj"_ustr, u"com.sun.star.sheet.TableValidation"_ustr ) static sal_Int32 lcl_ConditionModeToOperatorNew( ScConditionMode eMode ) { @@ -361,7 +361,7 @@ void SAL_CALL ScTableConditionalFormat::clear() uno::Reference<container::XEnumeration> SAL_CALL ScTableConditionalFormat::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.TableConditionalEntryEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.TableConditionalEntryEnumeration"_ustr); } // XIndexAccess diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 4f4a967b59eb..46ff71b0c731 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -232,7 +232,7 @@ ScFunctionAccess_get_implementation(css::uno::XComponentContext*, css::uno::Sequ // XServiceInfo OUString SAL_CALL ScFunctionAccess::getImplementationName() { - return "stardiv.StarCalc.ScFunctionAccess"; + return u"stardiv.StarCalc.ScFunctionAccess"_ustr; } sal_Bool SAL_CALL ScFunctionAccess::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index b8c6a9c7e35e..847e5a41f4b4 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -66,12 +66,12 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetSheetLinkMap() return aSheetLinkMap_Impl; } -SC_SIMPLE_SERVICE_INFO( ScAreaLinkObj, "ScAreaLinkObj", "com.sun.star.sheet.CellAreaLink" ) -SC_SIMPLE_SERVICE_INFO( ScAreaLinksObj, "ScAreaLinksObj", "com.sun.star.sheet.CellAreaLinks" ) -SC_SIMPLE_SERVICE_INFO( ScDDELinkObj, "ScDDELinkObj", "com.sun.star.sheet.DDELink" ) -SC_SIMPLE_SERVICE_INFO( ScDDELinksObj, "ScDDELinksObj", "com.sun.star.sheet.DDELinks" ) -SC_SIMPLE_SERVICE_INFO( ScSheetLinkObj, "ScSheetLinkObj", "com.sun.star.sheet.SheetLink" ) -SC_SIMPLE_SERVICE_INFO( ScSheetLinksObj, "ScSheetLinksObj", "com.sun.star.sheet.SheetLinks" ) +SC_SIMPLE_SERVICE_INFO( ScAreaLinkObj, u"ScAreaLinkObj"_ustr, u"com.sun.star.sheet.CellAreaLink"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScAreaLinksObj, u"ScAreaLinksObj"_ustr, u"com.sun.star.sheet.CellAreaLinks"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDDELinkObj, u"ScDDELinkObj"_ustr, u"com.sun.star.sheet.DDELink"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScDDELinksObj, u"ScDDELinksObj"_ustr, u"com.sun.star.sheet.DDELinks"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScSheetLinkObj, u"ScSheetLinkObj"_ustr, u"com.sun.star.sheet.SheetLink"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScSheetLinksObj, u"ScSheetLinksObj"_ustr, u"com.sun.star.sheet.SheetLinks"_ustr ) ScSheetLinkObj::ScSheetLinkObj(ScDocShell* pDocSh, OUString aName) : aPropSet( lcl_GetSheetLinkMap() ), @@ -436,7 +436,7 @@ rtl::Reference<ScSheetLinkObj> ScSheetLinksObj::GetObjectByName_Impl(const OUStr uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.SheetLinksEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.SheetLinksEnumeration"_ustr); } // XIndexAccess @@ -942,7 +942,7 @@ void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) uno::Reference<container::XEnumeration> SAL_CALL ScAreaLinksObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.CellAreaLinksEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.CellAreaLinksEnumeration"_ustr); } // XIndexAccess @@ -1140,7 +1140,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( ) if ( !bSuccess ) { throw uno::RuntimeException( - "ScDDELinkObj::getResults: failed to get results!" ); + u"ScDDELinkObj::getResults: failed to get results!"_ustr ); } return aReturn; @@ -1165,7 +1165,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >& if ( !bSuccess ) { throw uno::RuntimeException( - "ScDDELinkObj::setResults: failed to set results!" ); + u"ScDDELinkObj::setResults: failed to set results!"_ustr ); } } @@ -1237,7 +1237,7 @@ rtl::Reference<ScDDELinkObj> ScDDELinksObj::GetObjectByName_Impl(std::u16string_ uno::Reference<container::XEnumeration> SAL_CALL ScDDELinksObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.DDELinksEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.DDELinksEnumeration"_ustr); } // XIndexAccess @@ -1369,7 +1369,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink( if ( !xLink.is() ) { throw uno::RuntimeException( - "ScDDELinksObj::addDDELink: cannot add DDE link!" ); + u"ScDDELinksObj::addDDELink: cannot add DDE link!"_ustr ); } return xLink; @@ -1569,7 +1569,7 @@ uno::Reference< container::XEnumeration > SAL_CALL ScExternalDocLinkObj::createE { SolarMutexGuard aGuard; uno::Reference< container::XEnumeration > aRef( - new ScIndexEnumeration(this, "com.sun.star.sheet.ExternalDocLink")); + new ScIndexEnumeration(this, u"com.sun.star.sheet.ExternalDocLink"_ustr)); return aRef; } @@ -1670,7 +1670,7 @@ uno::Reference< container::XEnumeration > SAL_CALL ScExternalDocLinksObj::create { SolarMutexGuard aGuard; uno::Reference< container::XEnumeration > aRef( - new ScIndexEnumeration(this, "com.sun.star.sheet.ExternalDocLinks")); + new ScIndexEnumeration(this, u"com.sun.star.sheet.ExternalDocLinks"_ustr)); return aRef; } diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index 5c875bc0b751..c0eba32bcd21 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -31,7 +31,7 @@ using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; -SC_SIMPLE_SERVICE_INFO( ScNameToIndexAccess, "ScNameToIndexAccess", "stardiv.unknown" ) +SC_SIMPLE_SERVICE_INFO( ScNameToIndexAccess, u"ScNameToIndexAccess"_ustr, u"stardiv.unknown"_ustr ) bool ScUnoHelpFunctions::GetBoolProperty( const uno::Reference<beans::XPropertySet>& xProp, const OUString& rName, bool bDefault ) @@ -224,7 +224,7 @@ uno::Any SAL_CALL ScIndexEnumeration::nextElement() OUString SAL_CALL ScIndexEnumeration::getImplementationName() { - return "ScIndexEnumeration"; + return u"ScIndexEnumeration"_ustr; } sal_Bool SAL_CALL ScIndexEnumeration::supportsService( const OUString& ServiceName ) diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 6a43a4c05f35..edbc0f6b0ea2 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -71,9 +71,9 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangesMap() constexpr OUString SCNAMEDRANGEOBJ_SERVICE = u"com.sun.star.sheet.NamedRange"_ustr; -SC_SIMPLE_SERVICE_INFO( ScLabelRangeObj, "ScLabelRangeObj", "com.sun.star.sheet.LabelRange" ) -SC_SIMPLE_SERVICE_INFO( ScLabelRangesObj, "ScLabelRangesObj", "com.sun.star.sheet.LabelRanges" ) -SC_SIMPLE_SERVICE_INFO( ScNamedRangesObj, "ScNamedRangesObj", "com.sun.star.sheet.NamedRanges" ) +SC_SIMPLE_SERVICE_INFO( ScLabelRangeObj, u"ScLabelRangeObj"_ustr, u"com.sun.star.sheet.LabelRange"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScLabelRangesObj, u"ScLabelRangesObj"_ustr, u"com.sun.star.sheet.LabelRanges"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScNamedRangesObj, u"ScNamedRangesObj"_ustr, u"com.sun.star.sheet.NamedRanges"_ustr ) // Database named ranges are not considered by getCount, hasByName, removeByName and getElementNames // Note that hidden named ranges are considered by these methods @@ -409,7 +409,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScNamedRangeObj ) OUString SAL_CALL ScNamedRangeObj::getImplementationName() { - return "ScNamedRangeObj"; + return u"ScNamedRangeObj"_ustr; } sal_Bool SAL_CALL ScNamedRangeObj::supportsService( const OUString& rServiceName ) @@ -472,12 +472,12 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName, { case ScRangeData::IsNameValidType::NAME_INVALID_CELL_REF: throw uno::RuntimeException( - "Invalid name. Reference to a cell, or a range of cells not allowed", + u"Invalid name. Reference to a cell, or a range of cells not allowed"_ustr, getXWeak()); break; case ScRangeData::IsNameValidType::NAME_INVALID_BAD_STRING: throw uno::RuntimeException( - "Invalid name. Start with a letter, use only letters, numbers and underscore", + u"Invalid name. Start with a letter, use only letters, numbers and underscore"_ustr, getXWeak()); break; case ScRangeData::IsNameValidType::NAME_VALID: @@ -567,7 +567,7 @@ void SAL_CALL ScNamedRangesObj::outputList( const table::CellAddress& aOutputPos uno::Reference<container::XEnumeration> SAL_CALL ScNamedRangesObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.NamedRangesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.NamedRangesEnumeration"_ustr); } // container::XIndexAccess @@ -1105,7 +1105,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) uno::Reference<container::XEnumeration> SAL_CALL ScLabelRangesObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.LabelRangesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.LabelRangesEnumeration"_ustr); } // container::XIndexAccess diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx index 4e99431dd47a..3869f24ffde6 100644 --- a/sc/source/ui/unoobj/notesuno.cxx +++ b/sc/source/ui/unoobj/notesuno.cxx @@ -50,7 +50,7 @@ static const SvxItemPropertySet* lcl_GetAnnotationPropertySet() return &aAnnotationPropertySet_Impl; } -SC_SIMPLE_SERVICE_INFO( ScAnnotationObj, "ScAnnotationObj", "com.sun.star.sheet.CellAnnotation" ) +SC_SIMPLE_SERVICE_INFO( ScAnnotationObj, u"ScAnnotationObj"_ustr, u"com.sun.star.sheet.CellAnnotation"_ustr ) //SC_SIMPLE_SERVICE_INFO( ScAnnotationShapeObj, "ScAnnotationShapeObj", "com.sun.star.sheet.CellAnnotationShape" ) ScAnnotationObj::ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos) : diff --git a/sc/source/ui/unoobj/pageuno.cxx b/sc/source/ui/unoobj/pageuno.cxx index 3ca903e63eb6..e0693388ea05 100644 --- a/sc/source/ui/unoobj/pageuno.cxx +++ b/sc/source/ui/unoobj/pageuno.cxx @@ -44,7 +44,7 @@ uno::Reference<drawing::XShape > ScPageObj::CreateShape( SdrObject *pObj ) const OUString SAL_CALL ScPageObj::getImplementationName() { - return "ScPageObj"; + return u"ScPageObj"_ustr; } sal_Bool SAL_CALL ScPageObj::supportsService( const OUString& rServiceName ) @@ -54,7 +54,7 @@ sal_Bool SAL_CALL ScPageObj::supportsService( const OUString& rServiceName ) uno::Sequence<OUString> SAL_CALL ScPageObj::getSupportedServiceNames() { - return { "com.sun.star.sheet.SpreadsheetDrawPage" }; + return { u"com.sun.star.sheet.SpreadsheetDrawPage"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index e5fc5848e1f0..4a34492207eb 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -316,7 +316,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l else return OUString(); - SfxFilterMatcher aMatcher("scalc"); + SfxFilterMatcher aMatcher(u"scalc"_ustr); std::shared_ptr<const SfxFilter> pFilter = aMatcher.GetFilter4FilterName(OUString::createFromAscii(pSearchFilterName)); if (!pFilter) @@ -329,7 +329,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l OUString SAL_CALL ScFilterDetect::getImplementationName() { - return "com.sun.star.comp.calc.FormatDetector"; + return u"com.sun.star.comp.calc.FormatDetector"_ustr; } sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName ) @@ -339,7 +339,7 @@ sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName ) css::uno::Sequence<OUString> ScFilterDetect::getSupportedServiceNames() { - return { "com.sun.star.frame.ExtendedTypeDetection" }; + return { u"com.sun.star.frame.ExtendedTypeDetection"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 432681702738..0671da468022 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -251,45 +251,45 @@ struct ProvNamesId_Type const ProvNamesId_Type aProvNamesId[] = { - { "com.sun.star.sheet.Spreadsheet", Type::SHEET }, - { "com.sun.star.text.TextField.URL", Type::URLFIELD }, - { "com.sun.star.text.TextField.PageNumber", Type::PAGEFIELD }, - { "com.sun.star.text.TextField.PageCount", Type::PAGESFIELD }, - { "com.sun.star.text.TextField.Date", Type::DATEFIELD }, - { "com.sun.star.text.TextField.Time", Type::TIMEFIELD }, - { "com.sun.star.text.TextField.DateTime", Type::EXT_TIMEFIELD }, - { "com.sun.star.text.TextField.DocInfo.Title", Type::TITLEFIELD }, - { "com.sun.star.text.TextField.FileName", Type::FILEFIELD }, - { "com.sun.star.text.TextField.SheetName", Type::SHEETFIELD }, - { "com.sun.star.style.CellStyle", Type::CELLSTYLE }, - { "com.sun.star.style.PageStyle", Type::PAGESTYLE }, - { "com.sun.star.style.GraphicStyle", Type::GRAPHICSTYLE }, - { "com.sun.star.sheet.TableAutoFormat", Type::AUTOFORMAT }, - { "com.sun.star.sheet.TableAutoFormats", Type::AUTOFORMATS }, - { "com.sun.star.sheet.SheetCellRanges", Type::CELLRANGES }, - { "com.sun.star.sheet.FunctionDescriptions", Type::FUNCTIONDESCRIPTIONS }, - { "com.sun.star.sheet.GlobalSheetSettings", Type::GLOBALSHEETSETTINGS }, - { "com.sun.star.sheet.RecentFunctions", Type::RECENTFUNCTIONS }, - { "com.sun.star.drawing.GradientTable", Type::GRADTAB }, - { "com.sun.star.drawing.HatchTable", Type::HATCHTAB }, - { "com.sun.star.drawing.BitmapTable", Type::BITMAPTAB }, - { "com.sun.star.drawing.TransparencyGradientTable", Type::TRGRADTAB }, - { "com.sun.star.drawing.MarkerTable", Type::MARKERTAB }, - { "com.sun.star.drawing.DashTable", Type::DASHTAB }, - { "com.sun.star.text.NumberingRules", Type::NUMRULES }, - { "com.sun.star.sheet.Defaults", Type::DOCDEFLTS }, - { "com.sun.star.drawing.Defaults", Type::DRAWDEFLTS }, - { "com.sun.star.comp.SpreadsheetSettings", Type::DOCSPRSETT }, - { "com.sun.star.document.Settings", Type::DOCCONF }, - { "com.sun.star.image.ImageMapRectangleObject", Type::IMAP_RECT }, - { "com.sun.star.image.ImageMapCircleObject", Type::IMAP_CIRC }, - { "com.sun.star.image.ImageMapPolygonObject", Type::IMAP_POLY }, + { u"com.sun.star.sheet.Spreadsheet"_ustr, Type::SHEET }, + { u"com.sun.star.text.TextField.URL"_ustr, Type::URLFIELD }, + { u"com.sun.star.text.TextField.PageNumber"_ustr, Type::PAGEFIELD }, + { u"com.sun.star.text.TextField.PageCount"_ustr, Type::PAGESFIELD }, + { u"com.sun.star.text.TextField.Date"_ustr, Type::DATEFIELD }, + { u"com.sun.star.text.TextField.Time"_ustr, Type::TIMEFIELD }, + { u"com.sun.star.text.TextField.DateTime"_ustr, Type::EXT_TIMEFIELD }, + { u"com.sun.star.text.TextField.DocInfo.Title"_ustr, Type::TITLEFIELD }, + { u"com.sun.star.text.TextField.FileName"_ustr, Type::FILEFIELD }, + { u"com.sun.star.text.TextField.SheetName"_ustr, Type::SHEETFIELD }, + { u"com.sun.star.style.CellStyle"_ustr, Type::CELLSTYLE }, + { u"com.sun.star.style.PageStyle"_ustr, Type::PAGESTYLE }, + { u"com.sun.star.style.GraphicStyle"_ustr, Type::GRAPHICSTYLE }, + { u"com.sun.star.sheet.TableAutoFormat"_ustr, Type::AUTOFORMAT }, + { u"com.sun.star.sheet.TableAutoFormats"_ustr, Type::AUTOFORMATS }, + { u"com.sun.star.sheet.SheetCellRanges"_ustr, Type::CELLRANGES }, + { u"com.sun.star.sheet.FunctionDescriptions"_ustr, Type::FUNCTIONDESCRIPTIONS }, + { u"com.sun.star.sheet.GlobalSheetSettings"_ustr, Type::GLOBALSHEETSETTINGS }, + { u"com.sun.star.sheet.RecentFunctions"_ustr, Type::RECENTFUNCTIONS }, + { u"com.sun.star.drawing.GradientTable"_ustr, Type::GRADTAB }, + { u"com.sun.star.drawing.HatchTable"_ustr, Type::HATCHTAB }, + { u"com.sun.star.drawing.BitmapTable"_ustr, Type::BITMAPTAB }, + { u"com.sun.star.drawing.TransparencyGradientTable"_ustr, Type::TRGRADTAB }, + { u"com.sun.star.drawing.MarkerTable"_ustr, Type::MARKERTAB }, + { u"com.sun.star.drawing.DashTable"_ustr, Type::DASHTAB }, + { u"com.sun.star.text.NumberingRules"_ustr, Type::NUMRULES }, + { u"com.sun.star.sheet.Defaults"_ustr, Type::DOCDEFLTS }, + { u"com.sun.star.drawing.Defaults"_ustr, Type::DRAWDEFLTS }, + { u"com.sun.star.comp.SpreadsheetSettings"_ustr, Type::DOCSPRSETT }, + { u"com.sun.star.document.Settings"_ustr, Type::DOCCONF }, + { u"com.sun.star.image.ImageMapRectangleObject"_ustr, Type::IMAP_RECT }, + { u"com.sun.star.image.ImageMapCircleObject"_ustr, Type::IMAP_CIRC }, + { u"com.sun.star.image.ImageMapPolygonObject"_ustr, Type::IMAP_POLY }, // Support creation of GraphicStorageHandler and EmbeddedObjectResolver - { "com.sun.star.document.ExportGraphicStorageHandler", Type::EXPORT_GRAPHIC_STORAGE_HANDLER }, - { "com.sun.star.document.ImportGraphicStorageHandler", Type::IMPORT_GRAPHIC_STORAGE_HANDLER }, - { "com.sun.star.document.ExportEmbeddedObjectResolver", Type::EXPORT_EOR }, - { "com.sun.star.document.ImportEmbeddedObjectResolver", Type::IMPORT_EOR }, + { u"com.sun.star.document.ExportGraphicStorageHandler"_ustr, Type::EXPORT_GRAPHIC_STORAGE_HANDLER }, + { u"com.sun.star.document.ImportGraphicStorageHandler"_ustr, Type::IMPORT_GRAPHIC_STORAGE_HANDLER }, + { u"com.sun.star.document.ExportEmbeddedObjectResolver"_ustr, Type::EXPORT_EOR }, + { u"com.sun.star.document.ImportEmbeddedObjectResolver"_ustr, Type::IMPORT_EOR }, { SC_SERVICENAME_VALBIND, Type::VALBIND }, { SC_SERVICENAME_LISTCELLBIND, Type::LISTCELLBIND }, @@ -297,43 +297,43 @@ const ProvNamesId_Type aProvNamesId[] = { SC_SERVICENAME_CELLADDRESS, Type::CELLADDRESS }, { SC_SERVICENAME_RANGEADDRESS, Type::RANGEADDRESS }, - { "com.sun.star.sheet.DocumentSettings",Type::SHEETDOCSET }, + { u"com.sun.star.sheet.DocumentSettings"_ustr,Type::SHEETDOCSET }, { SC_SERVICENAME_CHDATAPROV, Type::CHDATAPROV }, { SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER, Type::CHART_PIVOTTABLE_DATAPROVIDER }, { SC_SERVICENAME_FORMULAPARS, Type::FORMULAPARS }, { SC_SERVICENAME_OPCODEMAPPER, Type::OPCODEMAPPER }, - { "ooo.vba.VBAObjectModuleObjectProvider", Type::VBAOBJECTPROVIDER }, - { "ooo.vba.VBACodeNameProvider", Type::VBACODENAMEPROVIDER }, - { "ooo.vba.VBAGlobals", Type::VBAGLOBALS }, + { u"ooo.vba.VBAObjectModuleObjectProvider"_ustr, Type::VBAOBJECTPROVIDER }, + { u"ooo.vba.VBACodeNameProvider"_ustr, Type::VBACODENAMEPROVIDER }, + { u"ooo.vba.VBAGlobals"_ustr, Type::VBAGLOBALS }, // case-correct versions of the service names (#i102468#) - { "com.sun.star.text.textfield.URL", Type::URLFIELD }, - { "com.sun.star.text.textfield.PageNumber", Type::PAGEFIELD }, - { "com.sun.star.text.textfield.PageCount", Type::PAGESFIELD }, - { "com.sun.star.text.textfield.Date", Type::DATEFIELD }, - { "com.sun.star.text.textfield.Time", Type::TIMEFIELD }, - { "com.sun.star.text.textfield.DateTime", Type::EXT_TIMEFIELD }, - { "com.sun.star.text.textfield.docinfo.Title", Type::TITLEFIELD }, - { "com.sun.star.text.textfield.FileName", Type::FILEFIELD }, - { "com.sun.star.text.textfield.SheetName", Type::SHEETFIELD }, - { "ooo.vba.VBAGlobals", Type::VBAGLOBALS }, + { u"com.sun.star.text.textfield.URL"_ustr, Type::URLFIELD }, + { u"com.sun.star.text.textfield.PageNumber"_ustr, Type::PAGEFIELD }, + { u"com.sun.star.text.textfield.PageCount"_ustr, Type::PAGESFIELD }, + { u"com.sun.star.text.textfield.Date"_ustr, Type::DATEFIELD }, + { u"com.sun.star.text.textfield.Time"_ustr, Type::TIMEFIELD }, + { u"com.sun.star.text.textfield.DateTime"_ustr, Type::EXT_TIMEFIELD }, + { u"com.sun.star.text.textfield.docinfo.Title"_ustr, Type::TITLEFIELD }, + { u"com.sun.star.text.textfield.FileName"_ustr, Type::FILEFIELD }, + { u"com.sun.star.text.textfield.SheetName"_ustr, Type::SHEETFIELD }, + { u"ooo.vba.VBAGlobals"_ustr, Type::VBAGLOBALS }, }; // old service names that were in 567 still work in createInstance, // in case some macro is still using them const ProvNamesId_Type aOldNames[] = { - { "stardiv.one.text.TextField.URL", Type::URLFIELD }, - { "stardiv.one.text.TextField.PageNumber", Type::PAGEFIELD }, - { "stardiv.one.text.TextField.PageCount", Type::PAGESFIELD }, - { "stardiv.one.text.TextField.Date", Type::DATEFIELD }, - { "stardiv.one.text.TextField.Time", Type::TIMEFIELD }, - { "stardiv.one.text.TextField.DocumentTitle", Type::TITLEFIELD }, - { "stardiv.one.text.TextField.FileName", Type::FILEFIELD }, - { "stardiv.one.text.TextField.SheetName", Type::SHEETFIELD }, - { "stardiv.one.style.CellStyle", Type::CELLSTYLE }, - { "stardiv.one.style.PageStyle", Type::PAGESTYLE }, + { u"stardiv.one.text.TextField.URL"_ustr, Type::URLFIELD }, + { u"stardiv.one.text.TextField.PageNumber"_ustr, Type::PAGEFIELD }, + { u"stardiv.one.text.TextField.PageCount"_ustr, Type::PAGESFIELD }, + { u"stardiv.one.text.TextField.Date"_ustr, Type::DATEFIELD }, + { u"stardiv.one.text.TextField.Time"_ustr, Type::TIMEFIELD }, + { u"stardiv.one.text.TextField.DocumentTitle"_ustr, Type::TITLEFIELD }, + { u"stardiv.one.text.TextField.FileName"_ustr, Type::FILEFIELD }, + { u"stardiv.one.text.TextField.SheetName"_ustr, Type::SHEETFIELD }, + { u"stardiv.one.style.CellStyle"_ustr, Type::CELLSTYLE }, + { u"stardiv.one.style.PageStyle"_ustr, Type::PAGESTYLE }, }; sal_Int32 getFieldType(ScServiceProvider::Type nOldType) @@ -586,14 +586,14 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( if (pDocShell) { uno::Any aGlobs; - if ( !pDocShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aGlobs ) ) + if ( !pDocShell->GetBasicManager()->GetGlobalUNOConstant( u"VBAGlobals"_ustr, aGlobs ) ) { uno::Sequence< uno::Any > aArgs{ uno::Any(uno::Reference(static_cast<css::sheet::XSpreadsheetDocument*>(pDocShell->GetModel()))) }; - xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.excel.Globals", aArgs ); - pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", uno::Any( xRet ) ); + xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( u"ooo.vba.excel.Globals"_ustr, aArgs ); + pDocShell->GetBasicManager()->SetGlobalUNOConstant( u"VBAGlobals"_ustr, uno::Any( xRet ) ); BasicManager* pAppMgr = SfxApplication::GetBasicManager(); if ( pAppMgr ) - pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] ); + pAppMgr->SetGlobalUNOConstant( u"ThisExcelDoc"_ustr, aArgs[ 0 ] ); // create the VBA document event processor uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 95a1f3f00c15..08aee1cc9c63 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -255,7 +255,7 @@ static bool lcl_GetCaptionPoint( const uno::Reference< drawing::XShape >& xShape uno::Reference < beans::XPropertySet > xShapeProp (xShape, uno::UNO_QUERY); if (xShapeProp.is()) { - xShapeProp->getPropertyValue("CaptionPoint") >>= rCaptionPoint; + xShapeProp->getPropertyValue(u"CaptionPoint"_ustr) >>= rCaptionPoint; bReturn = true; } } @@ -316,7 +316,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const { uno::Reference<sheet::XCellRangeAddressable> xRangeAdd(aValue, uno::UNO_QUERY); if (!xRangeAdd.is()) - throw lang::IllegalArgumentException("only XCell or XSpreadsheet objects allowed", getXWeak(), 0); + throw lang::IllegalArgumentException(u"only XCell or XSpreadsheet objects allowed"_ustr, getXWeak(), 0); SdrObject *pObj = GetSdrObject(); if (pObj) @@ -1436,7 +1436,7 @@ ScShapeObj::getEvents( ) OUString SAL_CALL ScShapeObj::getImplementationName( ) { - return "com.sun.star.comp.sc.ScShapeObj"; + return u"com.sun.star.comp.sc.ScShapeObj"_ustr; } sal_Bool SAL_CALL ScShapeObj::supportsService( const OUString& ServiceName ) diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index a5b59a330cb4..9312fdcd3c55 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -179,7 +179,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScCellSearchObj ) OUString SAL_CALL ScCellSearchObj::getImplementationName() { - return "ScCellSearchObj"; + return u"ScCellSearchObj"_ustr; } sal_Bool SAL_CALL ScCellSearchObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index b0335697e7f1..417fded19368 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -415,8 +415,8 @@ constexpr OUString SCCELLSTYLE_SERVICE = u"com.sun.star.style.CellStyle"_ustr; constexpr OUString SCPAGESTYLE_SERVICE = u"com.sun.star.style.PageStyle"_ustr; constexpr OUString SCGRAPHICSTYLE_SERVICE = u"com.sun.star.style.GraphicStyle"_ustr; -SC_SIMPLE_SERVICE_INFO( ScStyleFamiliesObj, "ScStyleFamiliesObj", "com.sun.star.style.StyleFamilies" ) -SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, "ScStyleFamilyObj", "com.sun.star.style.StyleFamily" ) +SC_SIMPLE_SERVICE_INFO( ScStyleFamiliesObj, u"ScStyleFamiliesObj"_ustr, u"com.sun.star.style.StyleFamilies"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, u"ScStyleFamilyObj"_ustr, u"com.sun.star.style.StyleFamily"_ustr ) constexpr OUString SC_PAPERBIN_DEFAULTNAME = u"[From printer settings]"_ustr; @@ -564,8 +564,8 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL, if (!xInputStream.is()) { throw lang::IllegalArgumentException( - "Parameter 'InputStream' could not be converted " - "to type 'com::sun::star::io::XInputStream'", + u"Parameter 'InputStream' could not be converted " + "to type 'com::sun::star::io::XInputStream'"_ustr, nullptr, 0); } break; @@ -2047,7 +2047,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScStyleObj ) OUString SAL_CALL ScStyleObj::getImplementationName() { - return "ScStyleObj"; + return u"ScStyleObj"_ustr; } sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 635c918f3673..e7feb8dd3765 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -62,9 +62,9 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetLinkTargetMap() // service for ScLinkTargetTypeObj is not defined // must not support document::LinkTarget because the target type cannot be used as a target -SC_SIMPLE_SERVICE_INFO( ScLinkTargetTypesObj, "ScLinkTargetTypesObj", "com.sun.star.document.LinkTargets" ) -SC_SIMPLE_SERVICE_INFO( ScLinkTargetTypeObj, "ScLinkTargetTypeObj", "com.sun.star.document.LinkTargetSupplier" ) -SC_SIMPLE_SERVICE_INFO( ScLinkTargetsObj, "ScLinkTargetsObj", "com.sun.star.document.LinkTargets" ) +SC_SIMPLE_SERVICE_INFO( ScLinkTargetTypesObj, u"ScLinkTargetTypesObj"_ustr, u"com.sun.star.document.LinkTargets"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScLinkTargetTypeObj, u"ScLinkTargetTypeObj"_ustr, u"com.sun.star.document.LinkTargetSupplier"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScLinkTargetsObj, u"ScLinkTargetsObj"_ustr, u"com.sun.star.document.LinkTargets"_ustr ) ScLinkTargetTypesObj::ScLinkTargetTypesObj(ScDocShell* pDocSh) : pDocShell( pDocSh ) diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 01d25dffed82..f94750a4436a 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -80,8 +80,8 @@ static const SvxItemPropertySet * lcl_GetHdFtPropertySet() return &aHdFtPropertySet_Impl; } -SC_SIMPLE_SERVICE_INFO( ScHeaderFooterContentObj, "ScHeaderFooterContentObj", "com.sun.star.sheet.HeaderFooterContent" ) -SC_SIMPLE_SERVICE_INFO( ScHeaderFooterTextObj, "ScHeaderFooterTextObj", "stardiv.one.Text.Text" ) +SC_SIMPLE_SERVICE_INFO( ScHeaderFooterContentObj, u"ScHeaderFooterContentObj"_ustr, u"com.sun.star.sheet.HeaderFooterContent"_ustr ) +SC_SIMPLE_SERVICE_INFO( ScHeaderFooterTextObj, u"ScHeaderFooterTextObj"_ustr, u"stardiv.one.Text.Text"_ustr ) ScHeaderFooterContentObj::ScHeaderFooterContentObj() { @@ -284,7 +284,7 @@ uno::Reference<text::XTextCursor> SAL_CALL ScHeaderFooterTextObj::createTextCurs void ScHeaderFooterTextObj::FillDummyFieldData( ScHeaderFieldData& rData ) { - OUString aDummy("???"); + OUString aDummy(u"???"_ustr); rData.aTitle = aDummy; rData.aLongDocName = aDummy; rData.aShortDocName = aDummy; @@ -302,7 +302,7 @@ OUString SAL_CALL ScHeaderFooterTextObj::getString() uno::Reference<css::sheet::XHeaderFooterContent> xContentObj = aTextData.GetContentObj(); if (!xContentObj.is()) throw css::uno::RuntimeException( - "ScHeaderFooterTextObj::getString: no ContentObj"); + u"ScHeaderFooterTextObj::getString: no ContentObj"_ustr); rtl::Reference<ScHeaderFooterContentObj> pObj = ScHeaderFooterContentObj::getImplementation(xContentObj); diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 90b0a87e30f9..c5f34540f87f 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -70,7 +70,7 @@ const formula::FormulaGrammar::AddressConvention aConvMap[] = { constexpr sal_Int16 nConvMapCount = SAL_N_ELEMENTS(aConvMap); -SC_SIMPLE_SERVICE_INFO( ScFormulaParserObj, "ScFormulaParserObj", SC_SERVICENAME_FORMULAPARS ) +SC_SIMPLE_SERVICE_INFO( ScFormulaParserObj, u"ScFormulaParserObj"_ustr, SC_SERVICENAME_FORMULAPARS ) ScFormulaParserObj::ScFormulaParserObj(ScDocShell* pDocSh) : mpDocShell( pDocSh ), diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index a445f3d797c0..59e70aae0cfe 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -123,7 +123,7 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetViewOptPropertyMap() constexpr OUString SCTABVIEWOBJ_SERVICE = u"com.sun.star.sheet.SpreadsheetView"_ustr; constexpr OUString SCVIEWSETTINGS_SERVICE = u"com.sun.star.sheet.SpreadsheetViewSettings"_ustr; -SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, "ScViewPaneObj", "com.sun.star.sheet.SpreadsheetViewPane" ) +SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, u"ScViewPaneObj"_ustr, u"com.sun.star.sheet.SpreadsheetViewPane"_ustr ) ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP) : pViewShell( pViewSh ), @@ -988,7 +988,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelectionFromString( const OUString& aStrRang uno::Reference<container::XEnumeration> SAL_CALL ScTabViewObj::createEnumeration() { SolarMutexGuard aGuard; - return new ScIndexEnumeration(this, "com.sun.star.sheet.SpreadsheetViewPanesEnumeration"); + return new ScIndexEnumeration(this, u"com.sun.star.sheet.SpreadsheetViewPanesEnumeration"_ustr); } // XIndexAccess @@ -2102,7 +2102,7 @@ void ScTabViewObj::RangeSelChanged( const OUString& rText ) // XServiceInfo OUString SAL_CALL ScTabViewObj::getImplementationName() { - return "ScTabViewObj"; + return u"ScTabViewObj"_ustr; } sal_Bool SAL_CALL ScTabViewObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx index b8ccbffa2e9c..a7025b5eea34 100644 --- a/sc/source/ui/unoobj/warnpassword.cxx +++ b/sc/source/ui/unoobj/warnpassword.cxx @@ -39,7 +39,7 @@ bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium ) Reference< XInteractionHandler > xHandler( rMedium.GetInteractionHandler()); if( xHandler.is() ) { - Any aException( InteractiveAppException("", + Any aException( InteractiveAppException(u""_ustr, Reference <XInterface> (), InteractionClassification_QUERY, sal_uInt32(ERRCODE_SVX_EXPORT_FILTER_CRYPT))); |