summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-30 11:31:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-30 13:18:38 +0000
commitbbc94edb9a91b27910d43610db9994df10dd99e1 (patch)
tree99f81b7bc96dd93ae6c6e6a4f7a57cfda72cdfa4 /sc/source/ui/docshell
parent47e1e8494dde85414d28efafa99b33a62b59116d (diff)
refactor ConvertLineEnd
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/docshell/impex.cxx4
2 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 8ed622667ad4..94dd497dfd65 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1139,8 +1139,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, sal_Boo
return false;
}
- String aNewText = rText;
- aNewText.ConvertLineEnd(); //! ist das noetig ???
+ String aNewText = convertLineEnd(rText, GetSystemLineEnd()); //! ist das noetig ???
if( ScPostIt* pNote = (aNewText.Len() > 0) ? pDoc->GetOrCreateNote( rPos ) : pDoc->GetNote( rPos ) )
pNote->SetText( rPos, aNewText );
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 2c99ac995b2a..ede56ebb183e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1471,7 +1471,7 @@ sal_Bool ScImportExport::Doc2Text( SvStream& rStrm )
if( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSpace )
aCell.SearchAndReplaceAll( _LF, ' ' );
else if ( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSystem && bConvertLF )
- aCell.ConvertLineEnd();
+ aCell = convertLineEnd(aCell, GetSystemLineEnd());
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )
@@ -1503,7 +1503,7 @@ sal_Bool ScImportExport::Doc2Text( SvStream& rStrm )
if( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSpace )
aCell.SearchAndReplaceAll( _LF, ' ' );
else if ( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSystem && bConvertLF )
- aCell.ConvertLineEnd();
+ aCell = convertLineEnd(aCell, GetSystemLineEnd());
}
if( mExportTextOptions.mcSeparatorConvertTo && cSep )