summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
parent23e0b0ba4b67a402a89b3752ae5aede1c5249cc8 (diff)
convert SvxZoomType to enum class
Change-Id: I7308e848d3f9ac391dc656a145139dabbc792df3
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx14
-rw-r--r--starmath/source/view.cxx12
2 files changed, 13 insertions, 13 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index fe4b7ef008f4..054af675bfd1 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -262,14 +262,14 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_OPTIMAL, 0));
+ aSet.Put(SvxZoomItem(SvxZoomType::OPTIMAL, 0));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be optimal zoom", nFinalZoom == nOptimalZoom);
}
-//To-Do: investigate GetPrinter logic of SVX_ZOOM_PAGEWIDTH/SVX_ZOOM_WHOLEPAGE to ensure
+//To-Do: investigate GetPrinter logic of SvxZoomType::PAGEWIDTH/SvxZoomType::WHOLEPAGE to ensure
//consistent value regardless of
#if 0
{
@@ -279,7 +279,7 @@ void Test::viewZoom()
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_PAGEWIDTH, 0));
+ aSet.Put(SvxZoomItem(SvxZoomType::PAGEWIDTH, 0));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
@@ -293,7 +293,7 @@ void Test::viewZoom()
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_WHOLEPAGE, 0));
+ aSet.Put(SvxZoomItem(SvxZoomType::WHOLEPAGE, 0));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
@@ -308,7 +308,7 @@ void Test::viewZoom()
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 50));
+ aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 50));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
@@ -317,7 +317,7 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 5));
+ aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 5));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
@@ -326,7 +326,7 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 1000));
+ aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 1000));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5d4010257429..31bc611a1948 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1743,7 +1743,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
if ( !pSet )
{
SfxItemSet aSet( GetDoc()->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
- aSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, aGraphic.GetZoom()));
+ aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, aGraphic.GetZoom()));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -1759,16 +1759,16 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SvxZoomItem &rZoom = static_cast<const SvxZoomItem &>(pSet->Get(SID_ATTR_ZOOM));
switch( rZoom.GetType() )
{
- case SVX_ZOOM_PERCENT:
+ case SvxZoomType::PERCENT:
aGraphic.SetZoom((sal_uInt16)rZoom.GetValue ());
break;
- case SVX_ZOOM_OPTIMAL:
+ case SvxZoomType::OPTIMAL:
aGraphic.ZoomToFitInWindow();
break;
- case SVX_ZOOM_PAGEWIDTH:
- case SVX_ZOOM_WHOLEPAGE:
+ case SvxZoomType::PAGEWIDTH:
+ case SvxZoomType::WHOLEPAGE:
{
const MapMode aMap( MAP_100TH_MM );
SfxPrinter *pPrinter = GetPrinter( true );
@@ -1871,7 +1871,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
break;
case SID_ATTR_ZOOM:
- rSet.Put(SvxZoomItem( SVX_ZOOM_PERCENT, aGraphic.GetZoom()));
+ rSet.Put(SvxZoomItem( SvxZoomType::PERCENT, aGraphic.GetZoom()));
/* no break here */
case SID_ZOOMIN:
case SID_ZOOMOUT: