summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/docpool.cxx3
-rw-r--r--sc/source/ui/app/scmod.cxx1
-rw-r--r--sc/source/ui/inc/formatsh.hxx3
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx8
-rw-r--r--sc/source/ui/view/formatsh.cxx48
-rw-r--r--sc/source/ui/view/tabview3.cxx1
6 files changed, 5 insertions, 59 deletions
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index db06224d91ef..3c7e52dac489 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -182,8 +182,7 @@ static SfxItemInfo const aItemInfos[] =
{ SID_ATTR_PAGE_FOOTERSET, SFX_ITEM_POOLABLE }, // ATTR_PAGE_FOOTERSET
{ SID_SCATTR_PAGE_FORMULAS, SFX_ITEM_POOLABLE }, // ATTR_PAGE_FORMULAS
{ SID_SCATTR_PAGE_NULLVALS, SFX_ITEM_POOLABLE }, // ATTR_PAGE_NULLVALS
- { SID_SCATTR_PAGE_SCALETO, SFX_ITEM_POOLABLE }, // ATTR_PAGE_SCALETO
- { SID_SCGRIDSHOW, SFX_ITEM_POOLABLE }
+ { SID_SCATTR_PAGE_SCALETO, SFX_ITEM_POOLABLE } // ATTR_PAGE_SCALETO
};
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 496062b27629..ba7aec81082f 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1121,7 +1121,6 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if (pBindings)
{
pBindings->Invalidate(SID_HELPLINES_MOVE);
- pBindings->Invalidate(SID_SCGRIDSHOW);
}
}
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
index ccf69ca153b9..975e2ad63597 100644
--- a/sc/source/ui/inc/formatsh.hxx
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -67,9 +67,6 @@ public:
void ExecFormatPaintbrush( SfxRequest& rReq );
void StateFormatPaintbrush( SfxItemSet& rSet );
- void ExecViewOptions( SfxRequest& rReq );
- void GetViewOptions( SfxItemSet& rSet );
-
private:
short GetCurrentNumberFormatType();
};
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 2ebc5bfc964c..adc77f8bb98a 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -161,7 +161,7 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel(
maLineStyleControl(SID_FRAME_LINESTYLE, *pBindings, *this),
maBorderOuterControl(SID_ATTR_BORDER_OUTER, *pBindings, *this),
maBorderInnerControl(SID_ATTR_BORDER_INNER, *pBindings, *this),
- maGridShowControl(SID_SCGRIDSHOW, *pBindings, *this),
+ maGridShowControl(FID_TAB_TOGGLE_GRID, *pBindings, *this),
maBorderTLBRControl(SID_ATTR_BORDER_DIAG_TLBR, *pBindings, *this),
maBorderBLTRControl(SID_ATTR_BORDER_DIAG_BLTR, *pBindings, *this),
@@ -359,8 +359,8 @@ IMPL_LINK(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox
IMPL_LINK(CellAppearancePropertyPanel, CBOXGridShowClkHdl, void*, EMPTYARG)
{
bool bState = mpCBXShowGrid->IsChecked();
- SfxBoolItem aItem( SID_SCGRIDSHOW , bState);
- GetBindings()->GetDispatcher()->Execute(SID_SCGRIDSHOW, SFX_CALLMODE_RECORD, &aItem, 0L);
+ SfxBoolItem aItem( FID_TAB_TOGGLE_GRID , bState);
+ GetBindings()->GetDispatcher()->Execute(FID_TAB_TOGGLE_GRID, SFX_CALLMODE_RECORD, &aItem, 0L);
return 0;
}
@@ -671,7 +671,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
mbBLTR = false;
UpdateControlState();
break;
- case SID_SCGRIDSHOW:
+ case FID_TAB_TOGGLE_GRID:
if(eState >= SFX_ITEM_DEFAULT)
{
const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState);
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index a8c30d9710bd..9d9d9b34dae5 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2788,52 +2788,4 @@ short ScFormatShell::GetCurrentNumberFormatType()
return nType;
}
-void ScFormatShell::ExecViewOptions( SfxRequest& rReq )
-{
- ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- SfxBindings& rBindings = pViewData->GetBindings();
- const SfxItemSet* pNewAttrs = rReq.GetArgs();
-
- if ( pNewAttrs )
- {
- sal_uInt16 nSlot = rReq.GetSlot();
-
- if( nSlot == SID_SCGRIDSHOW)
- {
-
- ScViewData* pLclViewData = pTabViewShell->GetViewData();
- const ScViewOptions& rOldOpt = pLclViewData->GetOptions();
- ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
- bool bState = ((const SfxBoolItem &)pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot ) )).GetValue();
-
- if ( (bool)rOldOpt.GetOption( VOPT_GRID ) != bState)
- {
- ScViewOptions rNewOpt(rOldOpt);
- rNewOpt.SetOption( VOPT_GRID, bState);
- pLclViewData->SetOptions( rNewOpt );
- pLclViewData->GetDocument()->SetViewOptions( rNewOpt );
- pDocSh->SetDocumentModified();
- //add , write the change to sc view config
- ScModule* pScMod = SC_MOD();
- pScMod->SetViewOptions( rNewOpt );
- //add end
- rBindings.Invalidate( nSlot );
- }
- }
- }
-
-}
-
-void ScFormatShell::GetViewOptions( SfxItemSet& rSet )
-{
- ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- if( pTabViewShell )
- {
- ScViewOptions aViewOpt = pTabViewShell->GetViewData()->GetOptions();
- rSet.ClearItem(SID_SCGRIDSHOW);
- SfxBoolItem aItem( SID_SCGRIDSHOW, aViewOpt.GetOption( VOPT_GRID ) );
- rSet.Put(aItem);
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 3f1578bf410d..255dfb982218 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -242,7 +242,6 @@ void ScTabView::InvalidateAttribs()
rBindings.Invalidate( SID_FRAME_LINESTYLE );
rBindings.Invalidate( SID_ATTR_BORDER_OUTER );
rBindings.Invalidate( SID_ATTR_BORDER_INNER );
- rBindings.Invalidate( SID_SCGRIDSHOW );
rBindings.Invalidate( SID_ATTR_BORDER_DIAG_TLBR );
rBindings.Invalidate( SID_ATTR_BORDER_DIAG_BLTR );
rBindings.Invalidate( SID_NUMBER_TYPE_FORMAT );