summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-03-06 12:28:43 +0100
committerMichael Stahl <mstahl@redhat.com>2017-03-06 14:25:24 +0000
commitfee627825f2efb228d9c4e81ed007dd8c7066c9b (patch)
treeea8f38c49249e7ff4fada0a3ed8ad76dffd7a6a4 /sw
parent91745bdbfac1f478f230f6128240298d64d15d0d (diff)
sw: remove unnecessary upcasts
guess some broken compiler needed these Change-Id: If0132f6363555fea2ef880bd7af343c2d7b2a0a4 Reviewed-on: https://gerrit.libreoffice.org/34925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx2
-rw-r--r--sw/source/core/doc/lineinfo.cxx2
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx4
-rw-r--r--sw/source/core/frmedt/fews.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx4
8 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d252ad9273ba..fb14f5a7ed26 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2207,7 +2207,7 @@ void SwCursorShell::ShellGetFocus()
/** Get current frame in which the cursor is positioned. */
SwContentFrame *SwCursorShell::GetCurrFrame( const bool bCalcFrame ) const
{
- SET_CURR_SHELL( static_cast<SwViewShell*>(const_cast<SwCursorShell *>(this)) );
+ SET_CURR_SHELL( const_cast<SwCursorShell*>(this) );
SwContentFrame *pRet = nullptr;
SwContentNode *pNd = m_pCurrentCursor->GetContentNode();
if ( pNd )
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index 4839a3cd70fc..5da00dc03773 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -106,7 +106,7 @@ SwCharFormat* SwLineNumberInfo::GetCharFormat( IDocumentStylePoolAccess& rIDSPA
if ( !GetRegisteredIn() )
{
SwCharFormat* pFormat = rIDSPA.GetCharFormatFromPool( RES_POOLCHR_LINENUM );
- pFormat->Add( const_cast<SwClient*>(static_cast<SwClient const *>(this)) );
+ pFormat->Add( const_cast<SwLineNumberInfo*>(this) );
}
return const_cast<SwCharFormat*>(static_cast<const SwCharFormat*>(GetRegisteredIn()));
}
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 59ab8b167703..6513ec9b44e4 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -976,7 +976,7 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons
{
if( !rURL.GetMap() ||
m_pFlyFrame->GetFormat()->GetIMapObject( rRec.aPos, m_pFlyFrame ))
- return const_cast<SdrObject*>(static_cast<SdrObject const *>(this));
+ return const_cast<SwVirtFlyDrawObj*>(this);
return nullptr;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index b58e657ab84a..f733d2b9047e 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -577,7 +577,7 @@ void *SwEditShell::GetIMapInventor() const
Graphic SwEditShell::GetIMapGraphic() const
{
// returns always a graphic if the cursor is in a Fly
- SET_CURR_SHELL( const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
+ SET_CURR_SHELL( const_cast<SwEditShell*>(this) );
Graphic aRet;
SwPaM* pCursor = GetCursor();
if ( !pCursor->HasMark() )
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1536cf3c2d1e..a2c30f8ec451 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -990,7 +990,7 @@ bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const
return false;
}
- SET_CURR_SHELL( const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
+ SET_CURR_SHELL( const_cast<SwFEShell*>(this) );
if( !rSet.Set( pFly->GetFormat()->GetAttrSet() ) )
return false;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 840c05de5a7a..687b8854131d 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -598,7 +598,7 @@ FrameTypeFlags SwFEShell::GetSelFrameType() const
{
// obtain marked item as fly frame; if no fly frame, it must
// be a draw object
- const SwFlyFrame* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)));
+ const SwFlyFrame* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwFEShell*>(this));
if ( pFly != nullptr )
{
if( pFly->IsFlyLayFrame() )
@@ -1153,7 +1153,7 @@ bool SwFEShell::IsFrameSelected() const
return false;
else
return nullptr != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
- const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
+ const_cast<SwFEShell*>(this) );
}
bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index f26b1cf56172..ab0a560d5826 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -72,7 +72,7 @@ void SwFEShell::EndAllActionAndCall()
// Determine the Content's nearest to the point
Point SwFEShell::GetContentPos( const Point& rPoint, bool bNext ) const
{
- SET_CURR_SHELL( const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
+ SET_CURR_SHELL( const_cast<SwFEShell*>(this) );
return GetLayout()->GetNextPrevContentPos( rPoint, bNext );
}
@@ -81,7 +81,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
{
const SwFrame *pFrame = Imp()->HasDrawView()
? ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
- const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)))
+ const_cast<SwFEShell*>(this))
: nullptr;
if( !pFrame )
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 4f24e63b33f0..1a7a3bf402b6 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -657,7 +657,7 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
// follow field portions
if ( ! IsFollow() )
{
- SwLinePortion *pThis = const_cast<SwLinePortion*>(static_cast<SwLinePortion const *>(this));
+ SwNumberPortion *pThis = const_cast<SwNumberPortion*>(this);
pThis->Width( nSumWidth );
rInf.DrawViewOpt( *this, POR_NUMBER );
pThis->Width( nOldWidth );
@@ -683,7 +683,7 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
else
{
// logical const: reset width
- SwLinePortion *pThis = const_cast<SwLinePortion*>(static_cast<SwLinePortion const *>(this));
+ SwNumberPortion *pThis = const_cast<SwNumberPortion*>(this);
bPaintSpace = bPaintSpace && nFixWidth < nOldWidth;
sal_uInt16 nSpaceOffs = nFixWidth;
pThis->Width( nFixWidth );