diff options
author | Eike Rathke <erack@redhat.com> | 2015-12-01 21:24:27 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-12-01 21:36:57 +0100 |
commit | 63ada88a0fe28440c021141da911f69f7394250d (patch) | |
tree | 78817f873db95f0d2383b02e1fe7da8c69282e7b | |
parent | 91582427dbeccd35bd147ce1a5818f1e15709f13 (diff) |
Resolves: tdf#95629 quote CSV also if cell contains embedded '\r' CR
Change-Id: I37fb62a53338a7edcac1c72153eefcee6096e6f9
(cherry picked from commit 129935443cfd9378e1263489fc4bf47aee1f1a46)
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 5181bcc33bda..562254d8bf19 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1785,11 +1785,12 @@ sal_Int32 getTextSepPos( const StrT& rStr, const ScImportOptions& rAsciiOpt, const SepCharT& rTextSep, const SepCharT& rFieldSep, bool& rNeedQuotes) { // #i116636# quotes are needed if text delimiter (quote), field delimiter, - // or LF is in the cell text. + // or LF or CR is in the cell text. sal_Int32 nPos = rStr.indexOf(rTextSep); rNeedQuotes = rAsciiOpt.bQuoteAllText || (nPos >= 0) || (rStr.indexOf(rFieldSep) >= 0) || - (rStr.indexOf('\n') >= 0); + (rStr.indexOf('\n') >= 0) || + (rStr.indexOf('\r') >= 0); return nPos; } |