[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 18 20:04:46 UTC 2021
sc/source/core/tool/address.cxx | 8 ++++----
sc/source/ui/docshell/impex.cxx | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 6aa418bc1db541d40cbc34fb0be9f16cb0019c65
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Apr 18 20:58:01 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Apr 18 22:04:07 2021 +0200
no need to construct temporary OUStrings here
Change-Id: I869c1cf23d8055b0327ca486bbfbc68dd98af842
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 44c8e0a90dc1..fb086018a972 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -311,7 +311,7 @@ static const sal_Unicode * lcl_XL_ParseSheetRef( const sal_Unicode* start,
// We pre-analyzed the quoting, no checks needed here.
if (*++p == '\'')
{
- aTabName += OUString( pCurrentStart,
+ aTabName += std::u16string_view( pCurrentStart,
sal::static_int_cast<sal_Int32>( p - pCurrentStart));
pCurrentStart = ++p;
}
@@ -324,7 +324,7 @@ static const sal_Unicode * lcl_XL_ParseSheetRef( const sal_Unicode* start,
++p;
}
if (pCurrentStart < p)
- aTabName += OUString( pCurrentStart, sal::static_int_cast<sal_Int32>( p - pCurrentStart));
+ aTabName += std::u16string_view( pCurrentStart, sal::static_int_cast<sal_Int32>( p - pCurrentStart));
if (aTabName.isEmpty())
return nullptr;
if (p == pMsoxlQuoteStop)
@@ -402,7 +402,7 @@ static const sal_Unicode * lcl_XL_ParseSheetRef( const sal_Unicode* start,
if( *p != '!' && ( !bAllow3D || *p != ':' ) )
return (!bAllow3D && *p == ':') ? p : start;
- aTabName += OUString( start, sal::static_int_cast<sal_Int32>( p - start ) );
+ aTabName += std::u16string_view( start, sal::static_int_cast<sal_Int32>( p - start ) );
}
rExternTabName = aTabName;
@@ -509,7 +509,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
p = ScGlobal::UnicodeStrChr( start+1, ']' );
if( p == nullptr )
return start;
- rExternDocName += OUString( start+1, sal::static_int_cast<sal_Int32>( p-(start+1) ) );
+ rExternDocName += std::u16string_view( start+1, sal::static_int_cast<sal_Int32>( p-(start+1) ) );
}
++p;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 3abb445590a9..3e58a9767cbe 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -667,13 +667,13 @@ static bool lcl_appendLineData( OUString& rField, const sal_Unicode* p1, const s
{
if (rField.getLength() + (p2 - p1) <= nArbitraryCellLengthLimit)
{
- rField += OUString( p1, sal::static_int_cast<sal_Int32>( p2 - p1 ) );
+ rField += std::u16string_view( p1, sal::static_int_cast<sal_Int32>( p2 - p1 ) );
return true;
}
else
{
SAL_WARN( "sc", "lcl_appendLineData: data overflow");
- rField += OUString( p1, nArbitraryCellLengthLimit - rField.getLength() );
+ rField += std::u16string_view( p1, nArbitraryCellLengthLimit - rField.getLength() );
return false;
}
}
@@ -794,7 +794,7 @@ static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
}
if (!pEndQuote)
pEndQuote = p; // Take all data as string.
- rString += OUString(pStartQuote + 1, sal::static_int_cast<sal_Int32>( pEndQuote - pStartQuote - 1 ) );
+ rString += std::u16string_view(pStartQuote + 1, sal::static_int_cast<sal_Int32>( pEndQuote - pStartQuote - 1 ) );
lcl_UnescapeSylk( rString, eVersion);
return p;
}
@@ -816,7 +816,7 @@ static const sal_Unicode* lcl_ScanSylkFormula( const sal_Unicode* p,
}
++p;
}
- rString += OUString( pStart, sal::static_int_cast<sal_Int32>( p - pStart));
+ rString += std::u16string_view( pStart, sal::static_int_cast<sal_Int32>( p - pStart));
lcl_UnescapeSylk( rString, eVersion);
}
else
@@ -857,7 +857,7 @@ static const sal_Unicode* lcl_ScanSylkFormula( const sal_Unicode* p,
{
while (*p && *p != ';')
++p;
- rString += OUString( pStart, sal::static_int_cast<sal_Int32>( p - pStart));
+ rString += std::u16string_view( pStart, sal::static_int_cast<sal_Int32>( p - pStart));
}
}
return p;
@@ -2507,7 +2507,7 @@ Label_RetryWithNewSep:
if (eRetryState == RetryState::ALLOW && rcDetectSep == ' ')
{
eRetryState = RetryState::RETRY;
- rFieldSeparators += OUString(' ');
+ rFieldSeparators += " ";
goto Label_RetryWithNewSep;
}
More information about the Libreoffice-commits
mailing list