summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdglev.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-23 16:06:58 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:39 +0200
commitda9361374c45da7c3bda803aaed52485fb3b12d7 (patch)
tree15aae8b9b8ffad3ad59281c68bb905596774f87f /svx/source/svdraw/svdglev.cxx
parent1f1b9b9ff56d8649b22b78c5696a36b078ea9dcf (diff)
convert SDRESC_ constants to scoped enum
Change-Id: I9488088d006ceae15368fae775aeebebfa7ce229
Diffstat (limited to 'svx/source/svdraw/svdglev.cxx')
-rw-r--r--svx/source/svdraw/svdglev.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 77e191d1ab59..3492f47e076c 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -90,8 +90,8 @@ static void ImpGetEscDir(SdrGluePoint& rGP, const SdrObject* /*pObj*/, const voi
{
sal_uInt16& nRet=*const_cast<sal_uInt16 *>(static_cast<sal_uInt16 const *>(pnRet));
if (nRet!=FUZZY) {
- sal_uInt16 nEsc = rGP.GetEscDir();
- bool bOn = (nEsc & *static_cast<sal_uInt16 const *>(pnThisEsc)) != 0;
+ SdrEscapeDirection nEsc = rGP.GetEscDir();
+ bool bOn = bool(nEsc & *static_cast<SdrEscapeDirection const *>(pnThisEsc));
bool& bFirst=*const_cast<bool *>(static_cast<bool const *>(pbFirst));
if (bFirst) {
nRet = bOn ? 1 : 0;
@@ -101,7 +101,7 @@ static void ImpGetEscDir(SdrGluePoint& rGP, const SdrObject* /*pObj*/, const voi
}
}
-SDR_TRISTATE SdrGlueEditView::IsMarkedGluePointsEscDir(sal_uInt16 nThisEsc) const
+SDR_TRISTATE SdrGlueEditView::IsMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc) const
{
ForceUndirtyMrkPnt();
bool bFirst=true;
@@ -112,13 +112,15 @@ SDR_TRISTATE SdrGlueEditView::IsMarkedGluePointsEscDir(sal_uInt16 nThisEsc) cons
static void ImpSetEscDir(SdrGluePoint& rGP, const SdrObject* /*pObj*/, const void* pnThisEsc, const void* pbOn, const void*, const void*, const void*)
{
- sal_uInt16 nEsc=rGP.GetEscDir();
- if (*static_cast<bool const *>(pbOn)) nEsc|=*static_cast<sal_uInt16 const *>(pnThisEsc);
- else nEsc&=~*static_cast<sal_uInt16 const *>(pnThisEsc);
+ SdrEscapeDirection nEsc=rGP.GetEscDir();
+ if (*static_cast<bool const *>(pbOn))
+ nEsc |= *static_cast<SdrEscapeDirection const *>(pnThisEsc);
+ else
+ nEsc &= ~*static_cast<SdrEscapeDirection const *>(pnThisEsc);
rGP.SetEscDir(nEsc);
}
-void SdrGlueEditView::SetMarkedGluePointsEscDir(sal_uInt16 nThisEsc, bool bOn)
+void SdrGlueEditView::SetMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc, bool bOn)
{
ForceUndirtyMrkPnt();
BegUndo(ImpGetResStr(STR_EditSetGlueEscDir),GetDescriptionOfMarkedGluePoints());