diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:36 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:37 +0100 |
commit | 0d05f417c3a7dcde89f5e15b29f39ce2db65b543 (patch) | |
tree | 52f3890d679ef16bdd74c075a0e89f7cc036b087 /include | |
parent | 3b9e0676b0a193dbf802a6b703827c9cc0689900 (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Iabe2ecce65a91b003fe042a22630131449968fd8
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/fmtfield.hxx | 2 | ||||
-rw-r--r-- | include/svtools/treelist.hxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index efce83a940c0..bda86e2f4447 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -244,7 +244,7 @@ protected: // SetFormatKey without FormatChanged notification SvNumberFormatter* CreateFormatter() { SetFormatter(StandardFormatter()); return m_pFormatter; } - SvNumberFormatter* ImplGetFormatter() const { return m_pFormatter ? m_pFormatter : ((FormattedField*)this)->CreateFormatter(); } + SvNumberFormatter* ImplGetFormatter() const { return m_pFormatter ? m_pFormatter : const_cast<FormattedField*>(this)->CreateFormatter(); } bool PreNotify(NotifyEvent& rNEvt) SAL_OVERRIDE; diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx index cad50fc71040..79b6ff640c19 100644 --- a/include/svtools/treelist.hxx +++ b/include/svtools/treelist.hxx @@ -286,7 +286,7 @@ public: ); sal_uLong GetVisibleCount() const - { return pModel->GetVisibleCount( (SvListView*)this ); } + { return pModel->GetVisibleCount( const_cast<SvListView*>(this) ); } SvTreeListEntry* FirstVisible() const { return pModel->FirstVisible(); } @@ -324,26 +324,26 @@ public: { return pModel->GetEntryAtAbsPos(nAbsPos); } SvTreeListEntry* GetEntryAtVisPos( sal_uLong nVisPos ) const - { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); } + { return pModel->GetEntryAtVisPos(this,nVisPos); } sal_uLong GetAbsPos( SvTreeListEntry* pEntry ) const { return pModel->GetAbsPos(pEntry); } sal_uLong GetVisiblePos( SvTreeListEntry* pEntry ) const - { return pModel->GetVisiblePos((SvListView*)this,pEntry); } + { return pModel->GetVisiblePos(this,pEntry); } sal_uLong GetVisibleChildCount(SvTreeListEntry* pParent ) const - { return pModel->GetVisibleChildCount((SvListView*)this,pParent); } + { return pModel->GetVisibleChildCount(this,pParent); } sal_uLong GetChildSelectionCount( SvTreeListEntry* pParent ) const - { return pModel->GetChildSelectionCount((SvListView*)this,pParent); } + { return pModel->GetChildSelectionCount(this,pParent); } // Does not call the Select Handler virtual void SelectAll( bool bSelect, bool ) { pModel->SelectAll((SvListView*)this, bSelect); } bool IsEntryVisible( SvTreeListEntry* pEntry ) const - { return pModel->IsEntryVisible((SvListView*)this,pEntry); } + { return pModel->IsEntryVisible(this,pEntry); } bool IsExpanded( SvTreeListEntry* pEntry ) const; bool IsSelected( SvTreeListEntry* pEntry ) const; |