summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 14:38:03 +0200
committerNoel Grandin <noel@peralex.com>2015-03-25 08:56:14 +0200
commit6cb56b551bc1e30a887d8a333d70567cad23aa9e (patch)
tree732a580d2bf7411bb3c30656f87b89121828da46
parent6ef4d92869114179fc7802e2a2b5be665f248029 (diff)
convert MouseTarget to enum class
Change-Id: I223c032e1637fecb8b7b0578a81762572973084b
-rw-r--r--editeng/source/outliner/outlvw.cxx18
-rw-r--r--include/editeng/outliner.hxx12
2 files changed, 15 insertions, 15 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index bd2b0845ec70..43f51bdc7165 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -248,11 +248,11 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
Point aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix );
if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
{
- reTarget = MouseOutside;
+ reTarget = MouseTarget::Outside;
}
else
{
- reTarget = MouseText;
+ reTarget = MouseTarget::Text;
Point aPaperPos( aMousePosWin );
Rectangle aOutArea = pEditView->GetOutputArea();
@@ -270,14 +270,14 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
if ( bBullet )
{
- reTarget = MouseBullet;
+ reTarget = MouseTarget::Bullet;
}
else
{
// Check for hyperlink
const SvxFieldItem* pFieldItem = pEditView->GetField( aMousePosWin );
if ( pFieldItem && pFieldItem->GetField() && pFieldItem->GetField()->ISA( SvxURLField ) )
- reTarget = MouseHypertext;
+ reTarget = MouseTarget::Hypertext;
}
}
}
@@ -313,7 +313,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
MouseTarget eTarget;
sal_Int32 nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
- if ( eTarget == MouseBullet )
+ if ( eTarget == MouseTarget::Bullet )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
bool bHasChildren = (pPara && pOwner->pParaList->HasChildren(pPara));
@@ -333,7 +333,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
}
// special case for outliner view in impress, check if double click hits the page icon for toggle
- if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW) && (eTarget == MouseText) && (rMEvt.GetClicks() == 2) )
+ if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
{
ESelection aSel( pEditView->GetSelection() );
nPara = aSel.nStartPara;
@@ -735,15 +735,15 @@ Pointer OutlinerView::GetPointer( const Point& rPosPixel )
ImpCheckMousePos( rPosPixel, eTarget );
PointerStyle ePointerStyle = POINTER_ARROW;
- if ( eTarget == MouseText )
+ if ( eTarget == MouseTarget::Text )
{
ePointerStyle = GetOutliner()->IsVertical() ? POINTER_TEXT_VERTICAL : POINTER_TEXT;
}
- else if ( eTarget == MouseHypertext )
+ else if ( eTarget == MouseTarget::Hypertext )
{
ePointerStyle = POINTER_REFHAND;
}
- else if ( eTarget == MouseBullet )
+ else if ( eTarget == MouseTarget::Bullet )
{
ePointerStyle = POINTER_MOVE;
}
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 09c4012dad4f..24b7130c30c2 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -192,12 +192,12 @@ private:
Outliner* pOwner;
EditView* pEditView;
- enum MouseTarget {
- MouseText = 0,
- MouseBullet = 1,
- MouseHypertext = 2, // Outside OutputArea
- MouseOutside = 3, // Outside OutputArea
- MouseDontKnow = 4
+ enum class MouseTarget {
+ Text = 0,
+ Bullet = 1,
+ Hypertext = 2, // Outside OutputArea
+ Outside = 3, // Outside OutputArea
+ DontKnow = 4
};
EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_Int32 nStartPara, sal_Int32 nEndPara, bool bExpand );