diff options
39 files changed, 170 insertions, 170 deletions
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index fa8b53ee3da0..446e47a8e3b7 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -212,18 +212,18 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet ) switch (eType) { - case SVX_ZOOM_OPTIMAL: + case SvxZoomType::OPTIMAL: nButtonId = ZOOMBTN_OPTIMAL; break; - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::PAGEWIDTH: nButtonId = ZOOMBTN_PAGEWIDTH; break; - case SVX_ZOOM_WHOLEPAGE: + case SvxZoomType::WHOLEPAGE: nButtonId = ZOOMBTN_WHOLEPAGE; break; - case SVX_ZOOM_PERCENT: + case SvxZoomType::PERCENT: break; - case SVX_ZOOM_PAGEWIDTH_NOBORDER: + case SvxZoomType::PAGEWIDTH_NOBORDER: break; } @@ -380,7 +380,7 @@ IMPL_LINK(SvxZoomDialog, OKHdl, Button*, pButton) { if (mbModified || m_pOKBtn != pButton) { - SvxZoomItem aZoomItem(SVX_ZOOM_PERCENT, 0, mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM)); + SvxZoomItem aZoomItem(SvxZoomType::PERCENT, 0, mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM)); SvxViewLayoutItem aViewLayoutItem(0, false, mrSet.GetPool()->GetWhich(SID_ATTR_VIEWLAYOUT)); if (m_pOKBtn == pButton) @@ -390,11 +390,11 @@ IMPL_LINK(SvxZoomDialog, OKHdl, Button*, pButton) if (SPECIAL_FACTOR == nFactor) { if (m_pOptimalBtn->IsChecked()) - aZoomItem.SetType(SVX_ZOOM_OPTIMAL); + aZoomItem.SetType(SvxZoomType::OPTIMAL); else if (m_pPageWidthBtn->IsChecked()) - aZoomItem.SetType(SVX_ZOOM_PAGEWIDTH); + aZoomItem.SetType(SvxZoomType::PAGEWIDTH); else if (m_pWholePageBtn->IsChecked()) - aZoomItem.SetType(SVX_ZOOM_WHOLEPAGE); + aZoomItem.SetType(SvxZoomType::WHOLEPAGE); } else { diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx index e08665365291..23542239c725 100644 --- a/include/sfx2/zoomitem.hxx +++ b/include/sfx2/zoomitem.hxx @@ -25,32 +25,32 @@ -enum SvxZoomType +enum class SvxZoomType { - SVX_ZOOM_PERCENT, // GetValue() is no special percentage value - SVX_ZOOM_OPTIMAL, // GetValue() corresponds to the optimal size - SVX_ZOOM_WHOLEPAGE, // GetValue() corresponds to the whole page - SVX_ZOOM_PAGEWIDTH, // GetValue() corresponds to the page width - SVX_ZOOM_PAGEWIDTH_NOBORDER // GetValue() pagewidth without border + PERCENT, // GetValue() is no special percentage value + OPTIMAL, // GetValue() corresponds to the optimal size + WHOLEPAGE, // GetValue() corresponds to the whole page + PAGEWIDTH, // GetValue() corresponds to the page width + PAGEWIDTH_NOBORDER // GetValue() pagewidth without border }; class SFX2_DLLPUBLIC SvxZoomItem: public SfxUInt16Item { - sal_uInt16 nValueSet; // allowed values (see #defines below) + sal_uInt16 nValueSet; // allowed values (see #defines below) SvxZoomType eType; public: TYPEINFO_OVERRIDE(); - SvxZoomItem( SvxZoomType eZoomType = SVX_ZOOM_PERCENT, + SvxZoomItem( SvxZoomType eZoomType = SvxZoomType::PERCENT, sal_uInt16 nVal = 0, sal_uInt16 nWhich = SID_ATTR_ZOOM ); SvxZoomItem( const SvxZoomItem& ); virtual ~SvxZoomItem(); void SetValueSet( sal_uInt16 nValues ) { nValueSet = nValues; } - sal_uInt16 GetValueSet() const { return nValueSet; } + sal_uInt16 GetValueSet() const { return nValueSet; } bool IsValueAllowed( sal_uInt16 nValue ) const { return nValue == ( nValue & nValueSet ); } 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: diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index abe4658a9e09..59bcd4097bc0 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -60,7 +60,7 @@ void ScAppOptions::SetDefaults() eMetric = FUNIT_INCH; // default for others nZoom = 100; - eZoomType = SVX_ZOOM_PERCENT; + eZoomType = SvxZoomType::PERCENT; bSynchronizeZoom = true; nStatusFunc = SUBTOTAL_FUNC_SUM; bAutoComplete = true; diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index dff6fd0f96c9..002a571436bb 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -455,19 +455,19 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( short nVal = ScUnoHelpFunctions::GetInt16FromAny( aValue ); if ( nVal < 0 ) { - SvxZoomType eType = SVX_ZOOM_PERCENT; + SvxZoomType eType = SvxZoomType::PERCENT; switch (nVal) { - case SC_ZOOMVAL_OPTIMAL: eType = SVX_ZOOM_OPTIMAL; break; - case SC_ZOOMVAL_WHOLEPAGE: eType = SVX_ZOOM_WHOLEPAGE; break; - case SC_ZOOMVAL_PAGEWIDTH: eType = SVX_ZOOM_PAGEWIDTH; break; + case SC_ZOOMVAL_OPTIMAL: eType = SvxZoomType::OPTIMAL; break; + case SC_ZOOMVAL_WHOLEPAGE: eType = SvxZoomType::WHOLEPAGE; break; + case SC_ZOOMVAL_PAGEWIDTH: eType = SvxZoomType::PAGEWIDTH; break; } aAppOpt.SetZoomType( eType ); } else if ( nVal >= MINZOOM && nVal <= MAXZOOM ) { aAppOpt.SetZoom( nVal ); - aAppOpt.SetZoomType( SVX_ZOOM_PERCENT ); + aAppOpt.SetZoomType( SvxZoomType::PERCENT ); } bSaveApp = true; } @@ -549,10 +549,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp sal_Int16 nZoomVal = 0; switch ( aAppOpt.GetZoomType() ) { - case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break; - case SVX_ZOOM_OPTIMAL: nZoomVal = SC_ZOOMVAL_OPTIMAL; break; - case SVX_ZOOM_WHOLEPAGE: nZoomVal = SC_ZOOMVAL_WHOLEPAGE; break; - case SVX_ZOOM_PAGEWIDTH: nZoomVal = SC_ZOOMVAL_PAGEWIDTH; break; + case SvxZoomType::PERCENT: nZoomVal = aAppOpt.GetZoom(); break; + case SvxZoomType::OPTIMAL: nZoomVal = SC_ZOOMVAL_OPTIMAL; break; + case SvxZoomType::WHOLEPAGE: nZoomVal = SC_ZOOMVAL_WHOLEPAGE; break; + case SvxZoomType::PAGEWIDTH: nZoomVal = SC_ZOOMVAL_PAGEWIDTH; break; default: { // added to avoid warnings diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 7f7ac0def73d..f60d22cd0cae 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -1472,19 +1472,19 @@ sal_Int16 ScTabViewObj::GetZoomType(void) const SvxZoomType eZoomType = pViewSh->GetViewData().GetView()->GetZoomType(); switch (eZoomType) { - case SVX_ZOOM_PERCENT: + case SvxZoomType::PERCENT: aZoomType = view::DocumentZoomType::BY_VALUE; break; - case SVX_ZOOM_OPTIMAL: + case SvxZoomType::OPTIMAL: aZoomType = view::DocumentZoomType::OPTIMAL; break; - case SVX_ZOOM_WHOLEPAGE: + case SvxZoomType::WHOLEPAGE: aZoomType = view::DocumentZoomType::ENTIRE_PAGE; break; - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::PAGEWIDTH: aZoomType = view::DocumentZoomType::PAGE_WIDTH; break; - case SVX_ZOOM_PAGEWIDTH_NOBORDER: + case SvxZoomType::PAGEWIDTH_NOBORDER: aZoomType = view::DocumentZoomType::PAGE_WIDTH_EXACT; break; } @@ -1504,26 +1504,26 @@ void ScTabViewObj::SetZoomType(sal_Int16 aZoomType) switch (aZoomType) { case view::DocumentZoomType::BY_VALUE: - eZoomType = SVX_ZOOM_PERCENT; + eZoomType = SvxZoomType::PERCENT; break; case view::DocumentZoomType::OPTIMAL: - eZoomType = SVX_ZOOM_OPTIMAL; + eZoomType = SvxZoomType::OPTIMAL; break; case view::DocumentZoomType::ENTIRE_PAGE: - eZoomType = SVX_ZOOM_WHOLEPAGE; + eZoomType = SvxZoomType::WHOLEPAGE; break; case view::DocumentZoomType::PAGE_WIDTH: - eZoomType = SVX_ZOOM_PAGEWIDTH; + eZoomType = SvxZoomType::PAGEWIDTH; break; case view::DocumentZoomType::PAGE_WIDTH_EXACT: - eZoomType = SVX_ZOOM_PAGEWIDTH_NOBORDER; + eZoomType = SvxZoomType::PAGEWIDTH_NOBORDER; break; default: - eZoomType = SVX_ZOOM_OPTIMAL; + eZoomType = SvxZoomType::OPTIMAL; } sal_Int16 nZoom(GetZoom()); sal_Int16 nOldZoom(nZoom); - if ( eZoomType == SVX_ZOOM_PERCENT ) + if ( eZoomType == SvxZoomType::PERCENT ) { if ( nZoom < MINZOOM ) nZoom = MINZOOM; if ( nZoom > MAXZOOM ) nZoom = MAXZOOM; @@ -1533,13 +1533,13 @@ void ScTabViewObj::SetZoomType(sal_Int16 aZoomType) switch ( eZoomType ) { - case SVX_ZOOM_WHOLEPAGE: - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::WHOLEPAGE: + case SvxZoomType::PAGEWIDTH: pView->SetZoomType( eZoomType, true ); break; default: - pView->SetZoomType( SVX_ZOOM_PERCENT, true ); + pView->SetZoomType( SvxZoomType::PERCENT, true ); } SetZoom( nZoom ); } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 6793f201de75..3bc36f77c799 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -117,7 +117,7 @@ void ScPreviewShell::Construct( vcl::Window* pParent ) if (mpFrameWindow) mpFrameWindow->SetCloseHdl(LINK(this, ScPreviewShell, CloseHdl)); - eZoom = SVX_ZOOM_WHOLEPAGE; + eZoom = SvxZoomType::WHOLEPAGE; pCorner = new ScrollBarBox( pParent, WB_SIZEABLE ); @@ -215,9 +215,9 @@ void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) Size aOutSize( rSize ); pPreview->SetPosSizePixel( rPos, aOutSize ); - if ( SVX_ZOOM_WHOLEPAGE == eZoom ) + if ( SvxZoomType::WHOLEPAGE == eZoom ) pPreview->SetZoom( pPreview->GetOptimalZoom(false) ); - else if ( SVX_ZOOM_PAGEWIDTH == eZoom ) + else if ( SvxZoomType::PAGEWIDTH == eZoom ) pPreview->SetZoom( pPreview->GetOptimalZoom(true) ); UpdateNeededScrollBars(); @@ -502,7 +502,7 @@ bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) if ( nNew != nOld ) { - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; pPreview->SetZoom( (sal_uInt16)nNew ); } @@ -627,7 +627,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) sal_uInt16 nZoom = 100; bool bCancel = false; - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; if ( pReqArgs ) { @@ -641,7 +641,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) else { SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM ); - SvxZoomItem aZoomItem( SVX_ZOOM_PERCENT, pPreview->GetZoom(), SID_ATTR_ZOOM ); + SvxZoomItem aZoomItem( SvxZoomType::PERCENT, pPreview->GetZoom(), SID_ATTR_ZOOM ); aSet.Put( aZoomItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -669,11 +669,11 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) { switch ( eZoom ) { - case SVX_ZOOM_OPTIMAL: - case SVX_ZOOM_WHOLEPAGE: + case SvxZoomType::OPTIMAL: + case SvxZoomType::WHOLEPAGE: nZoom = pPreview->GetOptimalZoom(false); break; - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::PAGEWIDTH: nZoom = pPreview->GetOptimalZoom(true); break; default: @@ -692,7 +692,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) sal_uInt16 nNew = pPreview->GetZoom() + 20 ; nNew -= nNew % 20; pPreview->SetZoom( nNew ); - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; rReq.Done(); } break; @@ -701,7 +701,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) sal_uInt16 nNew = pPreview->GetZoom() - 1; nNew -= nNew % 20; pPreview->SetZoom( nNew ); - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; rReq.Done(); } break; @@ -716,7 +716,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) case SID_ATTR_ZOOMSLIDER: { const SfxPoolItem* pItem; - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem*>(pItem)->GetValue(); @@ -933,7 +933,7 @@ void ScPreviewShell::ReadUserData(const OUString& rData, bool /* bBrowse */) sal_Int32 nIndex = 0; pPreview->SetZoom((sal_uInt16)rData.getToken(0, SC_USERDATA_SEP, nIndex).toInt32()); pPreview->SetPageNo(rData.getToken(0, SC_USERDATA_SEP, nIndex).toInt32()); - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; } } diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 5f30db49c821..706856f4cfe0 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -750,7 +750,7 @@ void ScTabView::UpdateVarZoom() // update variable zoom types SvxZoomType eZoomType = GetZoomType(); - if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate ) + if ( eZoomType != SvxZoomType::PERCENT && !bInZoomUpdate ) { bInZoomUpdate = true; const Fraction& rOldX = GetViewData().GetZoomX(); @@ -998,7 +998,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) // scroll wheel doesn't set the AppOptions default bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); - SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); + SetZoomType( SvxZoomType::PERCENT, bSyncZoom ); Fraction aFract( nNew, 100 ); SetZoom( aFract, aFract, bSyncZoom ); PaintGrid(); diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index c79d356065ae..fc9b1a892abd 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -1174,11 +1174,11 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom ) switch ( eType ) { - case SVX_ZOOM_PERCENT: // rZoom ist kein besonderer prozentualer Wert + case SvxZoomType::PERCENT: // rZoom ist kein besonderer prozentualer Wert nZoom = nOldZoom; break; - case SVX_ZOOM_OPTIMAL: // nZoom entspricht der optimalen Gr"o\se + case SvxZoomType::OPTIMAL: // nZoom entspricht der optimalen Gr"o\se { ScMarkData& rMark = aViewData.GetMarkData(); ScDocument* pDoc = aViewData.GetDocument(); @@ -1272,8 +1272,8 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom ) } break; - case SVX_ZOOM_WHOLEPAGE: // nZoom entspricht der ganzen Seite oder - case SVX_ZOOM_PAGEWIDTH: // nZoom entspricht der Seitenbreite + case SvxZoomType::WHOLEPAGE: // nZoom entspricht der ganzen Seite oder + case SvxZoomType::PAGEWIDTH: // nZoom entspricht der Seitenbreite { SCTAB nCurTab = aViewData.GetTabNo(); ScDocument* pDoc = aViewData.GetDocument(); @@ -1340,7 +1340,7 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom ) ( aPageSize.Height() * nPPTY ) ); long nNew = nZoomX; - if (eType == SVX_ZOOM_WHOLEPAGE && nZoomY < nNew) + if (eType == SvxZoomType::WHOLEPAGE && nZoomY < nNew) nNew = nZoomY; nZoom = (sal_uInt16) nNew; diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 8253b37d35df..e7da39649637 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -681,7 +681,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if ( !bCancel ) { - if ( eNewZoomType == SVX_ZOOM_PERCENT ) + if ( eNewZoomType == SvxZoomType::PERCENT ) { if ( nZoom < MINZOOM ) nZoom = MINZOOM; if ( nZoom > MAXZOOM ) nZoom = MAXZOOM; @@ -694,13 +694,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) switch ( eNewZoomType ) { - case SVX_ZOOM_WHOLEPAGE: - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::WHOLEPAGE: + case SvxZoomType::PAGEWIDTH: SetZoomType( eNewZoomType, bSyncZoom ); break; default: - SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); + SetZoomType( SvxZoomType::PERCENT, bSyncZoom ); } } @@ -734,7 +734,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem *>(pItem)->GetValue(); if( nCurrentZoom ) { - SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); + SetZoomType( SvxZoomType::PERCENT, bSyncZoom ); if (!GetViewData().IsPagebreakMode()) { ScAppOptions aNewOpt = pScMod->GetAppOptions(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index f8724ad19942..a943245a69c4 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1718,7 +1718,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, if ( GetViewData().GetDocShell()->IsPreview() ) { // preview for template dialog: always show whole page - SetZoomType( SVX_ZOOM_WHOLEPAGE, true ); // zoom value is recalculated at next Resize + SetZoomType( SvxZoomType::WHOLEPAGE, true ); // zoom value is recalculated at next Resize } else { diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 6c2896db131c..ada241426a08 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -289,7 +289,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) const Fraction& rOldY = GetViewData().GetZoomY(); sal_uInt16 nZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); - rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) ); + rSet.Put( SvxZoomItem( SvxZoomType::PERCENT, nZoom, nWhich ) ); } break; diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 9efad26ee977..db824d56a1cd 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -76,7 +76,7 @@ static bool bMoveArea = false; // Member? sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; // Member! ScViewDataTable::ScViewDataTable() : - eZoomType( SVX_ZOOM_PERCENT ), + eZoomType( SvxZoomType::PERCENT ), aZoomX( 1,1 ), aZoomY( 1,1 ), aPageZoomX( 3,5 ), // Page-Default: 60% @@ -301,7 +301,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) : pOptions ( new ScViewOptions ), pSpellingView ( NULL ), aLogicMode ( MAP_100TH_MM ), - eDefZoomType( SVX_ZOOM_PERCENT ), + eDefZoomType( SvxZoomType::PERCENT ), aDefZoomX ( 1,1 ), aDefZoomY ( 1,1 ), aDefPageZoomX( 3,5 ), 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; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 9256ea270966..40e8a9533ac0 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -595,7 +595,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // make sure aZoom is initialized with a proper value if SetType // doesn't work - SvxZoomItem aZoom( SVX_ZOOM_PERCENT, 100 ); + SvxZoomItem aZoom( SvxZoomType::PERCENT, 100 ); switch (rReq.GetSlot()) { @@ -615,13 +615,13 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) aZoom.SetValue(200); break; case SID_ZOOM_OPTIMAL: - aZoom.SetType( SVX_ZOOM_OPTIMAL ); + aZoom.SetType( SvxZoomType::OPTIMAL ); break; case SID_ZOOM_ENTIRE_PAGE: - aZoom.SetType( SVX_ZOOM_WHOLEPAGE ); + aZoom.SetType( SvxZoomType::WHOLEPAGE ); break; case SID_ZOOM_PAGE_WIDTH: - aZoom.SetType( SVX_ZOOM_PAGEWIDTH ); + aZoom.SetType( SvxZoomType::PAGEWIDTH ); break; } diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index 7ee923c74ff2..a89e590ddf39 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -89,7 +89,7 @@ SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) con { rStrm.WriteUInt16( GetValue() ) .WriteUInt16( nValueSet ) - .WriteSChar( eType ); + .WriteSChar( static_cast<int>(eType) ); return rStrm; } 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: diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 4ab723225359..b50efb208782 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -150,13 +150,13 @@ void SvxZoomStatusBarControl::Command( const CommandEvent& rCEvt ) if ( aPop.Execute( &rStatusbar, rCEvt.GetMousePosPixel() ) && ( nZoom != aPop.GetZoom() || !nZoom ) ) { nZoom = aPop.GetZoom(); - SvxZoomItem aZoom( SVX_ZOOM_PERCENT, nZoom, GetId() ); + SvxZoomItem aZoom( SvxZoomType::PERCENT, nZoom, GetId() ); switch( aPop.GetCurId() ) { - case ZOOM_OPTIMAL: aZoom.SetType( SVX_ZOOM_OPTIMAL ); break; - case ZOOM_PAGE_WIDTH: aZoom.SetType( SVX_ZOOM_PAGEWIDTH ); break; - case ZOOM_WHOLE_PAGE: aZoom.SetType( SVX_ZOOM_WHOLEPAGE ); break; + case ZOOM_OPTIMAL: aZoom.SetType( SvxZoomType::OPTIMAL ); break; + case ZOOM_PAGE_WIDTH: aZoom.SetType( SvxZoomType::PAGEWIDTH ); break; + case ZOOM_WHOLE_PAGE: aZoom.SetType( SvxZoomType::WHOLEPAGE ); break; } ::com::sun::star::uno::Any a; @@ -194,7 +194,7 @@ void SvxZoomPageStatusBarControl::Paint(const UserDrawEvent& rUsrEvt) bool SvxZoomPageStatusBarControl::MouseButtonDown(const MouseEvent&) { - SvxZoomItem aZoom( SVX_ZOOM_WHOLEPAGE, 0, GetId() ); + SvxZoomItem aZoom( SvxZoomType::WHOLEPAGE, 0, GetId() ); ::com::sun::star::uno::Any a; INetURLObject aObj( m_aCommandURL ); diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index d4a7b466ac6d..368a38882390 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -254,7 +254,7 @@ void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom ) { aNewViewOptions.SetZoom( _aNewZoom ); //#i19975# - consider zoom type. - enum SvxZoomType eZoomType = SVX_ZOOM_PERCENT; + enum SvxZoomType eZoomType = SvxZoomType::PERCENT; aNewViewOptions.SetZoomType( eZoomType ); mrParentViewShell.ApplyViewOptions( aNewViewOptions ); } diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 8130678cd9a8..e6e503a459ff 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -504,7 +504,7 @@ void RtfExport::ExportDocument_Impl() Strm().WriteCharPtr(m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr()).WriteCharPtr(SAL_NEWLINE_STRING); // Zoom SwViewShell* pViewShell(pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()); - if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SVX_ZOOM_PERCENT) + if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SvxZoomType::PERCENT) { Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_VIEWSCALE); OutULong(pViewShell->GetViewOptions()->GetZoom()); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index b61b8da529dd..5998a155c285 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -340,9 +340,9 @@ static void WriteDop( WW8Export& rWrt ) { switch ( pViewShell->GetViewOptions()->GetZoomType() ) { - case SVX_ZOOM_WHOLEPAGE: rDop.zkSaved = 1; break; - case SVX_ZOOM_PAGEWIDTH: rDop.zkSaved = 2; break; - case SVX_ZOOM_OPTIMAL: rDop.zkSaved = 3; break; + case SvxZoomType::WHOLEPAGE: rDop.zkSaved = 1; break; + case SvxZoomType::PAGEWIDTH: rDop.zkSaved = 2; break; + case SvxZoomType::OPTIMAL: rDop.zkSaved = 3; break; default: rDop.zkSaved = 0; rDop.wScaleSaved = pViewShell->GetViewOptions()->GetZoom(); break; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3275db852aac..051c866ad984 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1901,10 +1901,10 @@ void SwWW8ImplReader::ImportDop() aViewProps[2].Name = "ZoomType"; //Import zoom type switch (pWDop->zkSaved) { - case 1: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_WHOLEPAGE); break; - case 2: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_PAGEWIDTH); break; - case 3: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_OPTIMAL); break; - default: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_PERCENT); break; + case 1: aViewProps[2].Value <<= sal_Int16(SvxZoomType::WHOLEPAGE); break; + case 2: aViewProps[2].Value <<= sal_Int16(SvxZoomType::PAGEWIDTH); break; + case 3: aViewProps[2].Value <<= sal_Int16(SvxZoomType::OPTIMAL); break; + default: aViewProps[2].Value <<= sal_Int16(SvxZoomType::PERCENT); break; } uno::Reference< uno::XComponentContext > xComponentContext(comphelper::getProcessComponentContext()); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 2650f8cea84b..df8550dc27fa 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -184,7 +184,7 @@ void SwDocShell::ToggleBrowserMode(bool bSet, SwView* _pView ) if( bSet ) { const SvxZoomType eType = (SvxZoomType)rViewOptions.GetZoomType(); - if ( SVX_ZOOM_PERCENT != eType) + if ( SvxZoomType::PERCENT != eType) static_cast<SwView*>(GetView())->SetZoom( eType ); } pTempView->InvalidateBorder(); diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 011e0300f67d..852751667581 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -166,7 +166,7 @@ SwViewOption::SwViewOption() : mbViewLayoutBookMode(false), bShowPlaceHolderFields( true ), nZoom( 100 ), - eZoom( SVX_ZOOM_PERCENT ), + eZoom( SvxZoomType::PERCENT ), nTblDest(TBL_DEST_CELL) { // Initialisation is a little simpler now diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 5c8629535f77..d72438c72246 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -772,7 +772,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) } if( pArgs ) { - enum SvxZoomType eType = SVX_ZOOM_PERCENT; + enum SvxZoomType eType = SvxZoomType::PERCENT; sal_uInt16 nZoomFactor = USHRT_MAX; if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem)) { @@ -794,14 +794,14 @@ void SwPagePreview::Execute( SfxRequest &rReq ) if ( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem *>(pItem)->GetValue(); - SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); + SetZoom( SvxZoomType::PERCENT, nCurrentZoom ); } } break; case SID_ZOOM_IN: case SID_ZOOM_OUT: { - enum SvxZoomType eType = SVX_ZOOM_PERCENT; + enum SvxZoomType eType = SvxZoomType::PERCENT; const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); SetZoom(eType, lcl_GetNextZoomStep(pVOpt->GetZoom(), SID_ZOOM_IN == rReq.GetSlot())); @@ -1726,7 +1726,7 @@ void SwPagePreviewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor, const SvxZoomType _eZoomType ) { // #i19975# consider zoom type - if ( _eZoomType == SVX_ZOOM_WHOLEPAGE ) + if ( _eZoomType == SvxZoomType::WHOLEPAGE ) { mnRow = 1; mnCol = 1; @@ -1798,7 +1798,7 @@ bool SwPagePreview::HandleWheelCommands( const CommandEvent& rCEvt ) if(nFactor > MAX_PREVIEW_ZOOM) nFactor = MAX_PREVIEW_ZOOM; } - SetZoom(SVX_ZOOM_PERCENT, nFactor); + SetZoom(SvxZoomType::PERCENT, nFactor); } bOk = true; } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index e7a6020ff1d7..7d119b63e553 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -811,14 +811,14 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) aUsrPref.setBrowseMode( rDoc.getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE) ); //For the BrowseMode we do not assume a factor. - if( aUsrPref.getBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT ) + if( aUsrPref.getBrowseMode() && aUsrPref.GetZoomType() != SvxZoomType::PERCENT ) { - aUsrPref.SetZoomType( SVX_ZOOM_PERCENT ); + aUsrPref.SetZoomType( SvxZoomType::PERCENT ); aUsrPref.SetZoom( 100 ); } if(pDocSh->IsPreview()) { - aUsrPref.SetZoomType( SVX_ZOOM_WHOLEPAGE ); + aUsrPref.SetZoomType( SvxZoomType::WHOLEPAGE ); aUsrPref.SetViewLayoutBookMode( false ); aUsrPref.SetViewLayoutColumns( 1 ); } @@ -1159,7 +1159,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) eZoom = (SvxZoomType) (sal_uInt16)rUserData.getToken(nOff, ';', nPos ).toInt32(); else { - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; ++nOff; } @@ -1342,7 +1342,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > eZoom = static_cast < SvxZoomType > ( nZoomType ); else { - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; } if (bGotIsSelectedFrame) { @@ -1405,7 +1405,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > const bool bZoomNeedsViewLayout = bSetViewLayoutSettings && 1 < nViewLayoutColumns && bSetViewSettings && - eZoom != SVX_ZOOM_PERCENT; + eZoom != SvxZoomType::PERCENT; if ( !bZoomNeedsViewLayout ) m_pWrtShell->StartAction(); diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 1c7bf5cbecce..7379cf3dd6d2 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -229,7 +229,7 @@ void SwView::RecheckBrowseMode() CheckVisArea(); SvxZoomType eType; - if( GetWrtShell().GetViewOptions()->getBrowseMode() && SVX_ZOOM_PERCENT != (eType = (SvxZoomType) + if( GetWrtShell().GetViewOptions()->getBrowseMode() && SvxZoomType::PERCENT != (eType = (SvxZoomType) GetWrtShell().GetViewOptions()->GetZoomType()) ) SetZoom( eType ); InvalidateBorder(); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 54776c6d4b4f..2bb5d4408795 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1769,7 +1769,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem )) { const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem *>(pItem)->GetValue(); - SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); + SetZoom( SvxZoomType::PERCENT, nCurrentZoom ); } bUp = true; diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 052b8370bbb0..4116e7ee1d36 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -88,7 +88,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, const SwViewOption *pOpt = m_pWrtShell->GetViewOptions(); long lLeftMargin = 0; - if( eZoomType != SVX_ZOOM_PERCENT ) + if( eZoomType != SvxZoomType::PERCENT ) { const bool bAutomaticViewLayout = 0 == pOpt->GetViewLayoutColumns(); @@ -111,14 +111,14 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, aPageSize.Width() += std::abs( long(rLeftLRSpace.GetLeft()) - long(rLRSpace.GetLeft()) ); } - if( SVX_ZOOM_OPTIMAL == eZoomType ) + if( SvxZoomType::OPTIMAL == eZoomType ) { if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes()) aPageSize.Width() -= ( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 ); lLeftMargin = long(rLRSpace.GetLeft()) + DOCUMENTBORDER + nLeftOfst; nFac = aWindowSize.Width() * 100 / aPageSize.Width(); } - else if(SVX_ZOOM_WHOLEPAGE == eZoomType || SVX_ZOOM_PAGEWIDTH == eZoomType ) + else if(SvxZoomType::WHOLEPAGE == eZoomType || SvxZoomType::PAGEWIDTH == eZoomType ) { const long nOf = DOCUMENTBORDER * 2L; long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width(); @@ -126,7 +126,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, aPageSize.Height() += nOf; nFac = aWindowSize.Width() * 100 / nTmpWidth; - if ( SVX_ZOOM_WHOLEPAGE == eZoomType ) + if ( SvxZoomType::WHOLEPAGE == eZoomType ) { long nVisPercent = aWindowSize.Height() * 100 / aPageSize.Height(); nFac = std::min( nFac, nVisPercent ); @@ -161,11 +161,11 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, aOpt.SetReadonly(pOpt->IsReadonly()); m_pWrtShell->ApplyViewOptions( aOpt ); } - if ( eZoomType != SVX_ZOOM_PERCENT ) + if ( eZoomType != SvxZoomType::PERCENT ) { Point aPos; - if ( eZoomType == SVX_ZOOM_WHOLEPAGE ) + if ( eZoomType == SvxZoomType::WHOLEPAGE ) aPos.Y() = m_pWrtShell->GetAnyCurRect(RECT_PAGE).Top() - DOCUMENTBORDER; else { diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 868072865ad3..04773149ddce 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -69,15 +69,15 @@ bool SwView::IsDocumentBorder() return false; return m_pWrtShell->GetViewOptions()->getBrowseMode() || - SVX_ZOOM_PAGEWIDTH_NOBORDER == (SvxZoomType)m_pWrtShell->GetViewOptions()->GetZoomType(); + SvxZoomType::PAGEWIDTH_NOBORDER == (SvxZoomType)m_pWrtShell->GetViewOptions()->GetZoomType(); } inline long GetLeftMargin( SwView &rView ) { SvxZoomType eType = (SvxZoomType)rView.GetWrtShell().GetViewOptions()->GetZoomType(); long lRet = rView.GetWrtShell().GetAnyCurRect(RECT_PAGE_PRT).Left(); - return eType == SVX_ZOOM_PERCENT ? lRet + DOCUMENTBORDER : - eType == SVX_ZOOM_PAGEWIDTH || eType == SVX_ZOOM_PAGEWIDTH_NOBORDER ? 0 : + return eType == SvxZoomType::PERCENT ? lRet + DOCUMENTBORDER : + eType == SvxZoomType::PAGEWIDTH || eType == SvxZoomType::PAGEWIDTH_NOBORDER ? 0 : lRet + DOCUMENTBORDER + nLeftOfst; } @@ -1103,7 +1103,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) pDocSh->SetVisArea( pDocSh->SfxInPlaceObject::GetVisArea() );*/ - if ( m_pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT && + if ( m_pWrtShell->GetViewOptions()->GetZoomType() != SvxZoomType::PERCENT && !m_pWrtShell->GetViewOptions()->getBrowseMode() ) _SetZoom( aEditSz, (SvxZoomType)m_pWrtShell->GetViewOptions()->GetZoomType(), 100, true ); m_pWrtShell->EndAction(); @@ -1139,7 +1139,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY ) { const Fraction &rFrac = rX < rY ? rX : rY; - SetZoom( SVX_ZOOM_PERCENT, (short) long(rFrac * Fraction( 100, 1 )) ); + SetZoom( SvxZoomType::PERCENT, (short) long(rFrac * Fraction( 100, 1 )) ); // To minimize rounding errors we also adjust the odd values // of the base class if necessary. @@ -1202,7 +1202,7 @@ bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) else nFact = std::min( (long) 600, basegfx::zoomtools::zoomIn( nFact )); - SetZoom( SVX_ZOOM_PERCENT, nFact ); + SetZoom( SvxZoomType::PERCENT, nFact ); bOk = true; } else if (pWData && CommandWheelMode::ZOOM_SCALE == pWData->GetMode()) @@ -1228,7 +1228,7 @@ bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) if(zoomTarget!=preZoomByVCL) { - SetZoom( SVX_ZOOM_PERCENT, zoomTarget ); + SetZoom( SvxZoomType::PERCENT, zoomTarget ); } // we move to the center, and add additional tilt from center const Point & postZoomTargetCenterInPixels = GetEditWin().LogicToPixel(preZoomTargetCenterInLogic); diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 477a9e49842e..52444be8911a 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -680,19 +680,19 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c switch (nZoom) { case view::DocumentZoomType::OPTIMAL: - eZoom = SVX_ZOOM_OPTIMAL; + eZoom = SvxZoomType::OPTIMAL; break; case view::DocumentZoomType::PAGE_WIDTH: - eZoom = SVX_ZOOM_PAGEWIDTH; + eZoom = SvxZoomType::PAGEWIDTH; break; case view::DocumentZoomType::ENTIRE_PAGE: - eZoom = SVX_ZOOM_WHOLEPAGE; + eZoom = SvxZoomType::WHOLEPAGE; break; case view::DocumentZoomType::BY_VALUE: - eZoom = SVX_ZOOM_PERCENT; + eZoom = SvxZoomType::PERCENT; break; case view::DocumentZoomType::PAGE_WIDTH_EXACT: - eZoom = SVX_ZOOM_PAGEWIDTH_NOBORDER; + eZoom = SvxZoomType::PAGEWIDTH_NOBORDER; break; default: throw IllegalArgumentException( @@ -882,19 +882,19 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u sal_Int16 nRet(0); switch (mpConstViewOption->GetZoomType()) { - case SVX_ZOOM_OPTIMAL: + case SvxZoomType::OPTIMAL: nRet = view::DocumentZoomType::OPTIMAL; break; - case SVX_ZOOM_PAGEWIDTH: + case SvxZoomType::PAGEWIDTH: nRet = view::DocumentZoomType::PAGE_WIDTH; break; - case SVX_ZOOM_WHOLEPAGE: + case SvxZoomType::WHOLEPAGE: nRet = view::DocumentZoomType::ENTIRE_PAGE; break; - case SVX_ZOOM_PERCENT: + case SvxZoomType::PERCENT: nRet = view::DocumentZoomType::BY_VALUE; break; - case SVX_ZOOM_PAGEWIDTH_NOBORDER: + case SvxZoomType::PAGEWIDTH_NOBORDER: nRet = view::DocumentZoomType::PAGE_WIDTH_EXACT; break; default: |