summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/button.cxx4
-rw-r--r--vcl/source/window/window3.cxx24
2 files changed, 5 insertions, 23 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 715752c146c4..e35ab9de4ef6 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2739,7 +2739,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags
return pSVData->maCtrlData.maRadioImgList[nIndex];
}
-void RadioButton::ImplSetMinimumNWFSize()
+void RadioButton::ImplAdjustNWFSizes()
{
Push( PushFlags::MAPMODE );
SetMapMode(MapMode(MapUnit::MapPixel));
@@ -3579,7 +3579,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFl
return pSVData->maCtrlData.maCheckImgList[nIndex];
}
-void CheckBox::ImplSetMinimumNWFSize()
+void CheckBox::ImplAdjustNWFSizes()
{
Push( PushFlags::MAPMODE );
SetMapMode(MapMode(MapUnit::MapPixel));
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index c3412e0dda46..565a81eb292e 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -19,7 +19,6 @@
#include <vcl/window.hxx>
#include <vcl/waitobj.hxx>
-#include <vcl/button.hxx>
#include <window.h>
WaitObject::~WaitObject()
@@ -37,26 +36,9 @@ Size Window::GetOptimalSize() const
void Window::ImplAdjustNWFSizes()
{
- switch( GetType() )
- {
- case WindowType::CHECKBOX:
- static_cast<CheckBox*>(this)->ImplSetMinimumNWFSize();
- break;
- case WindowType::RADIOBUTTON:
- static_cast<RadioButton*>(this)->ImplSetMinimumNWFSize();
- break;
- default:
- {
- // iterate over children
- vcl::Window* pWin = GetWindow( GetWindowType::FirstChild );
- while( pWin )
- {
- pWin->ImplAdjustNWFSizes();
- pWin = pWin->GetWindow( GetWindowType::Next );
- }
- }
- break;
- }
+ for (Window* pWin = GetWindow(GetWindowType::FirstChild); pWin;
+ pWin = pWin->GetWindow(GetWindowType::Next))
+ pWin->ImplAdjustNWFSizes();
}
void Window::ImplClearFontData(bool bNewFontLists)