diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-13 15:03:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:29 +0200 |
commit | 15113ea855baab1f8319a7125cec90d203904cb7 (patch) | |
tree | 73d86eab424567cc5faa21dbb69d7937466c65f7 /sc/source/filter | |
parent | 39c8da8c86decbe3443a786ad445a18b0078daa3 (diff) |
remove unnecessary sal_Unicode casts in SC module
Change-Id: Iee7688ea60b4d45d3e6725afd46e9cbb5ebe26c5
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/dif/difexp.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xehelper.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xipivot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xltools.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/autofilterbuffer.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/commentsbuffer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/formulabase.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/pagesettings.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/querytablebuffer.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/worksheetbuffer.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/worksheethelper.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 10 |
17 files changed, 36 insertions, 36 deletions
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index de90f1d1926c..f34750e01f4f 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -124,7 +124,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aOS.append(pKeyVECTORS); aOS.appendAscii("\n0,"); aOS.append(static_cast<sal_Int32>(nNumCols)); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); aOS.appendAscii(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); @@ -132,7 +132,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aOS.append(pKeyTUPLES); aOS.appendAscii("\n0,"); aOS.append(static_cast<sal_Int32>(nNumRows)); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); aOS.appendAscii(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); @@ -152,7 +152,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc OSL_ASSERT(aOS.getLength() == 0); aOS.appendAscii(pSpecDataType_LF); aOS.append(pKeyBOT); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); for( nColCnt = rRange.aStart.Col() ; nColCnt <= nEndCol ; nColCnt++ ) { @@ -287,7 +287,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc OSL_ASSERT(aOS.getLength() == 0); aOS.appendAscii(pSpecDataType_LF); aOS.append(pKeyEOD); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); // restore original value diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index fd2fad955cab..c64006a67642 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -898,7 +898,7 @@ OUString lclEncodeDosUrl( if ( aOldUrl.getLength() > 2 && aOldUrl.copy(0,2) == "\\\\" ) { // UNC - aBuf.append(EXC_URL_DOSDRIVE).append(sal_Unicode('@')); + aBuf.append(EXC_URL_DOSDRIVE).append('@'); aOldUrl = aOldUrl.copy(2); } else if ( aOldUrl.getLength() > 2 && aOldUrl.copy(1,2) == ":\\" ) @@ -930,7 +930,7 @@ OUString lclEncodeDosUrl( // file name if (pTableName) // enclose file name in brackets if table name follows - aBuf.append(sal_Unicode('[')).append(aOldUrl).append(sal_Unicode(']')); + aBuf.append('[').append(aOldUrl).append(']'); else aBuf.append(aOldUrl); } diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 5a8a2fed0234..f29cc2479631 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -1052,7 +1052,7 @@ static OUString lcl_convertCalcSubtotalName(const OUString& rName) for (sal_Int32 i = 0; i < n; ++i) { const sal_Unicode c = p[i]; - if (!bEscaped && c == sal_Unicode('\\')) + if (!bEscaped && c == '\\') { bEscaped = true; continue; diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 39557bda18cd..09a9c5c474a3 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -360,7 +360,7 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl) sal_Unicode c = rUrl[i]; if (c == '\'') { - if (bInQuote && i+1 < n && rUrl[i+1] == sal_Unicode('\'')) + if (bInQuote && i+1 < n && rUrl[i+1] == '\'') { // Two consecutive single quotes ('') signify a single literal // quite. When this occurs, the whole table name needs to be diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 30af343dc070..3309449ef9e4 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1061,7 +1061,7 @@ static OUString lcl_convertExcelSubtotalName(const OUString& rName) for (sal_Int32 i = 0; i < n; ++i) { const sal_Unicode c = p[i]; - if (c == sal_Unicode('\\')) + if (c == '\\') { aBuf.append(c); aBuf.append(c); diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index e0713e4902b0..7da57ce532b4 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -654,9 +654,9 @@ OUString XclTools::GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_ { OUStringBuffer aBuf(maCFStyleNamePrefix1); aBuf.append(static_cast<sal_Int32>(nScTab+1)); - aBuf.append(sal_Unicode('_')); + aBuf.append('_'); aBuf.append(static_cast<sal_Int32>(nFormat+1)); - aBuf.append(sal_Unicode('_')); + aBuf.append('_'); aBuf.append(static_cast<sal_Int32>(nCondition+1)); return aBuf.makeStringAndClear(); } diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx index 18ffc0847fa3..3b98ba7a591e 100644 --- a/sc/source/filter/oox/autofilterbuffer.cxx +++ b/sc/source/filter/oox/autofilterbuffer.cxx @@ -124,14 +124,14 @@ bool lclConvertWildcardsToRegExp( OUString& rValue ) switch( *pcChar ) { case '?': - aBuffer.append( sal_Unicode( '.' ) ); + aBuffer.append( '.' ); break; case '*': - aBuffer.append( sal_Unicode( '.' ) ).append( sal_Unicode( '*' ) ); + aBuffer.append( '.' ).append( '*' ); break; case '\\': case '.': case '|': case '(': case ')': case '^': case '$': // quote RE meta characters - aBuffer.append( sal_Unicode( '\\' ) ).append( *pcChar ); + aBuffer.append( '\\' ).append( *pcChar ); break; default: aBuffer.append( *pcChar ); diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index cee629d28efb..e9489d7a320d 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -143,7 +143,7 @@ void Comment::finalizeImport() Reference< XSheetAnnotationsSupplier > xAnnosSupp( getSheet(), UNO_QUERY_THROW ); Reference< XSheetAnnotations > xAnnos( xAnnosSupp->getAnnotations(), UNO_SET_THROW ); // non-empty string required by note implementation (real text will be added below) - xAnnos->insertNew( aNotePos, OUString( sal_Unicode( ' ' ) ) ); + xAnnos->insertNew( aNotePos, OUString( ' ' ) ); // receive created note from cell (insertNew does not return the note) Reference< XSheetAnnotationAnchor > xAnnoAnchor( getCell( aNotePos ), UNO_QUERY_THROW ); diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 582ea145e328..9ffda5b3129f 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1567,10 +1567,10 @@ OUString FormulaProcessorBase::generateAddress2dString( const BinAddress& rAddre for( sal_Int32 nTemp = rAddress.mnCol; nTemp >= 0; (nTemp /= 26) -= 1 ) aBuffer.insert( 0, sal_Unicode( 'A' + (nTemp % 26) ) ); if( bAbsolute ) - aBuffer.insert( 0, sal_Unicode( '$' ) ); + aBuffer.insert( 0, '$' ); // row if( bAbsolute ) - aBuffer.append( sal_Unicode( '$' ) ); + aBuffer.append( '$' ); aBuffer.append( static_cast< sal_Int32 >( rAddress.mnRow + 1 ) ); return aBuffer.makeStringAndClear(); } @@ -1583,7 +1583,7 @@ OUString FormulaProcessorBase::generateApiString( const OUString& rString ) sal_Int32 nQuotePos = aRetString.getLength(); while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 ) aRetString = aRetString.replaceAt( nQuotePos, 1, OUString( "\"\"" ) ); - return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString ).append( sal_Unicode( '"' ) ).makeStringAndClear(); + return OUStringBuffer().append( '"' ).append( aRetString ).append( '"' ).makeStringAndClear(); } OUString FormulaProcessorBase::generateApiArray( const Matrix< Any >& rMatrix ) diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx index 8ada6680b679..90dc156b0fa7 100644 --- a/sc/source/filter/oox/pagesettings.cxx +++ b/sc/source/filter/oox/pagesettings.cxx @@ -785,7 +785,7 @@ void HeaderFooterParser::appendText() void HeaderFooterParser::appendLineBreak() { getEndPos()->gotoEnd( sal_False ); - getEndPos()->setString( OUString( sal_Unicode( '\n' ) ) ); + getEndPos()->setString( OUString( '\n' ) ); getPortion().mfTotalHeight += getCurrHeight(); getPortion().mfCurrHeight = 0; } diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx index bc7f6915d12c..5b2e9b10d5d1 100644 --- a/sc/source/filter/oox/querytablebuffer.cxx +++ b/sc/source/filter/oox/querytablebuffer.cxx @@ -71,7 +71,7 @@ void lclAppendWebQueryTableName( OUStringBuffer& rTables, const OUString& rTable if( !rTableName.isEmpty() ) { if( !rTables.isEmpty() ) - rTables.append( sal_Unicode( ';' ) ); + rTables.append( ';' ); rTables.appendAscii( RTL_CONSTASCII_STRINGPARAM( "HTML__" ) ).append( rTableName ); } } @@ -81,7 +81,7 @@ void lclAppendWebQueryTableIndex( OUStringBuffer& rTables, sal_Int32 nTableIndex if( nTableIndex > 0 ) { if( !rTables.isEmpty() ) - rTables.append( sal_Unicode( ';' ) ); + rTables.append( ';' ); rTables.appendAscii( RTL_CONSTASCII_STRINGPARAM( "HTML_" ) ).append( nTableIndex ); } } diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index c4dcc2d7e2b0..70787add172f 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -215,9 +215,9 @@ void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rEr void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode ) { OUStringBuffer aBuf; - aBuf.append(sal_Unicode('{')); + aBuf.append('{'); aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode)); - aBuf.append(sal_Unicode('}')); + aBuf.append('}'); getFormulaBuffer().setCellFormula(rModel.maCellAddr, aBuf.makeStringAndClear()); setCellFormat( rModel ); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 02ca85104d12..f1b65110bf10 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -872,7 +872,7 @@ void Font::finalizeImport() // Western fonts bool bHasLatin = (!bHasAsian && !bHasCmplx) || - xFont->hasGlyphs( OUString( sal_Unicode( 'A' ) ) ); + xFont->hasGlyphs( OUString( 'A' ) ); lclSetFontName( maApiData.maLatinFont, maApiData.maDesc, bHasLatin ); lclSetFontName( maApiData.maAsianFont, maApiData.maDesc, bHasAsian ); @@ -2784,7 +2784,7 @@ void CellStyleBuffer::finalizeImport() sal_Int32 nIndex = 0; do { - aUnusedName = OUStringBuffer( aStyleName ).append( sal_Unicode( ' ' ) ).append( ++nIndex ).makeStringAndClear(); + aUnusedName = OUStringBuffer( aStyleName ).append( ' ' ).append( ++nIndex ).makeStringAndClear(); } while( aCellStyles.count( aUnusedName ) > 0 ); aCellStyles[ aUnusedName ] = *aIt; diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx index b589f849e041..c9e5e57f153c 100644 --- a/sc/source/filter/oox/worksheetbuffer.cxx +++ b/sc/source/filter/oox/worksheetbuffer.cxx @@ -117,7 +117,7 @@ void WorksheetBuffer::convertSheetNameRef( OUString& sSheetNameRef ) const if( nSepPos > 0 ) { // replace the exclamation mark with a period - sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, OUString( sal_Unicode( '.' ) ) ); + sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, OUString( '.' ) ); // #i66592# convert sheet names that have been renamed on import OUString aSheetName = sSheetNameRef.copy( 1, nSepPos - 1 ); OUString aCalcName = getCalcSheetName( aSheetName ); @@ -153,9 +153,9 @@ OUString lclQuoteName( const OUString& rName ) // duplicate all quote characters for( sal_Int32 nPos = aBuffer.getLength() - 1; nPos >= 0; --nPos ) if( aBuffer[nPos] == '\'' ) - aBuffer.insert( nPos, sal_Unicode( '\'' ) ); + aBuffer.insert( nPos, '\'' ); // add outer quotes and return - return aBuffer.insert( 0, sal_Unicode( '\'' ) ).append( sal_Unicode( '\'' ) ).makeStringAndClear(); + return aBuffer.insert( 0, '\'' ).append( '\'' ).makeStringAndClear(); } } // namespace diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 148118b953de..0ff929302cd6 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -997,7 +997,7 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c if( !rHyperlink.maTarget.isEmpty() ) aUrlBuffer.append( getBaseFilter().getAbsoluteUrl( rHyperlink.maTarget ) ); if( !rHyperlink.maLocation.isEmpty() ) - aUrlBuffer.append( sal_Unicode( '#' ) ).append( rHyperlink.maLocation ); + aUrlBuffer.append( '#' ).append( rHyperlink.maLocation ); OUString aUrl = aUrlBuffer.makeStringAndClear(); // convert '#SheetName!A1' to '#SheetName.A1' @@ -1007,7 +1007,7 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c if( nSepPos > 0 ) { // replace the exclamation mark with a period - aUrl = aUrl.replaceAt( nSepPos, 1, OUString( sal_Unicode( '.' ) ) ); + aUrl = aUrl.replaceAt( nSepPos, 1, OUString( '.' ) ); // #i66592# convert sheet names that have been renamed on import OUString aSheetName = aUrl.copy( 1, nSepPos - 1 ); OUString aCalcName = getWorksheets().getCalcSheetName( aSheetName ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 39fe09357d10..e9f7d5b0e8c5 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -358,7 +358,7 @@ void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData, const OUS Field& rField = maFields.back(); sal_Int32 nPos = maParagraph.getLength(); - maParagraph.append(sal_Unicode('\1')); // Placeholder text for inserted field item. + maParagraph.append('\1'); // Placeholder text for inserted field item. rField.maSelection.nStartPara = mnCurParagraph; rField.maSelection.nEndPara = mnCurParagraph; rField.maSelection.nStartPos = nPos; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index cb0b63dfb284..2067f195b2dc 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -188,7 +188,7 @@ OUString lcl_RangeSequenceToString( { OUStringBuffer aResult; const sal_Int32 nMaxIndex( rRanges.getLength() - 1 ); - const sal_Unicode cSep( sal_Char(' ')); + const sal_Unicode cSep(' '); for( sal_Int32 i=0; i<=nMaxIndex; ++i ) { OUString aRange( rRanges[i] ); @@ -3088,15 +3088,15 @@ void writeContent( OUStringBuffer aBuf; sal_Int32 nVal = aDate.GetYear(); aBuf.append(nVal); - aBuf.append(sal_Unicode('-')); + aBuf.append('-'); nVal = aDate.GetMonth(); if (nVal < 10) - aBuf.append(sal_Unicode('0')); + aBuf.append('0'); aBuf.append(nVal); - aBuf.append(sal_Unicode('-')); + aBuf.append('-'); nVal = aDate.GetDay(); if (nVal < 10) - aBuf.append(sal_Unicode('0')); + aBuf.append('0'); aBuf.append(nVal); rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, "N2"); rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_DATE_VALUE, aBuf.makeStringAndClear()); |