summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxwindow.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-20 15:51:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-21 08:07:34 +0100
commit8cea43730177a89c7686cda64f87a2e9e63fd7fd (patch)
treeb34c7aca68d193b3639563ff38bb67e644200137 /toolkit/source/awt/vclxwindow.cxx
parent3404084d62e6289db8308f97793ea5fd75c61274 (diff)
simplify code
These methods are virtual, so the check does nothing useful. Possibly back when this code was introduced, the methods were not. This was introduced in commit 411f66186e228 Date: Mon Jan 31 07:58:15 2005 +0000 INTEGRATION: CWS vcl34 (1.49.26); FILE MERGED 2005/01/06 14:13:03 ssa 1.49.26.1: #i37461# get/setOutputsize has to check for DockingWindow to call proper method to solve https://bz.apache.org/ooo/show_bug.cgi?id=37461 I have checked, and the bug does not come back. Change-Id: I540b85eccbf7107ee640f09b41340dc906995557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90795 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx22
1 files changed, 4 insertions, 18 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 0a789dc376e3..01ec82878f79 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2441,29 +2441,15 @@ sal_Bool SAL_CALL VCLXWindow::isInPopupMode( )
void SAL_CALL VCLXWindow::setOutputSize( const css::awt::Size& aSize )
{
SolarMutexGuard aGuard;
- VclPtr<vcl::Window> pWindow;
- if( (pWindow = GetWindow()) != nullptr )
- {
- DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >(pWindow.get());
- if( pDockingWindow )
- pDockingWindow->SetOutputSizePixel( VCLSize( aSize ) );
- else
- pWindow->SetOutputSizePixel( VCLSize( aSize ) );
- }
+ if( VclPtr<vcl::Window> pWindow = GetWindow() )
+ pWindow->SetOutputSizePixel( VCLSize( aSize ) );
}
css::awt::Size SAL_CALL VCLXWindow::getOutputSize( )
{
SolarMutexGuard aGuard;
- VclPtr<vcl::Window> pWindow;
- if( (pWindow = GetWindow()) != nullptr )
- {
- DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >(pWindow.get());
- if( pDockingWindow )
- return AWTSize( pDockingWindow->GetOutputSizePixel() );
- else
- return AWTSize( pWindow->GetOutputSizePixel() );
- }
+ if( VclPtr<vcl::Window> pWindow = GetWindow() )
+ return AWTSize( pWindow->GetOutputSizePixel() );
else
return css::awt::Size();
}