diff options
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/dstribut.hxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/dstribut.cxx | 20 | ||||
-rw-r--r-- | include/svx/dstribut_enum.hxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 12 |
5 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 109e7c136e6c..c1f3644801b2 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -929,7 +929,7 @@ AbstractSvxCaptionDialog* AbstractDialogFactory_Impl::CreateCaptionDialog( AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeDialog(const SfxItemSet& rAttr) { - VclPtrInstance<SvxDistributeDialog> pDlg( nullptr, rAttr, SvxDistributeHorizontalNone, SvxDistributeVertical::NONE); + VclPtrInstance<SvxDistributeDialog> pDlg( nullptr, rAttr, SvxDistributeHorizontal::NONE, SvxDistributeVertical::NONE); return new AbstractSvxDistributeDialog_Impl( pDlg ); } diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx index 0e87c903710a..9f478f6bf2f7 100644 --- a/cui/source/inc/dstribut.hxx +++ b/cui/source/inc/dstribut.hxx @@ -42,7 +42,7 @@ class SvxDistributePage : public SvxTabPage public: SvxDistributePage(vcl::Window* pWindow, const SfxItemSet& rInAttrs, - SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, + SvxDistributeHorizontal eHor = SvxDistributeHorizontal::NONE, SvxDistributeVertical eVer = SvxDistributeVertical::NONE); virtual ~SvxDistributePage(); virtual void dispose() override; @@ -61,7 +61,7 @@ class SvxDistributeDialog : public SfxSingleTabDialog public: SvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr, - SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, + SvxDistributeHorizontal eHor = SvxDistributeHorizontal::NONE, SvxDistributeVertical eVer = SvxDistributeVertical::NONE); virtual ~SvxDistributeDialog(); virtual void dispose() override; diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index de3f64b92570..574468a1e98c 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -120,11 +120,11 @@ void SvxDistributePage::Reset(const SfxItemSet* ) switch(m_eDistributeHor) { - case SvxDistributeHorizontalNone : m_pBtnHorNone->SetState(true); break; - case SvxDistributeHorizontalLeft : m_pBtnHorLeft->SetState(true); break; - case SvxDistributeHorizontalCenter : m_pBtnHorCenter->SetState(true); break; - case SvxDistributeHorizontalDistance : m_pBtnHorDistance->SetState(true); break; - case SvxDistributeHorizontalRight : m_pBtnHorRight->SetState(true); break; + case SvxDistributeHorizontal::NONE : m_pBtnHorNone->SetState(true); break; + case SvxDistributeHorizontal::Left : m_pBtnHorLeft->SetState(true); break; + case SvxDistributeHorizontal::Center : m_pBtnHorCenter->SetState(true); break; + case SvxDistributeHorizontal::Distance : m_pBtnHorDistance->SetState(true); break; + case SvxDistributeHorizontal::Right : m_pBtnHorRight->SetState(true); break; } m_pBtnVerNone->SetState(false); @@ -151,17 +151,17 @@ void SvxDistributePage::Reset(const SfxItemSet* ) bool SvxDistributePage::FillItemSet( SfxItemSet* ) { - SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone); + SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontal::NONE); SvxDistributeVertical eDistributeVer(SvxDistributeVertical::NONE); if(m_pBtnHorLeft->IsChecked()) - eDistributeHor = SvxDistributeHorizontalLeft; + eDistributeHor = SvxDistributeHorizontal::Left; else if(m_pBtnHorCenter->IsChecked()) - eDistributeHor = SvxDistributeHorizontalCenter; + eDistributeHor = SvxDistributeHorizontal::Center; else if(m_pBtnHorDistance->IsChecked()) - eDistributeHor = SvxDistributeHorizontalDistance; + eDistributeHor = SvxDistributeHorizontal::Distance; else if(m_pBtnHorRight->IsChecked()) - eDistributeHor = SvxDistributeHorizontalRight; + eDistributeHor = SvxDistributeHorizontal::Right; if(m_pBtnVerTop->IsChecked()) eDistributeVer = SvxDistributeVertical::Top; diff --git a/include/svx/dstribut_enum.hxx b/include/svx/dstribut_enum.hxx index 85315ac72f8f..a69e6f10ecb6 100644 --- a/include/svx/dstribut_enum.hxx +++ b/include/svx/dstribut_enum.hxx @@ -19,13 +19,13 @@ #ifndef INCLUDED_SVX_DSTRIBUT_ENUM_HXX #define INCLUDED_SVX_DSTRIBUT_ENUM_HXX -enum SvxDistributeHorizontal +enum class SvxDistributeHorizontal { - SvxDistributeHorizontalNone = 0, - SvxDistributeHorizontalLeft, - SvxDistributeHorizontalCenter, - SvxDistributeHorizontalDistance, - SvxDistributeHorizontalRight + NONE = 0, + Left, + Center, + Distance, + Right }; enum class SvxDistributeVertical diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 151a97407db0..b4469e7e4796 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -788,7 +788,7 @@ void SdrEditView::DistributeMarkedObjects() if( bUndo ) BegUndo(); - if(eHor != SvxDistributeHorizontalNone) + if(eHor != SvxDistributeHorizontal::NONE) { // build sorted entry list nFullLength = 0L; @@ -802,24 +802,24 @@ void SdrEditView::DistributeMarkedObjects() switch(eHor) { - case SvxDistributeHorizontalLeft: + case SvxDistributeHorizontal::Left: { pNew->mnPos = pNew->mpObj->GetSnapRect().Left(); break; } - case SvxDistributeHorizontalCenter: + case SvxDistributeHorizontal::Center: { pNew->mnPos = (pNew->mpObj->GetSnapRect().Right() + pNew->mpObj->GetSnapRect().Left()) / 2; break; } - case SvxDistributeHorizontalDistance: + case SvxDistributeHorizontal::Distance: { pNew->mnLength = pNew->mpObj->GetSnapRect().GetWidth() + 1; nFullLength += pNew->mnLength; pNew->mnPos = (pNew->mpObj->GetSnapRect().Right() + pNew->mpObj->GetSnapRect().Left()) / 2; break; } - case SvxDistributeHorizontalRight: + case SvxDistributeHorizontal::Right: { pNew->mnPos = pNew->mpObj->GetSnapRect().Right(); break; @@ -837,7 +837,7 @@ void SdrEditView::DistributeMarkedObjects() aEntryList.push_back( pNew ); } - if(eHor == SvxDistributeHorizontalDistance) + if(eHor == SvxDistributeHorizontal::Distance) { // calculate room in-between sal_Int32 nWidth = GetAllMarkedBoundRect().GetWidth() + 1; |