summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-07-15 17:33:57 +0200
committerEike Rathke <erack@redhat.com>2021-07-15 19:20:16 +0200
commit92d7ab0f9822bad7b003b317b6f08b7f84441ff0 (patch)
treed0f55fdfd77969893df474a0047f03eaf542e1b6 /sc
parent7d1692179e7cdca19ab34fdc9701512656f01861 (diff)
Keep ScAsciiOptions in sync with ScImportOptions, tdf#135762 related
Change-Id: I9b8689e9d91c4ce35c0069209a79b639bb0b8509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118989 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 4d9e8dea6fe8..af65dbc54956 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -174,6 +174,16 @@ void ScAsciiOptions::ReadFromString( const OUString& rString )
}
else
bRemoveSpace = false;
+
+ // Token 11: sheet to export for --convert-to csv
+ // Does not need to be evaluated here but may be present, so in case
+ // there'll be yet another token 12 then do some dummy like
+#if 0
+ if (nPos >= 0)
+ {
+ rString.getToken(0, ',', nPos);
+ }
+#endif
}
OUString ScAsciiOptions::WriteToString() const
@@ -225,6 +235,7 @@ OUString ScAsciiOptions::WriteToString() const
// #i112025# the options string is used in macros and linked sheets,
// so new options must be added at the end, to remain compatible
+ // Always keep in sync with ScImportOptions.
aOutStr.append("," +
//Token 5: Language
@@ -238,7 +249,10 @@ OUString ScAsciiOptions::WriteToString() const
// Token 9: used for "Save cell formulas" in export options
OUString::boolean( bSaveFormulas ) + "," +
//Token 10: Trim Space
- OUString::boolean( bRemoveSpace ));
+ OUString::boolean( bRemoveSpace ) +
+ //Token 11: sheet to export, always 0 for current sheet
+ ",0"
+ );
return aOutStr.makeStringAndClear();
}