[Libreoffice-commits] core.git: sc/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 15 17:20:52 UTC 2021


 sc/source/ui/dbgui/asciiopt.cxx |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 92d7ab0f9822bad7b003b317b6f08b7f84441ff0
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Thu Jul 15 17:33:57 2021 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Thu Jul 15 19:20:16 2021 +0200

    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 at redhat.com>
    Tested-by: Jenkins

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();
 }
 


More information about the Libreoffice-commits mailing list