diff options
-rw-r--r-- | package/qa/cppunit/test_package.cxx | 6 | ||||
-rw-r--r-- | package/source/manifest/ManifestImport.cxx | 3 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 7 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 | ||||
-rw-r--r-- | registry/source/keyimpl.cxx | 27 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/propbrw.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 56 | ||||
-rw-r--r-- | sal/qa/osl/file/test_cpy_wrt_file.cxx | 6 | ||||
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 14 |
13 files changed, 62 insertions, 92 deletions
diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx index ec65d7a88351..2353e7b3de07 100644 --- a/package/qa/cppunit/test_package.cxx +++ b/package/qa/cppunit/test_package.cxx @@ -152,8 +152,7 @@ namespace for (char c = 'a'; c <= 'z'; ++c, ++itBuf) { - OUString aName(c); - aName += ".txt"; + OUString aName = OUString(c) + ".txt"; uno::Reference<io::XInputStream> xStrm; mxNA->getByName(aName) >>= xStrm; @@ -175,8 +174,7 @@ namespace for (char c = 'a'; c <= 'z'; ++c, ++itBuf) { - OUString aName(c); - aName += ".txt"; + OUString aName = OUString(c) + ".txt"; uno::Reference<io::XInputStream> xStrm; //Size of each stream is 1mb (>10000) => XBufferedThreadedStream diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index b333cf5c9831..4014bf3d0a4d 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -581,8 +581,7 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const if ( aIter != aNamespaces.end() && ( aIter->second == MANIFEST_NAMESPACE || aIter->second == MANIFEST_OASIS_NAMESPACE ) ) { // no check for manifest.xml consistency currently since the old versions have supported inconsistent documents as well - aResult = MANIFEST_NSPREFIX; - aResult += aPureName; + aResult = MANIFEST_NSPREFIX + aPureName; } return aResult; diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index e4935b94c81d..a781dc4bdac9 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1510,11 +1510,8 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN ) throw io::IOException(); // TODO: - OUString aOrigRelStreamName = aOrigStreamName; - aOrigRelStreamName += ".rels"; - - OUString aNewRelStreamName = aNewStreamName; - aNewRelStreamName += ".rels"; + OUString aOrigRelStreamName = aOrigStreamName + ".rels"; + OUString aNewRelStreamName = aNewStreamName + ".rels"; bool bRenamed = aOrigRelStreamName != aNewRelStreamName; if ( m_nRelInfoStatus == RELINFO_CHANGED diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 5a375e4bfcfa..6a5b62a6edd2 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1591,8 +1591,7 @@ void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName ) if ( m_nStorageType == embed::StorageFormats::OFOPXML && m_xRelStorage.is() ) { - OUString aRelStreamName = aOriginalName; - aRelStreamName += ".rels"; + OUString aRelStreamName = aOriginalName + ".rels"; if ( m_xRelStorage->hasByName( aRelStreamName ) ) m_xRelStorage->removeElement( aRelStreamName ); @@ -1654,8 +1653,7 @@ uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName( const ReadContents(); if ( m_xRelStorage.is() ) { - OUString aRelStreamName = aName; - aRelStreamName += ".rels"; + OUString aRelStreamName = aName + ".rels"; if ( m_xRelStorage->hasByName( aRelStreamName ) ) { uno::Reference< io::XStream > xStream = m_xRelStorage->openStreamElement( aRelStreamName, embed::ElementModes::READ ); diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index e5aef0675199..d969cbaa32c5 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -228,8 +228,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -288,8 +287,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal return RegError::INVALID_VALUE; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -355,8 +353,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * return RegError::REGISTRY_READONLY; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -411,8 +408,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu return RegError::REGISTRY_READONLY; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -476,8 +472,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p return RegError::REGISTRY_READONLY; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -544,8 +539,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -630,8 +624,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -734,8 +727,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -832,8 +824,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode*** accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName( VALUE_PREFIX ); - sImplValueName += valueName; + OUString sImplValueName = VALUE_PREFIX + valueName; REG_GUARD(m_pRegistry->m_mutex); diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 63c937a1109a..ab7dcb09888e 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -796,8 +796,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName) return _ret; } - OUString tmpName(sRelativKey); - tmpName += ROOT; + OUString tmpName = sRelativKey + ROOT; OStoreFile sFile(pKey->getStoreFile()); if (sFile.isValid() && sFile.remove(sFullPath, tmpName)) @@ -1198,8 +1197,7 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey, if (sRelPath.getLength() > 1 || sFullPath.isEmpty()) sFullPath += ROOT; - OUString sFullKeyName = sFullPath; - sFullKeyName += keyName; + OUString sFullKeyName = sFullPath + keyName; OStoreDirectory rStoreDir; if (rStoreDir.create(pTargetKey->getStoreFile(), sFullPath, keyName, storeAccessMode::Create)) diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 4c991cd87732..b548f991dcc6 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1082,14 +1082,11 @@ void ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDefinit sExpression = sExpression.replaceAt(nIndex, 1, "\"\""); nIndex = sExpression.indexOf('"',nIndex+2); } - OUString sFormula("rpt:HASCHANGED(\""); TGroupFunctionMap::const_iterator aGroupFind = m_aGroupFunctionMap.find(xGroup); if ( aGroupFind != m_aGroupFunctionMap.end() ) sExpression = aGroupFind->second->getName(); - sFormula += sExpression; - sFormula += "\")"; - sExpression = sFormula; + sExpression = "rpt:HASCHANGED(\"" + sExpression + "\")"; } AddAttribute(XML_NAMESPACE_REPORT, XML_SORT_EXPRESSION, sField); AddAttribute(XML_NAMESPACE_REPORT, XML_GROUP_EXPRESSION,sExpression); @@ -1556,10 +1553,7 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG xFunction->setName(sFunctionName); if ( !sInitialFormula.isEmpty() ) xFunction->setInitialFormula(beans::Optional< OUString>(true, sInitialFormula)); - sFunction = "rpt:" + sFunction; - sFunction += "(["; - sFunction += sExpression; - sFunction += "]"; + sFunction = "rpt:" + sFunction + "([" + sExpression + "]"; if ( !sPrefix.isEmpty() ) sFunction += sPrefix; diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 20e37bf6413c..eaf9d679f509 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -2157,8 +2157,7 @@ void GeometryHandler::impl_setCounterFunction_throw() { OUString sNamePostfix; fillScope_throw(sNamePostfix); - OUString sFunctionName = m_aCounterFunction.m_sName; - sFunctionName += sNamePostfix; + OUString sFunctionName = m_aCounterFunction.m_sName + sNamePostfix; const OUString sQuotedFunctionName = lcl_getQuotedFunctionName(sFunctionName); OUString sScope; if ( !(!sFunctionName.isEmpty() && m_aFunctionNames.find(sQuotedFunctionName) != m_aFunctionNames.end() && impl_isCounterFunction_throw(sQuotedFunctionName,sScope)) ) diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index bde0449a34b1..51d7b5e7cf69 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -162,15 +162,13 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 OSL_ENSURE(_xGroup.is(),"Group is NULL -> GPF"); if ( _xGroup->getHeaderOn() && _xGroup->getHeader()->getName().isEmpty() ) { - OUString sName = RptResId(RID_STR_GROUPHEADER); - sName += OUString::number(_nPos); + OUString sName = RptResId(RID_STR_GROUPHEADER) + OUString::number(_nPos); _xGroup->getHeader()->setName(sName); } if ( _xGroup->getFooterOn() && _xGroup->getFooter()->getName().isEmpty() ) { - OUString sName = RptResId(RID_STR_GROUPFOOTER); - sName += OUString::number(_nPos); + OUString sName = RptResId(RID_STR_GROUPFOOTER) + OUString::number(_nPos); _xGroup->getFooter()->setName(sName); } } diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 633d5faea46a..ad6d8f1d494e 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -389,8 +389,8 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac } else // multiselection { - aName = RptResId(RID_STR_BRWTITLE_PROPERTIES); - aName += RptResId(RID_STR_BRWTITLE_MULTISELECT); + aName = RptResId(RID_STR_BRWTITLE_PROPERTIES) + + RptResId(RID_STR_BRWTITLE_MULTISELECT); } return aName; diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 1b32320803e9..cf8875b020ac 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -86,10 +86,9 @@ static OString errorToString(const osl::FileBase::RC _nError) static OString errorToStr(osl::FileBase::RC const& nError) { - OString suBuf; - suBuf += "The returned error is: " ; - suBuf += errorToString(nError); - suBuf += "!\n"; + OString suBuf = "The returned error is: " + + errorToString(nError) + + "!\n"; return suBuf; } @@ -263,8 +262,8 @@ static void deleteTestDirectory(const OUString& dirname) nError = Directory::remove(aPathURL); - OString strError ("In deleteTestDirectory function: remove Directory "); - strError += OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US); + OString strError = OString("In deleteTestDirectory function: remove Directory ") + + OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US); CPPUNIT_ASSERT_MESSAGE(strError.getStr(), (osl::FileBase::E_None == nError) || (nError == osl::FileBase::E_NOENT)); } @@ -368,16 +367,15 @@ static bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) */ static OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") { - OString aString; if (returnVal == rightVal) - return aString; - - aString += msg; - aString += ": the returned value is '"; - aString += returnVal; - aString += "', but the value should be '"; - aString += rightVal; - aString += "'."; + return OString(); + + OString aString = OString(msg) + + ": the returned value is '" + + returnVal + + "', but the value should be '" + + rightVal + + "'."; return aString; } @@ -969,9 +967,9 @@ namespace osl_FileBase bool bOk = compareFileName(aUStr, aUResultURL); - OString sError("test for getSystemPathFromFileURL(' "); - sError += OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US); - sError += " ') function:use an absolute file URL, "; + OString sError = "test for getSystemPathFromFileURL(' " + + OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US) + + " ') function:use an absolute file URL, "; sError += outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US), OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US)); @@ -992,9 +990,9 @@ namespace osl_FileBase bool bOk = compareFileName(aUStr, aUResultURL); - OString sError("test for getSystemPathFromFileURL(' "); - sError += OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US); - sError += " ') function:use a CJK coded absolute URL, "; + OString sError = "test for getSystemPathFromFileURL(' " + + OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US) + + " ') function:use a CJK coded absolute URL, "; sError += outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US), OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US)); deleteTestDirectory(aTmpName10); @@ -4773,9 +4771,9 @@ namespace osl_Directory CPPUNIT_ASSERT_EQUAL_MESSAGE("temp File removal failed", osl::FileBase::E_None, nError1); nError1 = Directory::create(aTmpDir); - OString sError("test for create function: create a directory '"); - sError += OUStringToOString(aTmpDir, RTL_TEXTENCODING_ASCII_US); - sError += "' and check its existence."; + OString sError = "test for create function: create a directory '" + + OUStringToOString(aTmpDir, RTL_TEXTENCODING_ASCII_US) + + "' and check its existence."; CPPUNIT_ASSERT_EQUAL_MESSAGE(sError.getStr(), osl::FileBase::E_None, nError1); osl_setFileAttributes(aTmpDir.pData, 0); // no access allowed now @@ -4789,9 +4787,9 @@ namespace osl_Directory osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnExe); deleteTestDirectory(aTmpDir); - sError = OString("test for create function: create a directory under '"); - sError += OUStringToOString(aTmpDir, RTL_TEXTENCODING_ASCII_US); - sError += "' for access test."; + sError = OString("test for create function: create a directory under '") + + OUStringToOString(aTmpDir, RTL_TEXTENCODING_ASCII_US) + + "' for access test."; CPPUNIT_ASSERT_EQUAL_MESSAGE(sError.getStr(), osl::FileBase::E_ACCES, nError1); #endif } @@ -4888,8 +4886,8 @@ namespace osl_Directory nError1 = Directory::remove(aTmpName3); deleteTestFile(aTmpName4); deleteTestDirectory(aTmpName3); - OString sError = "test for remove function: try to remove a directory that is not empty."; - sError += errorToStr(nError1).getStr(); + OString sError = "test for remove function: try to remove a directory that is not empty." + + errorToStr(nError1); #if defined(__sun) // on UNX, the implementation uses rmdir(), which EEXIST is thrown on Solaris when the directory is not empty, refer to: 'man -s 2 rmdir', while on linux, ENOTEMPTY is thrown. // EEXIST The directory contains entries other than those for "." and "..". diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx index 41e9f88c9fea..6843d10b362a 100644 --- a/sal/qa/osl/file/test_cpy_wrt_file.cxx +++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx @@ -43,9 +43,9 @@ public: File tmp_file(aTmpFile); err = tmp_file.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create); - OString sErrorMsg = "Expected that '"; - sErrorMsg += OUStringToOString(aTmpFile, RTL_TEXTENCODING_ASCII_US); - sErrorMsg += "' would exist!"; + OString sErrorMsg = "Expected that '" + + OUStringToOString(aTmpFile, RTL_TEXTENCODING_ASCII_US) + + "' would exist!"; CPPUNIT_ASSERT_EQUAL_MESSAGE(sErrorMsg.getStr(), FileBase::E_EXIST, err); char buffer[1]; diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 3030b5f001e0..c55cea3f2d04 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -614,13 +614,13 @@ OUString getErrorMessage( XML_Error xmlE, const OUString& sSystemId , sal_Int32 Message = "not standalone"; } - OUString str("["); - str += sSystemId; - str += " line "; - str += OUString::number( nLine ); - str += "]: "; - str += Message; - str += "error"; + OUString str = "[" + + sSystemId + + " line " + + OUString::number( nLine ) + + "]: " + + Message + + "error"; return str; } |