officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 21 +
sc/source/ui/dbgui/asciiopt.cxx | 59 +++
sc/source/ui/dbgui/csvgrid.cxx |4 -
sc/source/ui/dbgui/csvtablebox.cxx |4 -
sc/source/ui/dbgui/imoptdlg.cxx |7 +
sc/source/ui/dbgui/scuiasciiopt.cxx | 32 ++--
sc/source/ui/docshell/impex.cxx | 24 +-
sc/source/ui/inc/asciiopt.hxx|5 +
sc/source/ui/inc/csvgrid.hxx |2
sc/source/ui/inc/csvtablebox.hxx |2
sc/source/ui/inc/imoptdlg.hxx|2
sc/source/ui/inc/impex.hxx |2
sc/source/ui/inc/scuiasciiopt.hxx|1
sc/uiconfig/scalc/ui/textimportcsv.ui| 18
14 files changed, 148 insertions(+), 35 deletions(-)
New commits:
commit d999b55e28d0445df870f69b3a269964e3635def
Author: manujvashist <manujvash...@gmail.com>
Date: Sun Dec 10 10:56:38 2017 +0530
tdf#114200 : added 'Trim space' feature in 'Text Import'
made a checkbox to Trim extra white spaces from both ends
while using seperators in 'Text Imort'
Change-Id: Ib05d9b17525e3ebec380ec8b7eebfa35fff78f01
Reviewed-on: https://gerrit.libreoffice.org/46177
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Manuj Vashist <manujvash...@gmail.com>
Reviewed-by: Heiko Tietze <tietze.he...@gmail.com>
Tested-by: Heiko Tietze <tietze.he...@gmail.com>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 2d5e7a8696e0..7951d4bf91cc 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1088,6 +1088,13 @@
false
+
+
+If true, leading and trailing white spaces are trimmed
off.
+RemoveSpace
+
+ false
+
If true, quoted field is always imported as text with no
exception.
@@ -1163,6 +1170,13 @@
false
+
+
+If true, leading and trailing white spaces are trimmed
off.
+RemoveSpace
+
+ false
+
If true, quoted field is always imported as text with no
exception.
@@ -1245,6 +1259,13 @@
false
+
+
+If true, leading and trailing white spaces are trimmed
off.
+RemoveSpace
+
+ false
+
List of Separators - as a String
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3032106518f4..d699b4ea3675 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -29,9 +29,12 @@ ScAsciiOptions::ScAsciiOptions() :
bFixedLen ( false ),
aFieldSeps ( OUString(';') ),
bMergeFieldSeps ( false ),
+bRemoveSpace( false ),
bQuotedFieldAsText(false),
bDetectSpecialNumber(false),
bSkipEmptyCells(false),
+bSaveAsShown(true),
+bSaveFormulas(false),
cTextSep( cDefaultTextSep ),
eCharSet( osl_getThreadTextEncoding() ),
eLang ( LANGUAGE_SYSTEM ),
@@ -74,7 +77,12 @@ ScAsciiOptions& ScAsciiOptions::operator=( const
ScAsciiOptions& rCpy )
bFixedLen = rCpy.bFixedLen;
aFieldSeps = rCpy.aFieldSeps;
bMergeFieldSeps = rCpy.bMergeFieldSeps;
+bRemoveSpace= rCpy.bRemoveSpace;
bQuotedFieldAsText = rCpy.bQuotedFieldAsText;
+bDetectSpecialNumber = rCpy.bDetectSpecialNumber;
+bSkipEmptyCells = rCpy.bSkipEmptyCells;
+bSaveAsShown= rCpy.bSaveAsShown;
+bSaveFormulas = rCpy.bSaveFormulas;
cTextSep= rCpy.cTextSep;
eCharSet= rCpy.eCharSet;
bCharSetSystem = rCpy.bCharSetSystem;
@@ -180,15 +188,34 @@ void ScAsciiOptions::ReadFromString( const OUString&
rString )
else
bDetectSpecialNumber = true;// default of versions that didn't add
the parameter
-// 9th token is used for "Save as shown" in export options
-// 10th token is used for "Save cell formulas" in export options
+// Token 8: used for "Save as shown" in export options
+if ( nPos >= 0 )
+{
+bSaveAsShown = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveAsShown = true;//default value
+// Token 9: used for "Save cell formulas" in export options
+if ( nPos >= 0 )
+{
+bSaveFormulas = rString.getToken(0, ',', nPos) ==