sc/source/ui/dbgui/asciiopt.cxx |    1 +
 sc/source/ui/dbgui/imoptdlg.cxx |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 70db0942c3f63bed8c2ff517e80c06cef9b52267
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Fri Oct 29 22:41:04 2021 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Sat Oct 30 11:46:29 2021 +0200

    Add comments for defaults of bEvaluateFormulas
    
    The default is "true" if not present at all for compatibility of
    older filter options strings. The default is "false" if present.
    
    Change-Id: I79383e6fcf211fc8b8f933ae93f6d53ec084d551
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124454
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3bb97c5b3236..c7f920f5fb25 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -186,6 +186,7 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
     // Token 12: evaluate formulas.
     if (nPos >= 0)
     {
+        // If present, defaults to "false".
         bEvaluateFormulas = rString.getToken(0, ',', nPos) == "true";
     }
     else
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 2b279f1be10a..7c161da22754 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -45,7 +45,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
     bSaveFormulas = false;
     bRemoveSpace = false;
     nSheetToExport = 0;
-    bEvaluateFormulas = true;
+    bEvaluateFormulas = true;   // true if not present at all, for 
compatibility
     sal_Int32 nTokenCount = comphelper::string::getTokenCount(rStr, ',');
     if ( nTokenCount < 3 )
         return;
@@ -91,6 +91,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
                 nSheetToExport = -23;   // invalid, force error
         }
         if ( nTokenCount >= 13 )
+            // If present, defaults to "false".
             bEvaluateFormulas = rStr.getToken(0, ',', nIdx) == "true";
     }
 }

Reply via email to