diff options
-rw-r--r-- | test/source/a11y/AccessibilityTools.cxx | 7 | ||||
-rw-r--r-- | test/source/lokcallback.cxx | 6 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 44 | ||||
-rw-r--r-- | tools/source/inet/inetmime.cxx | 18 |
4 files changed, 31 insertions, 44 deletions
diff --git a/test/source/a11y/AccessibilityTools.cxx b/test/source/a11y/AccessibilityTools.cxx index b754f46d2f69..15a7cec17bc3 100644 --- a/test/source/a11y/AccessibilityTools.cxx +++ b/test/source/a11y/AccessibilityTools.cxx @@ -660,9 +660,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) if (i > 0) r.append(", "); - r.append("description=\""); - r.append(xAct->getAccessibleActionDescription(i)); - r.append('"'); + r.append("description=\"" + xAct->getAccessibleActionDescription(i) + "\""); const auto& xKeyBinding = xAct->getAccessibleActionKeyBinding(i); if (xKeyBinding) @@ -689,8 +687,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) r.append("<Mod3>"); if (keyStroke.Modifiers & awt::KeyModifier::SHIFT) r.append("<Shift>"); - r.append(keyStroke.KeyChar); - r.append('"'); + r.append(OUStringChar(keyStroke.KeyChar) + "\""); } } r.append("]"); diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx index 5af844f089ad..323b263b7e76 100644 --- a/test/source/lokcallback.cxx +++ b/test/source/lokcallback.cxx @@ -68,10 +68,8 @@ void TestLokCallbackWrapper::libreOfficeKitViewInvalidateTilesCallback( buf.append("EMPTY"); if (comphelper::LibreOfficeKit::isPartInInvalidation()) { - buf.append(", "); - buf.append(static_cast<sal_Int32>(nPart)); - buf.append(", "); - buf.append(static_cast<sal_Int32>(nMode)); + buf.append(", " + OString::number(static_cast<sal_Int32>(nPart)) + ", " + + OString::number(static_cast<sal_Int32>(nMode))); } callCallback(LOK_CALLBACK_INVALIDATE_TILES, buf.makeStringAndClear().getStr(), NO_VIEWID); } diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 417618acbc94..ca5a014ecc56 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -2062,15 +2062,13 @@ bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef, // to the new relative URL: if (aSubject.m_aQuery.isPresent()) { - aSynRelURIRef.append('?'); - aSynRelURIRef.append(aSubject.decode(aSubject.m_aQuery, - eDecodeMechanism, eCharset)); + aSynRelURIRef.append("?" + + aSubject.decode(aSubject.m_aQuery, eDecodeMechanism, eCharset)); } if (aSubject.m_aFragment.isPresent()) { - aSynRelURIRef.append('#'); - aSynRelURIRef.append(aSubject.decode(aSubject.m_aFragment, - eDecodeMechanism, eCharset)); + aSynRelURIRef.append("#" + + aSubject.decode(aSubject.m_aFragment, eDecodeMechanism, eCharset)); } rTheRelURIRef = aSynRelURIRef.makeStringAndClear(); @@ -3354,8 +3352,9 @@ bool INetURLObject::insertName(std::u16string_view rTheName, } OUStringBuffer aNewPath(256); - aNewPath.append(pPathBegin, pPrefixEnd - pPathBegin); - aNewPath.append('/'); + aNewPath.append( + OUString::Concat(std::u16string_view(pPathBegin, pPrefixEnd - pPathBegin)) + + "/"); encodeText(aNewPath, rTheName, PART_PCHAR, eMechanism, eCharset, true); if (bInsertSlash) { @@ -3607,9 +3606,7 @@ INetURLObject::getAbbreviated( OUStringBuffer aResult(aBuffer); if (pSuffixEnd != pBegin) aResult.append("..."); - aResult.append(aSegment); - aResult.append(aTrailer); - aResult.append(aRest); + aResult.append(aSegment + aTrailer + aRest); if (rStringWidth-> queryStringWidth(aResult.makeStringAndClear()) <= nWidth) @@ -3644,12 +3641,10 @@ INetURLObject::getAbbreviated( eMechanism, eCharset)); pPrefixBegin = p; - OUStringBuffer aResult(aBuffer); - aResult.append(aSegment); + OUStringBuffer aResult(aBuffer + aSegment); if (pPrefixBegin != pEnd) aResult.append("..."); - aResult.append(aTrailer); - aResult.append(aRest); + aResult.append(aTrailer + aRest); if (rStringWidth-> queryStringWidth(aResult.makeStringAndClear()) <= nWidth) @@ -3681,13 +3676,11 @@ INetURLObject::getAbbreviated( eCharset)); if (m_aQuery.isPresent()) { - aBuffer.append('?'); - aBuffer.append(decode(m_aQuery, eMechanism, eCharset)); + aBuffer.append("?" + decode(m_aQuery, eMechanism, eCharset)); } if (m_aFragment.isPresent()) { - aBuffer.append('#'); - aBuffer.append(decode(m_aFragment, eMechanism, eCharset)); + aBuffer.append("#" + decode(m_aFragment, eMechanism, eCharset)); } if (!aBuffer.isEmpty()) { @@ -3980,8 +3973,7 @@ OUString INetURLObject::GetHostPort(DecodeMechanism eMechanism, OUStringBuffer aHostPort(decode(m_aHost, eMechanism, eCharset)); if (m_aPort.isPresent()) { - aHostPort.append(':'); - aHostPort.append(decode(m_aPort, eMechanism, eCharset)); + aHostPort.append(":" + decode(m_aPort, eMechanism, eCharset)); } return aHostPort.makeStringAndClear(); } @@ -4362,8 +4354,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle, if (pDelimiter) *pDelimiter = '/'; - OUStringBuffer aSynFSysPath; - aSynFSysPath.append("//"); + OUStringBuffer aSynFSysPath("//"); if (m_aHost.isPresent() && m_aHost.getLength() > 0) aSynFSysPath.append(decode(m_aHost, DecodeMechanism::WithCharset, RTL_TEXTENCODING_UTF8)); @@ -4393,10 +4384,9 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle, OUStringBuffer aSynFSysPath(64); if (m_aHost.isPresent() && m_aHost.getLength() > 0) { - aSynFSysPath.append("\\\\"); - aSynFSysPath.append(decode(m_aHost, DecodeMechanism::WithCharset, - RTL_TEXTENCODING_UTF8)); - aSynFSysPath.append('\\'); + aSynFSysPath.append("\\\\" + + decode(m_aHost, DecodeMechanism::WithCharset, RTL_TEXTENCODING_UTF8) + + "\\"); } sal_Unicode const * p = m_aAbsURIRef.getStr() + m_aPath.getBegin(); diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 1d4f05b0e9da..e6b725490e58 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -1270,10 +1270,11 @@ OUString INetMIME::decodeHeaderFieldBody(const OString& rBody) bDone = true; break; } - sText.append(rBody.subView( - (pEncodedTextCopyBegin - pBegin), - (q - 1 - pEncodedTextCopyBegin))); - sText.append(char(nDigit1 << 4 | nDigit2)); + sText.append( + rBody.subView( + (pEncodedTextCopyBegin - pBegin), + (q - 1 - pEncodedTextCopyBegin)) + + OStringChar(char(nDigit1 << 4 | nDigit2))); q += 2; pEncodedTextCopyBegin = q; break; @@ -1290,10 +1291,11 @@ OUString INetMIME::decodeHeaderFieldBody(const OString& rBody) break; case '_': - sText.append(rBody.subView( - (pEncodedTextCopyBegin - pBegin), - (q - 1 - pEncodedTextCopyBegin))); - sText.append(' '); + sText.append( + rBody.subView( + (pEncodedTextCopyBegin - pBegin), + (q - 1 - pEncodedTextCopyBegin)) + + OString::Concat(" ")); pEncodedTextCopyBegin = q; break; |