diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 13 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 7 | ||||
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/regionband.cxx | 7 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 7 | ||||
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 10 | ||||
-rw-r--r-- | vcl/source/outdev/clipping.cxx | 5 | ||||
-rw-r--r-- | vcl/source/outdev/curvedshapes.cxx | 28 | ||||
-rw-r--r-- | vcl/source/outdev/line.cxx | 14 | ||||
-rw-r--r-- | vcl/source/outdev/mask.cxx | 5 | ||||
-rw-r--r-- | vcl/source/outdev/nativecontrols.cxx | 20 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 94 | ||||
-rw-r--r-- | vcl/source/outdev/rect.cxx | 21 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 14 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/splitwin.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 7 |
19 files changed, 96 insertions, 203 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index bd6c0b04214c..e7f770d5ff1f 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1493,16 +1493,13 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) { SetTopEntry( 0 ); } - else if ( !bCtrl && !bMod2 ) + else if ( !bCtrl && !bMod2 && mnCurrentPos ) { - if ( mnCurrentPos ) - { - nSelect = mpEntryList->FindFirstSelectable( mpEntryList->GetEntryCount() ? 0 : LISTBOX_ENTRY_NOTFOUND ); - if( mnTop != 0 ) - SetTopEntry( 0 ); + nSelect = mpEntryList->FindFirstSelectable( mpEntryList->GetEntryCount() ? 0 : LISTBOX_ENTRY_NOTFOUND ); + if( mnTop != 0 ) + SetTopEntry( 0 ); - bDone = true; - } + bDone = true; } maQuickSelectionEngine.Reset(); } diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 61d22c90e3d9..e2b000cdd2ea 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -579,11 +579,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); - if (pRect) - { - if (pRect == &maThumbRect) - nState |= ControlState::ROLLOVER; - } + if (pRect && pRect == &maThumbRect) + nState |= ControlState::ROLLOVER; } bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, (bHorz ? ControlPart::ThumbHorz : ControlPart::ThumbVert), diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index a945ee7cc7be..11d9bedae11c 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -551,9 +551,8 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo if( ! glyphlist.empty() ) glyphlist.pop_back(); - if (flags & USE_MY_METRICS) { - if (metrics) GetMetrics(ttf, index, metrics); - } + if ((flags & USE_MY_METRICS) && metrics) + GetMetrics(ttf, index, metrics); if (flags & ARG_1_AND_2_ARE_WORDS) { e = GetInt16(ptr, 0); diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 28ff3fc79945..549979862e01 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -650,11 +650,8 @@ bool RegionBand::OptimizeBandList() if ( pBand->mnYBottom < pBand->mnYTop ) OSL_ENSURE(false, "RegionBand::OptimizeBandList(): YBottomBoundary < YTopBoundary" ); - if ( pBand->mpNextBand ) - { - if ( pBand->mnYBottom >= pBand->mpNextBand->mnYTop ) - OSL_ENSURE(false, "RegionBand::OptimizeBandList(): overlapping bands in region!" ); - } + if ( pBand->mpNextBand && pBand->mnYBottom >= pBand->mpNextBand->mnYTop ) + OSL_ENSURE(false, "RegionBand::OptimizeBandList(): overlapping bands in region!" ); pBand = pBand->mpNextBand; } diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 93b876577269..9f56bc102902 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -298,11 +298,8 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra ImplSVData* pSVData = ImplGetSVData(); // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return false; - } + if ( !mpGraphics && !AcquireGraphics() ) + return false; pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(mpGraphics, nNewWidth, nNewHeight, meFormat); if ( pNewVirDev ) diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 462b41cda50f..e6596df1f5b8 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -136,9 +136,8 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -372,9 +371,8 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index 8f7fcbbc98f5..1c17d53aba14 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -78,9 +78,8 @@ bool OutputDevice::SelectClipRegion( const vcl::Region& rRegion, SalGraphics* pG if( !pGraphics ) { - if( !mpGraphics ) - if( !AcquireGraphics() ) - return false; + if( !mpGraphics && !AcquireGraphics() ) + return false; pGraphics = mpGraphics; } diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx index 88dde9d5adb2..8b83ea37ef58 100644 --- a/vcl/source/outdev/curvedshapes.cxx +++ b/vcl/source/outdev/curvedshapes.cxx @@ -42,11 +42,8 @@ void OutputDevice::DrawEllipse( const tools::Rectangle& rRect ) return; // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -90,11 +87,8 @@ void OutputDevice::DrawArc( const tools::Rectangle& rRect, return; // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -134,11 +128,8 @@ void OutputDevice::DrawPie( const tools::Rectangle& rRect, return; // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -185,11 +176,8 @@ void OutputDevice::DrawChord( const tools::Rectangle& rRect, return; // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 54203424257b..ef7cb30ef6ba 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -53,11 +53,8 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, if ( !IsDeviceOutputNecessary() || !mbLineColor || ( LineStyle::NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; - if( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -101,11 +98,8 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() ) return; - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx index 8677e06174a0..e8d696dd412a 100644 --- a/vcl/source/outdev/mask.cxx +++ b/vcl/source/outdev/mask.cxx @@ -88,9 +88,8 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 740d54ecc86b..3634bfe3cb01 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -162,9 +162,8 @@ bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar if( !EnableNativeWidget( *this ) ) return false; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return false; + if ( !mpGraphics && !AcquireGraphics() ) + return false; return mpGraphics->IsNativeControlSupported(nType, nPart); } @@ -178,9 +177,8 @@ bool OutputDevice::HitTestNativeScrollbar( if( !EnableNativeWidget( *this ) ) return false; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return false; + if ( !mpGraphics && !AcquireGraphics() ) + return false; Point aWinOffs( mnOutOffX, mnOutOffY ); tools::Rectangle screenRegion( rControlRegion ); @@ -282,9 +280,8 @@ bool OutputDevice::DrawNativeControl( ControlType nType, return false; // make sure the current clip region is initialized correctly - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return false; + if ( !mpGraphics && !AcquireGraphics() ) + return false; if ( mbInitClipRegion ) InitClipRegion(); @@ -325,9 +322,8 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType, if( !EnableNativeWidget( *this ) ) return false; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return false; + if ( !mpGraphics && !AcquireGraphics() ) + return false; // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 275f0c1845e5..a8b4c1767058 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -191,13 +191,8 @@ SalGraphics* OutputDevice::GetGraphics() { DBG_TESTSOLARMUTEX(); - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - { - SAL_WARN("vcl.gdi", "No mpGraphics set"); - } - } + if (!mpGraphics && !AcquireGraphics()) + SAL_WARN("vcl.gdi", "No mpGraphics set"); return mpGraphics; } @@ -206,13 +201,8 @@ SalGraphics const *OutputDevice::GetGraphics() const { DBG_TESTSOLARMUTEX(); - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - { - SAL_WARN("vcl.gdi", "No mpGraphics set"); - } - } + if (!mpGraphics && !AcquireGraphics()) + SAL_WARN("vcl.gdi", "No mpGraphics set"); return mpGraphics; } @@ -232,11 +222,8 @@ void OutputDevice::SetSettings( const AllSettings& rSettings ) SystemGraphicsData OutputDevice::GetSystemGfxData() const { - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return SystemGraphicsData(); - } + if (!mpGraphics && !AcquireGraphics()) + return SystemGraphicsData(); return mpGraphics->GetGraphicsData(); } @@ -245,52 +232,37 @@ SystemGraphicsData OutputDevice::GetSystemGfxData() const bool OutputDevice::SupportsCairo() const { - if (!mpGraphics) - { - if (!AcquireGraphics()) - return false; - } + if (!mpGraphics && !AcquireGraphics()) + return false; return mpGraphics->SupportsCairo(); } cairo::SurfaceSharedPtr OutputDevice::CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const { - if (!mpGraphics) - { - if (!AcquireGraphics()) - return cairo::SurfaceSharedPtr(); - } + if (!mpGraphics && !AcquireGraphics()) + return cairo::SurfaceSharedPtr(); return mpGraphics->CreateSurface(rSurface); } cairo::SurfaceSharedPtr OutputDevice::CreateSurface(int x, int y, int width, int height) const { - if (!mpGraphics) - { - if (!AcquireGraphics()) - return cairo::SurfaceSharedPtr(); - } + if (!mpGraphics && !AcquireGraphics()) + return cairo::SurfaceSharedPtr(); return mpGraphics->CreateSurface(*this, x, y, width, height); } cairo::SurfaceSharedPtr OutputDevice::CreateBitmapSurface(const BitmapSystemData& rData, const Size& rSize) const { - if (!mpGraphics) - { - if (!AcquireGraphics()) - return cairo::SurfaceSharedPtr(); - } + if (!mpGraphics && !AcquireGraphics()) + return cairo::SurfaceSharedPtr(); return mpGraphics->CreateBitmapSurface(*this, rData, rSize); } css::uno::Any OutputDevice::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const { - if (!mpGraphics) - { - if (!AcquireGraphics()) - return css::uno::Any(); - } + if (!mpGraphics && !AcquireGraphics()) + return css::uno::Any(); return mpGraphics->GetNativeSurfaceHandle(rSurface, rSize); } @@ -335,11 +307,8 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) sal_uInt16 OutputDevice::GetBitCount() const { // we need a graphics instance - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return 0; - } + if ( !mpGraphics && !AcquireGraphics() ) + return 0; return mpGraphics->GetBitCount(); } @@ -370,9 +339,8 @@ std::vector< VCLXGraphics* > *OutputDevice::CreateUnoGraphicsList() bool OutputDevice::SupportsOperation( OutDevSupportType eType ) const { - if( !mpGraphics ) - if( !AcquireGraphics() ) - return false; + if( !mpGraphics && !AcquireGraphics() ) + return false; const bool bHasSupport = mpGraphics->supportsOperation( eType ); return bHasSupport; } @@ -400,9 +368,8 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -457,9 +424,8 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -519,9 +485,8 @@ void OutputDevice::CopyArea( const Point& rDestPt, if ( !IsDeviceOutputNecessary() ) return; - if ( !mpGraphics ) - if ( !AcquireGraphics() ) - return; + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -597,11 +562,8 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP } pSrcGraphics = pSrcDev->mpGraphics; - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; SAL_WARN_IF( !mpGraphics || !pSrcDev->mpGraphics, "vcl.gdi", "OutputDevice::DrawOutDev(): We need more than one Graphics" ); } diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 049612c5501e..0770b68db5b6 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -88,11 +88,8 @@ void OutputDevice::DrawRect( const tools::Rectangle& rRect, nVertRound = ImplLogicHeightToDevicePixel( nVertRound ); // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -142,11 +139,8 @@ void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags ) aRect.Justify(); // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); @@ -178,11 +172,8 @@ void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags ) tools::Polygon aPoly( ImplLogicToDevicePixel( rPoly ) ); // we need a graphics - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } + if ( !mpGraphics && !AcquireGraphics() ) + return; if ( mbInitClipRegion ) InitClipRegion(); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 83327e40cbb6..853ba065f7c7 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1703,21 +1703,15 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta rTargetDevice.Push( PushFlags::CLIPREGION ); rTargetDevice.IntersectClipRegion( rRect ); _rLayout.DrawText( aPos, aStr, 0, aStr.getLength(), pVector, pDisplayText ); - if ( bDrawMnemonics ) - { - if ( nMnemonicPos != -1 ) - rTargetDevice.ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); - } + if ( bDrawMnemonics && nMnemonicPos != -1 ) + rTargetDevice.ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); rTargetDevice.Pop(); } else { _rLayout.DrawText( aPos, aStr, 0, aStr.getLength(), pVector, pDisplayText ); - if ( bDrawMnemonics ) - { - if ( nMnemonicPos != -1 ) - rTargetDevice.ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); - } + if ( bDrawMnemonics && nMnemonicPos != -1 ) + rTargetDevice.ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); } } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 00f471ef9604..e7acc9e530cf 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1118,13 +1118,10 @@ void Dialog::EndDialog( long nResult ) Hide(); - if (bModal) + if (bModal && GetParent()) { - if ( GetParent() ) - { - NotifyEvent aNEvt( MouseNotifyEvent::ENDEXECUTEDIALOG, this ); - GetParent()->CompatNotify( aNEvt ); - } + NotifyEvent aNEvt( MouseNotifyEvent::ENDEXECUTEDIALOG, this ); + GetParent()->CompatNotify( aNEvt ); } mpDialogImpl->mnResult = nResult; diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 18da9e6e432c..18085cade791 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -893,15 +893,12 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* for ( auto& rItem : rItems ) { pSet = rItem.mpSet.get(); - if (pSet) + if (pSet && pSet->mpWallpaper) { - if (pSet->mpWallpaper) - { - Point aPoint(rItem.mnLeft, rItem.mnTop); - Size aSize(rItem.mnWidth, rItem.mnHeight); - tools::Rectangle aRect(aPoint, aSize); - rRenderContext.DrawWallpaper(aRect, *pSet->mpWallpaper); - } + Point aPoint(rItem.mnLeft, rItem.mnTop); + Size aSize(rItem.mnWidth, rItem.mnHeight); + tools::Rectangle aRect(aPoint, aSize); + rRenderContext.DrawWallpaper(aRect, *pSet->mpWallpaper); } } diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 660cc4222db6..b0ce426a53c6 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -319,15 +319,12 @@ tools::Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const { tools::Rectangle aRect; ImplStatusItem* pItem = ( nPos < mvItemList.size() ) ? mvItemList[ nPos ].get() : nullptr; - if ( pItem ) + if ( pItem && pItem->mbVisible ) { - if ( pItem->mbVisible ) - { - aRect.SetLeft( pItem->mnX ); - aRect.SetRight( aRect.Left() + pItem->mnWidth + pItem->mnExtraWidth ); - aRect.SetTop( STATUSBAR_OFFSET_Y ); - aRect.SetBottom( mnCalcHeight - STATUSBAR_OFFSET_Y ); - } + aRect.SetLeft( pItem->mnX ); + aRect.SetRight( aRect.Left() + pItem->mnWidth + pItem->mnExtraWidth ); + aRect.SetTop( STATUSBAR_OFFSET_Y ); + aRect.SetBottom( mnCalcHeight - STATUSBAR_OFFSET_Y ); } return aRect; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4f3810dc3d02..7609d1ea11b3 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3074,11 +3074,8 @@ const Wallpaper& Window::GetDisplayBackground() const // FIXME: fix issue 52349, need to fix this really in // all NWF enabled controls const ToolBox* pTB = dynamic_cast<const ToolBox*>(this); - if( pTB ) - { - if( IsNativeWidgetEnabled() ) - return pTB->ImplGetToolBoxPrivateData()->maDisplayBackground; - } + if( pTB && IsNativeWidgetEnabled() ) + return pTB->ImplGetToolBoxPrivateData()->maDisplayBackground; if( !IsBackground() ) { diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 29fe7d2c19c2..cf8608615517 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -535,11 +535,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent pWinFrameData->mpMouseMoveWin = nullptr; pWinFrameData->mbInMouseMove = false; - if ( pChild ) - { - if ( pChild->IsDisposed() ) - pChild = nullptr; - } + if ( pChild && pChild->IsDisposed() ) + pChild = nullptr; if ( pMouseMoveWin->IsDisposed() ) return true; } |