[Libreoffice-commits] core.git: 15 commits - cui/source filter/source include/svx sc/source sd/source svx/source sw/source
Noel Grandin
noel at peralex.com
Wed Aug 24 06:48:25 UTC 2016
cui/source/tabpages/chardlg.cxx | 6 +-
cui/source/tabpages/numfmt.cxx | 10 ++--
cui/source/tabpages/page.cxx | 2
cui/source/tabpages/textanim.cxx | 20 ++++-----
cui/source/tabpages/textattr.cxx | 6 +-
filter/source/msfilter/escherex.cxx | 2
filter/source/msfilter/msdffimp.cxx | 4 -
filter/source/msfilter/svdfppt.cxx | 2
include/svx/ipolypolygoneditorcontroller.hxx | 34 +++++++++-------
include/svx/langbox.hxx | 8 +--
include/svx/numfmtsh.hxx | 8 +--
include/svx/papersizelistbox.hxx | 6 +-
include/svx/rectenum.hxx | 10 ++--
include/svx/ruler.hxx | 10 ++--
include/svx/sdr/overlay/overlayobjectcell.hxx | 5 --
include/svx/sdr/overlay/overlayselection.hxx | 8 +--
include/svx/sdtaditm.hxx | 10 ++--
include/svx/sdtfsitm.hxx | 26 ++++++------
include/svx/shapeproperty.hxx | 15 ++-----
include/svx/sidebar/SelectionAnalyzer.hxx | 12 ++---
include/svx/sidebar/ValueSetWithTextControl.hxx | 10 ++--
include/svx/svddef.hxx | 4 -
sc/source/filter/excel/xeescher.cxx | 2
sc/source/ui/drawfunc/futext.cxx | 4 -
sc/source/ui/unoobj/shapeuno.cxx | 2
sc/source/ui/view/gridwin.cxx | 12 ++---
sc/source/ui/view/tabvwsh5.cxx | 18 ++++----
sd/source/core/stlpool.cxx | 2
sd/source/ui/animations/motionpathtag.cxx | 12 ++---
sd/source/ui/func/futext.cxx | 4 -
sd/source/ui/sidebar/SlideBackground.cxx | 2
sd/source/ui/view/drbezob.cxx | 28 ++++++-------
sd/source/ui/view/drviews2.cxx | 4 -
sd/source/ui/view/drviewsa.cxx | 10 ++--
sd/source/ui/view/drviewsj.cxx | 2
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2
svx/source/dialog/dlgctrl.cxx | 32 +++++++--------
svx/source/dialog/graphctl.cxx | 2
svx/source/dialog/langbox.cxx | 12 ++---
svx/source/dialog/papersizelistbox.cxx | 2
svx/source/dialog/svxruler.cxx | 18 ++++----
svx/source/items/numfmtsh.cxx | 18 ++++----
svx/source/items/numinf.cxx | 10 ++--
svx/source/sdr/overlay/overlayobjectcell.cxx | 27 +++---------
svx/source/sdr/overlay/overlayselection.cxx | 14 +++---
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 2
svx/source/sidebar/SelectionAnalyzer.cxx | 16 +++----
svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 10 ++--
svx/source/svdraw/polypolygoneditor.cxx | 4 -
svx/source/svdraw/svdattr.cxx | 4 -
svx/source/svdraw/svdfmtf.cxx | 2
svx/source/svdraw/svdibrow.cxx | 2
svx/source/svdraw/svdobj.cxx | 4 -
svx/source/svdraw/svdotext.cxx | 22 +++++-----
svx/source/svdraw/svdotextdecomposition.cxx | 2
svx/source/svdraw/svdotxat.cxx | 4 -
svx/source/svdraw/svdotxed.cxx | 4 -
svx/source/svdraw/svdpoev.cxx | 24 +++++------
svx/source/table/tablecontroller.cxx | 5 --
svx/source/toolbars/fontworkbar.cxx | 8 +--
svx/source/unodraw/shapepropertynotifier.cxx | 4 -
svx/source/unodraw/unoshape.cxx | 4 -
sw/source/core/crsr/viscrs.cxx | 2
sw/source/core/draw/dcontact.cxx | 2
sw/source/core/frmedt/feshview.cxx | 2
sw/source/core/unocore/unodraw.cxx | 2
sw/source/filter/html/htmldrawreader.cxx | 12 ++---
sw/source/filter/html/htmldrawwriter.cxx | 4 -
sw/source/filter/ww8/ww8graf.cxx | 4 -
sw/source/uibase/ribbar/conrect.cxx | 2
sw/source/uibase/shells/beziersh.cxx | 30 +++++++-------
sw/source/uibase/sidebar/PageColumnControl.cxx | 2
sw/source/uibase/sidebar/PageFormatPanel.cxx | 2
sw/source/uibase/sidebar/PageMarginControl.cxx | 2
sw/source/uibase/sidebar/PageOrientationControl.cxx | 2
sw/source/uibase/sidebar/PageSizeControl.cxx | 2
76 files changed, 317 insertions(+), 331 deletions(-)
New commits:
commit c222fa9c2206e3b8b0e8cf55bf61be26e32ea2d7
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 16:01:41 2016 +0200
convert SdrPathSmoothKind to scoped enum
Change-Id: I9b4a4226322c4d4eb2ab220ecf0b0efb068eea8e
diff --git a/include/svx/ipolypolygoneditorcontroller.hxx b/include/svx/ipolypolygoneditorcontroller.hxx
index 1df1046..c7cdad9 100644
--- a/include/svx/ipolypolygoneditorcontroller.hxx
+++ b/include/svx/ipolypolygoneditorcontroller.hxx
@@ -26,12 +26,13 @@
// Defines
-
-enum SdrPathSmoothKind {SDRPATHSMOOTH_DONTCARE, // only for status query
- SDRPATHSMOOTH_ANGULAR, // angular
- SDRPATHSMOOTH_ASYMMETRIC, // asymmetric, normal Smooth
- SDRPATHSMOOTH_SYMMETRIC}; // symmetric
-
+enum class SdrPathSmoothKind
+{
+ DontCare, // only for status query
+ Angular, // angular
+ Asymmetric, // asymmetric, normal Smooth
+ Symmetric // symmetric
+};
enum class SdrPathSegmentKind
{
DontCare, // only for status query
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 4a78617..6e45836 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -1125,22 +1125,22 @@ SdrPathSmoothKind MotionPathTag::GetMarkedPointsSmooth() const
if( mpPathObj )
return mrView.GetMarkedPointsSmooth();
else
- return SDRPATHSMOOTH_ANGULAR;
+ return SdrPathSmoothKind::Angular;
}
void MotionPathTag::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
{
basegfx::B2VectorContinuity eFlags;
- if(SDRPATHSMOOTH_ANGULAR == eKind)
+ if(SdrPathSmoothKind::Angular == eKind)
{
eFlags = basegfx::B2VectorContinuity::NONE;
}
- else if(SDRPATHSMOOTH_ASYMMETRIC == eKind)
+ else if(SdrPathSmoothKind::Asymmetric == eKind)
{
eFlags = basegfx::B2VectorContinuity::C1;
}
- else if(SDRPATHSMOOTH_SYMMETRIC == eKind)
+ else if(SdrPathSmoothKind::Symmetric == eKind)
{
eFlags = basegfx::B2VectorContinuity::C2;
}
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 55a7553..f012242 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -167,10 +167,10 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
SdrPathSmoothKind eSmooth = pIPPEC->GetMarkedPointsSmooth();
switch (eSmooth)
{
- case SDRPATHSMOOTH_DONTCARE : break;
- case SDRPATHSMOOTH_ANGULAR : rSet.Put(SfxBoolItem(SID_BEZIER_EDGE, true)); break;
- case SDRPATHSMOOTH_ASYMMETRIC: rSet.Put(SfxBoolItem(SID_BEZIER_SMOOTH,true)); break;
- case SDRPATHSMOOTH_SYMMETRIC : rSet.Put(SfxBoolItem(SID_BEZIER_SYMMTR,true)); break;
+ case SdrPathSmoothKind::DontCare : break;
+ case SdrPathSmoothKind::Angular : rSet.Put(SfxBoolItem(SID_BEZIER_EDGE, true)); break;
+ case SdrPathSmoothKind::Asymmetric: rSet.Put(SfxBoolItem(SID_BEZIER_SMOOTH,true)); break;
+ case SdrPathSmoothKind::Symmetric : rSet.Put(SfxBoolItem(SID_BEZIER_SYMMTR,true)); break;
}
}
if (!pIPPEC || !pIPPEC->IsOpenCloseMarkedObjectsPossible())
@@ -249,9 +249,9 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
switch (nSId)
{
default:
- case SID_BEZIER_EDGE: eKind = SDRPATHSMOOTH_ANGULAR; break;
- case SID_BEZIER_SMOOTH: eKind = SDRPATHSMOOTH_ASYMMETRIC; break;
- case SID_BEZIER_SYMMTR: eKind = SDRPATHSMOOTH_SYMMETRIC; break;
+ case SID_BEZIER_EDGE: eKind = SdrPathSmoothKind::Angular; break;
+ case SID_BEZIER_SMOOTH: eKind = SdrPathSmoothKind::Asymmetric; break;
+ case SID_BEZIER_SYMMTR: eKind = SdrPathSmoothKind::Symmetric; break;
}
pIPPEC->SetMarkedPointsSmooth(eKind);
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 896a093..cbd6fda 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -156,7 +156,7 @@ void GraphCtrl::InitSdrModel()
pView->EnableExtendedMouseEventDispatcher( true );
pView->ShowSdrPage(pView->GetModel()->GetPage(0));
pView->SetFrameDragSingles();
- pView->SetMarkedPointsSmooth( SDRPATHSMOOTH_SYMMETRIC );
+ pView->SetMarkedPointsSmooth( SdrPathSmoothKind::Symmetric );
pView->SetEditMode();
// #i72889# set needed flags
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 502a1d7..d4c2e2a 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -38,7 +38,7 @@ using namespace sdr;
void SdrPolyEditView::ImpResetPolyPossibilityFlags()
{
- eMarkedPointsSmooth=SDRPATHSMOOTH_DONTCARE;
+ eMarkedPointsSmooth=SdrPathSmoothKind::DontCare;
eMarkedSegmentsKind=SdrPathSegmentKind::DontCare;
bSetMarkedPointsSmoothPossible=false;
bSetMarkedSegmentsKindPossible=false;
@@ -153,17 +153,17 @@ void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmoot
{
if(basegfx::B2VectorContinuity::NONE == eSmooth)
{
- eMarkedPointsSmooth = SDRPATHSMOOTH_ANGULAR;
+ eMarkedPointsSmooth = SdrPathSmoothKind::Angular;
}
if(basegfx::B2VectorContinuity::C1 == eSmooth)
{
- eMarkedPointsSmooth = SDRPATHSMOOTH_ASYMMETRIC;
+ eMarkedPointsSmooth = SdrPathSmoothKind::Asymmetric;
}
if(basegfx::B2VectorContinuity::C2 == eSmooth)
{
- eMarkedPointsSmooth = SDRPATHSMOOTH_SYMMETRIC;
+ eMarkedPointsSmooth = SdrPathSmoothKind::Symmetric;
}
}
@@ -179,15 +179,15 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
{
basegfx::B2VectorContinuity eFlags;
- if(SDRPATHSMOOTH_ANGULAR == eKind)
+ if(SdrPathSmoothKind::Angular == eKind)
{
eFlags = basegfx::B2VectorContinuity::NONE;
}
- else if(SDRPATHSMOOTH_ASYMMETRIC == eKind)
+ else if(SdrPathSmoothKind::Asymmetric == eKind)
{
eFlags = basegfx::B2VectorContinuity::C1;
}
- else if(SDRPATHSMOOTH_SYMMETRIC == eKind)
+ else if(SdrPathSmoothKind::Symmetric == eKind)
{
eFlags = basegfx::B2VectorContinuity::C2;
}
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 115628b..b05c393 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -168,13 +168,13 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_SMOOTH:
case SID_BEZIER_SYMMTR:
{
- SdrPathSmoothKind eKind = SDRPATHSMOOTH_ASYMMETRIC;
+ SdrPathSmoothKind eKind = SdrPathSmoothKind::Asymmetric;
switch (nSlotId)
{
- case SID_BEZIER_EDGE: eKind = SDRPATHSMOOTH_ANGULAR; break;
- case SID_BEZIER_SMOOTH: eKind = SDRPATHSMOOTH_ASYMMETRIC; break;
- case SID_BEZIER_SYMMTR: eKind = SDRPATHSMOOTH_SYMMETRIC; break;
+ case SID_BEZIER_EDGE: eKind = SdrPathSmoothKind::Angular; break;
+ case SID_BEZIER_SMOOTH: eKind = SdrPathSmoothKind::Asymmetric; break;
+ case SID_BEZIER_SYMMTR: eKind = SdrPathSmoothKind::Symmetric; break;
}
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth();
@@ -284,15 +284,15 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
bool bEnable = false;
switch (eSmooth)
{
- case SDRPATHSMOOTH_DONTCARE :
+ case SdrPathSmoothKind::DontCare :
break;
- case SDRPATHSMOOTH_ANGULAR :
+ case SdrPathSmoothKind::Angular :
bEnable = nWhich == SID_BEZIER_EDGE;
break;
- case SDRPATHSMOOTH_ASYMMETRIC:
+ case SdrPathSmoothKind::Asymmetric:
bEnable = nWhich == SID_BEZIER_SMOOTH;
break;
- case SDRPATHSMOOTH_SYMMETRIC :
+ case SdrPathSmoothKind::Symmetric :
bEnable = nWhich == SID_BEZIER_SYMMTR;
break;
}
commit 9649154f1d844c76ca134d73cd3736452f4f55d4
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 15:43:55 2016 +0200
convert SdrPathSegmentKind to scoped enum
Change-Id: I1f5da7fb90b0100610677279e93b6e02347c120f
diff --git a/include/svx/ipolypolygoneditorcontroller.hxx b/include/svx/ipolypolygoneditorcontroller.hxx
index 41bdf92..1df1046 100644
--- a/include/svx/ipolypolygoneditorcontroller.hxx
+++ b/include/svx/ipolypolygoneditorcontroller.hxx
@@ -32,11 +32,13 @@ enum SdrPathSmoothKind {SDRPATHSMOOTH_DONTCARE, // only for status query
SDRPATHSMOOTH_ASYMMETRIC, // asymmetric, normal Smooth
SDRPATHSMOOTH_SYMMETRIC}; // symmetric
-enum SdrPathSegmentKind {SDRPATHSEGMENT_DONTCARE, // only for status query
- SDRPATHSEGMENT_LINE, // straight path segment
- SDRPATHSEGMENT_CURVE, // curve path segment (Bezier)
- SDRPATHSEGMENT_TOGGLE}; // only for Set: Toggle
-
+enum class SdrPathSegmentKind
+{
+ DontCare, // only for status query
+ Line, // straight path segment
+ Curve, // curve path segment (Bezier)
+ Toggle // only for Set: Toggle
+};
enum class SdrObjClosedKind
{
DontCare, // only for status query
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index df05aed..4a78617 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -1091,7 +1091,7 @@ SdrPathSegmentKind MotionPathTag::GetMarkedSegmentsKind() const
if( mpPathObj )
return mrView.GetMarkedSegmentsKind();
else
- return SDRPATHSEGMENT_LINE;
+ return SdrPathSegmentKind::Line;
}
void MotionPathTag::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index c002971..55a7553 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -150,9 +150,9 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
SdrPathSegmentKind eSegm = pIPPEC->GetMarkedSegmentsKind();
switch (eSegm)
{
- case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,false)); break; // Button down = curve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,true)); break;
+ case SdrPathSegmentKind::DontCare: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
+ case SdrPathSegmentKind::Line : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,false)); break; // Button down = curve
+ case SdrPathSegmentKind::Curve : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,true)); break;
default: break;
}
}
@@ -236,7 +236,7 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
case SID_BEZIER_CONVERT:
{
- pIPPEC->SetMarkedSegmentsKind(SDRPATHSEGMENT_TOGGLE);
+ pIPPEC->SetMarkedSegmentsKind(SdrPathSegmentKind::Toggle);
break;
}
diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx
index 8e91c77..9fab1ba 100644
--- a/svx/source/svdraw/polypolygoneditor.cxx
+++ b/svx/source/svdraw/polypolygoneditor.cxx
@@ -88,7 +88,7 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set
if(bContolUsed)
{
- if(SDRPATHSEGMENT_TOGGLE == eKind || SDRPATHSEGMENT_LINE == eKind)
+ if(SdrPathSegmentKind::Toggle == eKind || SdrPathSegmentKind::Line == eKind)
{
// remove control
aCandidate.resetNextControlPoint(nPntNum);
@@ -98,7 +98,7 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set
}
else
{
- if(SDRPATHSEGMENT_TOGGLE == eKind || SDRPATHSEGMENT_CURVE == eKind)
+ if(SdrPathSegmentKind::Toggle == eKind || SdrPathSegmentKind::Curve == eKind)
{
// add control
const basegfx::B2DPoint aStart(aCandidate.getB2DPoint(nPntNum));
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 4f4c927..502a1d7 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -39,7 +39,7 @@ using namespace sdr;
void SdrPolyEditView::ImpResetPolyPossibilityFlags()
{
eMarkedPointsSmooth=SDRPATHSMOOTH_DONTCARE;
- eMarkedSegmentsKind=SDRPATHSEGMENT_DONTCARE;
+ eMarkedSegmentsKind=SdrPathSegmentKind::DontCare;
bSetMarkedPointsSmoothPossible=false;
bSetMarkedSegmentsKindPossible=false;
}
@@ -169,7 +169,7 @@ void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmoot
if(!b1stSegm && !bSegmFuz)
{
- eMarkedSegmentsKind = (bCurve) ? SDRPATHSEGMENT_CURVE : SDRPATHSEGMENT_LINE;
+ eMarkedSegmentsKind = (bCurve) ? SdrPathSegmentKind::Curve : SdrPathSegmentKind::Line;
}
}
}
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 212717a..115628b 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -160,7 +160,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_CONVERT:
{
- pSdrView->SetMarkedSegmentsKind(SDRPATHSEGMENT_TOGGLE);
+ pSdrView->SetMarkedSegmentsKind(SdrPathSegmentKind::Toggle);
break;
}
@@ -265,9 +265,9 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrPathSegmentKind eSegm = pSdrView->GetMarkedSegmentsKind();
switch (eSegm)
{
- case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,false)); break; // Button pressed = curve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,true)); break;
+ case SdrPathSegmentKind::DontCare: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
+ case SdrPathSegmentKind::Line : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,false)); break; // Button pressed = curve
+ case SdrPathSegmentKind::Curve : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,true)); break;
default:; //prevent warning
}
}
commit 8267445b2e923b9de0ebe8c15e928e91c834ab86
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 15:26:17 2016 +0200
convert SdrObjClosedKind to scoped enum
Change-Id: Icb3a6ce66687ea66f72df956dc695e0a4147365e
diff --git a/include/svx/ipolypolygoneditorcontroller.hxx b/include/svx/ipolypolygoneditorcontroller.hxx
index ebd9eab..41bdf92 100644
--- a/include/svx/ipolypolygoneditorcontroller.hxx
+++ b/include/svx/ipolypolygoneditorcontroller.hxx
@@ -37,9 +37,12 @@ enum SdrPathSegmentKind {SDRPATHSEGMENT_DONTCARE, // only for status query
SDRPATHSEGMENT_CURVE, // curve path segment (Bezier)
SDRPATHSEGMENT_TOGGLE}; // only for Set: Toggle
-enum SdrObjClosedKind {SDROBJCLOSED_DONTCARE, // only for status query
- SDROBJCLOSED_OPEN, // non-closed object (line, polyline, ...)
- SDROBJCLOSED_CLOSED}; // closed object (polygon, ...)
+enum class SdrObjClosedKind
+{
+ DontCare, // only for status query
+ Open, // non-closed object (line, polyline, ...)
+ Closed // closed object (polygon, ...)
+};
class IPolyPolygonEditorController
{
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index aed3a65..df05aed 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -1174,7 +1174,7 @@ bool MotionPathTag::IsOpenCloseMarkedObjectsPossible() const
SdrObjClosedKind MotionPathTag::GetMarkedObjectsClosedState() const
{
// not supported for motion path
- return SDROBJCLOSED_OPEN;
+ return SdrObjClosedKind::Open;
}
// XChangesListener
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 31b7a87..c002971 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -182,9 +182,9 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
SdrObjClosedKind eClose = pIPPEC->GetMarkedObjectsClosedState();
switch (eClose)
{
- case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,false)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,true)); break;
+ case SdrObjClosedKind::DontCare: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
+ case SdrObjClosedKind::Open : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,false)); break;
+ case SdrObjClosedKind::Closed : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,true)); break;
default: break;
}
}
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index b1795f1..4f4c927 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -525,15 +525,15 @@ SdrObjClosedKind SdrPolyEditView::GetMarkedObjectsClosedState() const
if(bOpen && bClosed)
{
- return SDROBJCLOSED_DONTCARE;
+ return SdrObjClosedKind::DontCare;
}
else if(bOpen)
{
- return SDROBJCLOSED_OPEN;
+ return SdrObjClosedKind::Open;
}
else
{
- return SDROBJCLOSED_CLOSED;
+ return SdrObjClosedKind::Closed;
}
}
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 8303d4c..212717a 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -310,9 +310,9 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrObjClosedKind eClose = pSdrView->GetMarkedObjectsClosedState();
switch (eClose)
{
- case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,false)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,true)); break;
+ case SdrObjClosedKind::DontCare: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
+ case SdrObjClosedKind::Open : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,false)); break;
+ case SdrObjClosedKind::Closed : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,true)); break;
default:; //prevent warning
}
}
commit 3d226bdc444084615b29f79b977ade73fd653240
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 14:57:09 2016 +0200
convert EditedAndValid to scoped enum
Change-Id: I0f321de899771fe826224decddab1ec92d64a21a
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2ec8336..9f32516 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1122,17 +1122,17 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
{
switch (pLangComboBox->GetEditedAndValid())
{
- case SvxLanguageComboBox::EDITED_NO:
+ case SvxLanguageComboBox::EditedAndValid::No:
; // nothing to do
break;
- case SvxLanguageComboBox::EDITED_VALID:
+ case SvxLanguageComboBox::EditedAndValid::Valid:
{
const sal_Int32 nPos = pLangComboBox->SaveEditedAsEntry();
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
pLangComboBox->SelectEntryPos( nPos);
}
break;
- case SvxLanguageComboBox::EDITED_INVALID:
+ case SvxLanguageComboBox::EditedAndValid::Invalid:
pLangComboBox->SelectEntryPos( pLangComboBox->GetSavedValueLBB());
break;
}
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index 1f418f7..474348e 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -149,11 +149,11 @@ class SVX_DLLPUBLIC SvxLanguageComboBox : public ComboBox, public SvxLanguageBox
public:
SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits );
- enum EditedAndValid
+ enum class EditedAndValid
{
- EDITED_NO,
- EDITED_VALID,
- EDITED_INVALID
+ No,
+ Valid,
+ Invalid
};
EditedAndValid GetEditedAndValid() const { return meEditedAndValid;}
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 690ce9f15..11655fd 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -499,7 +499,7 @@ SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits )
: ComboBox( pParent, nBits )
, SvxLanguageBoxBase( false )
, mnSavedValuePos( COMBOBOX_ENTRY_NOTFOUND )
- , meEditedAndValid( EDITED_NO )
+ , meEditedAndValid( EditedAndValid::No )
{
// display entries sorted
SetStyle( GetStyle() | WB_SORT );
@@ -682,7 +682,7 @@ IMPL_LINK_NOARG_TYPED( SvxLanguageComboBox, EditModifyHdl, Edit&, void )
EditedAndValid eOldState = meEditedAndValid;
OUString aStr( vcl::I18nHelper::filterFormattingChars( GetText()));
if (aStr.isEmpty())
- meEditedAndValid = EDITED_INVALID;
+ meEditedAndValid = EditedAndValid::Invalid;
else
{
const sal_Int32 nPos = GetEntryPos( aStr);
@@ -721,13 +721,13 @@ IMPL_LINK_NOARG_TYPED( SvxLanguageComboBox, EditModifyHdl, Edit&, void )
if (bSetEditSelection)
SetSelection( aSel);
- meEditedAndValid = EDITED_NO;
+ meEditedAndValid = EditedAndValid::No;
}
else
{
OUString aCanonicalized;
bool bValid = LanguageTag::isValidBcp47( aStr, &aCanonicalized, true);
- meEditedAndValid = (bValid ? EDITED_VALID : EDITED_INVALID);
+ meEditedAndValid = (bValid ? EditedAndValid::Valid : EditedAndValid::Invalid);
if (bValid && aCanonicalized != aStr)
{
SetText( aCanonicalized);
@@ -737,7 +737,7 @@ IMPL_LINK_NOARG_TYPED( SvxLanguageComboBox, EditModifyHdl, Edit&, void )
}
if (eOldState != meEditedAndValid)
{
- if (meEditedAndValid == EDITED_INVALID)
+ if (meEditedAndValid == EditedAndValid::Invalid)
{
#if 0
//! Gives white on white!?! instead of white on reddish.
@@ -758,7 +758,7 @@ IMPL_LINK_NOARG_TYPED( SvxLanguageComboBox, EditModifyHdl, Edit&, void )
sal_Int32 SvxLanguageComboBox::SaveEditedAsEntry()
{
- if (meEditedAndValid != EDITED_VALID)
+ if (meEditedAndValid != EditedAndValid::Valid)
return COMBOBOX_ENTRY_NOTFOUND;
LanguageTag aLanguageTag( vcl::I18nHelper::filterFormattingChars( GetText()));
commit 00c3ea0ac629f695d22bb1debba385532f965379
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 14:55:53 2016 +0200
convert SvxNumberValueType to scoped enum
Change-Id: Ic82c18c16de8bd756a444de47c9a68e88fa1c7ee
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 51b9187..d37ed27 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -412,7 +412,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
sal_uInt16 nFmtLbSelPos = 0;
LanguageType eLangType = LANGUAGE_DONTKNOW;
std::vector<OUString> aFmtEntryList;
- SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED;
+ SvxNumberValueType eValType = SvxNumberValueType::Undefined;
double nValDouble = 0;
OUString aValString;
@@ -501,15 +501,15 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
switch ( eValType )
{
- case SVX_VALUE_TYPE_STRING:
+ case SvxNumberValueType::String:
aValString = pNumItem->GetValueString();
break;
- case SVX_VALUE_TYPE_NUMBER:
+ case SvxNumberValueType::Number:
// #50441# string may be set in addition to the value
aValString = pNumItem->GetValueString();
nValDouble = pNumItem->GetValueDouble();
break;
- case SVX_VALUE_TYPE_UNDEFINED:
+ case SvxNumberValueType::Undefined:
default:
break;
}
@@ -521,7 +521,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
: ULONG_MAX; // == DONT_KNOW
- if ( eValType == SVX_VALUE_TYPE_STRING )
+ if ( eValType == SvxNumberValueType::String )
pNumFmtShell =SvxNumberFormatShell::Create(
pNumItem->GetNumberFormatter(),
(pValFmtAttr) ? nInitFormat : 0L,
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 7e0d8cc..da2b07b 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -30,11 +30,11 @@
class Color;
-enum SvxNumberValueType
+enum class SvxNumberValueType
{
- SVX_VALUE_TYPE_UNDEFINED = 0,
- SVX_VALUE_TYPE_NUMBER,
- SVX_VALUE_TYPE_STRING
+ Undefined,
+ Number,
+ String
};
// sort order of the category ListBox entries in the TabPage
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 9772bd7..42888b6 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -309,7 +309,7 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD
// NumberInfo-Item konstruieren:
- SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED;
+ SvxNumberValueType eValType = SvxNumberValueType::Undefined;
double nCellValue = 0;
OUString aCellString;
@@ -320,14 +320,14 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD
case CELLTYPE_VALUE:
{
nCellValue = aCell.mfValue;
- eValType = SVX_VALUE_TYPE_NUMBER;
+ eValType = SvxNumberValueType::Number;
}
break;
case CELLTYPE_STRING:
{
aCellString = aCell.mpString->getString();
- eValType = SVX_VALUE_TYPE_STRING;
+ eValType = SvxNumberValueType::String;
}
break;
@@ -336,36 +336,36 @@ SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewD
if (aCell.mpFormula->IsValue())
{
nCellValue = aCell.mpFormula->GetValue();
- eValType = SVX_VALUE_TYPE_NUMBER;
+ eValType = SvxNumberValueType::Number;
}
else
{
nCellValue = 0;
- eValType = SVX_VALUE_TYPE_UNDEFINED;
+ eValType = SvxNumberValueType::Undefined;
}
}
break;
default:
nCellValue = 0;
- eValType = SVX_VALUE_TYPE_UNDEFINED;
+ eValType = SvxNumberValueType::Undefined;
}
switch ( eValType )
{
- case SVX_VALUE_TYPE_STRING:
+ case SvxNumberValueType::String:
return new SvxNumberInfoItem(
pDoc->GetFormatTable(),
aCellString,
SID_ATTR_NUMBERFORMAT_INFO );
- case SVX_VALUE_TYPE_NUMBER:
+ case SvxNumberValueType::Number:
return new SvxNumberInfoItem(
pDoc->GetFormatTable(),
nCellValue,
SID_ATTR_NUMBERFORMAT_INFO );
- case SVX_VALUE_TYPE_UNDEFINED:
+ case SvxNumberValueType::Undefined:
default:
;
}
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index f27f8c5..dd53982 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -103,16 +103,16 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
switch ( eValType )
{
- case SVX_VALUE_TYPE_STRING:
+ case SvxNumberValueType::String:
aValStr = rNumStr;
break;
- case SVX_VALUE_TYPE_NUMBER:
+ case SvxNumberValueType::Number:
if ( pFormatter )
{
nValNum = GetDefaultValNum( pFormatter->GetType( nCurFormatKey ) );
}
SAL_FALLTHROUGH;
- case SVX_VALUE_TYPE_UNDEFINED:
+ case SvxNumberValueType::Undefined:
default:
aValStr.clear();
}
@@ -144,11 +144,11 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
switch ( eValType )
{
- case SVX_VALUE_TYPE_NUMBER:
+ case SvxNumberValueType::Number:
nValNum = nNumVal;
break;
- case SVX_VALUE_TYPE_STRING:
- case SVX_VALUE_TYPE_UNDEFINED:
+ case SvxNumberValueType::String:
+ case SvxNumberValueType::Undefined:
default:
nValNum = SVX_NUMVAL_STANDARD;
bIsDefaultValNum = true;
@@ -454,7 +454,7 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr,
// format exists
// #50441# if a string was set in addition to the value, use it for text formats
- bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING ||
+ bool bUseText = ( eValType == SvxNumberValueType::String ||
( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & css::util::NumberFormat::TEXT ) ) );
if ( bUseText )
{
@@ -539,7 +539,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
short nSelPos = SELPOS_NONE;
// Sonderbehandlung fuer undefiniertes Zahlenformat:
- if ( (eValType == SVX_VALUE_TYPE_UNDEFINED) && (nCurFormatKey == 0) )
+ if ( (eValType == SvxNumberValueType::Undefined) && (nCurFormatKey == 0) )
PosToCategory_Impl( CAT_ALL, nCurCategory ); // Kategorie = Alle
else
nCurCategory = css::util::NumberFormat::UNDEFINED; // Kategorie = Undefiniert
@@ -1116,7 +1116,7 @@ void SvxNumberFormatShell::GetPreviewString_Impl( OUString& rString, Color*& rpC
rpColor = nullptr;
// #50441# if a string was set in addition to the value, use it for text formats
- bool bUseText = ( eValType == SVX_VALUE_TYPE_STRING ||
+ bool bUseText = ( eValType == SvxNumberValueType::String ||
( !aValStr.isEmpty() && ( pFormatter->GetType(nCurFormatKey) & css::util::NumberFormat::TEXT ) ) );
if ( bUseText )
diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx
index 18f7e65..680493b 100644
--- a/svx/source/items/numinf.cxx
+++ b/svx/source/items/numinf.cxx
@@ -32,7 +32,7 @@
SvxNumberInfoItem::SvxNumberInfoItem( const sal_uInt16 nId ) :
- INIT( nullptr, SVX_VALUE_TYPE_UNDEFINED, 0, "" )
+ INIT( nullptr, SvxNumberValueType::Undefined, 0, "" )
{
}
@@ -41,7 +41,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( const sal_uInt16 nId ) :
SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
const sal_uInt16 nId ) :
- INIT( pNumFormatter, SVX_VALUE_TYPE_UNDEFINED, 0, "" )
+ INIT( pNumFormatter, SvxNumberValueType::Undefined, 0, "" )
{
}
@@ -50,7 +50,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
const OUString& rVal, const sal_uInt16 nId ) :
- INIT( pNumFormatter, SVX_VALUE_TYPE_STRING, 0, rVal )
+ INIT( pNumFormatter, SvxNumberValueType::String, 0, rVal )
{
}
@@ -59,7 +59,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
const double& rVal, const sal_uInt16 nId ) :
- INIT( pNumFormatter, SVX_VALUE_TYPE_NUMBER, rVal, "" )
+ INIT( pNumFormatter, SvxNumberValueType::Number, rVal, "" )
{
}
@@ -69,7 +69,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
const double& rVal, const OUString& rValueStr,
const sal_uInt16 nId ) :
- INIT( pNumFormatter, SVX_VALUE_TYPE_NUMBER, rVal, rValueStr )
+ INIT( pNumFormatter, SvxNumberValueType::Number, rVal, rValueStr )
{
}
commit 20d1ee06c0242948e7e512db5465fdbdedc70916
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 14:27:36 2016 +0200
convert PaperSizeApp to scoped enum
Change-Id: Ifd452ed0ca53223ae9b45e1b3b232fcfc6d29496
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 61d5da6..ca206e6 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -553,7 +553,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
SetMetricValue( *m_pPaperWidthEdit, aPaperSize.Width(), MAP_100TH_MM );
m_pPaperSizeBox->Clear();
- m_pPaperSizeBox->FillPaperSizeEntries( ( ePaperStart == PAPER_A3 ) ? PaperSizeStd : PaperSizeDraw );
+ m_pPaperSizeBox->FillPaperSizeEntries( ( ePaperStart == PAPER_A3 ) ? PaperSizeApp::Std : PaperSizeApp::Draw );
m_pPaperSizeBox->SetSelection( ePaper );
// application specific
diff --git a/include/svx/papersizelistbox.hxx b/include/svx/papersizelistbox.hxx
index 4ff24e3..2d2cf5b 100644
--- a/include/svx/papersizelistbox.hxx
+++ b/include/svx/papersizelistbox.hxx
@@ -24,10 +24,10 @@
#include <svx/svxdllapi.h>
#include <vcl/lstbox.hxx>
-enum PaperSizeApp
+enum class PaperSizeApp
{
- PaperSizeStd,
- PaperSizeDraw
+ Std,
+ Draw
};
class SVX_DLLPUBLIC PaperSizeListBox : public ListBox
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 370f27a..4d7b6f4 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -147,7 +147,7 @@ bool SlideBackground::IsImpress()
void SlideBackground::Initialize()
{
- mpPaperSizeBox->FillPaperSizeEntries( PaperSizeDraw );
+ mpPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Draw );
mpPaperSizeBox->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl));
mpPaperOrientation->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl));
mpCloseMaster->Hide();
diff --git a/svx/source/dialog/papersizelistbox.cxx b/svx/source/dialog/papersizelistbox.cxx
index 30dbf0e..67401cf 100644
--- a/svx/source/dialog/papersizelistbox.cxx
+++ b/svx/source/dialog/papersizelistbox.cxx
@@ -34,7 +34,7 @@ VCL_BUILDER_FACTORY(PaperSizeListBox);
void PaperSizeListBox::FillPaperSizeEntries( PaperSizeApp eApp )
{
- ResStringArray aPaperAry( SVX_RES( ( eApp == PaperSizeStd ) ?
+ ResStringArray aPaperAry( SVX_RES( ( eApp == PaperSizeApp::Std ) ?
RID_SVXSTRARY_PAPERSIZE_STD : RID_SVXSTRARY_PAPERSIZE_DRAW ) );
sal_uInt32 nCnt = aPaperAry.Count();
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index c61e304..6d7bac0 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -109,7 +109,7 @@ void PageFormatPanel::dispose()
void PageFormatPanel::Initialize()
{
- mpPaperSizeBox->FillPaperSizeEntries( PaperSizeStd );
+ mpPaperSizeBox->FillPaperSizeEntries( PaperSizeApp::Std );
mpPaperSizeBox->SetDropDownLineCount(6);
meUnit = maPaperSizeController.GetCoreMetric();
SetFieldUnit( *mpPaperWidth, meFUnit );
commit 6971da088718321b3790ce4d1d7b238dc8b76ce8
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 14:19:34 2016 +0200
convert CTL_STYLE to scoped enum
Change-Id: I11cd4c4ac409f898676bc6049b21580f83450b03
diff --git a/include/svx/rectenum.hxx b/include/svx/rectenum.hxx
index e3413f1..9ca2e65 100644
--- a/include/svx/rectenum.hxx
+++ b/include/svx/rectenum.hxx
@@ -26,12 +26,12 @@ enum RECT_POINT
RP_LT, RP_MT, RP_RT, RP_LM, RP_MM, RP_RM, RP_LB, RP_MB, RP_RB
};
-enum CTL_STYLE
+enum class CTL_STYLE
{
- CS_RECT,
- CS_LINE,
- CS_ANGLE,
- CS_SHADOW
+ Rect,
+ Line,
+ Angle,
+ Shadow
};
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 17934ed..dfba8b8 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -73,7 +73,7 @@ SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt,
, nBorderWidth(nBorder)
, nRadius(nCircle)
, eDefRP(eRpt)
- , eCS(CS_RECT)
+ , eCS(CTL_STYLE::Rect)
, pBitmap(nullptr)
, m_nState(CTL_STATE::NONE)
, mbCompleteDisable(false)
@@ -89,7 +89,7 @@ void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uIn
nBorderWidth = nBorder;
nRadius = nCircle;
eDefRP = eRpt;
- eCS = CS_RECT;
+ eCS = CTL_STYLE::Rect;
Resize_Impl();
}
@@ -127,9 +127,9 @@ void SvxRectCtl::Resize_Impl()
switch( eCS )
{
- case CS_RECT:
- case CS_ANGLE:
- case CS_SHADOW:
+ case CTL_STYLE::Rect:
+ case CTL_STYLE::Angle:
+ case CTL_STYLE::Shadow:
aPtLT = Point( 0 + nBorderWidth, 0 + nBorderWidth );
aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
aPtRT = Point( aSize.Width() - nBorderWidth, 0 + nBorderWidth );
@@ -143,7 +143,7 @@ void SvxRectCtl::Resize_Impl()
aPtRB = Point( aSize.Width() - nBorderWidth, aSize.Height() - nBorderWidth );
break;
- case CS_LINE:
+ case CTL_STYLE::Line:
aPtLT = Point( 0 + 3 * nBorderWidth, 0 + nBorderWidth );
aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
aPtRT = Point( aSize.Width() - 3 * nBorderWidth, 0 + nBorderWidth );
@@ -255,7 +255,7 @@ void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt )
aPtNew = GetApproxLogPtFromPixPt( rMEvt.GetPosPixel() );
- if( aPtNew == aPtMM && ( eCS == CS_SHADOW || eCS == CS_ANGLE ) )
+ if( aPtNew == aPtMM && ( eCS == CTL_STYLE::Shadow || eCS == CTL_STYLE::Angle ) )
{
aPtNew = aPtLast;
}
@@ -282,7 +282,7 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
if(!IsCompletelyDisabled())
{
RECT_POINT eNewRP = eRP;
- bool bUseMM = (eCS != CS_SHADOW) && (eCS != CS_ANGLE);
+ bool bUseMM = (eCS != CTL_STYLE::Shadow) && (eCS != CTL_STYLE::Angle);
switch( rKeyEvt.GetKeyCode().GetCode() )
{
@@ -407,8 +407,8 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
switch (eCS)
{
- case CS_RECT:
- case CS_SHADOW:
+ case CTL_STYLE::Rect:
+ case CTL_STYLE::Shadow:
if (!IsEnabled())
{
Color aOldCol = rRenderContext.GetLineColor();
@@ -419,7 +419,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
rRenderContext.DrawRect(Rectangle(aPtLT, aPtRB));
break;
- case CS_LINE:
+ case CTL_STYLE::Line:
if (!IsEnabled())
{
Color aOldCol = rRenderContext.GetLineColor();
@@ -432,7 +432,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
aPtRM + Point(2 * nBorderWidth, 0));
break;
- case CS_ANGLE:
+ case CTL_STYLE::Angle:
if (!IsEnabled())
{
Color aOldCol = rRenderContext.GetLineColor();
@@ -473,7 +473,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
rRenderContext.DrawBitmap(aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
- if (eCS == CS_RECT || eCS == CS_LINE)
+ if (eCS == CTL_STYLE::Rect || eCS == CTL_STYLE::Line)
rRenderContext.DrawBitmap(aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
@@ -488,7 +488,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
rRenderContext.DrawBitmap(aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
// Center for rectangle and line
- if (eCS == CS_RECT || eCS == CS_LINE)
+ if (eCS == CTL_STYLE::Rect || eCS == CTL_STYLE::Line)
rRenderContext.DrawBitmap(aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, rBitmap);
rRenderContext.DrawBitmap(aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
@@ -501,7 +501,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if (!IsCompletelyDisabled())
{
- if (IsEnabled() && (eCS != CS_ANGLE || aPtNew != aPtMM))
+ if (IsEnabled() && (eCS != CTL_STYLE::Angle || aPtNew != aPtMM))
{
Point aCenterPt(aPtNew);
aCenterPt -= aToCenter;
@@ -677,7 +677,7 @@ void SvxRectCtl::SetState( CTL_STATE nState )
sal_uInt8 SvxRectCtl::GetNumOfChildren() const
{
- return ( eCS == CS_ANGLE )? 8 : 9;
+ return ( eCS == CTL_STYLE::Angle )? 8 : 9;
}
Rectangle SvxRectCtl::CalculateFocusRectangle() const
commit 27caeb631927a3e9dd8510768535afcd8f393773
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 14:10:24 2016 +0200
convert UpdateType to scoped enum
Change-Id: I1000875c186ee21d065e97b522f464ed6b635758
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index ebfc956..ca44488 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -218,13 +218,13 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
DECL_LINK_TYPED( MenuSelect, Menu *, bool );
void PrepareProportional_Impl(RulerType);
- enum UpdateType
+ enum class UpdateType
{
- MOVE_ALL,
- MOVE_LEFT,
- MOVE_RIGHT
+ MoveAll,
+ MoveLeft,
+ MoveRight
};
- void UpdateParaContents_Impl(long lDiff, UpdateType = MOVE_ALL);
+ void UpdateParaContents_Impl(long lDiff, UpdateType = UpdateType::MoveAll);
protected:
virtual void Command( const CommandEvent& rCEvt ) override;
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 7d05af0..1d3e1a0 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -1714,13 +1714,13 @@ void SvxRuler::UpdateParaContents_Impl(
/* Helper function; carry Tabs and Paragraph Margins */
switch(eType)
{
- case MOVE_RIGHT:
+ case UpdateType::MoveRight:
mpIndents[INDENT_RIGHT_MARGIN].nPos += lDifference;
break;
- case MOVE_ALL:
+ case UpdateType::MoveAll:
mpIndents[INDENT_RIGHT_MARGIN].nPos += lDifference;
SAL_FALLTHROUGH;
- case MOVE_LEFT:
+ case UpdateType::MoveLeft:
{
mpIndents[INDENT_FIRST_LINE].nPos += lDifference;
mpIndents[INDENT_LEFT_MARGIN].nPos += lDifference;
@@ -1783,13 +1783,13 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
// RR update the column
if(i == GetActRightColumn())
{
- UpdateParaContents_Impl(mpBorders[i].nPos - l, MOVE_RIGHT);
+ UpdateParaContents_Impl(mpBorders[i].nPos - l, UpdateType::MoveRight);
bRightIndentsCorrected = true;
}
// LAR, EZE update the column
else if(i == GetActLeftColumn())
{
- UpdateParaContents_Impl(mpBorders[i].nPos - l, MOVE_LEFT);
+ UpdateParaContents_Impl(mpBorders[i].nPos - l, UpdateType::MoveLeft);
bLeftIndentsCorrected = true;
}
}
@@ -1857,13 +1857,13 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
{
if(i == GetActRightColumn())
{
- UpdateParaContents_Impl(mpBorders[i].nPos - l, MOVE_RIGHT);
+ UpdateParaContents_Impl(mpBorders[i].nPos - l, UpdateType::MoveRight);
bRightIndentsCorrected = true;
}
// LAR, EZE update the column
else if(i == GetActLeftColumn())
{
- UpdateParaContents_Impl(mpBorders[i].nPos - l, MOVE_LEFT);
+ UpdateParaContents_Impl(mpBorders[i].nPos - l, UpdateType::MoveLeft);
bLeftIndentsCorrected = true;
}
}
@@ -1946,14 +1946,14 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin))
!mpIndents.empty() &&
!mxRulerImpl->bIsTableRows)
{
- UpdateParaContents_Impl(lDiff, MOVE_RIGHT);
+ UpdateParaContents_Impl(lDiff, UpdateType::MoveRight);
}
else if(!bLeftIndentsCorrected &&
GetActLeftColumn() == nIndex &&
nDragSize != RulerDragSize::N1 &&
!mpIndents.empty())
{
- UpdateParaContents_Impl(lDiff, MOVE_LEFT);
+ UpdateParaContents_Impl(lDiff, UpdateType::MoveLeft);
}
SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]);
}
commit 70d76c8165bc9393a92fa6d0dc9922364988abe2
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 13:47:09 2016 +0200
convert OverlayType to scoped enum
Change-Id: Ic7758ec96bdf7f532b5b95048dbb7eb5f360f74a
diff --git a/include/svx/sdr/overlay/overlayselection.hxx b/include/svx/sdr/overlay/overlayselection.hxx
index ed4d75a..4380e71 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -29,11 +29,11 @@ namespace sdr
namespace overlay
{
// overlay type definition
- enum OverlayType
+ enum class OverlayType
{
- OVERLAY_INVERT,
- OVERLAY_SOLID,
- OVERLAY_TRANSPARENT
+ Invert,
+ Solid,
+ Transparent
};
class SVX_DLLPUBLIC OverlaySelection : public OverlayObject
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index dba986a..94d38be 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6034,7 +6034,7 @@ void ScGridWindow::UpdateCursorOverlay()
}
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_SOLID,
+ sdr::overlay::OverlayType::Solid,
aCursorColor,
aRanges,
false);
@@ -6110,7 +6110,7 @@ void ScGridWindow::UpdateSelectionOverlay()
const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_TRANSPARENT,
+ sdr::overlay::OverlayType::Transparent,
aHighlight,
aRanges,
true);
@@ -6207,7 +6207,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
aRanges.push_back(aRB);
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_SOLID,
+ sdr::overlay::OverlayType::Solid,
aHandleColor,
aRanges,
false);
@@ -6334,7 +6334,7 @@ void ScGridWindow::UpdateDragRectOverlay()
}
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_INVERT,
+ sdr::overlay::OverlayType::Invert,
Color(COL_BLACK),
aRanges,
false);
@@ -6380,7 +6380,7 @@ void ScGridWindow::UpdateHeaderOverlay()
aRanges.push_back(aRB);
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_INVERT,
+ sdr::overlay::OverlayType::Invert,
Color(COL_BLACK),
aRanges,
false);
@@ -6447,7 +6447,7 @@ void ScGridWindow::UpdateShrinkOverlay()
aRanges.push_back(aRB);
sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_INVERT,
+ sdr::overlay::OverlayType::Invert,
Color(COL_BLACK),
aRanges,
false);
diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx
index ace91aa..b6b91fd 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -58,18 +58,18 @@ namespace sdr
return aRetval;
}
- // check if wanted type OVERLAY_TRANSPARENT or OVERLAY_SOLID
+ // check if wanted type OverlayType::Transparent or OverlayType::Solid
// is possible. If not, fallback to invert mode (classic mode)
OverlayType impCheckPossibleOverlayType(OverlayType aOverlayType)
{
- if(OVERLAY_INVERT != aOverlayType)
+ if(OverlayType::Invert != aOverlayType)
{
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
if(!aSvtOptionsDrawinglayer.IsTransparentSelection())
{
// not possible when switched off by user
- return OVERLAY_INVERT;
+ return OverlayType::Invert;
}
else if (const OutputDevice* pOut = Application::GetDefaultDevice())
{
@@ -77,13 +77,13 @@ namespace sdr
if(pOut->GetSettings().GetStyleSettings().GetHighContrastMode())
{
// not possible when in high contrast mode
- return OVERLAY_INVERT;
+ return OverlayType::Invert;
}
if(!pOut->SupportsOperation(OutDevSupport_TransparentRect))
{
// not possible when no fast transparence paint is supported on the system
- return OVERLAY_INVERT;
+ return OverlayType::Invert;
}
}
}
@@ -99,7 +99,7 @@ namespace sdr
if(nCount)
{
// create range primitives
- const bool bInvert(OVERLAY_INVERT == maLastOverlayType);
+ const bool bInvert(OverlayType::Invert == maLastOverlayType);
basegfx::BColor aRGBColor(getBaseColor().getBColor());
aRetval.resize(nCount);
@@ -126,7 +126,7 @@ namespace sdr
aRetval));
aRetval = drawinglayer::primitive2d::Primitive2DContainer { aInvert };
}
- else if(OVERLAY_TRANSPARENT == maLastOverlayType)
+ else if(OverlayType::Transparent == maLastOverlayType)
{
// embed all rectangles in transparent paint
const double fTransparence(mnLastTransparence / 100.0);
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index ca68ace..3cb2021 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -348,7 +348,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
// create correct selection
m_pCursorOverlay = new sdr::overlay::OverlaySelection(
- sdr::overlay::OVERLAY_TRANSPARENT,
+ sdr::overlay::OverlayType::Transparent,
aHighlight,
aNewRanges,
true);
commit 151752f89465ff980f9a377361eb90e4180943d3
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 13:35:32 2016 +0200
remove CellOverlayType
since only the CELL_OVERLAY_TRANSPARENT value was in use
Change-Id: Ia7a0dfbf09b08e2dfed62d51af42e1409b05f275
diff --git a/include/svx/sdr/overlay/overlayobjectcell.hxx b/include/svx/sdr/overlay/overlayobjectcell.hxx
index c5ef0e6..b2713a2 100644
--- a/include/svx/sdr/overlay/overlayobjectcell.hxx
+++ b/include/svx/sdr/overlay/overlayobjectcell.hxx
@@ -29,8 +29,6 @@ namespace sdr
{
namespace overlay
{
- enum CellOverlayType { CELL_OVERLAY_INVERT, CELL_OVERLAY_TRANSPARENT };
-
// OverlayObjectCell - used for cell cursor, selection and AutoFill handle
class SVX_DLLPUBLIC OverlayObjectCell : public OverlayObject
@@ -39,14 +37,13 @@ namespace sdr
typedef ::std::vector< basegfx::B2DRange > RangeVector;
private:
- CellOverlayType mePaintType;
RangeVector maRectangles;
// geometry creation for OverlayObject
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
public:
- OverlayObjectCell( CellOverlayType eType, const Color& rColor, const RangeVector& rRects);
+ OverlayObjectCell( const Color& rColor, const RangeVector& rRects);
virtual ~OverlayObjectCell();
};
diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx
index 4596fa9..934fc1d 100644
--- a/svx/source/sdr/overlay/overlayobjectcell.cxx
+++ b/svx/source/sdr/overlay/overlayobjectcell.cxx
@@ -34,9 +34,8 @@ namespace sdr
{
namespace overlay
{
- OverlayObjectCell::OverlayObjectCell( CellOverlayType eType, const Color& rColor, const RangeVector& rRects )
+ OverlayObjectCell::OverlayObjectCell( const Color& rColor, const RangeVector& rRects )
: OverlayObject( rColor ),
- mePaintType( eType ),
maRectangles( rRects )
{
// no AA for selection overlays
@@ -70,25 +69,13 @@ namespace sdr
}
- if(mePaintType == CELL_OVERLAY_TRANSPARENT)
- {
- // embed in 50% transparent paint
- const drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence(
- new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
- aRetval,
- 0.5));
+ // embed in 50% transparent paint
+ const drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence(
+ new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(
+ aRetval,
+ 0.5));
- aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence };
- }
- else // CELL_OVERLAY_INVERT
- {
- // embed in invert primitive
- const drawinglayer::primitive2d::Primitive2DReference aInvert(
- new drawinglayer::primitive2d::InvertPrimitive2D(
- aRetval));
-
- aRetval = drawinglayer::primitive2d::Primitive2DContainer { aInvert };
- }
+ aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence };
}
return aRetval;
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index ae8b848..f5899a6 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2141,10 +2141,7 @@ void SvxTableController::updateSelectionOverlay()
rtl::Reference < sdr::overlay::OverlayManager > xOverlayManager = pPaintWindow->GetOverlayManager();
if( xOverlayManager.is() )
{
- // sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_INVERT;
- sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_TRANSPARENT;
-
- sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
+ sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( aHighlight, aRanges );
xOverlayManager->add(*pOverlay);
mpSelectionOverlay = new sdr::overlay::OverlayObjectList;
commit 02329af0cbd25f5901be2ec938984968080d17f5
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 13:18:25 2016 +0200
convert SdrTextAniDirection to scoped enum
Change-Id: I67d1ffb1169e9faf4df90dd70a5496aa485979cf
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 5c9ba06..b2ffc91 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -618,26 +618,26 @@ IMPL_LINK_TYPED( SvxTextAnimationPage, ClickDirectionHdl_Impl, Button *, pBtn, v
void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue )
{
- m_pBtnUp->Check( nValue == SDRTEXTANI_UP );
- m_pBtnLeft->Check( nValue == SDRTEXTANI_LEFT );
- m_pBtnRight->Check( nValue == SDRTEXTANI_RIGHT );
- m_pBtnDown->Check( nValue == SDRTEXTANI_DOWN );
+ m_pBtnUp->Check( nValue == SdrTextAniDirection::Up );
+ m_pBtnLeft->Check( nValue == SdrTextAniDirection::Left );
+ m_pBtnRight->Check( nValue == SdrTextAniDirection::Right );
+ m_pBtnDown->Check( nValue == SdrTextAniDirection::Down );
}
sal_uInt16 SvxTextAnimationPage::GetSelectedDirection()
{
- sal_uInt16 nValue = 0;
+ SdrTextAniDirection nValue = SdrTextAniDirection::Left;
if( m_pBtnUp->IsChecked() )
- nValue = SDRTEXTANI_UP;
+ nValue = SdrTextAniDirection::Up;
else if( m_pBtnLeft->IsChecked() )
- nValue = SDRTEXTANI_LEFT;
+ nValue = SdrTextAniDirection::Left;
else if( m_pBtnRight->IsChecked() )
- nValue = SDRTEXTANI_RIGHT;
+ nValue = SdrTextAniDirection::Right;
else if( m_pBtnDown->IsChecked() )
- nValue = SDRTEXTANI_DOWN;
+ nValue = SdrTextAniDirection::Down;
- return nValue;
+ return (sal_uInt16)nValue;
}
diff --git a/include/svx/sdtaditm.hxx b/include/svx/sdtaditm.hxx
index 2c05bde..2481aa7 100644
--- a/include/svx/sdtaditm.hxx
+++ b/include/svx/sdtaditm.hxx
@@ -27,14 +27,14 @@
// class SdrTextAniDirectionItem
-enum SdrTextAniDirection {SDRTEXTANI_LEFT,
- SDRTEXTANI_RIGHT,
- SDRTEXTANI_UP,
- SDRTEXTANI_DOWN};
+enum class SdrTextAniDirection
+{
+ Left, Right, Up, Down
+};
class SVX_DLLPUBLIC SdrTextAniDirectionItem: public SfxEnumItem {
public:
- SdrTextAniDirectionItem(SdrTextAniDirection eDir=SDRTEXTANI_LEFT): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,(sal_uInt16)eDir) {}
+ SdrTextAniDirectionItem(SdrTextAniDirection eDir=SdrTextAniDirection::Left): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,(sal_uInt16)eDir) {}
SdrTextAniDirectionItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,rIn) {}
virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override;
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 4a4baaf..0f93472 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -100,7 +100,7 @@
#define SDRATTR_TEXT_AUTOGROWWIDTH (SDRATTR_MISC_FIRST +12) /* 1109 */ /* 1109 */ /* 1092 sal_Bool, def=sal_False - Pool V2 */
#define SDRATTR_TEXT_HORZADJUST (SDRATTR_MISC_FIRST +13) /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */
#define SDRATTR_TEXT_ANIKIND (SDRATTR_MISC_FIRST +14) /* 1111 */ /* 1111 */ /* 1094 enum, def=SDRTEXTANI_NONE - Pool V2/V4 */
-#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SDRTEXTANI_LEFT - Pool V2/V4 */
+#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SdrTextAniDirection::Left - Pool V2/V4 */
#define SDRATTR_TEXT_ANISTARTINSIDE (SDRATTR_MISC_FIRST +16) /* 1113 */ /* 1113 */ /* 1096 sal_Bool, def=sal_False - Pool V2/V4 */
#define SDRATTR_TEXT_ANISTOPINSIDE (SDRATTR_MISC_FIRST +17) /* 1114 */ /* 1114 */ /* 1097 sal_Bool, def=sal_False - Pool V2/V4 */
#define SDRATTR_TEXT_ANICOUNT (SDRATTR_MISC_FIRST +18) /* 1115 */ /* 1115 */ /* 1098 sal_uInt16, def=0 - Pool V2/V4 */
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 358e1d5..b23fb0e 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -458,7 +458,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
- aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
+ aItemSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) );
aItemSet.Put( SdrTextAniCountItem( 1 ) );
aItemSet.Put( SdrTextAniAmountItem(
(sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
@@ -762,7 +762,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
- aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
+ aSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
aSet.Put( SdrTextAniAmountItem( (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 39cef1e..9375506 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -369,7 +369,7 @@ namespace drawinglayer
{
// get scroll direction
const SdrTextAniDirection eDirection(rText.getSdrText().GetObject().GetTextAniDirection());
- const bool bHorizontal(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection);
+ const bool bHorizontal(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection);
// decompose to get separated values for the scroll box
basegfx::B2DVector aScale, aTranslate;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 54dda65..8bf6585 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -296,7 +296,7 @@ bool SdrTextObj::IsAutoGrowHeight() const
{
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
- if(eDirection == SDRTEXTANI_UP || eDirection == SDRTEXTANI_DOWN)
+ if(eDirection == SdrTextAniDirection::Up || eDirection == SdrTextAniDirection::Down)
{
bRet = false;
}
@@ -323,7 +323,7 @@ bool SdrTextObj::IsAutoGrowWidth() const
{
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
- if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+ if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
bRet = false;
}
@@ -354,7 +354,7 @@ SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust(const SfxItemSet& rSet) co
{
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
- if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+ if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
eRet = SDRTEXTHORZADJUST_LEFT;
}
@@ -387,7 +387,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons
{
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
- if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+ if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
eRet = SDRTEXTVERTADJUST_TOP;
}
@@ -721,8 +721,8 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE))
{
// unlimited paper size for ticker text
- if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nWdt=1000000;
- if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000;
+ if (eAniDirection==SdrTextAniDirection::Left || eAniDirection==SdrTextAniDirection::Right) nWdt=1000000;
+ if (eAniDirection==SdrTextAniDirection::Up || eAniDirection==SdrTextAniDirection::Down) nHgt=1000000;
}
bool bChainedFrame = IsChainable();
@@ -1877,13 +1877,13 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
const SfxItemSet& rSet = GetObjectItemSet();
SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
- if(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection)
+ if(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection)
{
aScrollFrameRect.Left() = aAnchorRect.Left();
aScrollFrameRect.Right() = aAnchorRect.Right();
}
- if(SDRTEXTANI_UP == eDirection || SDRTEXTANI_DOWN == eDirection)
+ if(SdrTextAniDirection::Up == eDirection || SdrTextAniDirection::Down == eDirection)
{
aScrollFrameRect.Top() = aAnchorRect.Top();
aScrollFrameRect.Bottom() = aAnchorRect.Bottom();
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 8a6a741..ff941a7 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1368,7 +1368,7 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
double fAnimationDelay((double)static_cast<const SdrTextAniDelayItem&>(rSet.Get(SDRATTR_TEXT_ANIDELAY)).GetValue());
double fSingleStepWidth((double)static_cast<const SdrTextAniAmountItem&>(rSet.Get(SDRATTR_TEXT_ANIAMOUNT)).GetValue());
const SdrTextAniDirection eDirection(GetTextAniDirection());
- const bool bForward(SDRTEXTANI_RIGHT == eDirection || SDRTEXTANI_DOWN == eDirection);
+ const bool bForward(SdrTextAniDirection::Right == eDirection || SdrTextAniDirection::Down == eDirection);
if(basegfx::fTools::equalZero(fAnimationDelay))
{
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 653e843..170a267 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -85,8 +85,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b
SdrTextAniDirection eAniDir = GetTextAniDirection();
bool bScroll = eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE;
- bool bHScroll = bScroll && (eAniDir == SDRTEXTANI_LEFT || eAniDir == SDRTEXTANI_RIGHT);
- bool bVScroll = bScroll && (eAniDir == SDRTEXTANI_UP || eAniDir == SDRTEXTANI_DOWN);
+ bool bHScroll = bScroll && (eAniDir == SdrTextAniDirection::Left || eAniDir == SdrTextAniDirection::Right);
+ bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down);
Rectangle aOldRect = rR;
long nHgt = 0, nMinHgt = 0, nMaxHgt = 0;
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 824f105..b656fa7 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -201,8 +201,8 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE))
{
// ticker text uses an unlimited paper size
- if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nMaxWdt=1000000;
- if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=1000000;
+ if (eAniDirection==SdrTextAniDirection::Left || eAniDirection==SdrTextAniDirection::Right) nMaxWdt=1000000;
+ if (eAniDirection==SdrTextAniDirection::Up || eAniDirection==SdrTextAniDirection::Down) nMaxHgt=1000000;
}
bool bChainedFrame = IsChainable();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index cc66fb9..7d4b170 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2890,7 +2890,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
- aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
+ aSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 22c6500..aadcb2f 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -65,9 +65,9 @@ static HTMLOptionEnum aHTMLMarqBehaviorTable[] =
static HTMLOptionEnum aHTMLMarqDirectionTable[] =
{
- { OOO_STRING_SVTOOLS_HTML_AL_left, SDRTEXTANI_LEFT },
- { OOO_STRING_SVTOOLS_HTML_AL_right, SDRTEXTANI_RIGHT },
- { nullptr, 0 }
+ { OOO_STRING_SVTOOLS_HTML_AL_left, (sal_uInt16)SdrTextAniDirection::Left },
+ { OOO_STRING_SVTOOLS_HTML_AL_right, (sal_uInt16)SdrTextAniDirection::Right },
+ { nullptr, 0 }
};
void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
@@ -260,7 +260,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
SdrTextAniKind eAniKind = SDRTEXTANI_SCROLL;
- SdrTextAniDirection eAniDir = SDRTEXTANI_LEFT;
+ SdrTextAniDirection eAniDir = SdrTextAniDirection::Left;
sal_uInt16 nCount = 0, nDelay = 60;
sal_Int16 nAmount = -6;
Color aBGColor;
@@ -370,7 +370,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
// (Nur) Alternate leueft per Default von links nach rechts
if( SDRTEXTANI_ALTERNATE==eAniKind && !bDirection )
- eAniDir = SDRTEXTANI_RIGHT;
+ eAniDir = SdrTextAniDirection::Right;
// die fuer das Scrollen benoetigten Attribute umsetzen
sal_uInt16 aWhichMap[7] = { XATTR_FILL_FIRST, XATTR_FILL_LAST,
@@ -390,7 +390,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
// (Nur) Alternate startet und stoppt per default Inside
aItemSet.Put( SdrTextAniStartInsideItem(true) );
aItemSet.Put( SdrTextAniStopInsideItem(true) );
- if( SDRTEXTANI_LEFT==eAniDir )
+ if( SdrTextAniDirection::Left==eAniDir )
aItemSet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT) );
}
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 3685ea1..a134f08 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -179,8 +179,8 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
SdrTextAniDirection eAniDir = pTextObj->GetTextAniDirection();
switch( eAniDir )
{
- case SDRTEXTANI_LEFT: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break;
- case SDRTEXTANI_RIGHT: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break;
+ case SdrTextAniDirection::Left: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break;
+ case SdrTextAniDirection::Right: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break;
default:
;
}
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index 8394299..9966394 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -87,7 +87,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) );
- aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
+ aItemSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) );
aItemSet.Put( SdrTextAniCountItem( 0 ) );
aItemSet.Put( SdrTextAniAmountItem(
(sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
commit 92743c1da67485338aadfc9e9444146f9bacd6d1
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 12:26:18 2016 +0200
convert SdrFitToSizeType to scoped enum
Change-Id: Id732c74b590db7006058d1919be2438b649a795e
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 49eca66..4da31e4b 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -312,7 +312,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
{
SdrFitToSizeType eFTS = (SdrFitToSizeType)
static_cast<const SdrTextFitToSizeTypeItem&>( rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
- m_pTsbFitToSize->SetState( eFTS == SDRTEXTFIT_NONE ? TRISTATE_FALSE : TRISTATE_TRUE );
+ m_pTsbFitToSize->SetState( eFTS == SdrFitToSizeType::NONE ? TRISTATE_FALSE : TRISTATE_TRUE );
m_pTsbFitToSize->EnableTriState( false );
}
else
@@ -410,8 +410,8 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
default: ; //prevent warning
OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" );
SAL_FALLTHROUGH;
- case TRISTATE_FALSE: eFTS = SDRTEXTFIT_NONE; break;
- case TRISTATE_TRUE: eFTS = SDRTEXTFIT_AUTOFIT; break;
+ case TRISTATE_FALSE: eFTS = SdrFitToSizeType::NONE; break;
+ case TRISTATE_TRUE: eFTS = SdrFitToSizeType::Autofit; break;
}
rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) );
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index a3eda37..4bee4c1 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3486,7 +3486,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
case drawing::TextHorizontalAdjust_BLOCK:
{
SdrFitToSizeType eFTS( static_cast<const SdrTextFitToSizeTypeItem&>(pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
- if ( eFTS == SDRTEXTFIT_ALLLINES)
+ if ( eFTS == SdrFitToSizeType::AllLines)
{
gTextAlign = mso_alignTextStretch;
}
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index cc75a92..631d9bc 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4389,9 +4389,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
}
aSet.Put( SdrTextHorzAdjustItem( eHorzAdjust ) );
- SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
+ SdrFitToSizeType eFTS = SdrFitToSizeType::NONE;
if ( eGeoTextAlign == mso_alignTextStretch )
- eFTS = SDRTEXTFIT_ALLLINES;
+ eFTS = SdrFitToSizeType::AllLines;
aSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
}
if ( IsProperty( DFF_Prop_gtextSpacing ) )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 5590875..6e31104 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1097,7 +1097,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
//See fdo#41245
if (bAutoFit && !bAutoGrowHeight && !bAutoGrowWidth)
{
- pTObj->SetMergedItem( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
+ pTObj->SetMergedItem( SdrTextFitToSizeTypeItem(SdrFitToSizeType::Autofit) );
}
if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
diff --git a/include/svx/sdtfsitm.hxx b/include/svx/sdtfsitm.hxx
index 656f1aa..406bd2b 100644
--- a/include/svx/sdtfsitm.hxx
+++ b/include/svx/sdtfsitm.hxx
@@ -23,19 +23,21 @@
#include <svx/svddef.hxx>
#include <svx/svxdllapi.h>
-enum SdrFitToSizeType {
- SDRTEXTFIT_NONE, // - no fit-to-size
- SDRTEXTFIT_PROPORTIONAL, // - resize all glyphs proportionally
- // (might scale anisotrophically)
- SDRTEXTFIT_ALLLINES, // - like SDRTEXTFIT_PROPORTIONAL, but
- // scales each line separately
- SDRTEXTFIT_AUTOFIT}; // - mimics PPT's automatic adaption of
- // font size to text rect - comparable
- // to SDRTEXTFIT_PROPORTIONAL, but
- // scales isotrophically
+enum class SdrFitToSizeType
+{
+ NONE, // - no fit-to-size
+ Proportional, // - resize all glyphs proportionally
+ // (might scale anisotrophically)
+ AllLines, // - like SdrFitToSizeType::Proportional, but
+ // scales each line separately
+ Autofit // - mimics PPT's automatic adaption of
+ // font size to text rect - comparable
+ // to SdrFitToSizeType::Proportional, but
+ // scales isotrophically
+};
// No AutoGrow and no automatic line breaks for
-// SDRTEXTFIT_PROPORTIONAL and SDRTEXTFIT_ALLLINES.
+// SdrFitToSizeType::Proportional and SdrFitToSizeType::AllLines.
// No automatic line breaks for AutoGrowingWidth as well (only if
// TextMaxFrameWidth is reached).
@@ -45,7 +47,7 @@ enum SdrFitToSizeType {
class SVX_DLLPUBLIC SdrTextFitToSizeTypeItem: public SfxEnumItem {
public:
static SfxPoolItem* CreateDefault();
- SdrTextFitToSizeTypeItem(SdrFitToSizeType eFit=SDRTEXTFIT_NONE): SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,(sal_uInt16)eFit) {}
+ SdrTextFitToSizeTypeItem(SdrFitToSizeType eFit=SdrFitToSizeType::NONE): SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,(sal_uInt16)eFit) {}
SdrTextFitToSizeTypeItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,rIn) {}
virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override;
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 733e6b0..4a4baaf 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -88,7 +88,7 @@
#define SDRATTR_ECKENRADIUS (SDRATTR_MISC_FIRST + 0) /* 1097 */ /* 1097 */ /* 1080 long, def=0 */
#define SDRATTR_TEXT_MINFRAMEHEIGHT (SDRATTR_MISC_FIRST + 1) /* 1098 */ /* 1098 */ /* 1081 long, def=0 */
#define SDRATTR_TEXT_AUTOGROWHEIGHT (SDRATTR_MISC_FIRST + 2) /* 1099 */ /* 1099 */ /* 1082 sal_Bool, def=sal_True */
-#define SDRATTR_TEXT_FITTOSIZE (SDRATTR_MISC_FIRST + 3) /* 1100 */ /* 1100 */ /* 1083 enum, def=SDRTEXTFIT_NONE */
+#define SDRATTR_TEXT_FITTOSIZE (SDRATTR_MISC_FIRST + 3) /* 1100 */ /* 1100 */ /* 1083 enum, def=SdrFitToSizeType::NONE */
#define SDRATTR_TEXT_LEFTDIST (SDRATTR_MISC_FIRST + 4) /* 1101 */ /* 1101 */ /* 1084 long, def=0 */ /* Pool V2 */
#define SDRATTR_TEXT_RIGHTDIST (SDRATTR_MISC_FIRST + 5) /* 1102 */ /* 1102 */ /* 1085 long, def=0 */ /* Pool V2 */
#define SDRATTR_TEXT_UPPERDIST (SDRATTR_MISC_FIRST + 6) /* 1103 */ /* 1103 */ /* 1086 long, def=0 */ /* Pool V2 */
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index b9bb3ad..11c0705 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1193,7 +1193,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
SfxItemSet aItemSet = pCaption->GetMergedItemSet();
meTVA = pCaption->GetTextVerticalAdjust();
meTHA = pCaption->GetTextHorizontalAdjust();
- mbAutoScale = pCaption->GetFitToSize() != SDRTEXTFIT_NONE;
+ mbAutoScale = pCaption->GetFitToSize() != SdrFitToSizeType::NONE;
mbLocked = pCaption->IsMoveProtect() || pCaption->IsResizeProtect();
// AutoFill style would change if Postit.cxx object creation values are changed
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 9ca1277..78bc0ad58 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -250,7 +250,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSet.Put( SvxBackgroundColorItem( Color (COL_AUTO), EE_CHAR_BKGCOLOR ) );
rSet.Put( XLineStyleItem(css::drawing::LineStyle_NONE) );
rSet.Put( XFillStyleItem(drawing::FillStyle_NONE) );
- rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
+ rSet.Put( SdrTextFitToSizeTypeItem(SdrFitToSizeType::Autofit) );
rSet.Put( makeSdrTextAutoGrowHeightItem(false) );
// #i16874# enable kerning by default but only for new documents
rSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 17f798d..72f6ae2 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -531,7 +531,7 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
{
// FitToSize (fit to frame)
SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
- SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+ SdrFitToSizeType eFTS = SdrFitToSizeType::Proportional;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
@@ -543,7 +543,7 @@ void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool(),
SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
- SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+ SdrFitToSizeType eFTS = SdrFitToSizeType::Proportional;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a0c3a9d..1430657 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -215,7 +215,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
mpDrawView->BegUndo();
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- bool bSet = static_cast<const SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
+ bool bSet = static_cast<const SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SdrFitToSizeType::NONE;
mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
@@ -228,7 +228,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
pObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(false));
}
- pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? SDRTEXTFIT_NONE : SDRTEXTFIT_AUTOFIT));
+ pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? SdrFitToSizeType::NONE : SdrFitToSizeType::Autofit));
mpDrawView->EndUndo();
pUndoManager->LeaveListAction();
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index febb543..1d2f20d 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -262,7 +262,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const bool bSet = static_cast<const SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
+ const bool bSet = static_cast<const SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SdrFitToSizeType::NONE;
rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
}
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 989d329..def4e5b 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -433,7 +433,7 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
while ( aTextAreaIter != aTextAreaIEnd )
{
GetTextAreaOutline( rFWData, pCustomShape, *aTextAreaIter, bSameLetterHeights );
- if ( eFTS == SDRTEXTFIT_ALLLINES )
+ if ( eFTS == SdrFitToSizeType::AllLines )
{
std::vector< FWParagraphData >::iterator aParagraphIter( aTextAreaIter->vParagraphs.begin() );
std::vector< FWParagraphData >::const_iterator aParagraphIEnd( aTextAreaIter->vParagraphs.end() );
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index b9563d0..4b3eba9 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -1047,11 +1047,11 @@ bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; }
-bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; }
+bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SdrFitToSizeType::NONE; }
void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal)
{
- SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE));
+ SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SdrFitToSizeType::Proportional : SdrFitToSizeType::NONE));
}
bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 42027a4..146eaab 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1009,7 +1009,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH );
pText->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
// don't let the margins eat the space needed for the text
- pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) );
+ pText->SetMergedItem( SdrTextFitToSizeTypeItem( SdrFitToSizeType::AllLines ) );
}
else
{
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 5f373c7..0c4e458 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -799,7 +799,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI
case SDRATTR_TEXT_HORZADJUST: {
if (ImpGetItem(*pSet,SDRATTR_TEXT_FITTOSIZE,pItem)) {
SdrFitToSizeType eFit=static_cast<const SdrTextFitToSizeTypeItem*>(pItem)->GetValue();
- if (eFit!=SDRTEXTFIT_NONE) return true;
+ if (eFit!=SdrFitToSizeType::NONE) return true;
}
} break;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index ddf5295..54dda65 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1481,7 +1481,7 @@ void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo)
SdrFitToSizeType SdrTextObj::GetFitToSize() const
{
- SdrFitToSizeType eType = SDRTEXTFIT_NONE;
+ SdrFitToSizeType eType = SdrFitToSizeType::NONE;
if(!IsAutoGrowWidth())
eType = static_cast<const SdrTextFitToSizeTypeItem&>(GetObjectItem(SDRATTR_TEXT_FITTOSIZE)).GetValue();
@@ -1911,13 +1911,13 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
// Access to TextAnimationAllowed flag
bool SdrTextObj::IsAutoFit() const
{
- return GetFitToSize()==SDRTEXTFIT_AUTOFIT;
+ return GetFitToSize()==SdrFitToSizeType::Autofit;
}
bool SdrTextObj::IsFitToSize() const
{
const SdrFitToSizeType eFit=GetFitToSize();
- return (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ return (eFit==SdrFitToSizeType::Proportional || eFit==SdrFitToSizeType::AllLines);
}
void SdrTextObj::SetTextAnimationAllowed(bool bNew)
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 07b688e..0dcad4f 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -69,9 +69,9 @@ void SetAlignmentState( SdrView* pSdrView, SfxItemSet& rSet )
case SDRTEXTHORZADJUST_RIGHT : nAlignment = 2; break;
case SDRTEXTHORZADJUST_BLOCK :
{
- if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_NONE )
+ if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::NONE )
nAlignment = 3;
- else if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_ALLLINES )
+ else if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::AllLines )
nAlignment = 4;
}
}
@@ -271,11 +271,11 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
sal_Int32 nValue = static_cast<const SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT))->GetValue();
if ( ( nValue >= 0 ) && ( nValue < 5 ) )
{
- SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
+ SdrFitToSizeType eFTS = SdrFitToSizeType::NONE;
SdrTextHorzAdjust eHorzAdjust;
switch ( nValue )
{
- case 4 : eFTS = SDRTEXTFIT_ALLLINES; SAL_FALLTHROUGH;
+ case 4 : eFTS = SdrFitToSizeType::AllLines; SAL_FALLTHROUGH;
case 3 : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break;
default: eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break;
case 1 : eHorzAdjust = SDRTEXTHORZADJUST_CENTER; break;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index eeee97d..34c10ea 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1224,7 +1224,7 @@ SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
SetStdAttr( rSet, aTextB.aLnt, aTextB.aShd );
SetFill( rSet, aTextB.aFill );
- rSet.Put( SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ) );
+ rSet.Put( SdrTextFitToSizeTypeItem( SdrFitToSizeType::NONE ) );
rSet.Put( makeSdrTextAutoGrowWidthItem(false));
rSet.Put( makeSdrTextAutoGrowHeightItem(false));
rSet.Put( makeSdrTextLeftDistItem( MIN_BORDER_DIST*2 ) );
@@ -2798,7 +2798,7 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
SfxItemSet aSet(m_pDrawModel->GetItemPool());
aSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
- aSet.Put(SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ));
+ aSet.Put(SdrTextFitToSizeTypeItem( SdrFitToSizeType::NONE ));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
pSdrTextObj->SetMergedItemSet(aSet);
commit 44b2afa192fbf78d337cf18840c26b7d04e91a4e
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 11:53:22 2016 +0200
convert ShapeProperty to scoped enum
Change-Id: I2e0dc3aaefb174c8960bb6b8ce9a4ad830626ba4
diff --git a/include/svx/shapeproperty.hxx b/include/svx/shapeproperty.hxx
index 4ed901a..aeeaa13 100644
--- a/include/svx/shapeproperty.hxx
+++ b/include/svx/shapeproperty.hxx
@@ -24,27 +24,24 @@
namespace svx
{
-
//= ShapeProperty
- enum ShapeProperty
+ enum class ShapeProperty
{
// generic (UNO) shape properties
- eShapePosition,
- eShapeSize,
+ Position,
+ Size,
// text doc shape properties
- eTextShapeAnchorType,
+ TextDocAnchor,
// spreadsheet doc shape properties
- eSpreadsheetAnchor,
+ CalcDocAnchor,
// invalid, not to be used
- eInvalidShapeProperty
+ Invalid
};
-
}
-
#endif // INCLUDED_SVX_SHAPEPROPERTY_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 253c341..eb850fa 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -85,7 +85,7 @@ namespace
void lcl_initializeNotifier( SdrObject& _rSdrObj, ::cppu::OWeakObject& _rShape )
{
std::shared_ptr<svx::IPropertyValueProvider> pProvider( new svx::PropertyValueProvider( _rShape, "Anchor" ) );
- _rSdrObj.getShapePropertyChangeNotifier().registerProvider( svx::eSpreadsheetAnchor, pProvider );
+ _rSdrObj.getShapePropertyChangeNotifier().registerProvider( svx::ShapeProperty::CalcDocAnchor, pProvider );
}
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b940c56..f534933 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2799,10 +2799,10 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundR
switch ( eUserCall )
{
case SdrUserCallType::Resize:
- notifyShapePropertyChange( svx::eShapeSize );
+ notifyShapePropertyChange( svx::ShapeProperty::Size );
SAL_FALLTHROUGH; // RESIZE might also imply a change of the position
case SdrUserCallType::MoveOnly:
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list