diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:38 +0100 |
commit | 5429049e3b8fd12e84aca83be7ca19e52920f672 (patch) | |
tree | 3b473be72f20a82357bd3f8ee7aa558b6b517e99 /svx/source/xoutdev | |
parent | 0d05f417c3a7dcde89f5e15b29f39ce2db65b543 (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ic90647cc4da716b54b00520b683cee027a664c22
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xtable.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index fe93cad652a4..e977f02f2283 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -133,7 +133,7 @@ Bitmap XOBitmap::GetBitmap() const const GraphicObject& XOBitmap::GetGraphicObject() const { if( bGraphicDirty ) - ( (XOBitmap*) this )->Array2Bitmap(); + const_cast<XOBitmap*>(this)->Array2Bitmap(); return aGraphicObject; } diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index 166c873f27da..c5cd0c549602 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -134,8 +134,8 @@ long XPropertyList::Count() const { if( mbListDirty ) { - if( !( (XPropertyList*) this )->Load() ) - ( (XPropertyList*) this )->Create(); + if( !const_cast<XPropertyList*>(this)->Load() ) + const_cast<XPropertyList*>(this)->Create(); } return maList.size(); } @@ -144,8 +144,8 @@ XPropertyEntry* XPropertyList::Get( long nIndex ) const { if( mbListDirty ) { - if( !( (XPropertyList*) this )->Load() ) - ( (XPropertyList*) this )->Create(); + if( !const_cast<XPropertyList*>(this)->Load() ) + const_cast<XPropertyList*>(this)->Create(); } return ( (size_t)nIndex < maList.size() ) ? maList[ nIndex ] : NULL; } @@ -154,8 +154,8 @@ long XPropertyList::GetIndex(const OUString& rName) const { if( mbListDirty ) { - if( !( (XPropertyList*) this )->Load() ) - ( (XPropertyList*) this )->Create(); + if( !const_cast<XPropertyList*>(this)->Load() ) + const_cast<XPropertyList*>(this)->Create(); } for( long i = 0, n = maList.size(); i < n; ++i ) { |