diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-23 14:40:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 09:36:57 +0200 |
commit | 5d37fa2a710e3bd76d3f1e18d1d66b8a4ab15030 (patch) | |
tree | b472de3b77857a725b3a469e648151b12a7bb9d9 /reportdesign | |
parent | 23e0b0ba4b67a402a89b3752ae5aede1c5249cc8 (diff) |
convert SvxZoomType to enum class
Change-Id: I7308e848d3f9ac391dc656a145139dabbc792df3
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/inc/ReportController.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index acb4c0072641..ae4ef3987530 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -445,7 +445,7 @@ namespace rptui inline ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const { return m_xContext; } inline sal_Int16 getZoomValue() const { return m_nZoomValue; } - inline void resetZoomType() { m_eZoomType = SVX_ZOOM_PERCENT; } + inline void resetZoomType() { m_eZoomType = SvxZoomType::PERCENT; } // com::sun::star::beans::XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index fb4cb41681ed..ca05e172e909 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -298,7 +298,7 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon ,m_nSelectionCount(0) ,m_nAspect(0) ,m_nZoomValue(100) - ,m_eZoomType(SVX_ZOOM_PERCENT) + ,m_eZoomType(SvxZoomType::PERCENT) ,m_bShowRuler(true) ,m_bGridVisible(true) ,m_bGridUse(true) @@ -1645,7 +1645,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > SvxZoomSliderItem aZoomSlider; aZoomSlider.PutValue(aArgs[0].Value); m_nZoomValue = aZoomSlider.GetValue(); - m_eZoomType = SVX_ZOOM_PERCENT; + m_eZoomType = SvxZoomType::PERCENT; impl_zoom_nothrow(); } break; @@ -4287,7 +4287,7 @@ void OReportController::openZoomDialog() const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM )); m_eZoomType = rZoomItem.GetType(); m_nZoomValue = rZoomItem.GetValue(); - if ( m_eZoomType != SVX_ZOOM_PERCENT ) + if ( m_eZoomType != SvxZoomType::PERCENT ) m_nZoomValue = getDesignView()->getZoomFactor( m_eZoomType ); impl_zoom_nothrow(); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 1ec3c0a309ce..3ace86ee9e66 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -407,12 +407,12 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const const Size aSize( GetSizePixel() ); switch( _eType) { - case SVX_ZOOM_PERCENT: + case SvxZoomType::PERCENT: nZoom = m_pView->getController().getZoomValue(); break; - case SVX_ZOOM_OPTIMAL: + case SvxZoomType::OPTIMAL: break; - case SVX_ZOOM_WHOLEPAGE: + case SvxZoomType::WHOLEPAGE: { nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); MapMode aMap( MAP_100TH_MM ); @@ -420,7 +420,7 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const nZoom = ::std::min(nZoom,(sal_uInt16)(long)Fraction(aSize.Height()*100,aHeight.Height())); } break; - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::PAGEWIDTH: nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth()); break; default: |