vcl/source/window/menu.cxx      |   21 +++++++++++++++++----
 vcl/unx/generic/app/i18n_im.cxx |    9 ++++++---
 2 files changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 39a060442cb1148e976c4f2316d0449dd285e8df
Author: Caolán McNamara <[email protected]>
Date:   Sat Apr 26 19:08:48 2014 +0100

    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

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 40f7c55..ae8e74a 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 )
commit 506bf3bc3f65834c1f69d7d5ea38221e67b00346
Author: Caolán McNamara <[email protected]>
Date:   Sat Apr 26 15:36:19 2014 +0100

    coverity#708651 Uninitialized pointer field
    
    Change-Id: If2c5d406994902839c4c81a947fc46a06056fe90

diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index acbca69..7522416 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -245,10 +245,13 @@ SalI18N_InputMethod::PosixLocale()
 
 // Constructor / Destructor / Initialisation
 
-SalI18N_InputMethod::SalI18N_InputMethod( ) : mbUseable( 
bUseInputMethodDefault ),
-                                              maMethod( (XIM)NULL ),
-                                                mpStyles( (XIMStyles*)NULL )
+SalI18N_InputMethod::SalI18N_InputMethod( )
+    : mbUseable( bUseInputMethodDefault )
+    , maMethod( (XIM)NULL )
+    , mpStyles( (XIMStyles*)NULL )
 {
+    maDestroyCallback.callback = (XIMProc)NULL;
+    maDestroyCallback.client_data = (XPointer)NULL;
     const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" );
     if ( pUseInputMethod != NULL )
         mbUseable = pUseInputMethod[0] != '\0' ;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to