diff options
38 files changed, 423 insertions, 415 deletions
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 369f6d442435..5764328bb5d5 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -54,7 +54,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang long nSizX(0); long nSizY(0); - RECT_POINT eRP = (RECT_POINT)RP_LT; + RectPoint eRP = RectPoint::LT; const SfxPoolItem* pPoolItem=nullptr; //read position @@ -68,37 +68,37 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue(); if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)) - eRP=(RECT_POINT)static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue(); + eRP=(RectPoint)static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue(); switch( eRP ) { - case RP_LT: + case RectPoint::LT: break; - case RP_MT: + case RectPoint::MT: nPosX += ( rOriginalSize.Width - nSizX ) / 2; break; - case RP_RT: + case RectPoint::RT: nPosX += rOriginalSize.Width - nSizX; break; - case RP_LM: + case RectPoint::LM: nPosY += ( rOriginalSize.Height - nSizY ) / 2; break; - case RP_MM: + case RectPoint::MM: nPosX += ( rOriginalSize.Width - nSizX ) / 2; nPosY += ( rOriginalSize.Height - nSizY ) / 2; break; - case RP_RM: + case RectPoint::RM: nPosX += rOriginalSize.Width - nSizX; nPosY += ( rOriginalSize.Height - nSizY ) / 2; break; - case RP_LB: + case RectPoint::LB: nPosY += rOriginalSize.Height - nSizY; break; - case RP_MB: + case RectPoint::MB: nPosX += ( rOriginalSize.Width - nSizX ) / 2; nPosY += rOriginalSize.Height - nSizY; break; - case RP_RB: + case RectPoint::RB: nPosX += rOriginalSize.Width - nSizX; nPosY += rOriginalSize.Height - nSizY; break; diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 1a8774ba9219..76f4698ce5c6 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -521,7 +521,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double void EmbossControl::MouseButtonDown( const MouseEvent& rEvt ) { - const RECT_POINT eOldRP = GetActualRP(); + const RectPoint eOldRP = GetActualRP(); SvxRectCtl::MouseButtonDown( rEvt ); @@ -540,7 +540,7 @@ VCL_BUILDER_FACTORY(EmbossControl) GraphicFilterEmboss::GraphicFilterEmboss(vcl::Window* pParent, - const Graphic& rGraphic, RECT_POINT eLightSource) + const Graphic& rGraphic, RectPoint eLightSource) : GraphicFilterDialog (pParent, "EmbossDialog", "cui/ui/embossdialog.ui", rGraphic) { @@ -573,15 +573,15 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double { default: OSL_FAIL("svx::GraphicFilterEmboss::GetFilteredGraphic(), unknown Reference Point!" ); SAL_FALLTHROUGH; - case RP_LT: nAzim = 4500; nElev = 4500; break; - case RP_MT: nAzim = 9000; nElev = 4500; break; - case RP_RT: nAzim = 13500; nElev = 4500; break; - case RP_LM: nAzim = 0; nElev = 4500; break; - case RP_MM: nAzim = 0; nElev = 9000; break; - case RP_RM: nAzim = 18000; nElev = 4500; break; - case RP_LB: nAzim = 31500; nElev = 4500; break; - case RP_MB: nAzim = 27000; nElev = 4500; break; - case RP_RB: nAzim = 22500; nElev = 4500; break; + case RectPoint::LT: nAzim = 4500; nElev = 4500; break; + case RectPoint::MT: nAzim = 9000; nElev = 4500; break; + case RectPoint::RT: nAzim = 13500; nElev = 4500; break; + case RectPoint::LM: nAzim = 0; nElev = 4500; break; + case RectPoint::MM: nAzim = 0; nElev = 9000; break; + case RectPoint::RM: nAzim = 18000; nElev = 4500; break; + case RectPoint::LB: nAzim = 31500; nElev = 4500; break; + case RectPoint::MB: nAzim = 27000; nElev = 4500; break; + case RectPoint::RB: nAzim = 22500; nElev = 4500; break; } BmpFilterParam aParam( nAzim, nElev ); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index f45c32eeddc3..7010cfc0af19 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1223,7 +1223,7 @@ AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::W AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (vcl::Window* pParent, const Graphic& rGraphic, - RECT_POINT eLightSource) + RectPoint eLightSource) { VclPtrInstance<GraphicFilterEmboss> pDlg( pParent, rGraphic, eLightSource ); return new AbstractGraphicFilterDialog_Impl( pDlg ); diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 57355f660a95..a1441f6a326d 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -571,7 +571,7 @@ public: sal_Int16 nInitialContext, const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) override; virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(vcl::Window* pParent, - const Graphic& rGraphic, RECT_POINT eLightSource) override; + const Graphic& rGraphic, RectPoint eLightSource) override; virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(vcl::Window* pParent, const Graphic& rGraphic, sal_uInt16 nCount) override; virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (vcl::Window* pParent, diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index c668a12e9e4b..8ba8411af948 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -55,7 +55,7 @@ public: virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void FillUserData() override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; /// Shift-ListBox activation void ShowSelector(); diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index db4b0a384eec..57b73e3473fe 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -199,7 +199,7 @@ private: VclPtr<EmbossControl> mpCtlLight; public: GraphicFilterEmboss( vcl::Window* pParent, const Graphic& rGraphic, - RECT_POINT eLightSource ); + RectPoint eLightSource ); virtual ~GraphicFilterEmboss(); virtual void dispose() override; diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index ed510c092f99..d3cefc5bf62a 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -133,7 +133,7 @@ class SvxTransparenceTabPage : public SvxTabPage static const sal_uInt16 pTransparenceRanges[]; const SfxItemSet& rOutAttrs; - RECT_POINT eRP; + RectPoint eRP; PageType nPageType; sal_uInt16 nDlgType; @@ -195,7 +195,7 @@ public: virtual void ChangesApplied() override; virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - virtual void PointChanged(vcl::Window* pWindow, RECT_POINT eRP) override; + virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override; void SetPageType(PageType nInType) { nPageType = nInType; } void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; } @@ -221,7 +221,7 @@ private: VclPtr<SvxXRectPreview> m_pCtlXRectPreview; const SfxItemSet& m_rOutAttrs; - RECT_POINT m_eRP; + RectPoint m_eRP; XColorListRef m_pColorList; XGradientListRef m_pGradientList; @@ -281,7 +281,7 @@ public: virtual void ChangesApplied() override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetGradientList( XGradientListRef const & pGrdLst) @@ -318,7 +318,7 @@ private: VclPtr<SvxXShadowPreview> m_pCtlXRectPreview; const SfxItemSet& m_rOutAttrs; - RECT_POINT m_eRP; + RectPoint m_eRP; XColorListRef m_pColorList; ChangeType* m_pnColorListState; @@ -347,7 +347,7 @@ public: virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetPageType( PageType nInType ) { m_nPageType = nInType; } @@ -511,7 +511,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetHatchingList( XHatchListRef const & pHtchLst) @@ -608,7 +608,7 @@ public: virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; } @@ -679,7 +679,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; } diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 639e5117598c..e95919925504 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -146,7 +146,7 @@ private: bool m_bSymbols; const SfxItemSet& m_rOutAttrs; - RECT_POINT m_eRP; + RectPoint m_eRP; bool m_bObjSelected; XLineAttrSetItem m_aXLineAttr; @@ -217,7 +217,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; virtual void FillUserData() override; diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx index 9f478f6bf2f7..abe0e3fde48a 100644 --- a/cui/source/inc/dstribut.hxx +++ b/cui/source/inc/dstribut.hxx @@ -49,7 +49,7 @@ public: virtual bool FillItemSet(SfxItemSet*) override; virtual void Reset(const SfxItemSet*) override; - virtual void PointChanged(vcl::Window* pWindow, RECT_POINT eRP) override; + virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override; SvxDistributeHorizontal GetDistributeHor() const { return m_eDistributeHor; } SvxDistributeVertical GetDistributeVer() const { return m_eDistributeVer; } diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index 184ad5cca81e..50418d3dc2e5 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -78,7 +78,7 @@ public: virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index a826b2fedf96..931727bc8666 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -90,7 +90,7 @@ public: virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void Construct(); void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; } diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 7e9077758e54..80a5ff14ee84 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -121,7 +121,7 @@ private: // #i75273# double mfOldWidth; double mfOldHeight; - RECT_POINT meRP; + RectPoint meRP; DECL_LINK_TYPED( ChangePosProtectHdl, Button*, void ); @@ -149,7 +149,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void Construct(); void SetView( const SdrView* pSdrView ) { mpView = pSdrView; } @@ -207,7 +207,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } @@ -260,7 +260,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 906f1649d272..535074e71325 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -931,7 +931,7 @@ DeactivateRC SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet ) return DeactivateRC::LeavePage; } -void SvxBackgroundTabPage::PointChanged( vcl::Window* , RECT_POINT ) +void SvxBackgroundTabPage::PointChanged( vcl::Window* , RectPoint ) { // has to be implemented so that position control can work } @@ -1083,19 +1083,19 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos ) { m_pBtnPosition->Check(); m_pWndPosition->Enable(); - RECT_POINT eNewPos = RP_MM; + RectPoint eNewPos = RectPoint::MM; switch ( ePos ) { case GPOS_MM: break; - case GPOS_LT: eNewPos = RP_LT; break; - case GPOS_MT: eNewPos = RP_MT; break; - case GPOS_RT: eNewPos = RP_RT; break; - case GPOS_LM: eNewPos = RP_LM; break; - case GPOS_RM: eNewPos = RP_RM; break; - case GPOS_LB: eNewPos = RP_LB; break; - case GPOS_MB: eNewPos = RP_MB; break; - case GPOS_RB: eNewPos = RP_RB; break; + case GPOS_LT: eNewPos = RectPoint::LT; break; + case GPOS_MT: eNewPos = RectPoint::MT; break; + case GPOS_RT: eNewPos = RectPoint::RT; break; + case GPOS_LM: eNewPos = RectPoint::LM; break; + case GPOS_RM: eNewPos = RectPoint::RM; break; + case GPOS_LB: eNewPos = RectPoint::LB; break; + case GPOS_MB: eNewPos = RectPoint::MB; break; + case GPOS_RB: eNewPos = RectPoint::RB; break; default: ;//prevent warning } m_pWndPosition->SetActualRP( eNewPos ); @@ -1115,15 +1115,15 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() { switch ( m_pWndPosition->GetActualRP() ) { - case RP_LT: return GPOS_LT; - case RP_MT: return GPOS_MT; - case RP_RT: return GPOS_RT; - case RP_LM: return GPOS_LM; - case RP_MM: return GPOS_MM; - case RP_RM: return GPOS_RM; - case RP_LB: return GPOS_LB; - case RP_MB: return GPOS_MB; - case RP_RB: return GPOS_RB; + case RectPoint::LT: return GPOS_LT; + case RectPoint::MT: return GPOS_MT; + case RectPoint::RT: return GPOS_RT; + case RectPoint::LM: return GPOS_LM; + case RectPoint::MM: return GPOS_MM; + case RectPoint::RM: return GPOS_RM; + case RectPoint::LB: return GPOS_LB; + case RectPoint::MB: return GPOS_MB; + case RectPoint::RB: return GPOS_RB; } } return GPOS_MM; diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index 574468a1e98c..d50a60f72c00 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -100,7 +100,7 @@ void SvxDistributePage::dispose() } -void SvxDistributePage::PointChanged(vcl::Window* /*pWindow*/, RECT_POINT /*eRP*/) +void SvxDistributePage::PointChanged(vcl::Window* /*pWindow*/, RectPoint /*eRP*/) { } diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 714a362af017..6da107c1c4ab 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -349,43 +349,43 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) static_cast<const SdrMeasureTextHPosItem&>( rAttrs->Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); - RECT_POINT eRP = RP_MM; + RectPoint eRP = RectPoint::MM; switch( eVPos ) { case SdrMeasureTextVPos::Above: switch( eHPos ) { - case SdrMeasureTextHPos::LeftOutside: eRP = RP_LT; break; - case SdrMeasureTextHPos::Inside: eRP = RP_MT; break; - case SdrMeasureTextHPos::RightOutside: eRP = RP_RT; break; - case SdrMeasureTextHPos::Auto: eRP = RP_MT; break; + case SdrMeasureTextHPos::LeftOutside: eRP = RectPoint::LT; break; + case SdrMeasureTextHPos::Inside: eRP = RectPoint::MT; break; + case SdrMeasureTextHPos::RightOutside: eRP = RectPoint::RT; break; + case SdrMeasureTextHPos::Auto: eRP = RectPoint::MT; break; } break; case SdrMeasureTextVPos::VerticalCentered: switch( eHPos ) { - case SdrMeasureTextHPos::LeftOutside: eRP = RP_LM; break; - case SdrMeasureTextHPos::Inside: eRP = RP_MM; break; - case SdrMeasureTextHPos::RightOutside: eRP = RP_RM; break; - case SdrMeasureTextHPos::Auto: eRP = RP_MM; break; + case SdrMeasureTextHPos::LeftOutside: eRP = RectPoint::LM; break; + case SdrMeasureTextHPos::Inside: eRP = RectPoint::MM; break; + case SdrMeasureTextHPos::RightOutside: eRP = RectPoint::RM; break; + case SdrMeasureTextHPos::Auto: eRP = RectPoint::MM; break; } break; case SdrMeasureTextVPos::Below: switch( eHPos ) { - case SdrMeasureTextHPos::LeftOutside: eRP = RP_LB; break; - case SdrMeasureTextHPos::Inside: eRP = RP_MB; break; - case SdrMeasureTextHPos::RightOutside: eRP = RP_RB; break; - case SdrMeasureTextHPos::Auto: eRP = RP_MB; break; + case SdrMeasureTextHPos::LeftOutside: eRP = RectPoint::LB; break; + case SdrMeasureTextHPos::Inside: eRP = RectPoint::MB; break; + case SdrMeasureTextHPos::RightOutside: eRP = RectPoint::RB; break; + case SdrMeasureTextHPos::Auto: eRP = RectPoint::MB; break; } break; case SdrMeasureTextVPos::Auto: switch( eHPos ) { - case SdrMeasureTextHPos::LeftOutside: eRP = RP_LM; break; - case SdrMeasureTextHPos::Inside: eRP = RP_MM; break; - case SdrMeasureTextHPos::RightOutside: eRP = RP_RM; break; - case SdrMeasureTextHPos::Auto: eRP = RP_MM; break; + case SdrMeasureTextHPos::LeftOutside: eRP = RectPoint::LM; break; + case SdrMeasureTextHPos::Inside: eRP = RectPoint::MM; break; + case SdrMeasureTextHPos::RightOutside: eRP = RectPoint::RM; break; + case SdrMeasureTextHPos::Auto: eRP = RectPoint::MM; break; } break; default: ;//prevent warning @@ -521,27 +521,27 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) SdrMeasureTextVPos eVPos, eOldVPos; SdrMeasureTextHPos eHPos, eOldHPos; - RECT_POINT eRP = m_pCtlPosition->GetActualRP(); + RectPoint eRP = m_pCtlPosition->GetActualRP(); switch( eRP ) { default: - case RP_LT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::LT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_LM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::LM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_LB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::LB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_MT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::MT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_MM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::MM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_MB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::MB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_RT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::RT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::RightOutside; break; - case RP_RM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::RM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::RightOutside; break; - case RP_RB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::RB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::RightOutside; break; } if( m_pTsbAutoPosH->GetState() == TRISTATE_TRUE ) @@ -607,7 +607,7 @@ VclPtr<SfxTabPage> SvxMeasurePage::Create( vcl::Window* pWindow, return VclPtr<SvxMeasurePage>::Create( pWindow, *rAttrs ); } -void SvxMeasurePage::PointChanged( vcl::Window* pWindow, RECT_POINT /*eRP*/ ) +void SvxMeasurePage::PointChanged( vcl::Window* pWindow, RectPoint /*eRP*/ ) { ChangeAttrHdl_Impl( pWindow ); } @@ -618,19 +618,19 @@ IMPL_LINK_TYPED( SvxMeasurePage, ClickAutoPosHdl_Impl, Button*, p, void ) { switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: - case RP_RT: - m_pCtlPosition->SetActualRP( RP_MT ); + case RectPoint::LT: + case RectPoint::RT: + m_pCtlPosition->SetActualRP( RectPoint::MT ); break; - case RP_LM: - case RP_RM: - m_pCtlPosition->SetActualRP( RP_MM ); + case RectPoint::LM: + case RectPoint::RM: + m_pCtlPosition->SetActualRP( RectPoint::MM ); break; - case RP_LB: - case RP_RB: - m_pCtlPosition->SetActualRP( RP_MB ); + case RectPoint::LB: + case RectPoint::RB: + m_pCtlPosition->SetActualRP( RectPoint::MB ); break; default: ;//prevent warning } @@ -639,19 +639,19 @@ IMPL_LINK_TYPED( SvxMeasurePage, ClickAutoPosHdl_Impl, Button*, p, void ) { switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: - case RP_LB: - m_pCtlPosition->SetActualRP( RP_LM ); + case RectPoint::LT: + case RectPoint::LB: + m_pCtlPosition->SetActualRP( RectPoint::LM ); break; - case RP_MT: - case RP_MB: - m_pCtlPosition->SetActualRP( RP_MM ); + case RectPoint::MT: + case RectPoint::MB: + m_pCtlPosition->SetActualRP( RectPoint::MM ); break; - case RP_RT: - case RP_RB: - m_pCtlPosition->SetActualRP( RP_RM ); + case RectPoint::RT: + case RectPoint::RB: + m_pCtlPosition->SetActualRP( RectPoint::RM ); break; default: ;//prevent warning } @@ -747,30 +747,30 @@ void SvxMeasurePage::ChangeAttrHdl_Impl( void* p ) bPositionModified = true; // Position - RECT_POINT eRP = m_pCtlPosition->GetActualRP(); + RectPoint eRP = m_pCtlPosition->GetActualRP(); SdrMeasureTextVPos eVPos; SdrMeasureTextHPos eHPos; switch( eRP ) { default: - case RP_LT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::LT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_LM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::LM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_LB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::LB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::LeftOutside; break; - case RP_MT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::MT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_MM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::MM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_MB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::MB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::Inside; break; - case RP_RT: eVPos = SdrMeasureTextVPos::Above; + case RectPoint::RT: eVPos = SdrMeasureTextVPos::Above; eHPos = SdrMeasureTextHPos::RightOutside; break; - case RP_RM: eVPos = SdrMeasureTextVPos::VerticalCentered; + case RectPoint::RM: eVPos = SdrMeasureTextVPos::VerticalCentered; eHPos = SdrMeasureTextHPos::RightOutside; break; - case RP_RB: eVPos = SdrMeasureTextVPos::Below; + case RectPoint::RB: eVPos = SdrMeasureTextVPos::Below; eHPos = SdrMeasureTextHPos::RightOutside; break; } diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index fabedc8b0e32..7c03cf4a11b2 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -916,7 +916,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), (sal_uInt32) nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() - rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), RP_LT ) ); + rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), (sal_uInt16)RectPoint::LT ) ); bModified = true; } diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 4da31e4b6158..a53b3695b12f 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -79,7 +79,7 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr get(m_pMtrFldBottom,"MTR_FLD_BOTTOM"); get(m_pFlPosition,"FL_POSITION"); get(m_pCtlPosition,"CTL_POSITION"); - m_pCtlPosition->SetControlSettings(RP_MM, 240, 100); + m_pCtlPosition->SetControlSettings(RectPoint::MM, 240, 100); get(m_pTsbFullWidth,"TSB_FULL_WIDTH"); @@ -238,7 +238,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // VertAdjust and HorAdjust are unequivocal, thus SdrTextVertAdjust eTVA = (SdrTextVertAdjust)static_cast<const SdrTextVertAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)static_cast<const SdrTextHorzAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); - RECT_POINT eRP = RP_LB; + RectPoint eRP = RectPoint::LB; m_pTsbFullWidth->EnableTriState( false ); @@ -249,10 +249,10 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) { switch (eTHA) { - case SDRTEXTHORZADJUST_LEFT: eRP = RP_LT; break; + case SDRTEXTHORZADJUST_LEFT: eRP = RectPoint::LT; break; case SDRTEXTHORZADJUST_BLOCK: - case SDRTEXTHORZADJUST_CENTER: eRP = RP_MT; break; - case SDRTEXTHORZADJUST_RIGHT: eRP = RP_RT; break; + case SDRTEXTHORZADJUST_CENTER: eRP = RectPoint::MT; break; + case SDRTEXTHORZADJUST_RIGHT: eRP = RectPoint::RT; break; } break; } @@ -261,10 +261,10 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) { switch (eTHA) { - case SDRTEXTHORZADJUST_LEFT: eRP = RP_LM; break; + case SDRTEXTHORZADJUST_LEFT: eRP = RectPoint::LM; break; case SDRTEXTHORZADJUST_BLOCK: - case SDRTEXTHORZADJUST_CENTER: eRP = RP_MM; break; - case SDRTEXTHORZADJUST_RIGHT: eRP = RP_RM; break; + case SDRTEXTHORZADJUST_CENTER: eRP = RectPoint::MM; break; + case SDRTEXTHORZADJUST_RIGHT: eRP = RectPoint::RM; break; } break; } @@ -272,10 +272,10 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) { switch (eTHA) { - case SDRTEXTHORZADJUST_LEFT: eRP = RP_LB; break; + case SDRTEXTHORZADJUST_LEFT: eRP = RectPoint::LB; break; case SDRTEXTHORZADJUST_BLOCK: - case SDRTEXTHORZADJUST_CENTER: eRP = RP_MB; break; - case SDRTEXTHORZADJUST_RIGHT: eRP = RP_RB; break; + case SDRTEXTHORZADJUST_CENTER: eRP = RectPoint::MB; break; + case SDRTEXTHORZADJUST_RIGHT: eRP = RectPoint::RB; break; } break; } @@ -417,30 +417,30 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) } // centered - RECT_POINT eRP = m_pCtlPosition->GetActualRP(); + RectPoint eRP = m_pCtlPosition->GetActualRP(); SdrTextVertAdjust eTVA, eOldTVA; SdrTextHorzAdjust eTHA, eOldTHA; switch( eRP ) { default: - case RP_LT: eTVA = SDRTEXTVERTADJUST_TOP; + case RectPoint::LT: eTVA = SDRTEXTVERTADJUST_TOP; eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RP_LM: eTVA = SDRTEXTVERTADJUST_CENTER; + case RectPoint::LM: eTVA = SDRTEXTVERTADJUST_CENTER; eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RP_LB: eTVA = SDRTEXTVERTADJUST_BOTTOM; + case RectPoint::LB: eTVA = SDRTEXTVERTADJUST_BOTTOM; eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RP_MT: eTVA = SDRTEXTVERTADJUST_TOP; + case RectPoint::MT: eTVA = SDRTEXTVERTADJUST_TOP; eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RP_MM: eTVA = SDRTEXTVERTADJUST_CENTER; + case RectPoint::MM: eTVA = SDRTEXTVERTADJUST_CENTER; eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RP_MB: eTVA = SDRTEXTVERTADJUST_BOTTOM; + case RectPoint::MB: eTVA = SDRTEXTVERTADJUST_BOTTOM; eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RP_RT: eTVA = SDRTEXTVERTADJUST_TOP; + case RectPoint::RT: eTVA = SDRTEXTVERTADJUST_TOP; eTHA = SDRTEXTHORZADJUST_RIGHT; break; - case RP_RM: eTVA = SDRTEXTVERTADJUST_CENTER; + case RectPoint::RM: eTVA = SDRTEXTVERTADJUST_CENTER; eTHA = SDRTEXTHORZADJUST_RIGHT; break; - case RP_RB: eTVA = SDRTEXTVERTADJUST_BOTTOM; + case RectPoint::RB: eTVA = SDRTEXTVERTADJUST_BOTTOM; eTHA = SDRTEXTHORZADJUST_RIGHT; break; } @@ -534,7 +534,7 @@ VclPtr<SfxTabPage> SvxTextAttrPage::Create( vcl::Window* pWindow, /** Check whether we have to uncheck the "Full width" check box. */ -void SvxTextAttrPage::PointChanged( vcl::Window*, RECT_POINT eRP ) +void SvxTextAttrPage::PointChanged( vcl::Window*, RectPoint eRP ) { if (m_pTsbFullWidth->GetState() == TRISTATE_TRUE) { @@ -543,12 +543,12 @@ void SvxTextAttrPage::PointChanged( vcl::Window*, RECT_POINT eRP ) if (IsTextDirectionLeftToRight()) switch( eRP ) { - case RP_LT: - case RP_LM: - case RP_LB: - case RP_RT: - case RP_RM: - case RP_RB: + case RectPoint::LT: + case RectPoint::LM: + case RectPoint::LB: + case RectPoint::RT: + case RectPoint::RM: + case RectPoint::RB: m_pTsbFullWidth->SetState( TRISTATE_FALSE ); break; default: ;//prevent warning @@ -556,12 +556,12 @@ void SvxTextAttrPage::PointChanged( vcl::Window*, RECT_POINT eRP ) else switch (eRP) { - case RP_LT: - case RP_MT: - case RP_RT: - case RP_LB: - case RP_MB: - case RP_RB: + case RectPoint::LT: + case RectPoint::MT: + case RectPoint::RT: + case RectPoint::LB: + case RectPoint::MB: + case RectPoint::RB: m_pTsbFullWidth->SetState( TRISTATE_FALSE ); break; default: ;//prevent warning @@ -588,19 +588,19 @@ IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void) // Move text anchor to horizontal middle axis. switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: - case RP_RT: - m_pCtlPosition->SetActualRP( RP_MT ); + case RectPoint::LT: + case RectPoint::RT: + m_pCtlPosition->SetActualRP( RectPoint::MT ); break; - case RP_LM: - case RP_RM: - m_pCtlPosition->SetActualRP( RP_MM ); + case RectPoint::LM: + case RectPoint::RM: + m_pCtlPosition->SetActualRP( RectPoint::MM ); break; - case RP_LB: - case RP_RB: - m_pCtlPosition->SetActualRP( RP_MB ); + case RectPoint::LB: + case RectPoint::RB: + m_pCtlPosition->SetActualRP( RectPoint::MB ); break; default: ;//prevent warning } @@ -610,19 +610,19 @@ IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void) // Move text anchor to vertical middle axis. switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: - case RP_LB: - m_pCtlPosition->SetActualRP( RP_LM ); + case RectPoint::LT: + case RectPoint::LB: + m_pCtlPosition->SetActualRP( RectPoint::LM ); break; - case RP_MT: - case RP_MB: - m_pCtlPosition->SetActualRP( RP_MM ); + case RectPoint::MT: + case RectPoint::MB: + m_pCtlPosition->SetActualRP( RectPoint::MM ); break; - case RP_RT: - case RP_RB: - m_pCtlPosition->SetActualRP( RP_RM ); + case RectPoint::RT: + case RectPoint::RB: + m_pCtlPosition->SetActualRP( RectPoint::RM ); break; default: ;//prevent warning } diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 3f54e2263d74..ff8360f5674d 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -72,7 +72,7 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs "cui/ui/areatabpage.ui", rInAttrs ), m_rOutAttrs (rInAttrs ), - m_eRP( RP_LT ), + m_eRP( RectPoint::LT ), m_pColorList( nullptr ), m_pGradientList( nullptr ), @@ -880,7 +880,7 @@ IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ModifyBitmapHdl_Impl, ListBox&, void) m_pCtlBitmapPreview->Invalidate(); } -void SvxAreaTabPage::PointChanged( vcl::Window* , RECT_POINT ) +void SvxAreaTabPage::PointChanged( vcl::Window* , RectPoint ) { } diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 31e06172cf4d..f00310b00771 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -270,7 +270,7 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs ) } if(m_pPositionLB->IsEnabled()) - rAttrs->Put( XFillBmpPosItem( static_cast<RECT_POINT>( m_pPositionLB->GetSelectEntryPos() ) ) ); + rAttrs->Put( XFillBmpPosItem( static_cast<RectPoint>( m_pPositionLB->GetSelectEntryPos() ) ) ); if(m_pPositionOffX->IsEnabled()) rAttrs->Put( XFillBmpPosOffsetXItem( m_pPositionOffX->GetValue() ) ); if(m_pPositionOffY->IsEnabled()) @@ -410,7 +410,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SfxItemState::DONTCARE ) { - RECT_POINT eValue = static_cast<const XFillBmpPosItem&>( rAttrs->Get( XATTR_FILLBMP_POS ) ).GetValue(); + RectPoint eValue = static_cast<const XFillBmpPosItem&>( rAttrs->Get( XATTR_FILLBMP_POS ) ).GetValue(); m_pPositionLB->SelectEntryPos( static_cast< sal_Int32 >(eValue) ); } @@ -719,7 +719,7 @@ IMPL_LINK_NOARG_TYPED( SvxBitmapTabPage, ModifyBitmapStyleHdl, ListBox&, void ) IMPL_LINK_NOARG_TYPED(SvxBitmapTabPage, ModifyBitmapPositionHdl, ListBox&, void) { if(m_pPositionLB->IsEnabled()) - m_rXFSet.Put( XFillBmpPosItem( static_cast< RECT_POINT >( m_pPositionLB->GetSelectEntryPos() ) ) ); + m_rXFSet.Put( XFillBmpPosItem( static_cast< RectPoint >( m_pPositionLB->GetSelectEntryPos() ) ) ); m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->Invalidate(); @@ -852,7 +852,7 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName) return nPos; } -void SvxBitmapTabPage::PointChanged( vcl::Window* , RECT_POINT ) +void SvxBitmapTabPage::PointChanged( vcl::Window* , RectPoint ) { } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 32abc8ed0ad9..b9c9c384dcc5 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -642,7 +642,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, v } -void SvxHatchTabPage::PointChanged( vcl::Window*, RECT_POINT ) +void SvxHatchTabPage::PointChanged( vcl::Window*, RectPoint ) { } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 85d02b3d4e04..fa2398fd3622 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -96,7 +96,7 @@ SvxLineTabPage::SvxLineTabPage m_bSymbols(false), m_rOutAttrs ( rInAttrs ), - m_eRP( RP_LT ), + m_eRP( RectPoint::LT ), m_bObjSelected( false ), m_aXLineAttr ( rInAttrs.GetPool() ), @@ -1696,7 +1696,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineTabPage, ChangeTransparentHdl_Impl, Edit&, void) } -void SvxLineTabPage::PointChanged( vcl::Window*, RECT_POINT eRcPt ) +void SvxLineTabPage::PointChanged( vcl::Window*, RectPoint eRcPt ) { m_eRP = eRcPt; } diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 1f0b9d841c94..de13c2089745 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -664,7 +664,7 @@ void SvxPatternTabPage::ChangeColor_Impl() } -void SvxPatternTabPage::PointChanged( vcl::Window* pWindow, RECT_POINT ) +void SvxPatternTabPage::PointChanged( vcl::Window* pWindow, RectPoint ) { if( pWindow == m_pCtlPixel ) { diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 01f99fc9313a..4073e715fe33 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -54,7 +54,7 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA "cui/ui/shadowtabpage.ui", rInAttrs ), m_rOutAttrs ( rInAttrs ), - m_eRP ( RP_LT ), + m_eRP ( RectPoint::LT ), m_pnColorListState ( nullptr ), m_nPageType ( PageType::Area ), m_nDlgType ( 0 ), @@ -287,15 +287,15 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: nX = nY = -nXY; break; - case RP_MT: nY = -nXY; break; - case RP_RT: nX = nXY; nY = -nXY; break; - case RP_LM: nX = -nXY; break; - case RP_RM: nX = nXY; break; - case RP_LB: nX = -nXY; nY = nXY; break; - case RP_MB: nY = nXY; break; - case RP_RB: nX = nY = nXY; break; - case RP_MM: break; + case RectPoint::LT: nX = nY = -nXY; break; + case RectPoint::MT: nY = -nXY; break; + case RectPoint::RT: nX = nXY; nY = -nXY; break; + case RectPoint::LM: nX = -nXY; break; + case RectPoint::RM: nX = nXY; break; + case RectPoint::LB: nX = -nXY; nY = nXY; break; + case RectPoint::MB: nY = nXY; break; + case RectPoint::RB: nX = nY = nXY; break; + case RectPoint::MM: break; } // If the values of the shadow distances==SfxItemState::DONTCARE and the displayed @@ -402,16 +402,16 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) SetMetricValue( *m_pMtrDistance, nY < 0L ? -nY : nY, m_ePoolUnit ); // setting the shadow control - if ( nX < 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RP_LT ); - else if( nX == 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RP_MT ); - else if( nX > 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RP_RT ); - else if( nX < 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RP_LM ); + if ( nX < 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::LT ); + else if( nX == 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::MT ); + else if( nX > 0L && nY < 0L ) m_pCtlPosition->SetActualRP( RectPoint::RT ); + else if( nX < 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::LM ); // there's no center point anymore - else if( nX == 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RP_RB ); - else if( nX > 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RP_RM ); - else if( nX < 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RP_LB ); - else if( nX == 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RP_MB ); - else if( nX > 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RP_RB ); + else if( nX == 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::RB ); + else if( nX > 0L && nY == 0L ) m_pCtlPosition->SetActualRP( RectPoint::RM ); + else if( nX < 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::LB ); + else if( nX == 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::MB ); + else if( nX > 0L && nY > 0L ) m_pCtlPosition->SetActualRP( RectPoint::RB ); } else { @@ -433,7 +433,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // The text (which shall be displayed) of the MetricFields is set to "" and serves as an // identification in the method FillItemSet for the fact that the distance value was NOT changed !!!! m_pMtrDistance->SetText( "" ); - m_pCtlPosition->SetActualRP( RP_MM ); + m_pCtlPosition->SetActualRP( RectPoint::MM ); } if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE ) @@ -514,15 +514,15 @@ IMPL_LINK_NOARG_TYPED(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) sal_Int32 nXY = GetCoreValue( *m_pMtrDistance, m_ePoolUnit ); switch( m_pCtlPosition->GetActualRP() ) { - case RP_LT: nX = nY = -nXY; break; - case RP_MT: nY = -nXY; break; - case RP_RT: nX = nXY; nY = -nXY; break; - case RP_LM: nX = -nXY; break; - case RP_RM: nX = nXY; break; - case RP_LB: nX = -nXY; nY = nXY; break; - case RP_MB: nY = nXY; break; - case RP_RB: nX = nY = nXY; break; - case RP_MM: break; + case RectPoint::LT: nX = nY = -nXY; break; + case RectPoint::MT: nY = -nXY; break; + case RectPoint::RT: nX = nXY; nY = -nXY; break; + case RectPoint::LM: nX = -nXY; break; + case RectPoint::RM: nX = nXY; break; + case RectPoint::LB: nX = -nXY; nY = nXY; break; + case RectPoint::MB: nY = nXY; break; + case RectPoint::RB: nX = nY = nXY; break; + case RectPoint::MM: break; } m_pCtlXRectPreview->SetShadowPosition(Point(nX, nY)); @@ -533,7 +533,7 @@ IMPL_LINK_NOARG_TYPED(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) } -void SvxShadowTabPage::PointChanged( vcl::Window*, RECT_POINT eRcPt ) +void SvxShadowTabPage::PointChanged( vcl::Window*, RectPoint eRcPt ) { m_eRP = eRcPt; diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index 1809549fad36..cc718cc949a8 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -241,7 +241,7 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(vcl::Window* pParent, const SfxIt "cui/ui/transparencytabpage.ui", rInAttrs), rOutAttrs ( rInAttrs ), - eRP ( RP_LT ), + eRP ( RectPoint::LT ), nPageType ( PageType::Area ), nDlgType (0), bBitmap ( false ), @@ -489,7 +489,7 @@ DeactivateRC SvxTransparenceTabPage::DeactivatePage(SfxItemSet* _pSet) return DeactivateRC::LeavePage; } -void SvxTransparenceTabPage::PointChanged(vcl::Window* , RECT_POINT eRcPt) +void SvxTransparenceTabPage::PointChanged(vcl::Window* , RectPoint eRcPt) { eRP = eRcPt; } diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 90cede794f54..10c3cae058f8 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -344,61 +344,61 @@ DeactivateRC SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet ) } -void SvxAngleTabPage::PointChanged(vcl::Window* pWindow, RECT_POINT eRP) +void SvxAngleTabPage::PointChanged(vcl::Window* pWindow, RectPoint eRP) { if(pWindow == m_pCtlRect) { switch(eRP) { - case RP_LT: + case RectPoint::LT: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMinX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMinY()), FUNIT_NONE ); break; } - case RP_MT: + case RectPoint::MT: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getCenter().getX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMinY()), FUNIT_NONE ); break; } - case RP_RT: + case RectPoint::RT: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMaxX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMinY()), FUNIT_NONE ); break; } - case RP_LM: + case RectPoint::LM: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMinX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getCenter().getY()), FUNIT_NONE ); break; } - case RP_MM: + case RectPoint::MM: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getCenter().getX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getCenter().getY()), FUNIT_NONE ); break; } - case RP_RM: + case RectPoint::RM: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMaxX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getCenter().getY()), FUNIT_NONE ); break; } - case RP_LB: + case RectPoint::LB: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMinX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMaxY()), FUNIT_NONE ); break; } - case RP_MB: + case RectPoint::MB: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getCenter().getX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMaxY()), FUNIT_NONE ); break; } - case RP_RB: + case RectPoint::RB: { m_pMtrPosX->SetUserValue( basegfx::fround64(maRange.getMaxX()), FUNIT_NONE ); m_pMtrPosY->SetUserValue( basegfx::fround64(maRange.getMaxY()), FUNIT_NONE ); @@ -714,7 +714,7 @@ DeactivateRC SvxSlantTabPage::DeactivatePage( SfxItemSet* _pSet ) } -void SvxSlantTabPage::PointChanged( vcl::Window* , RECT_POINT ) +void SvxSlantTabPage::PointChanged( vcl::Window* , RectPoint ) { } @@ -765,9 +765,9 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const SfxIt DBG_ASSERT( pPool, "no pool (!)" ); mePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X ); - m_pCtlPos->SetActualRP(RP_LT); - m_pCtlSize->SetActualRP(RP_LT); - meRP = RP_LT; // see above + m_pCtlPos->SetActualRP(RectPoint::LT); + m_pCtlSize->SetActualRP(RectPoint::LT); + meRP = RectPoint::LT; // see above m_pMtrWidth->SetModifyHdl( LINK( this, SvxPositionSizeTabPage, ChangeWidthHdl ) ); m_pMtrHeight->SetModifyHdl( LINK( this, SvxPositionSizeTabPage, ChangeHeightHdl ) ); @@ -1248,33 +1248,33 @@ void SvxPositionSizeTabPage::SetMinMaxPosition() switch ( m_pCtlPos->GetActualRP() ) { - case RP_LT: + case RectPoint::LT: { fRight -= maRange.getWidth(); fBottom -= maRange.getHeight(); break; } - case RP_MT: + case RectPoint::MT: { fLeft += maRange.getWidth() / 2.0; fRight -= maRange.getWidth() / 2.0; fBottom -= maRange.getHeight(); break; } - case RP_RT: + case RectPoint::RT: { fLeft += maRange.getWidth(); fBottom -= maRange.getHeight(); break; } - case RP_LM: + case RectPoint::LM: { fRight -= maRange.getWidth(); fTop += maRange.getHeight() / 2.0; fBottom -= maRange.getHeight() / 2.0; break; } - case RP_MM: + case RectPoint::MM: { fLeft += maRange.getWidth() / 2.0; fRight -= maRange.getWidth() / 2.0; @@ -1282,27 +1282,27 @@ void SvxPositionSizeTabPage::SetMinMaxPosition() fBottom -= maRange.getHeight() / 2.0; break; } - case RP_RM: + case RectPoint::RM: { fLeft += maRange.getWidth(); fTop += maRange.getHeight() / 2.0; fBottom -= maRange.getHeight() / 2.0; break; } - case RP_LB: + case RectPoint::LB: { fRight -= maRange.getWidth(); fTop += maRange.getHeight(); break; } - case RP_MB: + case RectPoint::MB: { fLeft += maRange.getWidth() / 2.0; fRight -= maRange.getWidth() / 2.0; fTop += maRange.getHeight(); break; } - case RP_RB: + case RectPoint::RB: { fLeft += maRange.getWidth(); fTop += maRange.getHeight(); @@ -1336,31 +1336,31 @@ void SvxPositionSizeTabPage::SetMinMaxPosition() switch ( m_pCtlSize->GetActualRP() ) { - case RP_LT: + case RectPoint::LT: { fNewX = maWorkRange.getWidth() - ( maRange.getMinX() - fLeft ); fNewY = maWorkRange.getHeight() - ( maRange.getMinY() - fTop ); break; } - case RP_MT: + case RectPoint::MT: { fNewX = std::min( maRange.getCenter().getX() - fLeft, fRight - maRange.getCenter().getX() ) * 2.0; fNewY = maWorkRange.getHeight() - ( maRange.getMinY() - fTop ); break; } - case RP_RT: + case RectPoint::RT: { fNewX = maWorkRange.getWidth() - ( fRight - maRange.getMaxX() ); fNewY = maWorkRange.getHeight() - ( maRange.getMinY() - fTop ); break; } - case RP_LM: + case RectPoint::LM: { fNewX = maWorkRange.getWidth() - ( maRange.getMinX() - fLeft ); fNewY = std::min( maRange.getCenter().getY() - fTop, fBottom - maRange.getCenter().getY() ) * 2.0; break; } - case RP_MM: + case RectPoint::MM: { const double f1(maRange.getCenter().getX() - fLeft); const double f2(fRight - maRange.getCenter().getX()); @@ -1374,25 +1374,25 @@ void SvxPositionSizeTabPage::SetMinMaxPosition() break; } - case RP_RM: + case RectPoint::RM: { fNewX = maWorkRange.getWidth() - ( fRight - maRange.getMaxX() ); fNewY = std::min( maRange.getCenter().getY() - fTop, fBottom - maRange.getCenter().getY() ) * 2.0; break; } - case RP_LB: + case RectPoint::LB: { fNewX = maWorkRange.getWidth() - ( maRange.getMinX() - fLeft ); fNewY = maWorkRange.getHeight() - ( fBottom - maRange.getMaxY() ); break; } - case RP_MB: + case RectPoint::MB: { fNewX = std::min( maRange.getCenter().getX() - fLeft, fRight - maRange.getCenter().getX() ) * 2.0; fNewY = maWorkRange.getHeight() - ( maRange.getMaxY() - fBottom ); break; } - case RP_RB: + case RectPoint::RB: { fNewX = maWorkRange.getWidth() - ( fRight - maRange.getMaxX() ); fNewY = maWorkRange.getHeight() - ( fBottom - maRange.getMaxY() ); @@ -1412,49 +1412,49 @@ void SvxPositionSizeTabPage::GetTopLeftPosition(double& rfX, double& rfY, const { switch (m_pCtlPos->GetActualRP()) { - case RP_LT: + case RectPoint::LT: { break; } - case RP_MT: + case RectPoint::MT: { rfX -= rRange.getCenter().getX() - rRange.getMinX(); break; } - case RP_RT: + case RectPoint::RT: { rfX -= rRange.getWidth(); break; } - case RP_LM: + case RectPoint::LM: { rfY -= rRange.getCenter().getY() - rRange.getMinY(); break; } - case RP_MM: + case RectPoint::MM: { rfX -= rRange.getCenter().getX() - rRange.getMinX(); rfY -= rRange.getCenter().getY() - rRange.getMinY(); break; } - case RP_RM: + case RectPoint::RM: { rfX -= rRange.getWidth(); rfY -= rRange.getCenter().getY() - rRange.getMinY(); break; } - case RP_LB: + case RectPoint::LB: { rfY -= rRange.getHeight(); break; } - case RP_MB: + case RectPoint::MB: { rfX -= rRange.getCenter().getX() - rRange.getMinX(); rfY -= rRange.getHeight(); break; } - case RP_RB: + case RectPoint::RB: { rfX -= rRange.getWidth(); rfY -= rRange.getHeight(); @@ -1464,62 +1464,62 @@ void SvxPositionSizeTabPage::GetTopLeftPosition(double& rfX, double& rfY, const } -void SvxPositionSizeTabPage::PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) +void SvxPositionSizeTabPage::PointChanged( vcl::Window* pWindow, RectPoint eRP ) { if( pWindow == m_pCtlPos ) { SetMinMaxPosition(); switch( eRP ) { - case RP_LT: + case RectPoint::LT: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMinX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMinY()) ); break; } - case RP_MT: + case RectPoint::MT: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getCenter().getX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMinY()) ); break; } - case RP_RT: + case RectPoint::RT: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMaxX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMinY()) ); break; } - case RP_LM: + case RectPoint::LM: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMinX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getCenter().getY()) ); break; } - case RP_MM: + case RectPoint::MM: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getCenter().getX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getCenter().getY()) ); break; } - case RP_RM: + case RectPoint::RM: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMaxX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getCenter().getY()) ); break; } - case RP_LB: + case RectPoint::LB: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMinX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMaxY()) ); break; } - case RP_MB: + case RectPoint::MB: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getCenter().getX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMaxY()) ); break; } - case RP_RB: + case RectPoint::RB: { m_pMtrPosX->SetValue( basegfx::fround64(maRange.getMaxX()) ); m_pMtrPosY->SetValue( basegfx::fround64(maRange.getMaxY()) ); diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index e32bfc1ffe29..21581ff4d844 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -47,7 +47,7 @@ public: : SfxTabPage(pParent, rID, rUIXMLDescription, &rAttrSet) { } - virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) = 0; + virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) = 0; }; /************************************************************************* @@ -86,7 +86,7 @@ protected: Point aPtLM, aPtMM, aPtRM; Point aPtLB, aPtMB, aPtRB; Point aPtNew; - RECT_POINT eRP, eDefRP; + RectPoint eRP, eDefRP; CTL_STYLE eCS; Bitmap* pBitmap; CTL_STATE m_nState; @@ -97,19 +97,19 @@ protected: void MarkToResetSettings(bool bUpdateForeground, bool bUpdateBackground); - RECT_POINT GetRPFromPoint( Point, bool bRTL = false ) const; - const Point& GetPointFromRP( RECT_POINT ) const; + RectPoint GetRPFromPoint( Point, bool bRTL = false ) const; + const Point& GetPointFromRP( RectPoint ) const; void SetFocusRect(); - Point SetActualRPWithoutInvalidate( RECT_POINT eNewRP ); // returns the last point + Point SetActualRPWithoutInvalidate( RectPoint eNewRP ); // returns the last point virtual void GetFocus() override; virtual void LoseFocus() override; Point GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const; public: - SvxRectCtl( vcl::Window* pParent, RECT_POINT eRpt = RP_MM, + SvxRectCtl( vcl::Window* pParent, RectPoint eRpt = RectPoint::MM, sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80 ); - void SetControlSettings(RECT_POINT eRpt = RP_MM, sal_uInt16 nBorder = 200, + void SetControlSettings(RectPoint eRpt = RectPoint::MM, sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80); virtual ~SvxRectCtl(); virtual void dispose() override; @@ -123,19 +123,19 @@ public: virtual Size GetOptimalSize() const override; void Reset(); - RECT_POINT GetActualRP() const { return eRP;} - void SetActualRP( RECT_POINT eNewRP ); + RectPoint GetActualRP() const { return eRP;} + void SetActualRP( RectPoint eNewRP ); void SetState( CTL_STATE nState ); sal_uInt8 GetNumOfChildren() const; // returns number of usable radio buttons Rectangle CalculateFocusRectangle() const; - Rectangle CalculateFocusRectangle( RECT_POINT eRectPoint ) const; + Rectangle CalculateFocusRectangle( RectPoint eRectPoint ) const; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - RECT_POINT GetApproxRPFromPixPt( const css::awt::Point& rPixelPoint ) const; + RectPoint GetApproxRPFromPixPt( const css::awt::Point& rPixelPoint ) const; bool IsCompletelyDisabled() const { return mbCompleteDisable; } void DoCompletelyDisable(bool bNew); diff --git a/include/svx/rectenum.hxx b/include/svx/rectenum.hxx index 9ca2e6546d9c..817df20ef8d9 100644 --- a/include/svx/rectenum.hxx +++ b/include/svx/rectenum.hxx @@ -21,9 +21,17 @@ // enum ------------------------------------------------------------------ -enum RECT_POINT +enum class RectPoint { - RP_LT, RP_MT, RP_RT, RP_LM, RP_MM, RP_RM, RP_LB, RP_MB, RP_RB + LT, // top left + MT, // top center + RT, // top right + LM, // left center + MM, // center + RM, // right center + LB, // bottom left + MB, // bottom center + RB // bottom right }; enum class CTL_STYLE diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index f3a21ca0f8d9..7cd86f74d2d0 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -362,7 +362,7 @@ public: const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(vcl::Window* pParent, const Graphic& rGraphic, - RECT_POINT eLightSource)=0; + RectPoint eLightSource)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(vcl::Window* pParent, const Graphic& rGraphic, sal_uInt16 nCount)=0; diff --git a/include/svx/xflbmpit.hxx b/include/svx/xflbmpit.hxx index 280f40c9b618..df73cb4b4410 100644 --- a/include/svx/xflbmpit.hxx +++ b/include/svx/xflbmpit.hxx @@ -28,7 +28,7 @@ class SVX_DLLPUBLIC XFillBmpPosItem : public SfxEnumItem { public: static SfxPoolItem* CreateDefault(); - XFillBmpPosItem( RECT_POINT eRP = RP_MM ); + XFillBmpPosItem( RectPoint eRP = RectPoint::MM ); SVX_DLLPRIVATE XFillBmpPosItem( SvStream& rIn ); SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override; @@ -40,7 +40,7 @@ public: OUString &rText, const IntlWrapper * = nullptr ) const override; SVX_DLLPRIVATE virtual sal_uInt16 GetValueCount() const override; - SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); } + SVX_DLLPRIVATE RectPoint GetValue() const { return (RectPoint) SfxEnumItem::GetValue(); } void dumpAsXml(struct _xmlTextWriter* pWriter) const override; }; diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index ea1404d35bcc..d43ab2c53801 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -59,7 +59,7 @@ namespace { short nResIdName; short nResIdDescr; - RECT_POINT ePoint; + RectPoint ePoint; }; } @@ -71,35 +71,35 @@ static const ChildIndexToPointData* IndexToPoint( long nIndex, bool bAngleContro // angles are counted reverse counter clock wise static const ChildIndexToPointData pAngleData[] = { // index - { RID_SVXSTR_RECTCTL_ACC_CHLD_A000, RID_SVXSTR_RECTCTL_ACC_CHLD_A000, RP_RM }, // 0 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A045, RID_SVXSTR_RECTCTL_ACC_CHLD_A045, RP_RT }, // 1 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A090, RID_SVXSTR_RECTCTL_ACC_CHLD_A090, RP_MT }, // 2 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A135, RID_SVXSTR_RECTCTL_ACC_CHLD_A135, RP_LT }, // 3 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A180, RID_SVXSTR_RECTCTL_ACC_CHLD_A180, RP_LM }, // 4 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A225, RID_SVXSTR_RECTCTL_ACC_CHLD_A225, RP_LB }, // 5 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A270, RID_SVXSTR_RECTCTL_ACC_CHLD_A270, RP_MB }, // 6 - { RID_SVXSTR_RECTCTL_ACC_CHLD_A315, RID_SVXSTR_RECTCTL_ACC_CHLD_A315, RP_RB } // 7 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A000, RID_SVXSTR_RECTCTL_ACC_CHLD_A000, RectPoint::RM }, // 0 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A045, RID_SVXSTR_RECTCTL_ACC_CHLD_A045, RectPoint::RT }, // 1 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A090, RID_SVXSTR_RECTCTL_ACC_CHLD_A090, RectPoint::MT }, // 2 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A135, RID_SVXSTR_RECTCTL_ACC_CHLD_A135, RectPoint::LT }, // 3 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A180, RID_SVXSTR_RECTCTL_ACC_CHLD_A180, RectPoint::LM }, // 4 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A225, RID_SVXSTR_RECTCTL_ACC_CHLD_A225, RectPoint::LB }, // 5 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A270, RID_SVXSTR_RECTCTL_ACC_CHLD_A270, RectPoint::MB }, // 6 + { RID_SVXSTR_RECTCTL_ACC_CHLD_A315, RID_SVXSTR_RECTCTL_ACC_CHLD_A315, RectPoint::RB } // 7 }; // corners are counted from left to right and top to bottom static const ChildIndexToPointData pCornerData[] = { // index - { RID_SVXSTR_RECTCTL_ACC_CHLD_LT, RID_SVXSTR_RECTCTL_ACC_CHLD_LT, RP_LT }, // 0 - { RID_SVXSTR_RECTCTL_ACC_CHLD_MT, RID_SVXSTR_RECTCTL_ACC_CHLD_MT, RP_MT }, // 1 - { RID_SVXSTR_RECTCTL_ACC_CHLD_RT, RID_SVXSTR_RECTCTL_ACC_CHLD_RT, RP_RT }, // 2 - { RID_SVXSTR_RECTCTL_ACC_CHLD_LM, RID_SVXSTR_RECTCTL_ACC_CHLD_LM, RP_LM }, // 3 - { RID_SVXSTR_RECTCTL_ACC_CHLD_MM, RID_SVXSTR_RECTCTL_ACC_CHLD_MM, RP_MM }, // 4 - { RID_SVXSTR_RECTCTL_ACC_CHLD_RM, RID_SVXSTR_RECTCTL_ACC_CHLD_RM, RP_RM }, // 5 - { RID_SVXSTR_RECTCTL_ACC_CHLD_LB, RID_SVXSTR_RECTCTL_ACC_CHLD_LB, RP_LB }, // 6 - { RID_SVXSTR_RECTCTL_ACC_CHLD_MB, RID_SVXSTR_RECTCTL_ACC_CHLD_MB, RP_MB }, // 7 - { RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RP_RB } // 8 + { RID_SVXSTR_RECTCTL_ACC_CHLD_LT, RID_SVXSTR_RECTCTL_ACC_CHLD_LT, RectPoint::LT }, // 0 + { RID_SVXSTR_RECTCTL_ACC_CHLD_MT, RID_SVXSTR_RECTCTL_ACC_CHLD_MT, RectPoint::MT }, // 1 + { RID_SVXSTR_RECTCTL_ACC_CHLD_RT, RID_SVXSTR_RECTCTL_ACC_CHLD_RT, RectPoint::RT }, // 2 + { RID_SVXSTR_RECTCTL_ACC_CHLD_LM, RID_SVXSTR_RECTCTL_ACC_CHLD_LM, RectPoint::LM }, // 3 + { RID_SVXSTR_RECTCTL_ACC_CHLD_MM, RID_SVXSTR_RECTCTL_ACC_CHLD_MM, RectPoint::MM }, // 4 + { RID_SVXSTR_RECTCTL_ACC_CHLD_RM, RID_SVXSTR_RECTCTL_ACC_CHLD_RM, RectPoint::RM }, // 5 + { RID_SVXSTR_RECTCTL_ACC_CHLD_LB, RID_SVXSTR_RECTCTL_ACC_CHLD_LB, RectPoint::LB }, // 6 + { RID_SVXSTR_RECTCTL_ACC_CHLD_MB, RID_SVXSTR_RECTCTL_ACC_CHLD_MB, RectPoint::MB }, // 7 + { RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RectPoint::RB } // 8 }; return ( bAngleControl? pAngleData : pCornerData ) + nIndex; } -static long PointToIndex( RECT_POINT ePoint, bool bAngleControl ) +static long PointToIndex( RectPoint ePoint, bool bAngleControl ) { long nRet( (long) ePoint ); if( bAngleControl ) @@ -107,22 +107,22 @@ static long PointToIndex( RECT_POINT ePoint, bool bAngleControl ) // angles are counted reverse counter clock wise switch( ePoint ) { - case RP_LT: nRet = 3; break; - case RP_MT: nRet = 2; break; - case RP_RT: nRet = 1; break; - case RP_LM: nRet = 4; break; - case RP_MM: nRet = NOCHILDSELECTED; break; - case RP_RM: nRet = 0; break; - case RP_LB: nRet = 5; break; - case RP_MB: nRet = 6; break; - case RP_RB: nRet = 7; break; + case RectPoint::LT: nRet = 3; break; + case RectPoint::MT: nRet = 2; break; + case RectPoint::RT: nRet = 1; break; + case RectPoint::LM: nRet = 4; break; + case RectPoint::MM: nRet = NOCHILDSELECTED; break; + case RectPoint::RM: nRet = 0; break; + case RectPoint::LB: nRet = 5; break; + case RectPoint::MB: nRet = 6; break; + case RectPoint::RB: nRet = 7; break; } } else { // corner control // corners are counted from left to right and top to bottom - DBG_ASSERT( RP_LT == 0 && RP_MT == 1 && RP_RT == 2 && RP_LM == 3 && RP_MM == 4 && RP_RM == 5 && - RP_LB == 6 && RP_MB == 7 && RP_RB == 8, "*PointToIndex(): unexpected enum value!" ); + DBG_ASSERT( (int)RectPoint::LT == 0 && (int)RectPoint::MT == 1 && (int)RectPoint::RT == 2 && (int)RectPoint::LM == 3 && (int)RectPoint::MM == 4 && (int)RectPoint::RM == 5 && + (int)RectPoint::LB == 6 && (int)RectPoint::MB == 7 && (int)RectPoint::RB == 8, "*PointToIndex(): unexpected enum value!" ); nRet = ( long ) ePoint; } @@ -570,7 +570,7 @@ void SvxRectCtlAccessibleContext::checkChildIndexOnSelection( long nIndex ) thro throw lang::IndexOutOfBoundsException(); } -void SvxRectCtlAccessibleContext::FireChildFocus( RECT_POINT eButton ) +void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton ) { ::osl::MutexGuard aGuard( m_aMutex ); long nNew = PointToIndex( eButton, mbAngleMode ); @@ -630,7 +630,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew ) } } -void SvxRectCtlAccessibleContext::selectChild(RECT_POINT eButton ) +void SvxRectCtlAccessibleContext::selectChild(RectPoint eButton ) { // no guard -> is done in next selectChild selectChild(PointToIndex( eButton, mbAngleMode )); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index dfba8b8d596d..662f62af4057 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -67,7 +67,7 @@ Bitmap& SvxRectCtl::GetRectBitmap() return *pBitmap; } -SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt, +SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RectPoint eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle) : Control(pParent, WB_BORDER | WB_TABSTOP) , nBorderWidth(nBorder) @@ -84,7 +84,7 @@ SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt, Resize_Impl(); } -void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle) +void SvxRectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle) { nBorderWidth = nBorder; nRadius = nCircle; @@ -281,7 +281,7 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) // CompletelyDisabled() added to have a disabled state for SvxRectCtl if(!IsCompletelyDisabled()) { - RECT_POINT eNewRP = eRP; + RectPoint eNewRP = eRP; bool bUseMM = (eCS != CTL_STYLE::Shadow) && (eCS != CTL_STYLE::Angle); switch( rKeyEvt.GetKeyCode().GetCode() ) @@ -291,12 +291,12 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) if( !(m_nState & CTL_STATE::NOVERT) ) switch( eNewRP ) { - case RP_LT: eNewRP = RP_LM; break; - case RP_MT: eNewRP = bUseMM ? RP_MM : RP_MB; break; - case RP_RT: eNewRP = RP_RM; break; - case RP_LM: eNewRP = RP_LB; break; - case RP_MM: eNewRP = RP_MB; break; - case RP_RM: eNewRP = RP_RB; break; + case RectPoint::LT: eNewRP = RectPoint::LM; break; + case RectPoint::MT: eNewRP = bUseMM ? RectPoint::MM : RectPoint::MB; break; + case RectPoint::RT: eNewRP = RectPoint::RM; break; + case RectPoint::LM: eNewRP = RectPoint::LB; break; + case RectPoint::MM: eNewRP = RectPoint::MB; break; + case RectPoint::RM: eNewRP = RectPoint::RB; break; default: ; //prevent warning } } @@ -306,12 +306,12 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) if( !(m_nState & CTL_STATE::NOVERT) ) switch( eNewRP ) { - case RP_LM: eNewRP = RP_LT; break; - case RP_MM: eNewRP = RP_MT; break; - case RP_RM: eNewRP = RP_RT; break; - case RP_LB: eNewRP = RP_LM; break; - case RP_MB: eNewRP = bUseMM ? RP_MM : RP_MT; break; - case RP_RB: eNewRP = RP_RM; break; + case RectPoint::LM: eNewRP = RectPoint::LT; break; + case RectPoint::MM: eNewRP = RectPoint::MT; break; + case RectPoint::RM: eNewRP = RectPoint::RT; break; + case RectPoint::LB: eNewRP = RectPoint::LM; break; + case RectPoint::MB: eNewRP = bUseMM ? RectPoint::MM : RectPoint::MT; break; + case RectPoint::RB: eNewRP = RectPoint::RM; break; default: ; //prevent warning } } @@ -321,12 +321,12 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) if( !(m_nState & CTL_STATE::NOHORZ) ) switch( eNewRP ) { - case RP_MT: eNewRP = RP_LT; break; - case RP_RT: eNewRP = RP_MT; break; - case RP_MM: eNewRP = RP_LM; break; - case RP_RM: eNewRP = bUseMM ? RP_MM : RP_LM; break; - case RP_MB: eNewRP = RP_LB; break; - case RP_RB: eNewRP = RP_MB; break; + case RectPoint::MT: eNewRP = RectPoint::LT; break; + case RectPoint::RT: eNewRP = RectPoint::MT; break; + case RectPoint::MM: eNewRP = RectPoint::LM; break; + case RectPoint::RM: eNewRP = bUseMM ? RectPoint::MM : RectPoint::LM; break; + case RectPoint::MB: eNewRP = RectPoint::LB; break; + case RectPoint::RB: eNewRP = RectPoint::MB; break; default: ; //prevent warning } } @@ -336,12 +336,12 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt ) if( !(m_nState & CTL_STATE::NOHORZ) ) switch( eNewRP ) { - case RP_LT: eNewRP = RP_MT; break; - case RP_MT: eNewRP = RP_RT; break; - case RP_LM: eNewRP = bUseMM ? RP_MM : RP_RM; break; - case RP_MM: eNewRP = RP_RM; break; - case RP_LB: eNewRP = RP_MB; break; - case RP_MB: eNewRP = RP_RB; break; + case RectPoint::LT: eNewRP = RectPoint::MT; break; + case RectPoint::MT: eNewRP = RectPoint::RT; break; + case RectPoint::LM: eNewRP = bUseMM ? RectPoint::MM : RectPoint::RM; break; + case RectPoint::MM: eNewRP = RectPoint::RM; break; + case RectPoint::LB: eNewRP = RectPoint::MB; break; + case RectPoint::MB: eNewRP = RectPoint::RB; break; default: ; //prevent warning } } @@ -511,21 +511,21 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } } -// Convert RECT_POINT Point +// Convert RectPoint Point -const Point& SvxRectCtl::GetPointFromRP( RECT_POINT _eRP) const +const Point& SvxRectCtl::GetPointFromRP( RectPoint _eRP) const { switch( _eRP ) { - case RP_LT: return aPtLT; - case RP_MT: return aPtMT; - case RP_RT: return aPtRT; - case RP_LM: return aPtLM; - case RP_MM: return aPtMM; - case RP_RM: return aPtRM; - case RP_LB: return aPtLB; - case RP_MB: return aPtMB; - case RP_RB: return aPtRB; + case RectPoint::LT: return aPtLT; + case RectPoint::MT: return aPtMT; + case RectPoint::RT: return aPtRT; + case RectPoint::LM: return aPtLM; + case RectPoint::MM: return aPtMM; + case RectPoint::RM: return aPtRM; + case RectPoint::LB: return aPtLB; + case RectPoint::MB: return aPtMB; + case RectPoint::RB: return aPtRB; } return aPtMM; // default } @@ -538,7 +538,7 @@ void SvxRectCtl::SetFocusRect() ShowFocus( CalculateFocusRectangle() ); } -Point SvxRectCtl::SetActualRPWithoutInvalidate( RECT_POINT eNewRP ) +Point SvxRectCtl::SetActualRPWithoutInvalidate( RectPoint eNewRP ) { Point aPtLast = aPtNew; aPtNew = GetPointFromRP( eNewRP ); @@ -612,20 +612,20 @@ Point SvxRectCtl::GetApproxLogPtFromPixPt( const Point& rPt ) const } -// Converts Point in RECT_POINT +// Converts Point in RectPoint -RECT_POINT SvxRectCtl::GetRPFromPoint( Point aPt, bool bRTL ) const +RectPoint SvxRectCtl::GetRPFromPoint( Point aPt, bool bRTL ) const { - RECT_POINT rPoint = RP_MM; // default + RectPoint rPoint = RectPoint::MM; // default - if ( aPt == aPtLT) rPoint = bRTL ? RP_RT : RP_LT; - else if( aPt == aPtMT) rPoint = RP_MT; - else if( aPt == aPtRT) rPoint = bRTL ? RP_LT : RP_RT; - else if( aPt == aPtLM) rPoint = bRTL ? RP_RM : RP_LM; - else if( aPt == aPtRM) rPoint = bRTL ? RP_LM : RP_RM; - else if( aPt == aPtLB) rPoint = bRTL ? RP_RB : RP_LB; - else if( aPt == aPtMB) rPoint = RP_MB; - else if( aPt == aPtRB) rPoint = bRTL ? RP_LB : RP_RB; + if ( aPt == aPtLT) rPoint = bRTL ? RectPoint::RT : RectPoint::LT; + else if( aPt == aPtMT) rPoint = RectPoint::MT; + else if( aPt == aPtRT) rPoint = bRTL ? RectPoint::LT : RectPoint::RT; + else if( aPt == aPtLM) rPoint = bRTL ? RectPoint::RM : RectPoint::LM; + else if( aPt == aPtRM) rPoint = bRTL ? RectPoint::LM : RectPoint::RM; + else if( aPt == aPtLB) rPoint = bRTL ? RectPoint::RB : RectPoint::LB; + else if( aPt == aPtMB) rPoint = RectPoint::MB; + else if( aPt == aPtRB) rPoint = bRTL ? RectPoint::LB : RectPoint::RB; return rPoint; } @@ -639,10 +639,10 @@ void SvxRectCtl::Reset() Invalidate(); } -// Returns the currently selected RECT_POINT +// Returns the currently selected RectPoint -void SvxRectCtl::SetActualRP( RECT_POINT eNewRP ) +void SvxRectCtl::SetActualRP( RectPoint eNewRP ) { Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) ); @@ -686,10 +686,10 @@ Rectangle SvxRectCtl::CalculateFocusRectangle() const return Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize ); } -Rectangle SvxRectCtl::CalculateFocusRectangle( RECT_POINT eRectPoint ) const +Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) const { Rectangle aRet; - RECT_POINT eOldRectPoint = GetActualRP(); + RectPoint eOldRectPoint = GetActualRP(); if( eOldRectPoint == eRectPoint ) aRet = CalculateFocusRectangle(); @@ -725,7 +725,7 @@ Reference< XAccessible > SvxRectCtl::CreateAccessible() return Reference< XAccessible >(); } -RECT_POINT SvxRectCtl::GetApproxRPFromPixPt( const css::awt::Point& r ) const +RectPoint SvxRectCtl::GetApproxRPFromPixPt( const css::awt::Point& r ) const { return GetRPFromPoint( GetApproxLogPtFromPixPt( Point( r.X, r.Y ) ) ); } @@ -793,7 +793,7 @@ long SvxPixelCtl::ShowPosition( const Point &pt) vcl::Window *pTabPage = getNonLayoutParent(this); if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType()) - static_cast<SvxTabPage*>(pTabPage)->PointChanged( this, RP_MM ); // RectPoint ist dummy + static_cast<SvxTabPage*>(pTabPage)->PointChanged( this, RectPoint::MM ); // RectPoint ist dummy return GetFocusPosIndex(); diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index ce305c6f15b5..53a98cd07a65 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -175,7 +175,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterEmboss(pWindow, rGraphic, RP_MM)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterEmboss(pWindow, rGraphic, RectPoint::MM)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index f9dcc099258d..25a28165c5b7 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -225,8 +225,8 @@ public: @param eButton Button which belongs to the child which should be selected. */ - void selectChild( RECT_POINT ePoint ); - void FireChildFocus( RECT_POINT eButton ); + void selectChild( RectPoint ePoint ); + void FireChildFocus( RectPoint eButton ); protected: diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index f514bf7c1978..bbfbbd87d8fa 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -156,20 +156,20 @@ namespace drawinglayer } } - basegfx::B2DVector RectPointToB2DVector(RECT_POINT eRectPoint) + basegfx::B2DVector RectPointToB2DVector(RectPoint eRectPoint) { basegfx::B2DVector aRetval(0.0, 0.0); // position changes X switch(eRectPoint) { - case RP_LT: case RP_LM: case RP_LB: + case RectPoint::LT: case RectPoint::LM: case RectPoint::LB: { aRetval.setX(-1.0); break; } - case RP_RT: case RP_RM: case RP_RB: + case RectPoint::RT: case RectPoint::RM: case RectPoint::RB: { aRetval.setX(1.0); break; @@ -184,13 +184,13 @@ namespace drawinglayer // position changes Y switch(eRectPoint) { - case RP_LT: case RP_MT: case RP_RT: + case RectPoint::LT: case RectPoint::MT: case RectPoint::RT: { aRetval.setY(-1.0); break; } - case RP_LB: case RP_MB: case RP_RB: + case RectPoint::LB: case RectPoint::MB: case RectPoint::RB: { aRetval.setY(1.0); break; @@ -700,7 +700,7 @@ namespace drawinglayer aOffset, aOffsetPosition, RectPointToB2DVector( - (RECT_POINT)static_cast<const SfxEnumItem&>(rSet.Get(XATTR_FILLBMP_POS)).GetValue()), + (RectPoint)static_cast<const SfxEnumItem&>(rSet.Get(XATTR_FILLBMP_POS)).GetValue()), static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_TILE)).GetValue(), static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_STRETCH)).GetValue(), static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_SIZELOG)).GetValue()); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 53f5e9dd17c6..b9939b482d4a 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -823,7 +823,7 @@ void PosSizePropertyPanel::executeSize() // put Width & Height to itemset SfxUInt32Item aWidthItem( SID_ATTR_TRANSFORM_WIDTH, (sal_uInt32) lWidth); SfxUInt32Item aHeightItem( SID_ATTR_TRANSFORM_HEIGHT, (sal_uInt32) lHeight); - SfxAllEnumItem aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, (sal_uInt16)RP_LT); + SfxAllEnumItem aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, (sal_uInt16)RectPoint::LT); const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI()); if( nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_Graphic) diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 1456c2c352c1..dddb0bd0ee98 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1434,18 +1434,18 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const return aRetSet; } -Point ImpGetPoint(const Rectangle& rRect, RECT_POINT eRP) +Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP) { switch(eRP) { - case RP_LT: return rRect.TopLeft(); - case RP_MT: return rRect.TopCenter(); - case RP_RT: return rRect.TopRight(); - case RP_LM: return rRect.LeftCenter(); - case RP_MM: return rRect.Center(); - case RP_RM: return rRect.RightCenter(); - case RP_LB: return rRect.BottomLeft(); - case RP_MB: return rRect.BottomCenter(); - case RP_RB: return rRect.BottomRight(); + case RectPoint::LT: return rRect.TopLeft(); + case RectPoint::MT: return rRect.TopCenter(); + case RectPoint::RT: return rRect.TopRight(); + case RectPoint::LM: return rRect.LeftCenter(); + case RectPoint::MM: return rRect.Center(); + case RectPoint::RM: return rRect.RightCenter(); + case RectPoint::LB: return rRect.BottomLeft(); + case RectPoint::MB: return rRect.BottomCenter(); + case RectPoint::RB: return rRect.BottomRight(); } return Point(); // Should not happen! } @@ -1465,7 +1465,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) const size_t nMarkCount=rMarkList.GetMarkCount(); SdrObject* pObj=nullptr; - RECT_POINT eSizePoint=RP_MM; + RectPoint eSizePoint=RectPoint::MM; long nPosDX=0; long nPosDY=0; long nSizX=0; @@ -1528,7 +1528,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) bChgHgt=true; } if (bChgSiz) { - eSizePoint=(RECT_POINT)static_cast<const SfxAllEnumItem&>(rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue(); + eSizePoint=(RectPoint)static_cast<const SfxAllEnumItem&>(rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue(); } // rotation diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx index ca484bc93a1e..c3d547d973d7 100644 --- a/svx/source/unodraw/unobrushitemhelper.cxx +++ b/svx/source/unodraw/unobrushitemhelper.cxx @@ -75,7 +75,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI rToSet.Put(XFillBmpTileItem(false)); // default for stretch is also top-left, but this will not be visible - rToSet.Put(XFillBmpPosItem(RP_LT)); + rToSet.Put(XFillBmpPosItem(RectPoint::LT)); } else if(GPOS_TILED == rBrush.GetGraphicPos()) { @@ -84,7 +84,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI rToSet.Put(XFillBmpTileItem(true)); // default for tiled is top-left - rToSet.Put(XFillBmpPosItem(RP_LT)); + rToSet.Put(XFillBmpPosItem(RectPoint::LT)); } else { @@ -92,19 +92,19 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI rToSet.Put(XFillBmpStretchItem(false)); rToSet.Put(XFillBmpTileItem(false)); - RECT_POINT aRectPoint(RP_MM); + RectPoint aRectPoint(RectPoint::MM); switch(rBrush.GetGraphicPos()) { - case GPOS_LT: aRectPoint = RP_LT; break; - case GPOS_MT: aRectPoint = RP_MT; break; - case GPOS_RT: aRectPoint = RP_RT; break; - case GPOS_LM: aRectPoint = RP_LM; break; - case GPOS_MM: aRectPoint = RP_MM; break; - case GPOS_RM: aRectPoint = RP_RM; break; - case GPOS_LB: aRectPoint = RP_LB; break; - case GPOS_MB: aRectPoint = RP_MB; break; - case GPOS_RB: aRectPoint = RP_RB; break; + case GPOS_LT: aRectPoint = RectPoint::LT; break; + case GPOS_MT: aRectPoint = RectPoint::MT; break; + case GPOS_RT: aRectPoint = RectPoint::RT; break; + case GPOS_LM: aRectPoint = RectPoint::LM; break; + case GPOS_MM: aRectPoint = RectPoint::MM; break; + case GPOS_RM: aRectPoint = RectPoint::RM; break; + case GPOS_LB: aRectPoint = RectPoint::LB; break; + case GPOS_MB: aRectPoint = RectPoint::MB; break; + case GPOS_RB: aRectPoint = RectPoint::RB; break; default: break; // GPOS_NONE, GPOS_AREA and GPOS_TILED already handled } @@ -311,15 +311,15 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt switch(rPosItem.GetValue()) { - case RP_LT: aSvxGraphicPosition = GPOS_LT; break; - case RP_MT: aSvxGraphicPosition = GPOS_MT; break; - case RP_RT: aSvxGraphicPosition = GPOS_RT; break; - case RP_LM: aSvxGraphicPosition = GPOS_LM; break; - case RP_MM: aSvxGraphicPosition = GPOS_MM; break; - case RP_RM: aSvxGraphicPosition = GPOS_RM; break; - case RP_LB: aSvxGraphicPosition = GPOS_LB; break; - case RP_MB: aSvxGraphicPosition = GPOS_MB; break; - case RP_RB: aSvxGraphicPosition = GPOS_RB; break; + case RectPoint::LT: aSvxGraphicPosition = GPOS_LT; break; + case RectPoint::MT: aSvxGraphicPosition = GPOS_MT; break; + case RectPoint::RT: aSvxGraphicPosition = GPOS_RT; break; + case RectPoint::LM: aSvxGraphicPosition = GPOS_LM; break; + case RectPoint::MM: aSvxGraphicPosition = GPOS_MM; break; + case RectPoint::RM: aSvxGraphicPosition = GPOS_RM; break; + case RectPoint::LB: aSvxGraphicPosition = GPOS_LB; break; + case RectPoint::MB: aSvxGraphicPosition = GPOS_MB; break; + case RectPoint::RB: aSvxGraphicPosition = GPOS_RB; break; } } diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index ad53a7755bf8..6cba0981081f 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -557,7 +557,7 @@ void XFillBmpTileItem::dumpAsXml(xmlTextWriterPtr pWriter) const SfxPoolItem* XFillBmpPosItem::CreateDefault() {return new XFillBmpPosItem;} -XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) : +XFillBmpPosItem::XFillBmpPosItem( RectPoint eRP ) : SfxEnumItem( XATTR_FILLBMP_POS, sal::static_int_cast< sal_uInt16 >( eRP ) ) { } @@ -598,7 +598,7 @@ void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBmpPosItem")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number((int)GetValue()).getStr())); xmlTextWriterEndElement(pWriter); } |