summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmlbas.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx7
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx8
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx28
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx20
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx2
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx6
10 files changed, 31 insertions, 48 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 41dd65880956..5dfa8bb854e2 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -645,7 +645,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// nur einen Zeilen-Umbruch (ohne Einrueckung) am Absatz-Anfang
// ausgeben
rInfo.aToken = OString(); // kein End-Tag ausgeben
- rWrt.Strm() << SwHTMLWriter::sNewLine;
+ rWrt.Strm() << SAL_NEWLINE_STRING;
return;
}
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index f691549fc51c..273a3d19fccf 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -301,7 +301,7 @@ void SwHTMLWriter::OutBasic()
}
const OUString& rModName = pModule->GetName();
- Strm() << SwHTMLWriter::sNewLine; // nicht einruecken!
+ Strm() << SAL_NEWLINE_STRING; // nicht einruecken!
HTMLOutFuncs::OutScript( Strm(), GetBaseURL(), pModule->GetSource(),
sLang, eType, aEmptyStr,
&rLibName, &rModName,
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 0004c9cbbeed..2c03016018bf 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -927,14 +927,13 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
rHTMLWrt.aImgMapNames.push_back(aIMapName);
OString aIndMap, aIndArea;
- const sal_Char *pLF = 0, *pIndArea = 0, *pIndMap = 0;
+ const sal_Char *pIndArea = 0, *pIndMap = 0;
if( rHTMLWrt.bLFPossible )
{
rHTMLWrt.OutNewLine( sal_True );
aIndMap = rHTMLWrt.GetIndentString();
aIndArea = rHTMLWrt.GetIndentString(1);
- pLF = SwHTMLWriter::sNewLine;
pIndArea = aIndArea.getStr();
pIndMap = aIndMap.getStr();
}
@@ -946,7 +945,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
HTMLOutFuncs::Out_ImageMap( rWrt.Strm(), rWrt.GetBaseURL(), aScaledIMap, aIMapName,
aIMapEventTable,
rHTMLWrt.bCfgStarBasic,
- pLF, pIndArea, pIndMap,
+ SAL_NEWLINE_STRING, pIndArea, pIndMap,
rHTMLWrt.eDestEnc,
&rHTMLWrt.aNonConvertableCharacters );
}
@@ -955,7 +954,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
HTMLOutFuncs::Out_ImageMap( rWrt.Strm(), rWrt.GetBaseURL(), *pIMap, aIMapName,
aIMapEventTable,
rHTMLWrt.bCfgStarBasic,
- pLF, pIndArea, pIndMap,
+ SAL_NEWLINE_STRING, pIndArea, pIndMap,
rHTMLWrt.eDestEnc,
&rHTMLWrt.aNonConvertableCharacters );
}
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 6917b8b805aa..5cf0ee3610c1 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1304,7 +1304,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
while ( nPos != -1 )
{
if( nPos )
- rWrt.Strm() << SwHTMLWriter::sNewLine;
+ rWrt.Strm() << SAL_NEWLINE_STRING;
OUString aLine = sVal.getToken( 0, 0x0A, nPos );
HTMLOutFuncs::Out_String( rWrt.Strm(), aLine,
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index c73eb04cf40c..612400fc56d3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -80,12 +80,6 @@
#define MAX_INDENT_LEVEL 20
-#ifdef _WIN32
-const sal_Char SwHTMLWriter::sNewLine[] = "\015\012";
-#else
-const sal_Char SwHTMLWriter::sNewLine[] = "\012";
-#endif
-
static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] =
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
@@ -1248,7 +1242,7 @@ void SwHTMLWriter::OutNewLine( sal_Bool bCheck )
{
if( !bCheck || (Strm().Tell()-nLastLFPos) > nIndentLvl )
{
- Strm() << sNewLine;
+ Strm() << SAL_NEWLINE_STRING;
nLastLFPos = Strm().Tell();
}
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 5fb71bb81b5c..e58939db2446 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -283,8 +283,6 @@ protected:
sal_uLong WriteStream();
public:
- static const sal_Char sNewLine[];
-
std::vector<String> aImgMapNames; // geschriebene Image Maps
std::set<String> aImplicitMarks;// implizite Stprungmarken
std::set<String> aNumRuleNames;// Names of exported num rules
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 198da0ad5d26..072d0a576c8a 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -308,7 +308,7 @@ void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
m_bTblAfterCell = false;
else
{
- aParagraph->append(m_rExport.sNewLine);
+ aParagraph->append(SAL_NEWLINE_STRING);
aParagraph->append(OOO_STRING_SVTOOLS_RTF_PAR);
aParagraph->append(' ');
}
@@ -328,7 +328,7 @@ void RtfAttributeOutput::EmptyParagraph()
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
- m_rExport.Strm() << m_rExport.sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' ';
+ m_rExport.Strm() << SAL_NEWLINE_STRING << OOO_STRING_SVTOOLS_RTF_PAR << ' ';
}
void RtfAttributeOutput::SectionBreaks(const SwTxtNode& rNode)
@@ -403,7 +403,7 @@ void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSing
void RtfAttributeOutput::EndRun()
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
- m_aRun->append(m_rExport.sNewLine);
+ m_aRun->append(SAL_NEWLINE_STRING);
m_aRun.appendAndClear(m_aRunText);
if (!m_bSingleEmptyRun && m_bInRun)
m_aRun->append('}');
@@ -1038,10 +1038,10 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer
void RtfAttributeOutput::StartStyles()
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
- m_rExport.Strm() << m_rExport.sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
+ m_rExport.Strm() << SAL_NEWLINE_STRING << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
m_rExport.OutColorTable();
OSL_ENSURE(m_aStylesheet.getLength() == 0, "m_aStylesheet is not empty");
- m_aStylesheet.append(m_rExport.sNewLine);
+ m_aStylesheet.append(SAL_NEWLINE_STRING);
m_aStylesheet.append('{');
m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET);
}
@@ -1097,7 +1097,7 @@ void RtfAttributeOutput::EndStyle()
m_aStylesheet.append(' ');
m_aStylesheet.append(msfilter::rtfutil::OutString(m_rStyleName, m_rExport.eCurrentEncoding));
m_aStylesheet.append(";}");
- m_aStylesheet.append(m_rExport.sNewLine);
+ m_aStylesheet.append(SAL_NEWLINE_STRING);
}
void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, sal_uInt16 /*nStyle*/ )
@@ -1308,7 +1308,7 @@ void RtfAttributeOutput::EndAbstractNumbering()
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTID;
- m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine;
+ m_rExport.OutULong( m_nListId ) << '}' << SAL_NEWLINE_STRING;
}
void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
@@ -1327,7 +1327,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
- m_rExport.Strm() << m_rExport.sNewLine;
+ m_rExport.Strm() << SAL_NEWLINE_STRING;
if( nLevel > 8 ) // RTF knows only 9 levels
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_SOUTLVL;
@@ -1600,7 +1600,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_rExport.Strm() << '}'; // shpinst
m_rExport.Strm() << '}'; // shp
- m_rExport.Strm() << RtfExport::sNewLine;
+ m_rExport.Strm() << SAL_NEWLINE_STRING;
}
break;
case sw::Frame::eGraphic:
@@ -3394,9 +3394,9 @@ OString RtfAttributeOutput::WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, S
if (++nBreak == nLimit)
{
if (pStream)
- (*pStream) << RtfExport::sNewLine;
+ (*pStream) << SAL_NEWLINE_STRING;
else
- aRet.append(RtfExport::sNewLine);
+ aRet.append(SAL_NEWLINE_STRING);
nBreak = 0;
}
}
@@ -3481,7 +3481,7 @@ static OString ExportPICT( const SwFlyFrmFmt* pFlyFrmFmt, const Size &rOrig, con
aRet.append((sal_Int32)8);
StripMetafileHeader(pGraphicAry, nSize);
}
- aRet.append(RtfExport::sNewLine);
+ aRet.append(SAL_NEWLINE_STRING);
if (pStream)
(*pStream) << aRet.makeStringAndClear().getStr();
if (pStream)
@@ -3674,7 +3674,7 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const S
m_rExport.Strm() << '}';
}
- m_rExport.Strm() << m_rExport.sNewLine;
+ m_rExport.Strm() << SAL_NEWLINE_STRING;
}
void RtfAttributeOutput::BulletDefinition(int /*nId*/, const Graphic& rGraphic, Size aSize)
@@ -3687,7 +3687,7 @@ void RtfAttributeOutput::BulletDefinition(int /*nId*/, const Graphic& rGraphic,
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_PICHGOAL;
m_rExport.OutULong(aSize.Height());
- m_rExport.Strm() << RtfExport::sNewLine;
+ m_rExport.Strm() << SAL_NEWLINE_STRING;
const sal_uInt8* pGraphicAry = 0;
SvMemoryStream aStream;
if (GraphicConverter::Export(aStream, rGraphic, CVT_PNG) != ERRCODE_NONE)
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 73e132d301f1..db3e1ff0f675 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -69,12 +69,6 @@ using namespace ::com::sun::star;
using sw::mark::IMark;
-#ifdef _WIN32
-const sal_Char* const RtfExport::sNewLine = "\015\012";
-#else
-const sal_Char* const RtfExport::sNewLine = "\012";
-#endif
-
// the default text encoding for the export, if it doesn't fit unicode will
// be used
#define DEF_ENCODING RTL_TEXTENCODING_ASCII_US
@@ -280,7 +274,7 @@ void RtfExport::WriteRevTab()
Strm() << msfilter::rtfutil::OutString(*pAuthor, eDefaultEncoding).getStr();
Strm() << ";}";
}
- Strm() << '}' << sNewLine;
+ Strm() << '}' << SAL_NEWLINE_STRING;
}
void RtfExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
@@ -376,7 +370,7 @@ sal_uLong RtfExport::ReplaceCr( sal_uInt8 )
void RtfExport::WriteFonts()
{
- Strm() << sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL;
+ Strm() << SAL_NEWLINE_STRING << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL;
maFontHelper.WriteFontTable( *m_pAttrOutput );
Strm() << '}';
}
@@ -464,14 +458,14 @@ void RtfExport::WritePageDescTable()
if( !nSize )
return;
- Strm() << sNewLine; // a separator
+ Strm() << SAL_NEWLINE_STRING;
bOutPageDescs = sal_True;
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL;
for( sal_uInt16 n = 0; n < nSize; ++n )
{
const SwPageDesc& rPageDesc = pDoc->GetPageDesc( n );
- Strm() << sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_PGDSC;
+ Strm() << SAL_NEWLINE_STRING << '{' << OOO_STRING_SVTOOLS_RTF_PGDSC;
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
@@ -486,7 +480,7 @@ void RtfExport::WritePageDescTable()
OutULong( i ) << ' ';
Strm() << msfilter::rtfutil::OutString( rPageDesc.GetName(), eDefaultEncoding).getStr() << ";}";
}
- Strm() << '}' << sNewLine;
+ Strm() << '}' << SAL_NEWLINE_STRING;
bOutPageDescs = sal_False;
// reset table infos, otherwise the depth of the cells will be incorrect,
@@ -520,7 +514,7 @@ void RtfExport::ExportDocument_Impl()
WriteInfo();
// Default TabSize
- Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr() << sNewLine;
+ Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr() << SAL_NEWLINE_STRING;
// Zoom
ViewShell *pViewShell(pDoc->GetCurrentViewShell());
if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SVX_ZOOM_PERCENT)
@@ -697,7 +691,7 @@ void RtfExport::ExportDocument_Impl()
Strm() << pOut;
}
- Strm() << sNewLine;
+ Strm() << SAL_NEWLINE_STRING;
// Init sections
m_pSections = new MSWordSections( *this );
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index fe577dbb704e..3df1c40bb809 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -144,8 +144,6 @@ public:
/// Destructor.
virtual ~RtfExport();
- static const sal_Char* const sNewLine;
-
rtl_TextEncoding eDefaultEncoding;
rtl_TextEncoding eCurrentEncoding;
/// This is used by OutputFlyFrame_Impl() to control the written syntax
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index d3e30359db61..fafb82986a6e 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -367,7 +367,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe
case ESCHER_Prop_fillBlip:
{
OStringBuffer aBuf;
- aBuf.append('{').append(OOO_STRING_SVTOOLS_RTF_PICT).append(OOO_STRING_SVTOOLS_RTF_PNGBLIP).append(RtfExport::sNewLine);
+ aBuf.append('{').append(OOO_STRING_SVTOOLS_RTF_PICT).append(OOO_STRING_SVTOOLS_RTF_PNGBLIP).append(SAL_NEWLINE_STRING);
int nHeaderSize = 25; // The first bytes are WW8-specific, we're only interested in the PNG
aBuf.append(RtfAttributeOutput::WriteHex(it->pBuf + nHeaderSize, it->nPropSize - nHeaderSize));
aBuf.append('}');
@@ -456,7 +456,7 @@ void RtfSdrExport::impl_writeGraphic()
RtfStringBuffer aBuf;
aBuf->append('{').append(OOO_STRING_SVTOOLS_RTF_PICT).append(OOO_STRING_SVTOOLS_RTF_PNGBLIP);
aBuf->append(OOO_STRING_SVTOOLS_RTF_PICW).append(sal_Int32(aMapped.Width()));
- aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH).append(sal_Int32(aMapped.Height())).append(RtfExport::sNewLine);
+ aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH).append(sal_Int32(aMapped.Height())).append(SAL_NEWLINE_STRING);
aBuf->append(RtfAttributeOutput::WriteHex(pGraphicAry, nSize));
aBuf->append('}');
m_aShapeProps.insert(std::pair<OString,OString>("pib", aBuf.makeStringAndClear()));
@@ -554,7 +554,7 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
nNextAttr = nEnd;
aAttrIter.OutAttr( nAktPos );
- m_rAttrOutput.RunText().append('{').append(m_rAttrOutput.Styles().makeStringAndClear()).append(m_rExport.sNewLine);
+ m_rAttrOutput.RunText().append('{').append(m_rAttrOutput.Styles().makeStringAndClear()).append(SAL_NEWLINE_STRING);
bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos );
if( !bTxtAtr )
{