summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-25 09:47:29 +0200
committerNoel Grandin <noel@peralex.com>2015-03-25 09:47:29 +0200
commit9110d8724d0af5e8a0a148096ce67c1d5a721f98 (patch)
tree22849e7f0661133fc79a7e5c9948a9b3d4ac9b62 /editeng
parentc7c0723dd97e278edeb7686d350ffe6d8706ed66 (diff)
convert EE_STAT constants to enum class
Change-Id: I2967cdbfd0303844892150bbff7aa5ce1a57054f
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editstt2.hxx4
-rw-r--r--editeng/source/editeng/impedit.cxx8
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/editeng/impedit4.cxx2
5 files changed, 12 insertions, 12 deletions
diff --git a/editeng/source/editeng/editstt2.hxx b/editeng/source/editeng/editstt2.hxx
index 84993a155d5e..44f1ed739c5c 100644
--- a/editeng/source/editeng/editstt2.hxx
+++ b/editeng/source/editeng/editstt2.hxx
@@ -34,10 +34,10 @@ public:
void TurnOffFlags( EEControlBits nFlags )
{ nControlBits &= ~nFlags; }
- void TurnOnStatusBits( sal_uLong nBits )
+ void TurnOnStatusBits( EditStatusFlags nBits )
{ nStatusBits |= nBits; }
- void TurnOffStatusBits( sal_uLong nBits )
+ void TurnOffStatusBits( EditStatusFlags nBits )
{ nStatusBits &= ~nBits; }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 0344f54c1ff4..7ac0acc0721f 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -860,9 +860,9 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
}
if ( nDiffX )
- pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EE_STAT_HSCROLL;
+ pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EditStatusFlags::HSCROLL;
if ( nDiffY )
- pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EE_STAT_VSCROLL;
+ pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EditStatusFlags::VSCROLL;
Scroll( -nDiffX, -nDiffY );
pEditEngine->pImpEditEngine->DelayedCallStatusHdl();
}
@@ -956,7 +956,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
}
else
{
- pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() = pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() | EE_STAT_CURSOROUT;
+ pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() = pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() | EditStatusFlags::CURSOROUT;
GetCursor()->Hide();
GetCursor()->SetPos( Point( -1, -1 ) );
GetCursor()->SetSize( Size( 0, 0 ) );
@@ -1123,7 +1123,7 @@ bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent )
{
if ( pEditEngine->GetInternalEditStatus().GetPrevParagraph() != pEditEngine->GetEditDoc().GetPos( GetEditSelection().Max().GetNode() ) )
{
- pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EE_STAT_CRSRLEFTPARA;
+ pEditEngine->GetInternalEditStatus().GetStatusWord() = pEditEngine->GetInternalEditStatus().GetStatusWord() | EditStatusFlags::CRSRLEFTPARA;
pEditEngine->pImpEditEngine->CallStatusHdl();
}
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 131b09cbd01b..fa62ca2d7ba9 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -886,12 +886,12 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
CursorMoved( aOldPaM.GetNode() );
if ( aStatus.NotifyCursorMovements() && ( aOldPaM.GetNode() != aPaM.GetNode() ) )
{
- aStatus.GetStatusWord() = aStatus.GetStatusWord() | EE_STAT_CRSRLEFTPARA;
+ aStatus.GetStatusWord() = aStatus.GetStatusWord() | EditStatusFlags::CRSRLEFTPARA;
aStatus.GetPrevParagraph() = aEditDoc.GetPos( aOldPaM.GetNode() );
}
}
else
- aStatus.GetStatusWord() = aStatus.GetStatusWord() | EE_STAT_CRSRMOVEFAIL;
+ aStatus.GetStatusWord() = aStatus.GetStatusWord() | EditStatusFlags::CRSRMOVEFAIL;
// May cause, an CreateAnchor or deselection all
aSelEngine.SetCurView( pEditView );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index c273180e802b..caba43f74ed9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -428,7 +428,7 @@ void ImpEditEngine::FormatDoc()
sal_uInt32 nNewHeight = CalcTextHeight( &nNewHeightNTP );
long nDiff = nNewHeight - nCurTextHeight;
if ( nDiff )
- aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTHEIGHTCHANGED : EE_STAT_TEXTWIDTHCHANGED;
+ aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTHEIGHTCHANGED : EditStatusFlags::TEXTWIDTHCHANGED;
if ( nNewHeight < nCurTextHeight )
{
aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight );
@@ -520,7 +520,7 @@ void ImpEditEngine::CheckAutoPageSize()
|| ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
{
// If ahead is centered / right or tabs ...
- aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTWIDTHCHANGED : EE_STAT_TEXTHEIGHTCHANGED;
+ aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTWIDTHCHANGED : EditStatusFlags::TEXTHEIGHTCHANGED;
for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{
// Only paragraphs which are not aligned to the left need to be
@@ -4026,7 +4026,7 @@ IMPL_LINK_NOARG_INLINE_END(ImpEditEngine, StatusTimerHdl)
void ImpEditEngine::CallStatusHdl()
{
- if ( aStatusHdlLink.IsSet() && aStatus.GetStatusWord() )
+ if ( aStatusHdlLink.IsSet() && bool(aStatus.GetStatusWord()) )
{
// The Status has to be reset before the Call,
// since other Flags might be set in the handler...
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 5c1a50628364..6bcd3a9088a1 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2378,7 +2378,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
// Invalidate?
if ( nPaintFrom>=0 )
{
- aStatus.GetStatusWord() |= EE_STAT_WRONGWORDCHANGED;
+ aStatus.GetStatusWord() |= EditStatusFlags::WRONGWORDCHANGED;
CallStatusHdl();
if (!aEditViews.empty())