diff options
author | Florent Gallaire <fgallaire@gmail.com> | 2012-04-21 22:00:19 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-04-25 14:19:23 +0200 |
commit | c041db6f59888adc90ee8257eafe150d874c46c9 (patch) | |
tree | efa5f611783883cfe470f3276a8d97672077533a /sc/source/ui/dbgui/imoptdlg.cxx | |
parent | d88493adfd549ec77f08ee919df609e645011b8b (diff) |
fdo#45664 EasyHack: Add a "Save cell formulas" checkbox to the CSV Export panel.
Diffstat (limited to 'sc/source/ui/dbgui/imoptdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index 250768ecdbbf..c42d073013e9 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -54,6 +54,7 @@ ScImportOptions::ScImportOptions( const String& rStr ) eCharSet = RTL_TEXTENCODING_DONTKNOW; bSaveAsShown = sal_True; // "true" if not in string (after CSV import) bQuoteAllText = false; + bSaveFormulas = false; xub_StrLen nTokenCount = comphelper::string::getTokenCount(rStr, ','); if ( nTokenCount >= 3 ) { @@ -80,6 +81,8 @@ ScImportOptions::ScImportOptions( const String& rStr ) bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true"); if ( nTokenCount >= 9 ) bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true"); + if ( nTokenCount >= 10 ) + bSaveFormulas = rStr.GetToken(9, ',').EqualsAscii("true"); } } } @@ -103,6 +106,8 @@ String ScImportOptions::BuildString() const aResult.AppendAscii(bQuoteAllText ? "true" : "false"); // same as "quoted field as text" in ScAsciiOptions aResult.AppendAscii( ",true," ); // "detect special numbers" aResult.AppendAscii(bSaveAsShown ? "true" : "false"); // "save as shown": not in ScAsciiOptions + aResult.AppendAscii( "," ); + aResult.AppendAscii(bSaveFormulas ? "true" : "false"); // "save formulas": not in ScAsciiOptions return aResult; } |