diff options
author | Eike Rathke <erack@redhat.com> | 2012-04-25 14:17:00 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-04-25 14:19:23 +0200 |
commit | 3cceb8a900cd1fe1ae9bdb0c2e532e82a1835861 (patch) | |
tree | 84a4a91a1c7c05673dd47270b87e318cd387ed40 /sc/source/ui/dbgui/scuiimoptdlg.cxx | |
parent | c041db6f59888adc90ee8257eafe150d874c46c9 (diff) |
changes to fdo#45664 EasyHack
* in dialog, placed "Save cell formulas" checkbox directly under "Save cell
content as shown" as they are related and "Fixed column width" should be
last
* also reordered entries in .src file for overview
* added HelpIDs, also to older "Quote all text cells" checkbox
* reordered checkbox member variables for tab order
* do not disable "Save cell content as shown" if "Save cell formulas" is
checked, they are independent, content as shown still applies to value cells
* changed label to "Save cell formulas instead of calculated values" for
clarity
* initialize "Save cell formulas" with view option that was removed from
ScDocShell::AsciiSave()
Diffstat (limited to 'sc/source/ui/dbgui/scuiimoptdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/scuiimoptdlg.cxx | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 245d68556977..e6952d952324 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -32,6 +32,7 @@ #include "scuiimoptdlg.hxx" +#include "tabvwsh.hxx" #include "scresid.hxx" #include "imoptdlg.hrc" #include <comphelper/string.hxx> @@ -133,10 +134,10 @@ ScImportOptionsDlg::ScImportOptionsDlg( aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ), aFtTextSep ( this, ScResId( FT_TEXTSEP ) ), aEdTextSep ( this, ScResId( ED_TEXTSEP ) ), - aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ), aCbShown ( this, ScResId( CB_SAVESHOWN ) ), - aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ), aCbFormulas ( this, ScResId( CB_FORMULAS ) ), + aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ), + aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ), aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ) @@ -208,7 +209,7 @@ ScImportOptionsDlg::ScImportOptionsDlg( if( bAscii ) { Size aWinSize( GetSizePixel() ); - aWinSize.Height() = aCbFormulas.GetPosPixel().Y() + aCbFormulas.GetSizePixel().Height(); + aWinSize.Height() = aCbFixed.GetPosPixel().Y() + aCbFixed.GetSizePixel().Height(); Size aDiffSize( LogicToPixel( Size( 0, 6 ), MapMode( MAP_APPFONT ) ) ); aWinSize.Height() += aDiffSize.Height(); SetSizePixel( aWinSize ); @@ -220,8 +221,11 @@ ScImportOptionsDlg::ScImportOptionsDlg( aCbQuoteAll.Show(); aCbQuoteAll.Check( false ); aCbFormulas.Show(); - aCbFormulas.SetClickHdl( LINK( this, ScImportOptionsDlg, SaveFormulasHdl ) ); - aCbFormulas.Check( false ); + ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current()); + bool bFormulas = (pViewSh ? + pViewSh->GetViewData()->GetOptions().GetOption( VOPT_FORMULAS) : + false); + aCbFormulas.Check( bFormulas ); } else { @@ -319,17 +323,7 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) return 0; } -IMPL_LINK( ScImportOptionsDlg, SaveFormulasHdl, CheckBox*, pCheckBox ) -{ - if( pCheckBox == &aCbFormulas ) - { - sal_Bool bEnable = !aCbFormulas.IsChecked(); - aCbShown.Enable( bEnable ); - } - return 0; -} - - IMPL_LINK( ScImportOptionsDlg, DoubleClickHdl, ListBox*, pLb ) +IMPL_LINK( ScImportOptionsDlg, DoubleClickHdl, ListBox*, pLb ) { if ( pLb == &aLbFont ) { |