summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-11-19 15:59:22 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2015-11-19 16:18:26 +0200
commita95f2e02e1ede0a0533312705aa27c82619ed340 (patch)
tree5348b912286394476ed2958f16a9366195be6de4 /framework
parentfdab1a6bed363edcc4562dba6799de8f6ef0a872 (diff)
The base class does this already
Change-Id: I102c7c83bc335d8b5bf597ff0610e65147d4ec9b
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/saveasmenucontroller.cxx30
1 files changed, 2 insertions, 28 deletions
diff --git a/framework/source/uielement/saveasmenucontroller.cxx b/framework/source/uielement/saveasmenucontroller.cxx
index e6f4eddcde4b..3df48db450f7 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 );