Hey there,
this is a patch to fix fdo#30800. A tiny specification, what has been implemented is at the wiki: http://wiki.documentfoundation.org/User:Andreschnabel/Spec_Calc_grid_lines_ on_colored_background Comments and questions are welcome, as this is the first time that I actually *add* some code.
Well done! Attached is a small modification to the code (and the function) I've made. I.e. it makes sense to allow user to define grid colour (and thus enable fixed text & related listbox) in both cases when the grid is enabled -- in both "show" and "show on colored cells" case. Also, before I really push the patch -- may I suggest some change to the wording being used? "Show on colored cells" sounds sliiiightly misleading to me, as the grid is shown everywhere (all over the sheet), not only over the cells filled by some colour. Something along "Show always on top" or "Show in the foreground" line would imao describe its function much better ... Consequently, the option name would become GridOnTop, or GridInForeground, but that's just nitpicking ... B. -- \\\\\ Katarina Machalkova \\\\\\\__o LibO developer __\\\\\\\'/_ & hedgehog painter
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 197169e..8fc3b23 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -315,7 +315,7 @@ void ScTpContentOptions::InitGridOpt() sal_Bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP ); sal_uInt16 nSelPos = 0; - if ( bGrid ) + if ( bGrid || bGridOnTop ) { aColorFT.Enable(), aColorLB.Enable(); if ( !bGridOnTop ) @@ -395,8 +395,8 @@ IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) sal_Bool bGrid = ( nSelPos <= 1 ); sal_Bool bGridOnTop = ( nSelPos == 1 ); - aColorFT.Enable(bGridOnTop); - aColorLB.Enable(bGridOnTop); + aColorFT.Enable(bGrid); + aColorLB.Enable(bGrid); pLocalOptions->SetOption( VOPT_GRID, bGrid ); pLocalOptions->SetOption( VOPT_GRID_ONTOP, bGridOnTop ); return 0;
Attachment:
signature.asc
Description: This is a digitally signed message part.