summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-22 11:57:53 +0200
committerNoel Grandin <noel@peralex.com>2016-08-23 09:54:16 +0200
commit618c5fea43904bc800344d08e9c7dcce5f6840b7 (patch)
tree92993f9627089fd3071836278c05a4254446063a /sd
parente0b61fdd35462ff679743dff1203fb5dd50e86a4 (diff)
convert SdrHelpLineKind to scoped enum
Change-Id: I640fc5497571f93068f613dff2f02e12848124f0
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fusnapln.cxx10
-rw-r--r--sd/source/ui/view/drviews3.cxx2
-rw-r--r--sd/source/ui/view/drviews4.cxx8
-rw-r--r--sd/source/ui/view/frmview.cxx16
4 files changed, 18 insertions, 18 deletions
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 0a89b57c95a9..03a77aaec8aa 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -121,7 +121,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
const SdrHelpLine& rHelpLine = (pPV->GetHelpLines())[nHelpLine];
- if ( rHelpLine.GetKind() == SDRHELPLINE_POINT )
+ if ( rHelpLine.GetKind() == SdrHelpLineKind::Point )
{
pDlg->SetText(SD_RESSTR(STR_SNAPDLG_SETPOINT));
pDlg->SetInputFields(true, true);
@@ -130,7 +130,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
{
pDlg->SetText(SD_RESSTR(STR_SNAPDLG_SETLINE));
- if ( rHelpLine.GetKind() == SDRHELPLINE_VERTICAL )
+ if ( rHelpLine.GetKind() == SdrHelpLineKind::Vertical )
pDlg->SetInputFields(true, false);
else
pDlg->SetInputFields(false, true);
@@ -176,9 +176,9 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
switch ( (SnapKind) static_cast<const SfxAllEnumItem&>(
pArgs->Get(ATTR_SNAPLINE_KIND)).GetValue() )
{
- case SK_HORIZONTAL : eKind = SDRHELPLINE_HORIZONTAL; break;
- case SK_VERTICAL : eKind = SDRHELPLINE_VERTICAL; break;
- default : eKind = SDRHELPLINE_POINT; break;
+ case SK_HORIZONTAL : eKind = SdrHelpLineKind::Horizontal; break;
+ case SK_VERTICAL : eKind = SdrHelpLineKind::Vertical; break;
+ default : eKind = SdrHelpLineKind::Point; break;
}
pPV->InsertHelpLine(SdrHelpLine(eKind, aHlpPos));
}
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 307ee4f4db9f..b7f41789b848 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -1046,7 +1046,7 @@ void DrawViewShell::GetSnapItemState( SfxItemSet &rSet )
{
const SdrHelpLine& rHelpLine = (pPV->GetHelpLines())[nHelpLine];
- if ( rHelpLine.GetKind() == SDRHELPLINE_POINT )
+ if ( rHelpLine.GetKind() == SdrHelpLineKind::Point )
{
rSet.Put( SfxStringItem( SID_SET_SNAPITEM,
SD_RESSTR( STR_POPUP_EDIT_SNAPPOINT)) );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index dc4091eefa62..c5f254f65189 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -230,11 +230,11 @@ void DrawViewShell::StartRulerDrag (
SdrHelpLineKind eKind;
if ( rMEvt.IsMod1() )
- eKind = SDRHELPLINE_POINT;
+ eKind = SdrHelpLineKind::Point;
else if ( rRuler.IsHorizontal() )
- eKind = SDRHELPLINE_HORIZONTAL;
+ eKind = SdrHelpLineKind::Horizontal;
else
- eKind = SDRHELPLINE_VERTICAL;
+ eKind = SdrHelpLineKind::Vertical;
mpDrawView->BegDragHelpLine(aWPos, eKind);
mbIsRulerDrag = true;
@@ -878,7 +878,7 @@ void DrawViewShell::ShowSnapLineContextMenu (
const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]);
ScopedVclPtrInstance<PopupMenu> pMenu;
- if (rHelpLine.GetKind() == SDRHELPLINE_POINT)
+ if (rHelpLine.GetKind() == SdrHelpLineKind::Point)
{
pMenu->InsertItem(
SID_SET_SNAPITEM,
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 99c879759b31..b148ccffbbbb 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -349,17 +349,17 @@ static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines )
switch( rHelpLine.GetKind() )
{
- case SDRHELPLINE_POINT:
+ case SdrHelpLineKind::Point:
aLines.append( 'P' );
aLines.append( (sal_Int32)rPos.X() );
aLines.append( ',' );
aLines.append( (sal_Int32)rPos.Y() );
break;
- case SDRHELPLINE_VERTICAL:
+ case SdrHelpLineKind::Vertical:
aLines.append( 'V' );
aLines.append( (sal_Int32)rPos.X() );
break;
- case SDRHELPLINE_HORIZONTAL:
+ case SdrHelpLineKind::Horizontal:
aLines.append( 'H' );
aLines.append( (sal_Int32)rPos.Y() );
break;
@@ -473,13 +473,13 @@ static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList&
switch( *pStr )
{
case (sal_Unicode)'P':
- aNewHelpLine.SetKind( SDRHELPLINE_POINT );
+ aNewHelpLine.SetKind( SdrHelpLineKind::Point );
break;
case (sal_Unicode)'V':
- aNewHelpLine.SetKind( SDRHELPLINE_VERTICAL );
+ aNewHelpLine.SetKind( SdrHelpLineKind::Vertical );
break;
case (sal_Unicode)'H':
- aNewHelpLine.SetKind( SDRHELPLINE_HORIZONTAL );
+ aNewHelpLine.SetKind( SdrHelpLineKind::Horizontal );
break;
default:
OSL_FAIL( "syntax error in snap lines settings string" );
@@ -495,7 +495,7 @@ static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList&
sal_Int32 nValue = sBuffer.makeStringAndClear().toInt32();
- if( aNewHelpLine.GetKind() == SDRHELPLINE_HORIZONTAL )
+ if( aNewHelpLine.GetKind() == SdrHelpLineKind::Horizontal )
{
aPoint.Y() = nValue;
}
@@ -503,7 +503,7 @@ static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList&
{
aPoint.X() = nValue;
- if( aNewHelpLine.GetKind() == SDRHELPLINE_POINT )
+ if( aNewHelpLine.GetKind() == SdrHelpLineKind::Point )
{
if( *pStr++ != ',' )
return;