[Libreoffice-commits] core.git: framework/source

Maxim Monastirsky momonasmon at gmail.com
Thu Nov 19 06:19:33 PST 2015


 framework/source/uielement/saveasmenucontroller.cxx |   30 +-------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

New commits:
commit a95f2e02e1ede0a0533312705aa27c82619ed340
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Thu Nov 19 15:59:22 2015 +0200

    The base class does this already
    
    Change-Id: I102c7c83bc335d8b5bf597ff0610e65147d4ec9b

diff --git a/framework/source/uielement/saveasmenucontroller.cxx b/framework/source/uielement/saveasmenucontroller.cxx
index e6f4edd..3df48db 100644
--- a/framework/source/uielement/saveasmenucontroller.cxx
+++ b/framework/source/uielement/saveasmenucontroller.cxx
@@ -40,9 +40,6 @@ using namespace framework;
 
 namespace {
 
-static const char CMD_SAVEAS[]       = ".uno:SaveAs";
-static const char CMD_SAVE_REMOTE[]  = ".uno:SaveAsRemote";
-
 class SaveAsMenuController :  public svt::PopupMenuControllerBase
 {
     using svt::PopupMenuControllerBase::disposing;
@@ -75,7 +72,6 @@ public:
     virtual void SAL_CALL statusChanged( const frame::FeatureStateEvent& Event ) throw ( uno::RuntimeException, std::exception ) override;
 
     // XMenuListener
-    virtual void SAL_CALL itemSelected( const awt::MenuEvent& rEvent ) throw (uno::RuntimeException, std::exception) override;
     virtual void SAL_CALL itemActivated( const awt::MenuEvent& rEvent ) throw (uno::RuntimeException, std::exception) override;
 
     // XEventListener
@@ -113,8 +109,8 @@ void SaveAsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
 
     if ( pVCLPopupMenu )
     {
-        pVCLPopupMenu->InsertItem( CMD_SAVEAS, m_xFrame );
-        pVCLPopupMenu->InsertItem( CMD_SAVE_REMOTE, m_xFrame );
+        pVCLPopupMenu->InsertItem( ".uno:SaveAs", m_xFrame );
+        pVCLPopupMenu->InsertItem( ".uno:SaveAsRemote", m_xFrame );
     }
 }
 
@@ -139,28 +135,6 @@ void SAL_CALL SaveAsMenuController::statusChanged( const FeatureStateEvent& Even
     m_bDisabled = !Event.IsEnabled;
 }
 
-void SAL_CALL SaveAsMenuController::itemSelected( const css::awt::MenuEvent& rEvent ) throw (RuntimeException, std::exception)
-{
-    Reference< css::awt::XPopupMenu > xPopupMenu;
-
-    osl::ClearableMutexGuard aLock( m_aMutex );
-    xPopupMenu = m_xPopupMenu;
-    aLock.clear();
-
-    if ( xPopupMenu.is() )
-    {
-        const OUString aCommand( xPopupMenu->getCommand( rEvent.MenuId ) );
-        OSL_TRACE( "SaveAsMenuController::itemSelected() - Command : %s",
-                   OUStringToOString( aCommand, RTL_TEXTENCODING_UTF8 ).getStr() );
-
-        Sequence< PropertyValue > aArgsList( 0 );
-        if ( aCommand == CMD_SAVE_REMOTE )
-            dispatchCommand( CMD_SAVE_REMOTE, aArgsList );
-        else if ( aCommand == CMD_SAVEAS )
-            dispatchCommand( CMD_SAVEAS, aArgsList );
-    }
-}
-
 void SAL_CALL SaveAsMenuController::itemActivated( const css::awt::MenuEvent& ) throw (RuntimeException, std::exception)
 {
     osl::MutexGuard aLock( m_aMutex );


More information about the Libreoffice-commits mailing list