summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwshf.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-15 21:15:49 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-15 21:15:49 +0200
commitfe8f3ddf3a6eef5320ea185a32d042a22fb94a30 (patch)
tree7d6120b5d3d44ecbcb37ddecea939f6cb2440add /sc/source/ui/view/tabvwshf.cxx
parent340f9bd08cfe91054d3ed36e13c26d4fccce154f (diff)
sc-sheet-gridline-toggle.diff: Toggle gridline display per sheet.
i#14893
Diffstat (limited to 'sc/source/ui/view/tabvwshf.cxx')
-rw-r--r--sc/source/ui/view/tabvwshf.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 20a10f149a3a..39a188e176d5 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -32,6 +32,7 @@
#include "scitems.hxx"
#include <sfx2/request.hxx>
+#include <sfx2/bindings.hxx>
#include <sfx2/viewfrm.hxx>
#include <basic/sbstar.hxx>
#include <layout/layout.hxx>
@@ -691,6 +692,17 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
break;
+ case FID_TAB_TOGGLE_GRID:
+ {
+ bool bShowGrid = pViewData->GetShowGrid();
+ pViewData->SetShowGrid(!bShowGrid);
+ SfxBindings& rBindings = GetViewFrame()->GetBindings();
+ rBindings.Invalidate( FID_TAB_TOGGLE_GRID );
+ PaintGrid();
+ rReq.Done();
+ }
+ break;
+
case FID_TAB_SET_TAB_BG_COLOR:
case FID_TAB_MENU_SET_TAB_BG_COLOR:
{
@@ -954,6 +966,10 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
rSet.Put( SvxColorItem( aColor, nWhich ) );
}
break;
+
+ case FID_TAB_TOGGLE_GRID:
+ rSet.Put( SfxBoolItem(nWhich, pViewData->GetShowGrid()) );
+ break;
}
nWhich = aIter.NextWhich();
}