Improve readability of OUString concatanation in OStorageHelper
It is more readable and more efficient as a bonus. See: https://goo.gl/jsVAwy: Change-Id: I5cc22276fc385a381d64e00f20d6d2b302ea587f Reviewed-on: https://gerrit.libreoffice.org/26720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
3bdc5063f9
commit
41bc79521e
@@ -275,12 +275,12 @@ sal_Int32 OStorageHelper::GetXStorageFormat(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the mediatype is not known
|
// the mediatype is not known
|
||||||
OUString aMsg(OSL_THIS_FUNC);
|
OUString aMsg = OUString(OSL_THIS_FUNC)
|
||||||
aMsg += ":";
|
+ ":"
|
||||||
aMsg += OUString::number(__LINE__);
|
+ OUString::number(__LINE__)
|
||||||
aMsg += ": unknown media type '";
|
+ ": unknown media type '"
|
||||||
aMsg += aMediaType;
|
+ aMediaType
|
||||||
aMsg += "'";
|
+ "'";
|
||||||
throw beans::IllegalTypeException(aMsg);
|
throw beans::IllegalTypeException(aMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -479,11 +479,11 @@ bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSeg
|
|||||||
|
|
||||||
if ( !aSegment.isEmpty() && nPathLen >= nSegLen )
|
if ( !aSegment.isEmpty() && nPathLen >= nSegLen )
|
||||||
{
|
{
|
||||||
OUString aEndSegment( "/" );
|
OUString aEndSegment = "/"
|
||||||
aEndSegment += aSegment;
|
+ aSegment;
|
||||||
|
|
||||||
OUString aInternalSegment( aEndSegment );
|
OUString aInternalSegment = aEndSegment
|
||||||
aInternalSegment += "/";
|
+ "/";
|
||||||
|
|
||||||
if ( aPath.indexOf( aInternalSegment ) >= 0 )
|
if ( aPath.indexOf( aInternalSegment ) >= 0 )
|
||||||
bResult = true;
|
bResult = true;
|
||||||
|
Reference in New Issue
Block a user