Kaydet (Commit) 8e12daed authored tarafından Takeshi Abe's avatar Takeshi Abe

bZoomEnable was always true

This completes dc9ce37f.

Change-Id: I0a840d01a40942016e32ec0547618bc44d94c48d
üst a4a45710
...@@ -962,8 +962,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ...@@ -962,8 +962,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
sal_uInt16 nWhich = aIter.FirstWhich(); sal_uInt16 nWhich = aIter.FirstWhich();
OSL_ENSURE(nWhich, "empty set"); OSL_ENSURE(nWhich, "empty set");
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
// zoom has to be disabled if Accessibility support is switched on
sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich) while(nWhich)
{ {
...@@ -1007,8 +1005,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ...@@ -1007,8 +1005,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
case SID_ATTR_ZOOM: case SID_ATTR_ZOOM:
case FN_STAT_ZOOM: case FN_STAT_ZOOM:
{
if(bZoomEnabled)
{ {
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
SvxZoomItem aZoom((SvxZoomType)pVOpt->GetZoomType(), SvxZoomItem aZoom((SvxZoomType)pVOpt->GetZoomType(),
...@@ -1021,13 +1017,8 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ...@@ -1021,13 +1017,8 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
SVX_ZOOM_ENABLE_200); SVX_ZOOM_ENABLE_200);
rSet.Put( aZoom ); rSet.Put( aZoom );
} }
else
rSet.DisableItem(nWhich);
}
break; break;
case SID_ATTR_ZOOMSLIDER : case SID_ATTR_ZOOMSLIDER :
{
if(bZoomEnabled)
{ {
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
const sal_uInt16 nCurrentZoom = pVOpt->GetZoom(); const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
...@@ -1035,26 +1026,18 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ...@@ -1035,26 +1026,18 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
aZoomSliderItem.AddSnappingPoint( 100 ); aZoomSliderItem.AddSnappingPoint( 100 );
rSet.Put( aZoomSliderItem ); rSet.Put( aZoomSliderItem );
} }
else
rSet.DisableItem(nWhich);
}
break; break;
case FN_PREVIEW_ZOOM: case FN_PREVIEW_ZOOM:
{
if(bZoomEnabled)
{ {
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
rSet.Put(SfxUInt16Item(nWhich, pVOpt->GetZoom())); rSet.Put(SfxUInt16Item(nWhich, pVOpt->GetZoom()));
} }
else
rSet.DisableItem(nWhich);
}
break; break;
case SID_ZOOM_IN: case SID_ZOOM_IN:
case SID_ZOOM_OUT: case SID_ZOOM_OUT:
{ {
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
if(!bZoomEnabled || (SID_ZOOM_OUT == nWhich && pVOpt->GetZoom() >= MAX_PREVIEW_ZOOM)|| if((SID_ZOOM_OUT == nWhich && pVOpt->GetZoom() >= MAX_PREVIEW_ZOOM)||
(SID_ZOOM_IN == nWhich && pVOpt->GetZoom() <= MIN_PREVIEW_ZOOM)) (SID_ZOOM_IN == nWhich && pVOpt->GetZoom() <= MIN_PREVIEW_ZOOM))
{ {
rSet.DisableItem(nWhich); rSet.DisableItem(nWhich);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment