summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-26 19:08:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-26 19:08:48 +0100
commit39a060442cb1148e976c4f2316d0449dd285e8df (patch)
tree5a244e6929f0da39e7b6d27f5040ff2413feee92 /vcl
parent506bf3bc3f65834c1f69d7d5ea38221e67b00346 (diff)
given the explanation of MenuFloatingWindow::InitClipRegion()...
should not be virtual then prior to 95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 the menu ImplInitClipRegion had nothing to do with the outdev ImplInitClipRegion and so all the original ImplInitClipRegion calls here should now be routed to InitMenuClipRegion which was removed by "In fact InitMenuClipRegion() is unused" so restore that Change-Id: Id208b30561803ee774e10d44e19ed0808f824766
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 40f7c5548924..ae8e74a76282 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -509,6 +509,7 @@ private:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
protected:
Region ImplCalcClipRegion( bool bIncludeLogo = true ) const;
+ void InitMenuClipRegion();
void ImplDrawScroller( bool bUp );
using Window::ImplScroll;
void ImplScroll( const Point& rMousePos );
@@ -3999,7 +4000,7 @@ MenuFloatingWindow::~MenuFloatingWindow()
void MenuFloatingWindow::Resize()
{
- InitClipRegion();
+ InitMenuClipRegion();
}
long MenuFloatingWindow::ImplGetStartY() const
@@ -4031,6 +4032,18 @@ Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
return aRegion;
}
+void MenuFloatingWindow::InitMenuClipRegion()
+{
+ if ( IsScrollMenu() )
+ {
+ SetClipRegion( ImplCalcClipRegion() );
+ }
+ else
+ {
+ SetClipRegion();
+ }
+}
+
void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown )
{
if( ! pMenu )
@@ -4255,7 +4268,7 @@ void MenuFloatingWindow::EnableScrollMenu( bool b )
bScrollMenu = b;
nScrollerHeight = b ? (sal_uInt16) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0;
bScrollDown = true;
- InitClipRegion();
+ InitMenuClipRegion();
}
void MenuFloatingWindow::Execute()
@@ -5005,7 +5018,7 @@ void MenuFloatingWindow::Paint( const Rectangle& )
CTRL_STATE_ENABLED,
aVal,
OUString() );
- InitClipRegion();
+ InitMenuClipRegion();
}
if ( IsScrollMenu() )
{
@@ -5039,7 +5052,7 @@ void MenuFloatingWindow::ImplDrawScroller( bool bUp )
aDecoView.DrawSymbol( aRect, eSymbol, GetSettings().GetStyleSettings().GetButtonTextColor(), nStyle );
- InitClipRegion();
+ InitMenuClipRegion();
}
void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )