diff options
Diffstat (limited to 'svtools/source/control/calendar.cxx')
-rw-r--r-- | svtools/source/control/calendar.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 72f2966fa0b6..1d02dc34ab09 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2132,9 +2132,9 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, { vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); - ((Calendar*)this)->SetFont( aTempFont ); + const_cast<Calendar*>(this)->SetFont( aTempFont ); nWeekWidth = GetTextWidth( a99Text )+WEEKNUMBER_OFFX; - ((Calendar*)this)->SetFont( aOldFont ); + const_cast<Calendar*>(this)->SetFont( aOldFont ); } else nWeekWidth = 0; @@ -2146,7 +2146,7 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, aFont.SetWeight( WEIGHT_BOLD ); else aFont.SetWeight( WEIGHT_NORMAL ); - ((Calendar*)this)->SetFont( aFont ); + const_cast<Calendar*>(this)->SetFont( aFont ); } Size aSize; @@ -2154,7 +2154,7 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, long nTextHeight = GetTextHeight(); if ( mnWinStyle & WB_BOLDTEXT ) - ((Calendar*)this)->SetFont( aOldFont ); + const_cast<Calendar*>(this)->SetFont( aOldFont ); aSize.Width() += ((n99TextWidth+DAY_OFFX)*7) + nWeekWidth; aSize.Width() += MONTH_BORDERX*2; |