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 | |
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')
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.src | 25 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiimoptdlg.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/inc/scuiimoptdlg.hxx | 5 |
3 files changed, 25 insertions, 31 deletions
diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src index ce00740518c1..7ad67be85150 100644 --- a/sc/source/ui/dbgui/imoptdlg.src +++ b/sc/source/ui/dbgui/imoptdlg.src @@ -92,36 +92,37 @@ ModalDialog RID_SCDLG_IMPORTOPT Size = MAP_APPFONT ( 188 , 8 ) ; Text [ en-US ] = "Field options" ; }; - CheckBox CB_FIXEDWIDTH + CheckBox CB_SAVESHOWN { - HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH"; - Pos = MAP_APPFONT( 12, 92 ); + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_SAVESHOWN"; + Pos = MAP_APPFONT( 12, 66 ); Size = MAP_APPFONT( 172, 10 ); Hide = TRUE; - Text [ en-US ] = "Fixed column ~width"; + Text [ en-US ] = "Save cell content as ~shown"; }; - CheckBox CB_SAVESHOWN + CheckBox CB_FORMULAS { - Pos = MAP_APPFONT( 12, 66 ); + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FORMULAS"; + Pos = MAP_APPFONT( 12, 79 ); Size = MAP_APPFONT( 172, 10 ); - TabStop = TRUE; Hide = TRUE; - Text [ en-US ] = "Save cell content as ~shown"; + Text [ en-US ] = "Save cell fo~rmulas instead of calculated values"; }; CheckBox CB_QUOTEALL { HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL"; - Pos = MAP_APPFONT( 12, 79 ); - Size = MAP_APPFONT( 164, 10 ); + Pos = MAP_APPFONT( 12, 92 ); + Size = MAP_APPFONT( 172, 10 ); Hide = TRUE; Text [ en-US ] = "~Quote all text cells"; }; - CheckBox CB_FORMULAS + CheckBox CB_FIXEDWIDTH { + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH"; Pos = MAP_APPFONT( 12, 105 ); Size = MAP_APPFONT( 172, 10 ); Hide = TRUE; - Text [ en-US ] = "Save cell fo~rmulas"; + Text [ en-US ] = "Fixed column ~width"; }; OKButton BTN_OK { 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 ) { diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index 3f4551366c79..91032218c9ee 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -59,10 +59,10 @@ private: ComboBox aEdFieldSep; FixedText aFtTextSep; ComboBox aEdTextSep; - CheckBox aCbQuoteAll; CheckBox aCbShown; - CheckBox aCbFixed; CheckBox aCbFormulas; + CheckBox aCbQuoteAll; + CheckBox aCbFixed; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; @@ -74,7 +74,6 @@ private: sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const; DECL_LINK( FixedWidthHdl, CheckBox* ); - DECL_LINK( SaveFormulasHdl, CheckBox* ); DECL_LINK( DoubleClickHdl, ListBox* ); }; |