vcl/source/window/menubarwindow.cxx      |    4 --
 vcl/source/window/menufloatingwindow.cxx |   10 +-----
 vcl/source/window/menuwindow.cxx         |   51 -------------------------------
 vcl/source/window/menuwindow.hxx         |    3 -
 4 files changed, 3 insertions(+), 65 deletions(-)

New commits:
commit 7cc23494dbadcd1ae0b94f6163ffe293857eb266
Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
Date:   Tue May 19 17:45:02 2015 +0900

    remove ImplInitMenuWindow as ApplySettings set it up instead
    
    Change-Id: I9086d36e254d3705bfc60ad9f01c09943f915c09

diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index faab3d9..dd2e9c6 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -187,7 +187,6 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
     pMenu = pMen;
     KillActivePopup();
     nHighlightedItem = ITEMPOS_INVALID;
-    ImplInitMenuWindow(this, true, true);
     if (pMen)
     {
         aCloseBtn->ShowItem(IID_DOCUMENTCLOSE, pMen->HasCloseButton());
@@ -991,7 +990,6 @@ void MenuBarWindow::StateChanged( StateChangedType nType )
     if (nType == StateChangedType::ControlForeground ||
         nType == StateChangedType::ControlBackground)
     {
-        ImplInitMenuWindow(this, false, true);
         Invalidate();
     }
     else if(pMenu)
@@ -1005,8 +1003,6 @@ void MenuBarWindow::LayoutChanged()
     if (!pMenu)
         return;
 
-    ImplInitMenuWindow(this, true, true);
-
     // if the font was changed.
     long nHeight = pMenu->ImplCalcSize(this).Height();
 
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index dea3016..46a997a 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -46,7 +46,6 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, 
vcl::Window* pParent, WinBit
     bKeyInput           = false;
 
     EnableSaveBackground();
-    ImplInitMenuWindow( this, true, false );
 
     SetPopupModeEndHdl( LINK( this, MenuFloatingWindow, PopupEnd ) );
 
@@ -1176,7 +1175,6 @@ void MenuFloatingWindow::StateChanged( StateChangedType 
nType )
 
     if ( ( nType == StateChangedType::ControlForeground ) || ( nType == 
StateChangedType::ControlBackground ) )
     {
-        ImplInitMenuWindow( this, false, false );
         Invalidate();
     }
 }
@@ -1190,7 +1188,6 @@ void MenuFloatingWindow::DataChanged( const 
DataChangedEvent& rDCEvt )
          ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
           (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
     {
-        ImplInitMenuWindow( this, false, false );
         Invalidate();
     }
 }
@@ -1202,18 +1199,17 @@ void MenuFloatingWindow::Command( const CommandEvent& 
rCEvt )
         const CommandWheelData* pData = rCEvt.GetWheelData();
         if( !pData->GetModifier() && ( pData->GetMode() == 
CommandWheelMode::SCROLL ) )
         {
-//          ImplCursorUpDown( pData->GetDelta() > 0L );
             ImplScroll( pData->GetDelta() > 0L );
             MouseMove( MouseEvent( GetPointerPosPixel(), 0 ) );
         }
     }
 }
 
-::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible 
> MenuFloatingWindow::CreateAccessible()
+css::uno::Reference<css::accessibility::XAccessible> 
MenuFloatingWindow::CreateAccessible()
 {
-    ::com::sun::star::uno::Reference< 
::com::sun::star::accessibility::XAccessible > xAcc;
+    css::uno::Reference<css::accessibility::XAccessible> xAcc;
 
-    if ( pMenu && !pMenu->pStartedFrom )
+    if (pMenu && !pMenu->pStartedFrom)
         xAcc = pMenu->GetAccessible();
 
     return xAcc;
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 2e8df7a..e915c33 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -26,57 +26,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
 
-void MenuWindow::ImplInitMenuWindow(vcl::Window* pWin, bool bFont, bool 
bMenuBar)
-{
-    const StyleSettings& rStyleSettings = 
pWin->GetSettings().GetStyleSettings();
-
-    // FIXME RenderContext
-    if (bFont)
-        pWin->SetPointFont(*pWin, rStyleSettings.GetMenuFont());
-    if( bMenuBar )
-    {
-        const BitmapEx& rPersonaBitmap = 
Application::GetSettings().GetStyleSettings().GetPersonaHeader();
-        if ( !rPersonaBitmap.IsEmpty() )
-        {
-            Wallpaper aWallpaper( rPersonaBitmap );
-            aWallpaper.SetStyle( WALLPAPER_TOPRIGHT );
-            aWallpaper.SetColor( 
Application::GetSettings().GetStyleSettings().GetWorkspaceColor() );
-
-            pWin->SetBackground( aWallpaper );
-            pWin->SetPaintTransparent( false );
-            pWin->SetParentClipMode( 0 );
-        }
-        else if ( pWin->IsNativeControlSupported( CTRL_MENUBAR, 
PART_ENTIRE_CONTROL ) )
-        {
-            pWin->SetBackground();  // background will be drawn by NWF
-        }
-        else
-        {
-            Wallpaper aWallpaper;
-            aWallpaper.SetStyle( WALLPAPER_APPLICATIONGRADIENT );
-            pWin->SetBackground( aWallpaper );
-            pWin->SetPaintTransparent( false );
-            pWin->SetParentClipMode( 0 );
-        }
-    }
-    else
-    {
-        if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, 
PART_ENTIRE_CONTROL ) )
-        {
-            pWin->SetBackground();  // background will be drawn by NWF
-        }
-        else
-            pWin->SetBackground( Wallpaper( rStyleSettings.GetMenuColor() ) );
-    }
-
-    if ( bMenuBar )
-        pWin->SetTextColor( rStyleSettings.GetMenuBarTextColor() );
-    else
-        pWin->SetTextColor( rStyleSettings.GetMenuTextColor() );
-    pWin->SetTextFillColor();
-    pWin->SetLineColor();
-}
-
 static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, vcl::Window 
*pWindow )
 {
     AllSettings aAllSettings( pWindow->GetSettings() );
diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx
index 16d2b88..37da819 100644
--- a/vcl/source/window/menuwindow.hxx
+++ b/vcl/source/window/menuwindow.hxx
@@ -53,9 +53,6 @@ class MenuWindow
 public:
     virtual ~MenuWindow() {}
 
-    /// Sets up some visual properties of the underlying window.
-    static void ImplInitMenuWindow(vcl::Window* pWin, bool bFont, bool 
bMenuBar);
-
     /// Show the appropriate help tooltip.
     static bool ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, 
sal_uInt16 nHighlightedItem,
             const HelpEvent& rHEvt, const Rectangle &rHighlightRect);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to