summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-13 13:45:17 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-13 13:49:24 +0300
commit6954aad4e5c99ce193d3dd60a43f6d41d7c0a87f (patch)
treeffba0bee05b37a70311ae198281f420600e30127 /svx
parent8ede32d15735b78e3528107bfbcfb69e3beb7439 (diff)
Reduce copypasta: Introduce SAL_NEWLINE_STRING and use it
Contains the platform-dependent on-disk line separator ("\r\n" for Windows, "\n" otherwise, and yes, I assume an ASCII-based world). Use it instead of static constant char array fields, with ifdeffed initialisations, in various classes here and there. Change-Id: Ibea1f2cc1acfb8cc067c3892a41f73bf44f2c78a
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/tablertfexporter.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index c003c12cd63a..c9c1de6bd333 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -86,7 +86,7 @@ long HundMMToTwips( long nIn )
sal_uLong SdrTableRtfExporter::Write()
{
mrStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
- mrStrm << OOO_STRING_SVTOOLS_RTF_ANSI << RTFOutFuncs::sNewLine;
+ mrStrm << OOO_STRING_SVTOOLS_RTF_ANSI << SAL_NEWLINE_STRING;
Reference< XTableColumns > xColumns( mxTable->getColumns() );
const sal_Int32 nColCount = xColumns->getCount();
@@ -125,7 +125,7 @@ sal_uLong SdrTableRtfExporter::Write()
OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!");
}
- mrStrm << '}' << RTFOutFuncs::sNewLine;
+ mrStrm << '}' << SAL_NEWLINE_STRING;
return mrStrm.GetError();
}
@@ -147,9 +147,9 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa
mrStrm << OOO_STRING_SVTOOLS_RTF_CELLX << OString::number(aColumnStart[nCol]).getStr();
if ( (nCol & 0x0F) == 0x0F )
- mrStrm << RTFOutFuncs::sNewLine; // Zeilen nicht zu lang werden lassen
+ mrStrm << SAL_NEWLINE_STRING; // Zeilen nicht zu lang werden lassen
}
- mrStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << RTFOutFuncs::sNewLine;
+ mrStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << SAL_NEWLINE_STRING;
sal_uLong nStrmPos = mrStrm.Tell();
for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
@@ -157,11 +157,11 @@ void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sa
WriteCell( nCol, nRow );
if ( mrStrm.Tell() - nStrmPos > 255 )
{
- mrStrm << RTFOutFuncs::sNewLine;
+ mrStrm << SAL_NEWLINE_STRING;
nStrmPos = mrStrm.Tell();
}
}
- mrStrm << OOO_STRING_SVTOOLS_RTF_ROW << RTFOutFuncs::sNewLine;
+ mrStrm << OOO_STRING_SVTOOLS_RTF_ROW << SAL_NEWLINE_STRING;
}