diff options
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/field.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index cab79f5d8cdd..8a9cbedea66d 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -387,7 +387,7 @@ LocaleDataWrapper& FormatterBase::ImplGetLocaleDataWrapper() const { if ( !mpLocaleDataWrapper ) { - ((FormatterBase*)this)->mpLocaleDataWrapper = new LocaleDataWrapper( GetLanguageTag() ); + const_cast<FormatterBase*>(this)->mpLocaleDataWrapper = new LocaleDataWrapper( GetLanguageTag() ); } return *mpLocaleDataWrapper; } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index c356a827535d..4bf320f61f48 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1449,7 +1449,7 @@ CalendarWrapper& DateFormatter::GetCalendarWrapper() const { if ( !mpCalendarWrapper ) { - ((DateFormatter*)this)->mpCalendarWrapper = new CalendarWrapper( comphelper::getProcessComponentContext() ); + const_cast<DateFormatter*>(this)->mpCalendarWrapper = new CalendarWrapper( comphelper::getProcessComponentContext() ); mpCalendarWrapper->loadDefaultCalendar( GetLocale() ); } diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index ee09d4074d6b..3d544133c398 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1611,7 +1611,7 @@ void TabControl::SetTabPageSizePixel( const Size& rSize ) Size TabControl::GetTabPageSizePixel() const { - Rectangle aRect = ((TabControl*)this)->ImplGetTabRect( TAB_PAGERECT ); + Rectangle aRect = const_cast<TabControl*>(this)->ImplGetTabRect( TAB_PAGERECT ); return aRect.GetSize(); } @@ -1779,7 +1779,7 @@ sal_uInt16 TabControl::GetPageId( const Point& rPos ) const { for( size_t i = 0; i < mpTabCtrlData->maItemList.size(); ++i ) { - if ( ((TabControl*)this)->ImplGetTabRect( static_cast<sal_uInt16>(i) ).IsInside( rPos ) ) + if ( const_cast<TabControl*>(this)->ImplGetTabRect( static_cast<sal_uInt16>(i) ).IsInside( rPos ) ) return mpTabCtrlData->maItemList[ i ].mnId; } |