summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-25 20:54:35 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-25 20:54:35 +0200
commit8b33808a1127c4552735f7a618e9639c6d109686 (patch)
tree44a8e9dfe4dd4c70d5733d05c41b626bfc851ca3
parente7ac7ba7de64068f0264b71bc4d9ff182e278338 (diff)
Revert "loplugin: cstylecast"
The change was broken. Luckily MSVC noticed: sw\inc\doc.hxx(1707) : warning C4717: 'SwDoc::GetNumberFormatter' : recursive on all control paths, function will cause runtime stack overflow. This reverts commit 7ca3303aaadd20dcc1d6e08bdeba38021cbec4bb.
-rw-r--r--sw/inc/cellatr.hxx2
-rw-r--r--sw/inc/doc.hxx4
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/frmfmt.hxx6
-rw-r--r--sw/inc/node.hxx6
-rw-r--r--sw/inc/swddetbl.hxx2
-rw-r--r--sw/inc/swtable.hxx2
-rw-r--r--sw/inc/viewsh.hxx4
10 files changed, 17 insertions, 17 deletions
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index 70cfbcc1d111..b343a8b32dc0 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -71,7 +71,7 @@ public:
SwTableBox* GetTableBox();
const SwTableBox* GetTableBox() const
- { return const_cast<SwTblBoxFormula*>(this)->GetTableBox(); }
+ { return ((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 ffb23e646847..a7b882998635 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 static_cast<const SwDoc*>(this)->IsIdxInTbl( rIdx );
+ return ((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 static_cast<const SwDoc*>(this)->GetNumberFormatter( bCreate );
+ return ((SwDoc*)this)->GetNumberFormatter( bCreate );
}
inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 2473d5ea4b29..53a801c2090f 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 const_cast<SwDocShell*>(this)->GetFEShell(); }
+ { return ((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 d0b781764fed..b59cc50e94cc 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 const_cast<SwEditShell*>(this)->GetNumberFormatter(); }
+ { return ((SwEditShell*)this)->GetNumberFormatter(); }
/// Interfaces for GlobalDocument.
bool IsGlobalDoc() const;
@@ -955,7 +955,7 @@ private:
};
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
-{ return const_cast<SwEditShell*>(this)->GetLinkManager(); }
+{ return ((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 da578a7e3281..57780e9671e4 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -272,7 +272,7 @@ public:
inline void SwFieldType::UpdateFlds() const
{
- const_cast<SwFieldType*>(this)->ModifyNotification( 0, 0 );
+ ((SwFieldType*)this)->ModifyNotification( 0, 0 );
}
/** Base class of all fields.
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 0650f44a2c62..e73f6bd22cf3 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 const_cast<SwFrmFmt*>(this)->FindContactObj(); }
+ { return ((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 const_cast<SwFrmFmt*>(this)->FindSdrObject(); }
+ { return ((SwFrmFmt*)this)->FindSdrObject(); }
SdrObject *FindRealSdrObject();
const SdrObject *FindRealSdrObject() const
- { return const_cast<SwFrmFmt*>(this)->FindRealSdrObject(); }
+ { return ((SwFrmFmt*)this)->FindRealSdrObject(); }
bool IsLowerOf( const SwFrmFmt& rFmt ) const;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 4cf51e29146b..a8c7f295e312 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 const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
+ return ((SwNode*)this)->FindSttNodeByType( eTyp );
}
inline const SwTableNode* SwNode::FindTableNode() const
{
- return const_cast<SwNode*>(this)->FindTableNode();
+ return ((SwNode*)this)->FindTableNode();
}
inline const SwSectionNode* SwNode::FindSectionNode() const
{
- return const_cast<SwNode*>(this)->FindSectionNode();
+ return ((SwNode*)this)->FindSectionNode();
}
inline sal_uLong SwNode::StartOfSectionIndex() const
{
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index 025fe81ce21c..f66e723d312d 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -47,7 +47,7 @@ protected:
inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
{
- return const_cast<SwDDETable*>(this)->GetDDEFldType();
+ return ((SwDDETable*)this)->GetDDEFldType();
}
#endif
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 3f7c716ecab1..592eacb8d02f 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 const_cast<SwTable*>(this)->GetTblBox( nSttIdx ); }
+ { return ((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 74fc0bbfceb4..7eab33738480 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 const_cast<SwViewShell*>(this)->GetDrawView(); }
+ const SdrView *GetDrawView() const { return ((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 const_cast<SwViewShell*>(this)->GetAttrPool();
+ return ((SwViewShell*)this)->GetAttrPool();
}
#endif // INCLUDED_SW_INC_VIEWSH_HXX