diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-10 08:10:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-10 08:10:58 +0100 |
commit | 243ab6d5583bdc02de38d62753e1b31ca8c0d162 (patch) | |
tree | b604bcfa3c919b59e8a50ef6c6306e26490d90c4 /sc/source/filter/dif | |
parent | 86215f8c6ba6bc3a83375ea362a608f4f1bcfbe5 (diff) |
New loplugin:conststringvar: sc
Change-Id: I5f353f8aaaa82f0f9dcb5af33320dbd7e4a8abb8
Diffstat (limited to 'sc/source/filter/dif')
-rw-r--r-- | sc/source/filter/dif/difexp.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index cbdd8a8a4659..4d0371285f0e 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -84,12 +84,12 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, bContextOrNotAsciiEncoding = false; } - const sal_Char* p2DoubleQuotes_LF = "\"\"\n"; - const sal_Char* pSpecDataType_LF = "-1,0\n"; - const sal_Char* pEmptyData = "1,0\n\"\"\n"; - const sal_Char* pStringData = "1,0\n"; - const sal_Char* pNumData = "0,"; - const sal_Char* pNumDataERROR = "0,0\nERROR\n"; + const sal_Char p2DoubleQuotes_LF[] = "\"\"\n"; + const sal_Char pSpecDataType_LF[] = "-1,0\n"; + const sal_Char pEmptyData[] = "1,0\n\"\"\n"; + const sal_Char pStringData[] = "1,0\n"; + const sal_Char pNumData[] = "0,"; + const sal_Char pNumDataERROR[] = "0,0\nERROR\n"; OUStringBuffer aOS; OUString aString; @@ -119,7 +119,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, aOS.append("\n0,"); aOS.append(static_cast<sal_Int32>(nNumCols)); aOS.append('\n'); - aOS.appendAscii(p2DoubleQuotes_LF); + aOS.append(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); // TUPLES @@ -127,13 +127,13 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, aOS.append("\n0,"); aOS.append(static_cast<sal_Int32>(nNumRows)); aOS.append('\n'); - aOS.appendAscii(p2DoubleQuotes_LF); + aOS.append(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); // DATA aOS.append(pKeyDATA); aOS.append("\n0,0\n"); - aOS.appendAscii(p2DoubleQuotes_LF); + aOS.append(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); SCCOL nColCnt; @@ -142,7 +142,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, for( nRowCnt = rRange.aStart.Row() ; nRowCnt <= nEndRow ; nRowCnt++ ) { OSL_ASSERT(aOS.getLength() == 0); - aOS.appendAscii(pSpecDataType_LF); + aOS.append(pSpecDataType_LF); aOS.append(pKeyBOT); aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); @@ -155,10 +155,10 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, switch (aCell.meType) { case CELLTYPE_NONE: - aOS.appendAscii(pEmptyData); + aOS.append(pEmptyData); break; case CELLTYPE_VALUE: - aOS.appendAscii(pNumData); + aOS.append(pNumData); pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString ); aOS.append(aString); aOS.append("\nV\n"); @@ -170,10 +170,10 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, break; case CELLTYPE_FORMULA: if (aCell.mpFormula->GetErrCode() != FormulaError::NONE) - aOS.appendAscii(pNumDataERROR); + aOS.append(pNumDataERROR); else if (aCell.mpFormula->IsValue()) { - aOS.appendAscii(pNumData); + aOS.append(pNumData); pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString ); aOS.append(aString); aOS.append("\nV\n"); @@ -198,7 +198,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, // needed just one more time.. OSL_ASSERT(aOS.getLength() == 0); OUString aTmpStr = aString; - aOS.appendAscii(pStringData); + aOS.append(pStringData); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear(), eCharSet); if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { @@ -258,7 +258,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, } OSL_ASSERT(aOS.getLength() == 0); - aOS.appendAscii(pSpecDataType_LF); + aOS.append(pSpecDataType_LF); aOS.append(pKeyEOD); aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); |