summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-03 21:13:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-05 21:18:11 +0200
commit256dfb9e78175c6e6a0723818afb9404ab350640 (patch)
tree69818884094a6199a53598201b4e992fc9f82c88 /editeng
parentc9e58c516e050f0134505f72b584490912d8dbb4 (diff)
Improved loplugin:cstylecast to reference types: editeng
Change-Id: I0a9321baf91ea0b460f4d1b6a638278275b184d3
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx2
-rw-r--r--editeng/source/uno/unoforou.cxx8
4 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 556cbaa8eace..438608fa9948 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1280,7 +1280,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
}
else
{
- aCurSel = pImpEditEngine->InsertTextUserInput( (const EditSelection&)aCurSel, nCharCode, !pEditView->IsInsertMode() );
+ aCurSel = pImpEditEngine->InsertTextUserInput( aCurSel, nCharCode, !pEditView->IsInsertMode() );
}
// AutoComplete ???
if ( pImpEditEngine->GetStatus().DoAutoComplete() && ( nCharCode != ' ' ) )
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 366e4f09ed6c..1225628f7e64 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2666,7 +2666,7 @@ EditPaM ImpEditEngine::InsertTextUserInput( const EditSelection& rCurSel,
InsertUndo( pNewUndo, bTryMerge );
}
- aEditDoc.InsertText( (const EditPaM&)aPaM, OUString(c) );
+ aEditDoc.InsertText( aPaM, OUString(c) );
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
OSL_ENSURE( pPortion, "Blind Portion in InsertText" );
pPortion->MarkInvalid( aPaM.GetIndex(), 1 );
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index fa8fed89bfdd..6565cec52ddb 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1869,7 +1869,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
SvxTabStopItem aNewTab( nTabCount, sal_uInt16(nValue),
SvxTabAdjust::Default, aPardMap.nTabStop );
while( nTabCount )
- ((SvxTabStop&)aNewTab[ --nTabCount ]).GetAdjustment() = SvxTabAdjust::Default;
+ const_cast<SvxTabStop&>(aNewTab[ --nTabCount ]).GetAdjustment() = SvxTabAdjust::Default;
pAttrPool->SetPoolDefaultItem( aNewTab );
}
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index f1d16b76fda1..050f3c8c85b1 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -116,7 +116,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA
//! Does it not exist on the Outliner?
//! and why is the GetAttribs on the EditEngine not a const?
- EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
+ EditEngine& rEditEngine = const_cast<EditEngine&>(rOutliner.GetEditEngine());
SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, nOnlyHardAttrib, rEditEngine ) );
@@ -154,7 +154,7 @@ SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_Int32 nPara ) const
mpParaAttribsCache = new SfxItemSet( rOutliner.GetParaAttribs( nPara ) );
mnParaAttribsCache = nPara;
- EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
+ EditEngine& rEditEngine = const_cast<EditEngine&>(rOutliner.GetEditEngine());
SfxStyleSheet* pStyle = rEditEngine.GetStyleSheet( nPara );
if( pStyle )
@@ -189,7 +189,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const
void SvxOutlinerForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const
{
- ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList );
+ const_cast<EditEngine&>(rOutliner.GetEditEngine()).GetPortions( nPara, rList );
}
void SvxOutlinerForwarder::QuickInsertText( const OUString& rText, const ESelection& rSel )
@@ -242,7 +242,7 @@ bool SvxOutlinerForwarder::IsValid() const
SfxItemState SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
- return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich );
+ return GetSvxEditEngineItemState( const_cast<EditEngine&>(rOutliner.GetEditEngine()), rSel, nWhich );
}
SfxItemState SvxOutlinerForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const