summaryrefslogtreecommitdiff
path: root/starmath/source/view.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/view.cxx')
-rw-r--r--starmath/source/view.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index d144dde573e9..997908d786da 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -51,6 +51,7 @@
#include <svl/undo.hxx>
#include <svl/whiter.hxx>
#include <svx/dialogs.hrc>
+#include <svx/zoomslideritem.hxx>
#include <editeng/editeng.hxx>
#include <svx/svxdlg.hxx>
#include <sfx2/zoomitem.hxx>
@@ -613,7 +614,10 @@ void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
SetTotalSize();
SmViewShell *pViewSh = GetView();
if (pViewSh)
+ {
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_ATTR_ZOOM);
+ pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_ATTR_ZOOMSLIDER);
+ }
Invalidate();
}
@@ -1853,6 +1857,19 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
break;
+ case SID_ATTR_ZOOMSLIDER:
+ {
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ const SfxPoolItem* pItem;
+
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
+ {
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ aGraphic.SetZoom( nCurrentZoom );
+ }
+ }
+ break;
+
case SID_TOOLBOX:
{
GetViewFrame()->ToggleChildWindow( SmToolBoxWrapper::GetChildWindowId() );
@@ -1936,6 +1953,15 @@ void SmViewShell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWh );
break;
+ case SID_ATTR_ZOOMSLIDER :
+ {
+ const sal_uInt16 nCurrentZoom = aGraphic.GetZoom();
+ SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
+ aZoomSliderItem.AddSnappingPoint( 100 );
+ rSet.Put( aZoomSliderItem );
+ }
+ break;
+
case SID_NEXTERR:
case SID_PREVERR:
case SID_NEXTMARK: