diff options
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/clipping.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/decoview.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 20 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
8 files changed, 27 insertions, 32 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index ea117be234ac..906486ad51d5 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -492,7 +492,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize ); tools::Rectangle aBounds, aContent; if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion, - ControlState::ENABLED, aControlValue, OUString(), + ControlState::ENABLED, aControlValue, aBounds, aContent ) ) { mnLeftBorder = aContent.Left() - aBounds.Left(); @@ -696,7 +696,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c tools::Rectangle aContentRgn(aCtrlRegion); if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize && rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion, - nState, aControlValue, OUString(), + nState, aControlValue, aBoundingRgn, aContentRgn)) { aCtrlRegion=aContentRgn; diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index d87bafd74de3..ab46546a4daa 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -674,7 +674,7 @@ void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Re } void Window::SaveBackground( const Point& rPos, const Size& rSize, - const Point& rDestOff, VirtualDevice& rSaveDevice ) + VirtualDevice& rSaveDevice ) { if ( mpWindowImpl->mpPaintRegion ) { @@ -687,7 +687,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, if ( !aClip.IsEmpty() ) { const vcl::Region aOldClip( rSaveDevice.GetClipRegion() ); - const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) ); + const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) ); const bool bMap = rSaveDevice.IsMapModeEnabled(); // move clip region to have the same distance to DestOffset @@ -697,12 +697,12 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, rSaveDevice.EnableMapMode( false ); rSaveDevice.SetClipRegion( aClip ); rSaveDevice.EnableMapMode( bMap ); - rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this ); + rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this ); rSaveDevice.SetClipRegion( aOldClip ); } } else - rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this ); + rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this ); } } /* namespace vcl */ diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 4a84622b7ea6..ade16d0e2db6 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -603,7 +603,7 @@ void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect, tools::Rectangle aBound, aContent; tools::Rectangle aNatRgn( rRect ); if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border, - aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) + aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) ) { // if bNoDraw is true then don't call the drawing routine // but just update the target rectangle diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 77b48ad3c9d7..9c547a933fcf 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1289,7 +1289,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark, - aCtrlRegion, ControlState::ENABLED, aVal, OUString(), + aCtrlRegion, ControlState::ENABLED, aVal, aNativeBounds, aNativeContent)) { rCheckHeight = aNativeBounds.GetHeight(); @@ -1299,7 +1299,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemRadioMark)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemRadioMark, - aCtrlRegion, ControlState::ENABLED, aVal, OUString(), + aCtrlRegion, ControlState::ENABLED, aVal, aNativeBounds, aNativeContent)) { rRadioHeight = aNativeBounds.GetHeight(); @@ -1320,7 +1320,7 @@ bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Siz { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow, aCtrlRegion, ControlState::ENABLED, - aVal, OUString(), aNativeBounds, aNativeContent)) + aVal, aNativeBounds, aNativeContent)) { Size aSize(aNativeContent.GetWidth(), aNativeContent.GetHeight()); rArrowSize = aSize; @@ -1566,7 +1566,6 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) aCtrlRegion, ControlState::ENABLED, aVal, - OUString(), aNativeBounds, aNativeContent ) ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 01f5b4a8b2f3..0fcaa9ec0d32 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -612,7 +612,7 @@ void StatusBar::ImplCalcProgressRect() tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) ); tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion, - ControlState::ENABLED, aValue, OUString(), + ControlState::ENABLED, aValue, aNativeControlRegion, aNativeContentRegion ) ) ) { long nProgressHeight = aNativeControlRegion.GetHeight(); @@ -1418,7 +1418,7 @@ Size StatusBar::CalcWindowSizePixel() const tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) ); tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, - aControlRegion, ControlState::ENABLED, aValue, OUString(), + aControlRegion, ControlState::ENABLED, aValue, aNativeControlRegion, aNativeContentRegion ) ) { nProgressHeight = aNativeControlRegion.GetHeight(); @@ -1432,7 +1432,7 @@ Size StatusBar::CalcWindowSizePixel() const tools::Rectangle aBound, aContent; tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) ); if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border, - aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) + aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) ) { mpImplData->mnItemBorderWidth = ( aBound.GetHeight() - aContent.GetHeight() ) / 2; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index e85da5b1f17a..d405717e0ad7 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -130,7 +130,7 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar, bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz, - aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) + aArea, ControlState::NONE, aControlValue, aBound, aContent) ) { nWidth = bHorz ? aContent.GetWidth() : aContent.GetHeight(); } @@ -1445,7 +1445,7 @@ bool ToolBox::ImplCalcItem() if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button, aReg, ControlState::ENABLED | ControlState::ROLLOVER, - aVal, OUString(), + aVal, aNativeBounds, aNativeContent ) ) { aRect = aNativeBounds; @@ -1470,7 +1470,7 @@ bool ToolBox::ImplCalcItem() if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire, aReg, ControlState::ENABLED | ControlState::ROLLOVER, - aVal, OUString(), + aVal, aNativeBounds, aNativeContent ) ) { aRect = aNativeBounds; @@ -1482,7 +1482,7 @@ bool ToolBox::ImplCalcItem() if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aReg, ControlState::ENABLED | ControlState::ROLLOVER, - aVal, OUString(), + aVal, aNativeBounds, aNativeContent ) ) { aRect = aNativeBounds; @@ -1494,7 +1494,7 @@ bool ToolBox::ImplCalcItem() if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire, aReg, ControlState::ENABLED | ControlState::ROLLOVER, - aVal, OUString(), + aVal, aNativeBounds, aNativeContent ) ) { aRect = aNativeBounds; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 171635342747..7ee491c6c886 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -794,7 +794,7 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const return 0; } -Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const +Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect ) const { Point aPos; if( !rRect.IsEmpty() ) @@ -813,32 +813,28 @@ Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& aPos = rRect.BottomLeft(); aPos.Y()++; devPos = OutputToAbsoluteScreenPixel( aPos ); - if( devPos.Y() + rSize.Height() >= aScreen.Bottom() ) - aPos.Y() = rRect.Top() - rSize.Height(); + if( devPos.Y() >= aScreen.Bottom() ) + aPos.Y() = rRect.Top(); break; case WindowAlign::Bottom: aPos = rRect.TopLeft(); aPos.Y()--; devPos = OutputToAbsoluteScreenPixel( aPos ); - if( devPos.Y() - rSize.Height() > aScreen.Top() ) - aPos.Y() -= rSize.Height(); - else + if( devPos.Y() <= aScreen.Top() ) aPos.Y() = rRect.Bottom(); break; case WindowAlign::Left: aPos = rRect.TopRight(); aPos.X()++; devPos = OutputToAbsoluteScreenPixel( aPos ); - if( devPos.X() + rSize.Width() >= aScreen.Right() ) - aPos.X() = rRect.Left() - rSize.Width(); + if( devPos.X() >= aScreen.Right() ) + aPos.X() = rRect.Left(); break; case WindowAlign::Right: aPos = rRect.TopLeft(); aPos.X()--; devPos = OutputToAbsoluteScreenPixel( aPos ); - if( devPos.X() - rSize.Width() > aScreen.Left() ) - aPos.X() -= rSize.Width(); - else + if( devPos.X() <= aScreen.Left() ) aPos.X() = rRect.Right(); break; default: @@ -1701,7 +1697,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void) } } - sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), + sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect ), Size() ), PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose ); if ( pWin->IsDisposed() ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 579fdb9ca92f..12a5a3027321 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1220,7 +1220,7 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow ) tools::Rectangle aBoundingRgn( aCtrlRegion ); tools::Rectangle aContentRgn( aCtrlRegion ); if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion, - ControlState::ENABLED, aControlValue, OUString(), + ControlState::ENABLED, aControlValue, aBoundingRgn, aContentRgn ) ) { // comment: the magical +6 is for the extra border in bordered |