summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-12-28 18:07:13 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2013-12-28 22:40:42 +0100
commit7da8245f2621a52de8548976dda73d38d5bf027a (patch)
tree08133452c08eff4b8754a04137a4d7fb8551859c /editeng
parent73f0b3bd5553c5d023d0a1dbfdc00836e2937961 (diff)
Do not use Getters as Setters
Change-Id: Ie465e768f07f6e0ebf10042ca389b4941ba84a2a
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/editdoc.hxx2
-rw-r--r--editeng/source/editeng/editundo.cxx20
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx42
-rw-r--r--editeng/source/editeng/impedit3.cxx19
-rw-r--r--editeng/source/editeng/impedit4.cxx14
8 files changed, 47 insertions, 58 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 0ec7b0d8ddf3..5cb90b5414b2 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2275,7 +2275,7 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const OUString& rStr )
aPaM.GetNode()->Insert( rStr, aPaM.GetIndex() );
aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.getLength(), GetItemPool() );
- aPaM.GetIndex() = aPaM.GetIndex() + rStr.getLength();
+ aPaM.SetIndex( aPaM.GetIndex() + rStr.getLength() );
SetModified( sal_True );
@@ -2338,7 +2338,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem )
SetModified( sal_True );
- aPaM.GetIndex()++;
+ aPaM.SetIndex( aPaM.GetIndex() + 1 );
return aPaM;
}
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 4d2479a30e7b..5fe635ba4bdb 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -326,7 +326,6 @@ public:
void SetNode(ContentNode* p);
sal_Int32 GetIndex() const { return nIndex; }
- sal_Int32& GetIndex() { return nIndex; }
void SetIndex( sal_Int32 n ) { nIndex = n; }
sal_Bool DbgIsBuggy( EditDoc& rDoc );
@@ -406,7 +405,6 @@ public:
~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); delete pExtraInfos; }
sal_uInt16 GetLen() const { return nLen; }
- sal_uInt16& GetLen() { return nLen; }
void SetLen( sal_uInt16 nL ) { nLen = nL; }
Size& GetSize() { return aOutSz; }
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index 02989df3d732..48aacd8be787 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -305,7 +305,7 @@ void EditUndoInsertChars::Undo()
DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM);
EditSelection aSel( aPaM, aPaM );
- aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength();
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + aText.getLength() );
EditPaM aNewPaM( GetEditEngine()->DeleteSelection(aSel) );
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aNewPaM, aNewPaM ) );
}
@@ -316,7 +316,7 @@ void EditUndoInsertChars::Redo()
EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM);
GetEditEngine()->InsertText(EditSelection(aPaM, aPaM), aText);
EditPaM aNewPaM( aPaM );
- aNewPaM.GetIndex() = aNewPaM.GetIndex() + aText.getLength();
+ aNewPaM.SetIndex( aNewPaM.GetIndex() + aText.getLength() );
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) );
}
@@ -348,7 +348,7 @@ void EditUndoRemoveChars::Undo()
EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM);
EditSelection aSel( aPaM, aPaM );
GetEditEngine()->InsertText(aSel, aText);
- aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength();
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + aText.getLength() );
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel);
}
@@ -357,7 +357,7 @@ void EditUndoRemoveChars::Redo()
DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM);
EditSelection aSel( aPaM, aPaM );
- aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength();
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + aText.getLength() );
EditPaM aNewPaM = GetEditEngine()->DeleteSelection(aSel);
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aNewPaM);
}
@@ -381,9 +381,9 @@ void EditUndoInsertFeature::Undo()
EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM);
EditSelection aSel( aPaM, aPaM );
// Attributes are then corrected implicitly by the document ...
- aSel.Max().GetIndex()++;
+ aSel.Max().SetIndex( aSel.Max().GetIndex()+1 );
GetEditEngine()->DeleteSelection(aSel);
- aSel.Max().GetIndex()--; // For Selection
+ aSel.Max().SetIndex( aSel.Max().GetIndex()-1 ); // For Selection
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel);
}
@@ -395,7 +395,7 @@ void EditUndoInsertFeature::Redo()
GetEditEngine()->InsertFeature(aSel, *pFeature);
if ( pFeature->Which() == EE_FEATURE_FIELD )
GetEditEngine()->UpdateFieldsOnly();
- aSel.Max().GetIndex()++;
+ aSel.Max().SetIndex( aSel.Max().GetIndex()+1 );
GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel);
}
@@ -617,14 +617,12 @@ void EditUndoTransliteration::Undo()
if ( aNewSel.Min().GetNode() == aDelSel.Max().GetNode() )
{
aNewSel.Min().SetNode( aDelSel.Min().GetNode() );
- aNewSel.Min().GetIndex() =
- aNewSel.Min().GetIndex() + aDelSel.Min().GetIndex();
+ aNewSel.Min().SetIndex( aNewSel.Min().GetIndex() + aDelSel.Min().GetIndex() );
}
if ( aNewSel.Max().GetNode() == aDelSel.Max().GetNode() )
{
aNewSel.Max().SetNode( aDelSel.Min().GetNode() );
- aNewSel.Max().GetIndex() =
- aNewSel.Max().GetIndex() + aDelSel.Min().GetIndex();
+ aNewSel.Max().SetIndex( aNewSel.Max().GetIndex() + aDelSel.Min().GetIndex() );
}
pEE->DeleteSelected( aDelSel );
pEE->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index bd07d8a7b869..7895f9226052 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -880,7 +880,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
pInsertMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS ); //! necessary to retrieve the correct dictionary names later
EditPaM aPaM2( aPaM );
- aPaM2.GetIndex()++;
+ aPaM2.SetIndex( aPaM2.GetIndex()+1 );
// Are there any replace suggestions?
OUString aSelected( GetSelected() );
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index cbf6c0e2e286..556bf80050ba 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1581,7 +1581,7 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d
break;
}
}
- aEndPaM.GetIndex() = aEndPaM.GetNode()->Len();
+ aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
SetEditSelection( EditSelection( aStartPaM, aEndPaM ) );
}
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 5813cfc77001..14df4f3763d0 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -372,9 +372,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( mpIMEInfos->nLen )
{
EditSelection aSel( mpIMEInfos->aPos );
- aSel.Min().GetIndex() += mpIMEInfos->nLen-1;
- aSel.Max().GetIndex() =
- aSel.Max().GetIndex() + mpIMEInfos->nLen;
+ aSel.Min().SetIndex( aSel.Min().GetIndex() + mpIMEInfos->nLen-1 );
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + mpIMEInfos->nLen );
// #102812# convert quotes in IME text
// works on the last input character, this is escpecially in Korean text often done
// quotes that are inside of the string are not replaced!
@@ -411,8 +410,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( !pData->IsOnlyCursorChanged() )
{
EditSelection aSel( mpIMEInfos->aPos );
- aSel.Max().GetIndex() =
- aSel.Max().GetIndex() + mpIMEInfos->nLen;
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + mpIMEInfos->nLen );
aSel = DeleteSelected( aSel );
aSel = ImpInsertText( aSel, pData->GetText() );
@@ -427,7 +425,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
// restore old characters
sal_Int32 nRestore = nOldIMETextLen - nNewIMETextLen;
EditPaM aPaM( mpIMEInfos->aPos );
- aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
+ aPaM.SetIndex( aPaM.GetIndex() + nNewIMETextLen );
ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.copy( nNewIMETextLen, nRestore ) );
}
else if ( ( nOldIMETextLen < nNewIMETextLen ) &&
@@ -439,10 +437,9 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
nOverwrite = mpIMEInfos->aOldTextAfterStartPos.getLength() - nOldIMETextLen;
OSL_ENSURE( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" );
EditPaM aPaM( mpIMEInfos->aPos );
- aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
+ aPaM.SetIndex( aPaM.GetIndex() + nNewIMETextLen );
EditSelection _aSel( aPaM );
- _aSel.Max().GetIndex() =
- _aSel.Max().GetIndex() + nOverwrite;
+ _aSel.Max().SetIndex( _aSel.Max().GetIndex() + nOverwrite );
DeleteSelected( _aSel );
}
}
@@ -943,7 +940,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM&
ubidi_close( pBidi );
- aPaM.GetIndex() = nLogPos + pLine->GetStart();
+ aPaM.SetIndex( nLogPos + pLine->GetStart() );
sal_uInt16 nTmp;
sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True );
@@ -956,13 +953,13 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM&
pEditView->pImpEditView->SetCursorBidiLevel( bPortionRTL ? 0 : 1 );
// Maybe we must be *behind* the character
if ( bPortionRTL && pEditView->IsInsertMode() )
- aPaM.GetIndex()++;
+ aPaM.SetIndex( aPaM.GetIndex()+1 );
}
else
{
pEditView->pImpEditView->SetCursorBidiLevel( bPortionRTL ? 1 : 0 );
if ( !bPortionRTL && pEditView->IsInsertMode() )
- aPaM.GetIndex()++;
+ aPaM.SetIndex( aPaM.GetIndex()+1 );
}
}
@@ -1077,8 +1074,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine )
{
- sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
- aPaM.GetIndex() = pLine->GetStart() + nLogPos;
+ aPaM.SetIndex( pLine->GetStart() + ubidi_getLogicalIndex( pBidi, nVisPos, &nError ) );
pEditView->pImpEditView->SetCursorBidiLevel( 0 );
}
}
@@ -1112,9 +1108,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine )
{
- sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
-
- aPaM.GetIndex() = pLine->GetStart() + nLogPos;
+ aPaM.SetIndex( pLine->GetStart() + ubidi_getLogicalIndex( pBidi, nVisPos, &nError ) );
// RTL portion, stay visually on the left side.
sal_uInt16 _nPortionStart;
@@ -1122,9 +1116,9 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, sal_True );
const TextPortion* _pTextPortion = pParaPortion->GetTextPortions()[_nTextPortion];
if ( bVisualToLeft && !bRTLPortion && ( _pTextPortion->GetRightToLeft() % 2 ) )
- aPaM.GetIndex()++;
+ aPaM.SetIndex( aPaM.GetIndex()+1 );
else if ( !bVisualToLeft && bRTLPortion && ( bWasBehind || !(_pTextPortion->GetRightToLeft() % 2 )) )
- aPaM.GetIndex()++;
+ aPaM.SetIndex( aPaM.GetIndex()+1 );
pEditView->pImpEditView->SetCursorBidiLevel( _nPortionStart );
}
@@ -2059,7 +2053,7 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, Edit
if (rAttr.GetEnd() >= nStart && rAttr.GetStart() < nEnd)
{
EditSelection aSel( rPaM );
- aSel.Max().GetIndex() = aSel.Max().GetIndex() + nChars;
+ aSel.Max().SetIndex( aSel.Max().GetIndex() + nChars );
EditUndoSetAttribs* pAttrUndo = CreateAttribUndo( aSel, GetEmptyItemSet() );
InsertUndo( pAttrUndo );
break; // for
@@ -2567,7 +2561,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
{
// If selected, then do not also overwrite a character!
EditSelection aTmpSel( aPaM );
- aTmpSel.Max().GetIndex()++;
+ aTmpSel.Max().SetIndex( aTmpSel.Max().GetIndex()+1 );
OSL_ENSURE( !aTmpSel.DbgIsBuggy( aEditDoc ), "Overwrite: Wrong selection! ");
ImpDeleteSelection( aTmpSel );
}
@@ -2636,7 +2630,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
OSL_ENSURE( pPortion, "Blind Portion in InsertText" );
pPortion->MarkInvalid( aPaM.GetIndex(), 1 );
- aPaM.GetIndex()++; // does not do EditDoc-Method anymore
+ aPaM.SetIndex( aPaM.GetIndex()+1 ); // does not do EditDoc-Method anymore
}
TextModified();
@@ -3349,12 +3343,12 @@ void ImpEditEngine::UpdateSelections()
// Check Index if node shrunk.
if ( aCurSel.Min().GetIndex() > aCurSel.Min().GetNode()->Len() )
{
- aCurSel.Min().GetIndex() = aCurSel.Min().GetNode()->Len();
+ aCurSel.Min().SetIndex( aCurSel.Min().GetNode()->Len() );
pView->pImpEditView->SetEditSelection( aCurSel );
}
if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
{
- aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+ aCurSel.Max().SetIndex( aCurSel.Max().GetNode()->Len() );
pView->pImpEditView->SetEditSelection( aCurSel );
}
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 38a84c15c98d..5fc405c4855f 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2111,18 +2111,18 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_
EditSelection aWordSel( EditPaM( pNode, nStart ) );
aWordSel = SelectWord( aWordSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
if ( aWordSel.Min().GetIndex() < nStart )
- aWordSel.Min().GetIndex() = nStart;
+ aWordSel.Min().SetIndex( nStart );
while ( ( aWordSel.Min().GetNode() == pNode ) && ( aWordSel.Min().GetIndex() < nEnd ) )
{
const sal_Int32 nSavPos = aWordSel.Max().GetIndex();
if ( aWordSel.Max().GetIndex() > nEnd )
- aWordSel.Max().GetIndex() = nEnd;
+ aWordSel.Max().SetIndex( nEnd );
OUString aWord = GetSelected( aWordSel );
// restore selection for proper iteration at the end of the function
- aWordSel.Max().GetIndex() = nSavPos;
+ aWordSel.Max().SetIndex( nSavPos );
sal_Int32 nIdx = 0;
sal_Int32 nKashidaPos = -1;
@@ -2252,7 +2252,7 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: No TextPortion!" );
sal_uInt16 nOverlapp = nTmpPos - nPos;
- pTextPortion->GetLen() = pTextPortion->GetLen() - nOverlapp;
+ pTextPortion->SetLen( pTextPortion->GetLen() - nOverlapp );
TextPortion* pNewPortion = new TextPortion( nOverlapp );
pPortion->GetTextPortions().Insert(nSplitPortion+1, pNewPortion);
// Set sizes
@@ -2399,10 +2399,9 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) &&
!pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
{
- DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "the empty portion was no TextPortion!" );
- sal_uInt16 & r =
- pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
- r = r + nNewChars;
+ TextPortion* const pTP = pParaPortion->GetTextPortions()[nNewPortionPos];
+ DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "the empty portion was no TextPortion!" );
+ pTP->SetLen( pTP->GetLen() + nNewChars );
}
else
{
@@ -2417,7 +2416,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
FindPortion( nStartPos, nPortionStart );
TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
DBG_ASSERT( pTP, "RecalcTextPortion: Portion not found" );
- pTP->GetLen() = pTP->GetLen() + nNewChars;
+ pTP->SetLen( pTP->GetLen() + nNewChars );
pTP->GetSize().Width() = (-1);
}
}
@@ -2465,7 +2464,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
else
{
DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion too small to shrink! ");
- pTP->GetLen() = pTP->GetLen() + nNewChars;
+ pTP->SetLen( pTP->GetLen() + nNewChars );
}
sal_uInt16 nPortionCount = pParaPortion->GetTextPortions().Count();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 414fd58021a2..5cc25b654e8f 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1490,7 +1490,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
{
pEditView->pImpEditView->DrawSelection();
if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
- aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+ aCurSel.Max().SetIndex( aCurSel.Max().GetNode()->Len() );
aCurSel.Min() = aCurSel.Max();
pEditView->pImpEditView->SetEditSelection( aCurSel );
pEditView->pImpEditView->DrawSelection();
@@ -1615,7 +1615,7 @@ void ImpEditEngine::Convert( EditView* pEditView,
{
pEditView->pImpEditView->DrawSelection();
if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
- aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+ aCurSel.Max().SetIndex( aCurSel.Max().GetNode()->Len() );
aCurSel.Min() = aCurSel.Max();
pEditView->pImpEditView->SetEditSelection( aCurSel );
pEditView->pImpEditView->DrawSelection();
@@ -1870,7 +1870,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
sal_Unicode cNext = aCurSel.Max().GetNode()->GetChar( aCurSel.Max().GetIndex() );
if ( cNext == '.' )
{
- aCurSel.Max().GetIndex()++;
+ aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
aWord += OUString(cNext);
}
}
@@ -1929,7 +1929,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
sal_Unicode cNext = aCurSel.Max().GetNode()->GetChar( aCurSel.Max().GetIndex() );
if ( cNext == '.' )
{
- aCurSel.Max().GetIndex()++;
+ aCurSel.Max().SetIndex( aCurSel.Max().GetIndex()+1 );
aWord += OUString(cNext);
}
}
@@ -2302,7 +2302,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
sal_Unicode cNext = aSel.Max().GetNode()->GetChar( aSel.Max().GetIndex() );
if ( cNext == '.' )
{
- aSel.Max().GetIndex()++;
+ aSel.Max().SetIndex( aSel.Max().GetIndex()+1 );
bDottAdded = true;
}
}
@@ -2554,7 +2554,7 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS
{
EditPaM aNewPaM( aFoundSel.Max() );
if ( aNewPaM.GetIndex() > aNewPaM.GetNode()->Len() )
- aNewPaM.GetIndex() = aNewPaM.GetNode()->Len();
+ aNewPaM.SetIndex( aNewPaM.GetNode()->Len() );
pEditView->pImpEditView->SetEditSelection( aNewPaM );
FormatAndUpdate( pEditView );
UndoActionEnd( EDITUNDO_REPLACEALL );
@@ -2993,7 +2993,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
// adjust selection in end node to possibly changed size
if (aSel.Max().GetNode() == rData.aSelection.Max().GetNode())
- aNewSel.Max().GetIndex() = aNewSel.Max().GetIndex() + nDiffs;
+ aNewSel.Max().SetIndex( aNewSel.Max().GetIndex() + nDiffs );
sal_Int32 nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() );
ParaPortion* pParaPortion = GetParaPortions()[nSelNode];