diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/optdlg.hrc | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/tpview.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpview.cxx | 50 | ||||
-rw-r--r-- | sc/source/ui/src/optdlg.src | 21 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 2 |
5 files changed, 57 insertions, 24 deletions
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc index b10452945220..9b94289527e0 100644 --- a/sc/source/ui/inc/optdlg.hrc +++ b/sc/source/ui/inc/optdlg.hrc @@ -145,7 +145,6 @@ #define CB_TBLREG 54 #define CB_OUTLINE 55 #define GB_LINES 56 -#define CB_GRID 57 #define FT_COLOR 58 #define LB_COLOR 59 #define CB_GUIDELINE 60 @@ -162,6 +161,8 @@ #define FL_SEPARATOR1 71 #define FL_SEPARATOR2 72 #define FL_SEPARATOR 73 +#define FT_GRID 74 +#define LB_GRID 75 // TP_INPUT #define GB_OPTIONS 70 diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 68093f0ce0f5..2599ea24e0c8 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -47,7 +47,8 @@ class ScViewOptions; class ScTpContentOptions : public SfxTabPage { FixedLine aLinesGB; - CheckBox aGridCB; + FixedText aGridFT; + ListBox aGridLB; FixedText aColorFT; ColorListBox aColorLB; CheckBox aBreakCB; @@ -89,7 +90,7 @@ class ScTpContentOptions : public SfxTabPage ScViewOptions* pLocalOptions; void InitGridOpt(); - DECL_LINK( GridHdl, CheckBox* ); + DECL_LINK( GridHdl, ListBox* ); DECL_LINK( SelLbObjHdl, ListBox* ); DECL_LINK( CBHdl, CheckBox* ); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 1cd9e4d124a4..5d166e5330c0 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -62,7 +62,8 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, SfxTabPage(pParent, ScResId( RID_SCPAGE_CONTENT ), rArgSet), aLinesGB( this, ScResId(GB_LINES )), - aGridCB( this, ScResId(CB_GRID )), + aGridFT( this, ScResId(FT_GRID )), + aGridLB( this, ScResId(LB_GRID )), aColorFT( this, ScResId(FT_COLOR )), aColorLB( this, ScResId(LB_COLOR )), aBreakCB( this, ScResId(CB_PAGEBREAKS )), @@ -108,6 +109,7 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, aObjGrfLB. SetSelectHdl(aSelObjHdl); aDiagramLB. SetSelectHdl(aSelObjHdl); aDrawLB. SetSelectHdl(aSelObjHdl); + aGridLB. SetSelectHdl( LINK( this, ScTpContentOptions, GridHdl ) ); Link aCBHdl(LINK( this, ScTpContentOptions, CBHdl ) ); aFormulaCB .SetClickHdl(aCBHdl); @@ -127,7 +129,6 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, aBigHandleCB.SetClickHdl(aCBHdl); aRowColHeaderCB.SetClickHdl(aCBHdl); - aGridCB .SetClickHdl( LINK( this, ScTpContentOptions, GridHdl ) ); } ScTpContentOptions::~ScTpContentOptions() @@ -153,7 +154,7 @@ sal_Bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) aObjGrfLB .GetSavedValue() != aObjGrfLB .GetSelectEntryPos() || aDiagramLB .GetSavedValue() != aDiagramLB .GetSelectEntryPos() || aDrawLB .GetSavedValue() != aDrawLB .GetSelectEntryPos() || - aGridCB .GetSavedValue() != aGridCB.IsChecked() || + aGridLB .GetSavedValue() != aGridLB .GetSelectEntryPos() || aRowColHeaderCB .GetSavedValue() != aRowColHeaderCB.IsChecked() || aHScrollCB .GetSavedValue() != aHScrollCB .IsChecked() || aVScrollCB .GetSavedValue() != aVScrollCB .IsChecked() || @@ -239,7 +240,7 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) aVScrollCB .SaveValue(); aTblRegCB .SaveValue(); aOutlineCB .SaveValue(); - aGridCB .SaveValue(); + aGridLB .SaveValue(); aColorLB .SaveValue(); aBreakCB .SaveValue(); aGuideLineCB .SaveValue(); @@ -310,19 +311,30 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) void ScTpContentOptions::InitGridOpt() { - sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); - - aGridCB.Check( bGrid ); + sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); + sal_Bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP ); + sal_uInt16 nSelPos = 0; if ( bGrid ) + { aColorFT.Enable(), aColorLB.Enable(); + if ( !bGridOnTop ) + nSelPos = 0; + else + nSelPos = 1; + } else + { aColorFT.Disable(), aColorLB.Disable(); + nSelPos = 2; + } + + aGridLB.SelectEntryPos (nSelPos); if ( aColorLB.GetEntryCount() == 0 ) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); - // hier koennte auch eine andere DocShell kommen! + // there might be another DocShell here pDocSh = PTR_CAST(ScDocShell, pDocSh); XColorTable* pColorTable = NULL; @@ -344,7 +356,7 @@ void ScTpContentOptions::InitGridOpt() aColorLB.SetUpdateMode( false ); - // Eintraege aus der Colortable + // items from ColorTable long nCount = pColorTable->Count(); for ( long n=0; n<nCount; n++ ) @@ -353,9 +365,9 @@ void ScTpContentOptions::InitGridOpt() aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - // Standard-Gitterfarbe + // default GridColor - Color aStdCol( SC_STD_GRIDCOLOR ); // wie Default in ScViewOptions + Color aStdCol( SC_STD_GRIDCOLOR ); // same default as in ScViewOptions if ( LISTBOX_ENTRY_NOTFOUND == aColorLB.GetEntryPos( aStdCol ) ) aColorLB.InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) ); @@ -369,7 +381,7 @@ void ScTpContentOptions::InitGridOpt() String aName; Color aCol = pLocalOptions->GetGridColor( &aName ); - sal_uInt16 nSelPos = aColorLB.GetEntryPos( aCol ); + nSelPos = aColorLB.GetEntryPos( aCol ); if ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) aColorLB.SelectEntryPos( nSelPos ); @@ -377,12 +389,16 @@ void ScTpContentOptions::InitGridOpt() aColorLB.SelectEntryPos( aColorLB.InsertEntry( aCol, aName ) ); } -IMPL_LINK( ScTpContentOptions, GridHdl, CheckBox*, pBox ) +IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) { - sal_Bool bChecked = pBox->IsChecked(); - aColorFT.Enable(bChecked); - aColorLB.Enable(bChecked); - pLocalOptions->SetOption( VOPT_GRID, bChecked ); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); + sal_Bool bGrid = ( nSelPos <= 1 ); + sal_Bool bGridOnTop = ( nSelPos == 1 ); + + aColorFT.Enable(bGridOnTop); + aColorLB.Enable(bGridOnTop); + pLocalOptions->SetOption( VOPT_GRID, bGrid ); + pLocalOptions->SetOption( VOPT_GRID_ONTOP, bGridOnTop ); return 0; } diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index 9370ea0ab4f8..e7ceead9a83b 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -446,13 +446,28 @@ TabPage RID_SCPAGE_CONTENT Size = MAP_APPFONT ( 121 , 8 ) ; Text [ en-US ] = "Visual aids"; }; - CheckBox CB_GRID + FixedText FT_GRID { - HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GRID"; + HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:FT_GRID"; Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 112 , 10 ) ; + Size = MAP_APPFONT ( 40 , 8 ) ; Text [ en-US ] = "~Grid lines" ; }; + ListBox LB_GRID + { + HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_GRID"; + Pos = MAP_APPFONT ( 54 , 12 ) ; + Size = MAP_APPFONT ( 70 , 46 ) ; + Border = TRUE ; + DropDown = TRUE ; + StringList [ en-US ] = + { + < "Show" ; Default ; > ; + < "Show on colored cells" ; Default ; > ; + < "Hide" ; Default ; > ; + }; + + }; FixedText FT_COLOR { Pos = MAP_APPFONT ( 21 , 28 ) ; diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b912cd57e82e..ea4fe2a0ac74 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -399,7 +399,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod { ScModule* pScMod = SC_MOD(); sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); - sal_Bool bGridFirst = true; //! entscheiden!!! if (pViewData->IsMinimized()) return; @@ -543,6 +542,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetViewShell( pViewData->GetViewShell() ); sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); + sal_Bool bGridFirst = !rOpts.GetOption( VOPT_GRID_ONTOP ); sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); |