fdo#63351 make use of ZoomSlider in StarMath
In collaboration with Marcos Souza <marcos.souza.org@gmail.com> :) Includes some reordering of the statusbar: Zoom and ZoomSlider right, left field with automatic size adjustment. Change-Id: Ibfb1eab1abef7b026eeb7fd7c0a778c433c9e208 Reviewed-on: https://gerrit.libreoffice.org/4053 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
This commit is contained in:
committed by
Michael Meeks
parent
c845557a69
commit
20824c118f
@@ -283,6 +283,11 @@ interface FormulaView
|
||||
ExecMethod = Execute ;
|
||||
StateMethod = GetState ;
|
||||
]
|
||||
SID_ATTR_ZOOMSLIDER
|
||||
[
|
||||
ExecMethod = Execute ;
|
||||
StateMethod = GetState ;
|
||||
]
|
||||
//idlpp kein Menueeintrag , also keine Texte
|
||||
SID_TEXTSTATUS //idlpp ole : no , status : no
|
||||
[
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <svx/svxids.hrc>
|
||||
#include <svx/modctrl.hxx>
|
||||
#include <svx/zoomctrl.hxx>
|
||||
#include <svx/zoomsliderctrl.hxx>
|
||||
#include <sfx2/docfac.hxx>
|
||||
#include <svx/lboxctrl.hxx>
|
||||
#include <sfx2/docfile.hxx>
|
||||
@@ -67,6 +68,7 @@ namespace
|
||||
SmViewShell::RegisterFactory(1);
|
||||
|
||||
SvxZoomStatusBarControl::RegisterControl(SID_ATTR_ZOOM, pModule);
|
||||
SvxZoomSliderControl::RegisterControl(SID_ATTR_ZOOMSLIDER, pModule);
|
||||
SvxModifyControl::RegisterControl(SID_TEXTSTATUS, pModule);
|
||||
SvxUndoRedoControl::RegisterControl(SID_UNDO, pModule);
|
||||
SvxUndoRedoControl::RegisterControl(SID_REDO, pModule);
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <svl/stritem.hxx>
|
||||
#include <svl/eitem.hxx>
|
||||
#include <sfx2/zoomitem.hxx>
|
||||
#include <svx/zoomslideritem.hxx>
|
||||
#include <svx/svxids.hrc>
|
||||
#include <svl/slstitm.hxx>
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -18,8 +18,9 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
-->
|
||||
<statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<statusbar:statusbaritem xlink:href=".uno:TextStatus" statusbar:align="left" statusbar:width="300"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="54"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:TextStatus" statusbar:align="left" statusbar:autosize="true" statusbar:width="300"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="right" statusbar:ownerdraw="true" statusbar:width="130"/>
|
||||
<statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="54"/>
|
||||
</statusbar:statusbar>
|
||||
|
Reference in New Issue
Block a user