summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-06-29 15:32:09 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-06-29 18:06:15 +0400
commit7d1e257a6ba2bbb0120753a09c140200ab913991 (patch)
tree413e13e845036da79481dc238f5b06aa545fbf9e /vcl
parentGetNativeControlRegion is const (diff)
downloadcore-7d1e257a6ba2bbb0120753a09c140200ab913991.tar.gz
core-7d1e257a6ba2bbb0120753a09c140200ab913991.zip
make IsNativeControlSupported const
Change-Id: I4346b2df94fc8767fce734362901b6248bb6342d
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/window/status.cxx7
2 files changed, 5 insertions, 10 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a5781ee61d35..6ee894479c1c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2891,10 +2891,8 @@ long RadioButton::ImplGetImageToTextDistance() const
Size RadioButton::ImplGetRadioImageSize() const
{
Size aSize;
- // why are IsNativeControlSupported and GetNativeControlRegion not const ?
- RadioButton* pThis = const_cast<RadioButton*>(this);
bool bDefaultSize = true;
- if( pThis->IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
+ if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
@@ -3825,10 +3823,8 @@ long CheckBox::ImplGetImageToTextDistance() const
Size CheckBox::ImplGetCheckImageSize() const
{
Size aSize;
- // why are IsNativeControlSupported and GetNativeControlRegion not const ?
- CheckBox* pThis = const_cast<CheckBox*>(this);
bool bDefaultSize = true;
- if( pThis->IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
+ if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 7ec6fd79d968..1d08e8444e6c 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1595,9 +1595,8 @@ Size StatusBar::CalcWindowSizePixel() const
long nMinHeight = GetTextHeight();
const long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2;
long nProgressHeight = nMinHeight + nBarTextOffset;
- // FIXME: IsNativeControlSupported and GetNativeControlRegion should be const ?
- StatusBar* pThis = const_cast<StatusBar*>( this );
- if( pThis->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
+
+ if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
@@ -1611,7 +1610,7 @@ Size StatusBar::CalcWindowSizePixel() const
}
if( mpImplData->mbDrawItemFrames &&
- pThis->IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
+ IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
{
ImplControlValue aControlValue( FRAME_DRAW_NODRAW );
Rectangle aBound, aContent;