summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-05-03 09:45:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-04 20:32:30 +0200
commitfadf6427a9cbf351727e1412d8079757a994085b (patch)
tree99c956ba2d4f8bdd9271a01316edcb17a5b23615 /svx
parent8538f28377356a8abd1826c011b2e2cb33dacec2 (diff)
convert EVAnchorMode enum to scoped enum
change values to match position in definition to their meaning Change-Id: Ia96e0c7e0c70c847dea518ef871608516542d3cb Reviewed-on: https://gerrit.libreoffice.org/37186 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdedxv.cxx8
-rw-r--r--svx/source/svdraw/svdomeas.cxx24
-rw-r--r--svx/source/svdraw/svdotxed.cxx26
-rw-r--r--svx/source/table/svdotable.cxx12
4 files changed, 35 insertions, 35 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 1552591e1b38..4748b1eb018c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -245,7 +245,7 @@ void SdrObjEditView::ModelHasChanged()
bool bAnchorChg=false;
bool bColorChg=false;
bool bContourFrame=pTextObj->IsContourTextFrame();
- EVAnchorMode eNewAnchor(ANCHOR_VCENTER_HCENTER);
+ EEAnchorMode eNewAnchor(EEAnchorMode::VCenterHCenter);
tools::Rectangle aOldArea(aMinTextEditArea);
aOldArea.Union(aTextEditArea);
Color aNewColor;
@@ -302,8 +302,8 @@ void SdrObjEditView::ModelHasChanged()
}
}
if (pTextEditOutlinerView!=nullptr) { // check fill and anchor
- EVAnchorMode eOldAnchor=pTextEditOutlinerView->GetAnchorMode();
- eNewAnchor=(EVAnchorMode)pTextObj->GetOutlinerViewAnchorMode();
+ EEAnchorMode eOldAnchor=pTextEditOutlinerView->GetAnchorMode();
+ eNewAnchor=pTextObj->GetOutlinerViewAnchorMode();
bAnchorChg=eOldAnchor!=eNewAnchor;
Color aOldColor(pTextEditOutlinerView->GetBackgroundColor());
aNewColor = GetTextEditBackgroundColor(*this);
@@ -539,7 +539,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
if (pText!=nullptr)
{
- pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnchorMode()));
+ pOutlView->SetAnchorMode(pText->GetOutlinerViewAnchorMode());
pTextEditOutliner->SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
}
// do update before setting output area so that aTextEditArea can be recalculated
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 7f4654b211dd..5cf7a420f137 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -1313,7 +1313,7 @@ void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Re
SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin);
}
-sal_uInt16 SdrMeasureObj::GetOutlinerViewAnchorMode() const
+EEAnchorMode SdrMeasureObj::GetOutlinerViewAnchorMode() const
{
if (bTextDirty) UndirtyText();
ImpMeasureRec aRec;
@@ -1350,21 +1350,21 @@ sal_uInt16 SdrMeasureObj::GetOutlinerViewAnchorMode() const
if (eMV==css::drawing::MeasureTextVertPos_CENTERED) eTH=SDRTEXTHORZADJUST_CENTER;
}
- EVAnchorMode eRet=ANCHOR_BOTTOM_HCENTER;
+ EEAnchorMode eRet=EEAnchorMode::BottomHCenter;
if (eTH==SDRTEXTHORZADJUST_LEFT) {
- if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_LEFT;
- else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_LEFT;
- else eRet=ANCHOR_VCENTER_LEFT;
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=EEAnchorMode::TopLeft;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=EEAnchorMode::BottomLeft;
+ else eRet=EEAnchorMode::VCenterLeft;
} else if (eTH==SDRTEXTHORZADJUST_RIGHT) {
- if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_RIGHT;
- else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_RIGHT;
- else eRet=ANCHOR_VCENTER_RIGHT;
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=EEAnchorMode::TopRight;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=EEAnchorMode::BottomRight;
+ else eRet=EEAnchorMode::VCenterRight;
} else {
- if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_HCENTER;
- else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_HCENTER;
- else eRet=ANCHOR_VCENTER_HCENTER;
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=EEAnchorMode::TopHCenter;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=EEAnchorMode::BottomHCenter;
+ else eRet=EEAnchorMode::VCenterHCenter;
}
- return (sal_uInt16)eRet;
+ return eRet;
}
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index d6ba21c3c69b..3d4b392bab22 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -309,38 +309,38 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
mbInEditMode = false;
}
-sal_uInt16 SdrTextObj::GetOutlinerViewAnchorMode() const
+EEAnchorMode SdrTextObj::GetOutlinerViewAnchorMode() const
{
SdrTextHorzAdjust eH=GetTextHorizontalAdjust();
SdrTextVertAdjust eV=GetTextVerticalAdjust();
- EVAnchorMode eRet=ANCHOR_TOP_LEFT;
- if (IsContourTextFrame()) return (sal_uInt16)eRet;
+ EEAnchorMode eRet=EEAnchorMode::TopLeft;
+ if (IsContourTextFrame()) return eRet;
if (eH==SDRTEXTHORZADJUST_LEFT) {
if (eV==SDRTEXTVERTADJUST_TOP) {
- eRet=ANCHOR_TOP_LEFT;
+ eRet=EEAnchorMode::TopLeft;
} else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
- eRet=ANCHOR_BOTTOM_LEFT;
+ eRet=EEAnchorMode::BottomLeft;
} else {
- eRet=ANCHOR_VCENTER_LEFT;
+ eRet=EEAnchorMode::VCenterLeft;
}
} else if (eH==SDRTEXTHORZADJUST_RIGHT) {
if (eV==SDRTEXTVERTADJUST_TOP) {
- eRet=ANCHOR_TOP_RIGHT;
+ eRet=EEAnchorMode::TopRight;
} else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
- eRet=ANCHOR_BOTTOM_RIGHT;
+ eRet=EEAnchorMode::BottomRight;
} else {
- eRet=ANCHOR_VCENTER_RIGHT;
+ eRet=EEAnchorMode::VCenterRight;
}
} else {
if (eV==SDRTEXTVERTADJUST_TOP) {
- eRet=ANCHOR_TOP_HCENTER;
+ eRet=EEAnchorMode::TopHCenter;
} else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
- eRet=ANCHOR_BOTTOM_HCENTER;
+ eRet=EEAnchorMode::BottomHCenter;
} else {
- eRet=ANCHOR_VCENTER_HCENTER;
+ eRet=EEAnchorMode::VCenterHCenter;
}
}
- return (sal_uInt16)eRet;
+ return eRet;
}
void SdrTextObj::ImpSetTextEditParams() const
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index d3ab40c875ee..1e44e1f23e09 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1622,9 +1622,9 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size*
}
-sal_uInt16 SdrTableObj::GetOutlinerViewAnchorMode() const
+EEAnchorMode SdrTableObj::GetOutlinerViewAnchorMode() const
{
- EVAnchorMode eRet=ANCHOR_TOP_LEFT;
+ EEAnchorMode eRet=EEAnchorMode::TopLeft;
CellRef xCell( getActiveCell() );
if( xCell.is() )
{
@@ -1633,19 +1633,19 @@ sal_uInt16 SdrTableObj::GetOutlinerViewAnchorMode() const
{
if (eV==SDRTEXTVERTADJUST_TOP)
{
- eRet=ANCHOR_TOP_LEFT;
+ eRet=EEAnchorMode::TopLeft;
}
else if (eV==SDRTEXTVERTADJUST_BOTTOM)
{
- eRet=ANCHOR_BOTTOM_LEFT;
+ eRet=EEAnchorMode::BottomLeft;
}
else
{
- eRet=ANCHOR_VCENTER_LEFT;
+ eRet=EEAnchorMode::VCenterLeft;
}
}
}
- return (sal_uInt16)eRet;
+ return eRet;
}