convert SvxSpellArea to scoped enum
Change-Id: I91d3caabb667e7d4ff23e603026e072074058712
This commit is contained in:
@@ -57,7 +57,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
|
|||||||
ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
|
ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
|
||||||
SpellInfo* pSpellInfo = pImpEE->GetSpellInfo();
|
SpellInfo* pSpellInfo = pImpEE->GetSpellInfo();
|
||||||
|
|
||||||
if ( eArea == SVX_SPELL_BODY_START )
|
if ( eArea == SvxSpellArea::BodyStart )
|
||||||
{
|
{
|
||||||
// Is called when
|
// Is called when
|
||||||
// a) Spell-Forward has arrived at the end and should restart at the top
|
// a) Spell-Forward has arrived at the end and should restart at the top
|
||||||
@@ -76,7 +76,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
|
|||||||
pEE->GetEditDoc().GetStartPaM() );
|
pEE->GetEditDoc().GetStartPaM() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( eArea == SVX_SPELL_BODY_END )
|
else if ( eArea == SvxSpellArea::BodyEnd )
|
||||||
{
|
{
|
||||||
// Is called when
|
// Is called when
|
||||||
// a) Spell-Forward is launched
|
// a) Spell-Forward is launched
|
||||||
@@ -95,7 +95,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
|
|||||||
pEE->GetEditDoc().GetEndPaM() );
|
pEE->GetEditDoc().GetEndPaM() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( eArea == SVX_SPELL_BODY )
|
else if ( eArea == SvxSpellArea::Body )
|
||||||
{
|
{
|
||||||
; // Is handled by the App through SpellNextDocument
|
; // Is handled by the App through SpellNextDocument
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,7 @@ bool TextConvWrapper::ConvNext_impl()
|
|||||||
{
|
{
|
||||||
m_bStartDone = true;
|
m_bStartDone = true;
|
||||||
m_bEndDone = false;
|
m_bEndDone = false;
|
||||||
ConvStart_impl( SVX_SPELL_BODY );
|
ConvStart_impl( SvxSpellArea::Body );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -100,14 +100,14 @@ bool TextConvWrapper::ConvNext_impl()
|
|||||||
{
|
{
|
||||||
m_bStartDone = true;
|
m_bStartDone = true;
|
||||||
m_bEndDone = false;
|
m_bEndDone = false;
|
||||||
ConvStart_impl( SVX_SPELL_BODY );
|
ConvStart_impl( SvxSpellArea::Body );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!m_aConvSel.HasRange())
|
else if (!m_aConvSel.HasRange())
|
||||||
{
|
{
|
||||||
m_bStartChk = !m_bStartDone;
|
m_bStartChk = !m_bStartDone;
|
||||||
ConvStart_impl( m_bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
|
ConvStart_impl( m_bStartChk ? SvxSpellArea::BodyStart : SvxSpellArea::BodyEnd );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea )
|
|||||||
ImpEditEngine* pImpEE = m_pEditView->GetImpEditEngine();
|
ImpEditEngine* pImpEE = m_pEditView->GetImpEditEngine();
|
||||||
ConvInfo* pConvInfo = pImpEE->GetConvInfo();
|
ConvInfo* pConvInfo = pImpEE->GetConvInfo();
|
||||||
|
|
||||||
if ( eArea == SVX_SPELL_BODY_START )
|
if ( eArea == SvxSpellArea::BodyStart )
|
||||||
{
|
{
|
||||||
// Is called when Spell-forward has reached the end, and to start over
|
// Is called when Spell-forward has reached the end, and to start over
|
||||||
if ( m_bEndDone )
|
if ( m_bEndDone )
|
||||||
@@ -178,7 +178,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea )
|
|||||||
pEE->GetEditDoc().GetStartPaM() );
|
pEE->GetEditDoc().GetStartPaM() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( eArea == SVX_SPELL_BODY_END )
|
else if ( eArea == SvxSpellArea::BodyEnd )
|
||||||
{
|
{
|
||||||
// Is called when Spell-forward starts
|
// Is called when Spell-forward starts
|
||||||
pConvInfo->bConvToEnd = true;
|
pConvInfo->bConvToEnd = true;
|
||||||
@@ -196,7 +196,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea )
|
|||||||
pEE->GetEditDoc().GetEndPaM() );
|
pEE->GetEditDoc().GetEndPaM() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( eArea == SVX_SPELL_BODY )
|
else if ( eArea == SvxSpellArea::Body )
|
||||||
{
|
{
|
||||||
// called by ConvNext_impl...
|
// called by ConvNext_impl...
|
||||||
pConvInfo->aConvContinue = pConvInfo->aConvStart;
|
pConvInfo->aConvContinue = pConvInfo->aConvStart;
|
||||||
@@ -542,7 +542,7 @@ void TextConvWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttri
|
|||||||
void TextConvWrapper::Convert()
|
void TextConvWrapper::Convert()
|
||||||
{
|
{
|
||||||
m_bStartChk = false;
|
m_bStartChk = false;
|
||||||
ConvStart_impl( SVX_SPELL_BODY_END );
|
ConvStart_impl( SvxSpellArea::BodyEnd );
|
||||||
ConvertDocument();
|
ConvertDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -275,12 +275,12 @@ void SvxSpellWrapper::SpellDocument( )
|
|||||||
if ( bOtherCntnt )
|
if ( bOtherCntnt )
|
||||||
{
|
{
|
||||||
bReverse = false;
|
bReverse = false;
|
||||||
SpellStart( SVX_SPELL_OTHER );
|
SpellStart( SvxSpellArea::Other );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bStartChk = bReverse;
|
bStartChk = bReverse;
|
||||||
SpellStart( bReverse ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
|
SpellStart( bReverse ? SvxSpellArea::BodyStart : SvxSpellArea::BodyEnd );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( FindSpellError() )
|
if ( FindSpellError() )
|
||||||
@@ -340,7 +340,7 @@ bool SvxSpellWrapper::SpellNext( )
|
|||||||
bOtherCntnt = false;
|
bOtherCntnt = false;
|
||||||
bStartDone = !bReverse;
|
bStartDone = !bReverse;
|
||||||
bEndDone = bReverse;
|
bEndDone = bReverse;
|
||||||
SpellStart( SVX_SPELL_BODY );
|
SpellStart( SvxSpellArea::Body );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -351,7 +351,7 @@ bool SvxSpellWrapper::SpellNext( )
|
|||||||
if ( bOtherCntnt )
|
if ( bOtherCntnt )
|
||||||
{
|
{
|
||||||
bStartChk = false;
|
bStartChk = false;
|
||||||
SpellStart( SVX_SPELL_BODY );
|
SpellStart( SvxSpellArea::Body );
|
||||||
bGoOn = true;
|
bGoOn = true;
|
||||||
}
|
}
|
||||||
else if ( bStartDone && bEndDone )
|
else if ( bStartDone && bEndDone )
|
||||||
@@ -360,7 +360,7 @@ bool SvxSpellWrapper::SpellNext( )
|
|||||||
// Body area done, ask for special area
|
// Body area done, ask for special area
|
||||||
if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() )
|
if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() )
|
||||||
{
|
{
|
||||||
SpellStart( SVX_SPELL_OTHER );
|
SpellStart( SvxSpellArea::Other );
|
||||||
bOtherCntnt = bGoOn = true;
|
bOtherCntnt = bGoOn = true;
|
||||||
}
|
}
|
||||||
else if ( SpellMore() ) // check another document?
|
else if ( SpellMore() ) // check another document?
|
||||||
@@ -368,7 +368,7 @@ bool SvxSpellWrapper::SpellNext( )
|
|||||||
bOtherCntnt = false;
|
bOtherCntnt = false;
|
||||||
bStartDone = !bReverse;
|
bStartDone = !bReverse;
|
||||||
bEndDone = bReverse;
|
bEndDone = bReverse;
|
||||||
SpellStart( SVX_SPELL_BODY );
|
SpellStart( SvxSpellArea::Body );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -389,7 +389,7 @@ bool SvxSpellWrapper::SpellNext( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bStartChk = !bStartDone;
|
bStartChk = !bStartDone;
|
||||||
SpellStart( bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
|
SpellStart( bStartChk ? SvxSpellArea::BodyStart : SvxSpellArea::BodyEnd );
|
||||||
bGoOn = true;
|
bGoOn = true;
|
||||||
}
|
}
|
||||||
WAIT_ON();
|
WAIT_ON();
|
||||||
|
@@ -162,12 +162,12 @@ enum SvxDrawBezierEnum
|
|||||||
SVX_BEZIER_ELIMINATE_POINTS
|
SVX_BEZIER_ELIMINATE_POINTS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SvxSpellArea
|
enum class SvxSpellArea
|
||||||
{
|
{
|
||||||
SVX_SPELL_BODY = 0,
|
Body = 0,
|
||||||
SVX_SPELL_BODY_END,
|
BodyEnd,
|
||||||
SVX_SPELL_BODY_START,
|
BodyStart,
|
||||||
SVX_SPELL_OTHER
|
Other
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SvxFrameAnchor
|
enum SvxFrameAnchor
|
||||||
|
@@ -600,11 +600,11 @@ void SwHHCWrapper::Convert()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( m_bIsOtherContent )
|
if ( m_bIsOtherContent )
|
||||||
ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER );
|
ConvStart_impl( m_pConvArgs, SvxSpellArea::Other );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_bStartChk = false;
|
m_bStartChk = false;
|
||||||
ConvStart_impl( m_pConvArgs, SVX_SPELL_BODY_END );
|
ConvStart_impl( m_pConvArgs, SvxSpellArea::BodyEnd );
|
||||||
}
|
}
|
||||||
|
|
||||||
ConvertDocument();
|
ConvertDocument();
|
||||||
@@ -632,7 +632,7 @@ bool SwHHCWrapper::ConvNext_impl( )
|
|||||||
if ( m_bIsOtherContent )
|
if ( m_bIsOtherContent )
|
||||||
{
|
{
|
||||||
m_bStartChk = false;
|
m_bStartChk = false;
|
||||||
ConvStart_impl( m_pConvArgs, SVX_SPELL_BODY );
|
ConvStart_impl( m_pConvArgs, SvxSpellArea::Body );
|
||||||
bGoOn = true;
|
bGoOn = true;
|
||||||
}
|
}
|
||||||
else if ( m_bStartDone && m_bEndDone )
|
else if ( m_bStartDone && m_bEndDone )
|
||||||
@@ -640,14 +640,14 @@ bool SwHHCWrapper::ConvNext_impl( )
|
|||||||
// body region done, ask about special region
|
// body region done, ask about special region
|
||||||
if( HasOtherCnt_impl() )
|
if( HasOtherCnt_impl() )
|
||||||
{
|
{
|
||||||
ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER );
|
ConvStart_impl( m_pConvArgs, SvxSpellArea::Other );
|
||||||
m_bIsOtherContent = bGoOn = true;
|
m_bIsOtherContent = bGoOn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_bStartChk = !m_bStartDone;
|
m_bStartChk = !m_bStartDone;
|
||||||
ConvStart_impl( m_pConvArgs, m_bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
|
ConvStart_impl( m_pConvArgs, m_bStartChk ? SvxSpellArea::BodyStart : SvxSpellArea::BodyEnd );
|
||||||
bGoOn = true;
|
bGoOn = true;
|
||||||
}
|
}
|
||||||
return bGoOn;
|
return bGoOn;
|
||||||
@@ -686,7 +686,7 @@ bool SwHHCWrapper::HasOtherCnt_impl()
|
|||||||
|
|
||||||
void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ *pConversionArgs, SvxSpellArea eArea )
|
void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ *pConversionArgs, SvxSpellArea eArea )
|
||||||
{
|
{
|
||||||
SetDrawObj( SVX_SPELL_OTHER == eArea );
|
SetDrawObj( SvxSpellArea::Other == eArea );
|
||||||
m_pView->SpellStart( eArea, m_bStartDone, m_bEndDone, /* [out] */ pConversionArgs );
|
m_pView->SpellStart( eArea, m_bStartDone, m_bEndDone, /* [out] */ pConversionArgs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@ SwHyphWrapper::SwHyphWrapper( SwView* pVw,
|
|||||||
|
|
||||||
void SwHyphWrapper::SpellStart( SvxSpellArea eSpell )
|
void SwHyphWrapper::SpellStart( SvxSpellArea eSpell )
|
||||||
{
|
{
|
||||||
if( SVX_SPELL_OTHER == eSpell && nPageCount )
|
if( SvxSpellArea::Other == eSpell && nPageCount )
|
||||||
{
|
{
|
||||||
::EndProgress( pView->GetDocShell() );
|
::EndProgress( pView->GetDocShell() );
|
||||||
nPageCount = 0;
|
nPageCount = 0;
|
||||||
|
@@ -278,13 +278,13 @@ void SwView::SpellStart( SvxSpellArea eWhich,
|
|||||||
SwDocPositions eCurr = DOCPOS_CURR;
|
SwDocPositions eCurr = DOCPOS_CURR;
|
||||||
switch ( eWhich )
|
switch ( eWhich )
|
||||||
{
|
{
|
||||||
case SVX_SPELL_BODY:
|
case SvxSpellArea::Body:
|
||||||
if( bIsWrapReverse )
|
if( bIsWrapReverse )
|
||||||
eCurr = DOCPOS_END;
|
eCurr = DOCPOS_END;
|
||||||
else
|
else
|
||||||
eCurr = DOCPOS_START;
|
eCurr = DOCPOS_START;
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_BODY_END:
|
case SvxSpellArea::BodyEnd:
|
||||||
if( bIsWrapReverse )
|
if( bIsWrapReverse )
|
||||||
{
|
{
|
||||||
if( bStartDone )
|
if( bStartDone )
|
||||||
@@ -294,7 +294,7 @@ void SwView::SpellStart( SvxSpellArea eWhich,
|
|||||||
else if( bStartDone )
|
else if( bStartDone )
|
||||||
eCurr = DOCPOS_START;
|
eCurr = DOCPOS_START;
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_BODY_START:
|
case SvxSpellArea::BodyStart:
|
||||||
if( !bIsWrapReverse )
|
if( !bIsWrapReverse )
|
||||||
{
|
{
|
||||||
if( bEndDone )
|
if( bEndDone )
|
||||||
@@ -304,7 +304,7 @@ void SwView::SpellStart( SvxSpellArea eWhich,
|
|||||||
else if( bEndDone )
|
else if( bEndDone )
|
||||||
eCurr = DOCPOS_END;
|
eCurr = DOCPOS_END;
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_OTHER:
|
case SvxSpellArea::Other:
|
||||||
if( bIsWrapReverse )
|
if( bIsWrapReverse )
|
||||||
{
|
{
|
||||||
eStart = DOCPOS_OTHERSTART;
|
eStart = DOCPOS_OTHERSTART;
|
||||||
@@ -397,16 +397,16 @@ void SwView::HyphStart( SvxSpellArea eWhich )
|
|||||||
{
|
{
|
||||||
switch ( eWhich )
|
switch ( eWhich )
|
||||||
{
|
{
|
||||||
case SVX_SPELL_BODY:
|
case SvxSpellArea::Body:
|
||||||
m_pWrtShell->HyphStart( DOCPOS_START, DOCPOS_END );
|
m_pWrtShell->HyphStart( DOCPOS_START, DOCPOS_END );
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_BODY_END:
|
case SvxSpellArea::BodyEnd:
|
||||||
m_pWrtShell->HyphStart( DOCPOS_CURR, DOCPOS_END );
|
m_pWrtShell->HyphStart( DOCPOS_CURR, DOCPOS_END );
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_BODY_START:
|
case SvxSpellArea::BodyStart:
|
||||||
m_pWrtShell->HyphStart( DOCPOS_START, DOCPOS_CURR );
|
m_pWrtShell->HyphStart( DOCPOS_START, DOCPOS_CURR );
|
||||||
break;
|
break;
|
||||||
case SVX_SPELL_OTHER:
|
case SvxSpellArea::Other:
|
||||||
m_pWrtShell->HyphStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND );
|
m_pWrtShell->HyphStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user