[Libreoffice-commits] core.git: sw/inc
Noel Grandin
noel at peralex.com
Mon Nov 24 22:43:59 PST 2014
sw/inc/cellatr.hxx | 2 +-
sw/inc/doc.hxx | 4 ++--
sw/inc/docsh.hxx | 2 +-
sw/inc/editsh.hxx | 4 ++--
sw/inc/fldbas.hxx | 2 +-
sw/inc/frmfmt.hxx | 6 +++---
sw/inc/node.hxx | 6 +++---
sw/inc/swddetbl.hxx | 2 +-
sw/inc/swtable.hxx | 2 +-
sw/inc/viewsh.hxx | 4 ++--
10 files changed, 17 insertions(+), 17 deletions(-)
New commits:
commit 7ca3303aaadd20dcc1d6e08bdeba38021cbec4bb
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 25 06:46:49 2014 +0200
loplugin: cstylecast
Change-Id: Idc6c34d8b3cfab35c7dc841a9ff70c218e0282df
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index b343a8b..70cfbcc 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -71,7 +71,7 @@ public:
SwTableBox* GetTableBox();
const SwTableBox* GetTableBox() const
- { return ((SwTblBoxFormula*)this)->GetTableBox(); }
+ { return const_cast<SwTblBoxFormula*>(this)->GetTableBox(); }
void ChangeState( const SfxPoolItem* pItem );
void Calc( SwTblCalcPara& rCalcPara, double& rValue );
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index a7b8829..ffb23e6 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1691,7 +1691,7 @@ void ClrContourCache();
inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
{
- return ((SwDoc*)this)->IsIdxInTbl( rIdx );
+ return static_cast<const SwDoc*>(this)->IsIdxInTbl( rIdx );
}
inline SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate )
@@ -1703,7 +1703,7 @@ inline SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate )
inline const SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate ) const
{
- return ((SwDoc*)this)->GetNumberFormatter( bCreate );
+ return static_cast<const SwDoc*>(this)->GetNumberFormatter( bCreate );
}
inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 53a801c2..2473d5e 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -222,7 +222,7 @@ public:
/// For Core - it knows the DocShell but not the WrtShell!
SwFEShell *GetFEShell();
const SwFEShell *GetFEShell() const
- { return ((SwDocShell*)this)->GetFEShell(); }
+ { return const_cast<SwDocShell*>(this)->GetFEShell(); }
/// For inserting document.
Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index b59cc50..d0b7817 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -869,7 +869,7 @@ public:
/// Query NumberFormater from document.
SvNumberFormatter* GetNumberFormatter();
const SvNumberFormatter* GetNumberFormatter() const
- { return ((SwEditShell*)this)->GetNumberFormatter(); }
+ { return const_cast<SwEditShell*>(this)->GetNumberFormatter(); }
/// Interfaces for GlobalDocument.
bool IsGlobalDoc() const;
@@ -955,7 +955,7 @@ private:
};
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
-{ return ((SwEditShell*)this)->GetLinkManager(); }
+{ return const_cast<SwEditShell*>(this)->GetLinkManager(); }
/// Class for automated call of Start- and EndAction().
class SwActContext {
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 57780e9..da578a7 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -272,7 +272,7 @@ public:
inline void SwFieldType::UpdateFlds() const
{
- ((SwFieldType*)this)->ModifyNotification( 0, 0 );
+ const_cast<SwFieldType*>(this)->ModifyNotification( 0, 0 );
}
/** Base class of all fields.
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index e73f6bd..0650f44 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -97,7 +97,7 @@ public:
The UserCall knows its SdrObject. */
SwContact *FindContactObj();
const SwContact *FindContactObj() const
- { return ((SwFrmFmt*)this)->FindContactObj(); }
+ { return const_cast<SwFrmFmt*>(this)->FindContactObj(); }
/** @return the SdrObject, that is connected to the ContactObject.
Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
@@ -105,11 +105,11 @@ public:
"Real SdrObject" has position and a Z-order. */
SdrObject *FindSdrObject();
const SdrObject *FindSdrObject() const
- { return ((SwFrmFmt*)this)->FindSdrObject(); }
+ { return const_cast<SwFrmFmt*>(this)->FindSdrObject(); }
SdrObject *FindRealSdrObject();
const SdrObject *FindRealSdrObject() const
- { return ((SwFrmFmt*)this)->FindRealSdrObject(); }
+ { return const_cast<SwFrmFmt*>(this)->FindRealSdrObject(); }
bool IsLowerOf( const SwFrmFmt& rFmt ) const;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index a8c7f29..4cf51e2 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -665,15 +665,15 @@ inline bool SwNode::IsGrfNode() const
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
{
- return ((SwNode*)this)->FindSttNodeByType( eTyp );
+ return const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
}
inline const SwTableNode* SwNode::FindTableNode() const
{
- return ((SwNode*)this)->FindTableNode();
+ return const_cast<SwNode*>(this)->FindTableNode();
}
inline const SwSectionNode* SwNode::FindSectionNode() const
{
- return ((SwNode*)this)->FindSectionNode();
+ return const_cast<SwNode*>(this)->FindSectionNode();
}
inline sal_uLong SwNode::StartOfSectionIndex() const
{
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index f66e723..025fe81 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -47,7 +47,7 @@ protected:
inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
{
- return ((SwDDETable*)this)->GetDDEFldType();
+ return const_cast<SwDDETable*>(this)->GetDDEFldType();
}
#endif
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 592eacb..3f7c716 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -285,7 +285,7 @@ public:
// Get box, whose start index is set on nBoxStt.
SwTableBox* GetTblBox( sal_uLong nSttIdx );
const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const
- { return ((SwTable*)this)->GetTblBox( nSttIdx ); }
+ { return const_cast<SwTable*>(this)->GetTblBox( nSttIdx ); }
// Returns true if table contains nestings.
bool IsTblComplex() const;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 7eab337..74fc0bb 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -473,7 +473,7 @@ public:
// DrawView may be used at UI.
SdrView *GetDrawView();
- const SdrView *GetDrawView() const { return ((SwViewShell*)this)->GetDrawView(); }
+ const SdrView *GetDrawView() const { return const_cast<SwViewShell*>(this)->GetDrawView(); }
// Take care that MarkList is up-to-date in any case (Bug 57153).
SdrView *GetDrawViewWithValidMarkList();
@@ -613,7 +613,7 @@ inline void SwViewShell::UnlockPaint( bool bVirDev )
}
inline const SfxItemPool& SwViewShell::GetAttrPool() const
{
- return ((SwViewShell*)this)->GetAttrPool();
+ return const_cast<SwViewShell*>(this)->GetAttrPool();
}
#endif // INCLUDED_SW_INC_VIEWSH_HXX
More information about the Libreoffice-commits
mailing list