summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/imoptdlg.cxx
diff options
context:
space:
mode:
authorFlorent Gallaire <fgallaire@gmail.com>2012-04-21 22:00:19 +0200
committerEike Rathke <erack@redhat.com>2012-04-25 14:19:23 +0200
commitc041db6f59888adc90ee8257eafe150d874c46c9 (patch)
treeefa5f611783883cfe470f3276a8d97672077533a /sc/source/ui/dbgui/imoptdlg.cxx
parentd88493adfd549ec77f08ee919df609e645011b8b (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.cxx5
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;
}