summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-23 14:40:02 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:36:57 +0200
commit5d37fa2a710e3bd76d3f1e18d1d66b8a4ab15030 (patch)
treeb472de3b77857a725b3a469e648151b12a7bb9d9 /sd
parent23e0b0ba4b67a402a89b3752ae5aede1c5249cc8 (diff)
convert SvxZoomType to enum class
Change-Id: I7308e848d3f9ac391dc656a145139dabbc792df3
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuscale.cxx12
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx8
-rw-r--r--sd/source/ui/view/drviews2.cxx12
-rw-r--r--sd/source/ui/view/drviewsa.cxx4
-rw-r--r--sd/source/ui/view/outlnvs2.cxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
6 files changed, 20 insertions, 20 deletions
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 125ea0c4609f..bee412780a8e 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -80,11 +80,11 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( mpViewShell && mpViewShell->ISA( DrawViewShell ) &&
static_cast<DrawViewShell*>(mpViewShell)->IsZoomOnPage() )
{
- pZoomItem.reset(new SvxZoomItem( SVX_ZOOM_WHOLEPAGE, nValue ));
+ pZoomItem.reset(new SvxZoomItem( SvxZoomType::WHOLEPAGE, nValue ));
}
else
{
- pZoomItem.reset(new SvxZoomItem( SVX_ZOOM_PERCENT, nValue ));
+ pZoomItem.reset(new SvxZoomItem( SvxZoomType::PERCENT, nValue ));
}
// limit range
@@ -144,7 +144,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
switch (static_cast<const SvxZoomItem &>( aArgs.Get (SID_ATTR_ZOOM)).GetType ())
{
- case SVX_ZOOM_PERCENT:
+ case SvxZoomType::PERCENT:
{
nValue = static_cast<const SvxZoomItem &>( aArgs.Get (SID_ATTR_ZOOM)).GetValue ();
@@ -154,7 +154,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
}
break;
- case SVX_ZOOM_OPTIMAL:
+ case SvxZoomType::OPTIMAL:
{
if( mpViewShell->ISA( DrawViewShell ) )
{
@@ -165,11 +165,11 @@ void FuScale::DoExecute( SfxRequest& rReq )
}
break;
- case SVX_ZOOM_PAGEWIDTH:
+ case SvxZoomType::PAGEWIDTH:
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_SIZE_PAGE_WIDTH, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
break;
- case SVX_ZOOM_WHOLEPAGE:
+ case SvxZoomType::WHOLEPAGE:
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
break;
default:
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 0c07056be177..c073db21d60e 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -470,7 +470,7 @@ sal_Int16 SdUnoDrawView::GetZoom(void) const
void SdUnoDrawView::SetZoom( sal_Int16 nZoom )
{
- SvxZoomItem aZoomItem( SVX_ZOOM_PERCENT, nZoom );
+ SvxZoomItem aZoomItem( SvxZoomType::PERCENT, nZoom );
SfxViewFrame* pViewFrame = mrDrawViewShell.GetViewFrame();
if( pViewFrame )
@@ -512,16 +512,16 @@ void SdUnoDrawView::SetZoomType ( sal_Int16 nType )
switch( nType )
{
case com::sun::star::view::DocumentZoomType::OPTIMAL:
- eZoomType = SVX_ZOOM_OPTIMAL;
+ eZoomType = SvxZoomType::OPTIMAL;
break;
case com::sun::star::view::DocumentZoomType::PAGE_WIDTH:
case com::sun::star::view::DocumentZoomType::PAGE_WIDTH_EXACT:
- eZoomType = SVX_ZOOM_PAGEWIDTH;
+ eZoomType = SvxZoomType::PAGEWIDTH;
break;
case com::sun::star::view::DocumentZoomType::ENTIRE_PAGE:
- eZoomType = SVX_ZOOM_WHOLEPAGE;
+ eZoomType = SvxZoomType::WHOLEPAGE;
break;
default:
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index f30b974c8f65..c1b2096778ae 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -582,27 +582,27 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
Get( SID_ATTR_ZOOM ) ).GetType();
switch( eZT )
{
- case SVX_ZOOM_PERCENT:
+ case SvxZoomType::PERCENT:
SetZoom( (long) static_cast<const SvxZoomItem&>( pArgs->
Get( SID_ATTR_ZOOM ) ).GetValue() );
break;
- case SVX_ZOOM_OPTIMAL:
+ case SvxZoomType::OPTIMAL:
GetViewFrame()->GetDispatcher()->Execute( SID_SIZE_ALL,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
break;
- case SVX_ZOOM_PAGEWIDTH:
+ case SvxZoomType::PAGEWIDTH:
GetViewFrame()->GetDispatcher()->Execute( SID_SIZE_PAGE_WIDTH,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
break;
- case SVX_ZOOM_WHOLEPAGE:
+ case SvxZoomType::WHOLEPAGE:
GetViewFrame()->GetDispatcher()->Execute( SID_SIZE_PAGE,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
break;
- case SVX_ZOOM_PAGEWIDTH_NOBORDER:
- OSL_FAIL("sd::DrawViewShell::FuTemporary(), SVX_ZOOM_PAGEWIDTH_NOBORDER not handled!" );
+ case SvxZoomType::PAGEWIDTH_NOBORDER:
+ OSL_FAIL("sd::DrawViewShell::FuTemporary(), SvxZoomType::PAGEWIDTH_NOBORDER not handled!" );
break;
}
rReq.Ignore ();
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 0ab56de37e68..f31950507693 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -585,9 +585,9 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom();
if( mbZoomOnPage )
- pZoomItem.reset(new SvxZoomItem( SVX_ZOOM_WHOLEPAGE, nZoom ));
+ pZoomItem.reset(new SvxZoomItem( SvxZoomType::WHOLEPAGE, nZoom ));
else
- pZoomItem.reset(new SvxZoomItem( SVX_ZOOM_PERCENT, nZoom ));
+ pZoomItem.reset(new SvxZoomItem( SvxZoomType::PERCENT, nZoom ));
// constrain area
sal_uInt16 nZoomValues = SVX_ZOOM_ENABLE_ALL;
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index bbe02cfaa362..d75a96d3c87c 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -96,7 +96,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
Get( SID_ATTR_ZOOM ) ).GetType();
switch( eZT )
{
- case SVX_ZOOM_PERCENT:
+ case SvxZoomType::PERCENT:
SetZoom( (long) static_cast<const SvxZoomItem&>( pArgs->
Get( SID_ATTR_ZOOM ) ).GetValue() );
Invalidate( SID_ATTR_ZOOM );
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index ccf68155f469..494119aeecd5 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1276,7 +1276,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
{
sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom();
- boost::scoped_ptr<SvxZoomItem> pZoomItem(new SvxZoomItem( SVX_ZOOM_PERCENT, nZoom ));
+ boost::scoped_ptr<SvxZoomItem> pZoomItem(new SvxZoomItem( SvxZoomType::PERCENT, nZoom ));
// limit area
sal_uInt16 nZoomValues = SVX_ZOOM_ENABLE_ALL;