diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 09:53:33 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 10:06:26 +0100 |
commit | a0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch) | |
tree | c0d3443a27d9dc10266760110e96b50cce46ef02 /sc/source | |
parent | e9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff) |
const OUString -> const OUStringLiteral
Mostly automated rewrite
Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/xechart.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/querytablebuffer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/datastream.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/vba/vbasheetobject.cxx | 5 |
10 files changed, 15 insertions, 16 deletions
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index ad829a913f31..fb1a5f35d793 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -1912,8 +1912,8 @@ bool XclExpChSeries::ConvertDataSeries( Reference< XColorScheme > xColorScheme = xDiagram->getDefaultColorScheme(); if( xColorScheme.is() ) { - const OUString aFillStyleName = "FillStyle"; - const OUString aColorName = "Color"; + static const OUStringLiteral aFillStyleName = u"FillStyle"; + static const OUStringLiteral aColorName = u"Color"; namespace cssd = ::com::sun::star::drawing; for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx ) { diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 6c6ec113873d..52123b499935 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -994,7 +994,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm ) OUString aTables( rStrm.ReadUniString() ); const sal_Unicode cSep = ';'; - const OUString aQuotedPairs( "\"\"" ); + static const OUStringLiteral aQuotedPairs( u"\"\"" ); maTables.clear(); for ( sal_Int32 nStringIx {aTables.isEmpty() ? -1 : 0}; nStringIx>=0; ) { diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx index a3800acd5a81..b6614068c2ff 100644 --- a/sc/source/filter/oox/querytablebuffer.cxx +++ b/sc/source/filter/oox/querytablebuffer.cxx @@ -246,7 +246,7 @@ void QueryTable::finalizeImport() PropertySet aDocProps( getDocument() ); Reference< XAreaLinks > xAreaLinks( aDocProps.getAnyProperty( PROP_AreaLinks ), UNO_QUERY_THROW ); CellAddress aDestPos( aDestRange.aStart.Tab(), aDestRange.aStart.Col(), aDestRange.aStart.Row() ); - const OUString aFilterName = "calc_HTML_WebQuery"; + static const OUStringLiteral aFilterName = u"calc_HTML_WebQuery"; xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, /*aFilterOptions*/"" ); // set refresh interval (convert minutes to seconds) sal_Int32 nRefreshPeriod = xConnection->getModel().mnInterval * 60; diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 97129cdda671..33363d6cdb4a 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -168,7 +168,7 @@ bool lcl_IsFontwork( const SdrObject* pObj ) bool bIsFontwork = false; if( pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE ) { - const OUString aTextPath = "TextPath"; + static const OUStringLiteral aTextPath = u"TextPath"; const SdrCustomShapeGeometryItem& rGeometryItem = pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); if( const Any* pAny = rGeometryItem.GetPropertyValueByName( aTextPath, aTextPath ) ) diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index cb00b0074538..cfd41b9be146 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -402,7 +402,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport) // and the property name is "MacroName". bool bScriptURL = SfxApplication::IsXScriptURL( rValidation.sErrorTitle ); - const OUString sScript("Script"); + static const OUStringLiteral sScript(u"Script"); uno::Sequence<beans::PropertyValue> aSeq( comphelper::InitPropertySequence({ { "EventType", uno::Any(bScriptURL ? sScript : OUString("StarBasic")) }, { "Library", uno::Any(OUString()) }, diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx index bb2bf4a1ed49..1b26119f8893 100644 --- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx +++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx @@ -71,7 +71,7 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) output.writeString(getLabel()); output.nextColumn(); - const OUString strWildcardNumber("%NUMBER%"); + static const OUStringLiteral strWildcardNumber(u"%NUMBER%"); // write labels to columns for (size_t i = 0; i < aRangeList.size(); i++) diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index cd9097c0ff48..2abb8e53e441 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -315,7 +315,7 @@ void lclGetFormulaFromStringList( OUString& rFmlaStr, const OUString& rStringLis @return true = Conversion successful. */ bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaStr, sal_Unicode cFmlaSep ) { - const OUString aQuotes( "\"\"" ); + static const OUStringLiteral aQuotes( u"\"\"" ); rStringList.clear(); bool bIsStringList = !rFmlaStr.isEmpty(); diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 1a9e0a0c197b..26a5a77300d7 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -251,7 +251,7 @@ void DataStream::MakeToolbarVisible() if (!xLayoutManager.is()) return; - const OUString sResourceURL( "private:resource/toolbar/datastreams" ); + static const OUStringLiteral sResourceURL( u"private:resource/toolbar/datastreams" ); css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL); if (!xUIElement.is()) { diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index bc2edefd3115..f716048d8399 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1170,9 +1170,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( !aLangText.isEmpty() ) { LanguageType eLang, eLatin, eCjk, eCtl; - const OUString aSelectionLangPrefix("Current_"); - const OUString aParagraphLangPrefix("Paragraph_"); - const OUString aDocLangPrefix("Default_"); + static const OUStringLiteral aSelectionLangPrefix(u"Current_"); + static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_"); + static const OUStringLiteral aDocLangPrefix(u"Default_"); bool bSelection = false; bool bParagraph = false; @@ -1320,7 +1320,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pItem2) sApplyText = pItem2->GetValue(); - const OUString sSpellingRule("Spelling_"); + static const OUStringLiteral sSpellingRule(u"Spelling_"); sal_Int32 nPos = 0; if(-1 != (nPos = sApplyText.indexOf( sSpellingRule ))) { diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx index 400a1b88b47a..52513095fac4 100644 --- a/sc/source/ui/vba/vbasheetobject.cxx +++ b/sc/source/ui/vba/vbasheetobject.cxx @@ -323,12 +323,11 @@ OUString SAL_CALL ScVbaControlObjectBase::getOnAction() const uno::Sequence< script::ScriptEventDescriptor > aEvents = xEventMgr->getScriptEvents( nIndex ); if( aEvents.hasElements() ) { - const OUString aScriptType = "Script"; const script::ScriptEventDescriptor* pEvent = std::find_if(aEvents.begin(), aEvents.end(), - [&aScriptType](const script::ScriptEventDescriptor& rEvent) { + [](const script::ScriptEventDescriptor& rEvent) { return (rEvent.ListenerType == gaListenerType) && (rEvent.EventMethod == gaEventMethod) - && (rEvent.ScriptType == aScriptType); + && (rEvent.ScriptType == "Script"); }); if (pEvent != aEvents.end()) return extractMacroName( pEvent->ScriptCode ); |