framework/inc/uielement/newmenucontroller.hxx | 9 +++------ framework/source/uielement/newmenucontroller.cxx | 13 ++++++------- framework/source/uielement/popuptoolbarcontroller.cxx | 1 + officecfg/registry/data/org/openoffice/Office/Common.xcu | 2 +- sfx2/source/appl/shutdownicon.cxx | 7 ++----- sfx2/source/dialog/backingwindow.cxx | 2 +- vcl/source/window/window.cxx | 2 +- 7 files changed, 15 insertions(+), 21 deletions(-)
New commits: commit b97d9a1238a82461e64717757a4527565f879ee2 Author: Caolán McNamara <[email protected]> Date: Wed Jan 21 14:33:43 2015 +0000 slot:5500 -> .uno:NewDoc(FromTemplate) try and strip out the slot:5500 magic/lunacy Change-Id: I7236c83fba6cb8264f76aca90242775a3de58645 diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index 8895602..ffca153 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -342,7 +342,7 @@ </node> <node oor:name="m14" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>slot:5500</value> + <value>.uno:NewDoc</value> </prop> <prop oor:name="Title"> <value xml:lang="en-US">Templates</value> diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index f6bca87..d4ef0bb 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -286,7 +286,7 @@ void ShutdownIcon::FromTemplate() xFrame = ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >( xDesktop, UNO_QUERY ); URL aTargetURL; - aTargetURL.Complete = "slot:5500"; + aTargetURL.Complete = ".uno:NewDoc"; ::com::sun::star::uno::Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); xTrans->parseStrict( aTargetURL ); @@ -294,10 +294,7 @@ void ShutdownIcon::FromTemplate() ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > xDisp; if ( xProv.is() ) { - if (aTargetURL.Protocol == "slot:") - xDisp = xProv->queryDispatch( aTargetURL, OUString(), 0 ); - else - xDisp = xProv->queryDispatch( aTargetURL, OUString("_blank"), 0 ); + xDisp = xProv->queryDispatch( aTargetURL, OUString("_self"), 0 ); } if ( xDisp.is() ) { diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index ce33bae..e0074b5 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -67,7 +67,7 @@ const char IMPRESS_WIZARD_URL[] = "private:factory/simpress?slot=6686"; const char DRAW_URL[] = "private:factory/sdraw"; const char BASE_URL[] = "private:factory/sdatabase?Interactive"; const char MATH_URL[] = "private:factory/smath"; -const char TEMPLATE_URL[] = "slot:5500"; +const char TEMPLATE_URL[] = ".uno:NewDoc"; const char OPEN_URL[] = ".uno:Open"; const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess"; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index d63aaa0..cc49cab 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2413,7 +2413,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) else if ( !ImplIsWindowOrChild( pSVData->mpIntroWindow ) ) { // ... but the VCL splash is broken, and it needs this - // (for ./soffice slot:5500) + // (for ./soffice .uno:NewDoc) pSVData->mpIntroWindow->Hide(); } commit 1dbc6d05ded0dc1df75f7b9ff779571c98800035 Author: Caolán McNamara <[email protected]> Date: Wed Jan 21 12:41:39 2015 +0000 Resolves: fdo#87636 New button not clickable when Templates preselected regression from commit 57207cab004cb78c3fa6d9ed43cc4bf81f4e6981 Author: Ariel Constenla-Haile <[email protected]> Date: Tue May 28 10:01:32 2013 +0000 Add missing copy&paste of SfxAppToolBoxControl_Impl::Select (cherry picked from commit 47204c74d9e52f54f6983af19b66af2a96b42e61) Conflicts: framework/inc/uielement/popuptoolbarcontroller.hxx svtools/inc/svtools/toolboxcontroller.hxx The menu shown in the ui is a copy of a menu. The original menu has UserData set on it which contains the target for the command, but the copy doesn't, so looking up the target always fails and ses the "_default" frame and not the correct "_self" required for the template menu Change-Id: Ic1887467bf15f081d27286bd284929c17a2b19ad diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx index 4f1502a..ad802fa 100644 --- a/framework/inc/uielement/newmenucontroller.hxx +++ b/framework/inc/uielement/newmenucontroller.hxx @@ -37,6 +37,7 @@ #include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> +#include <framework/menuconfiguration.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> #include <vcl/accel.hxx> @@ -80,13 +81,9 @@ namespace framework private: virtual void impl_setPopupMenu() SAL_OVERRIDE; - struct AddInfo - { - OUString aTargetFrame; - OUString aImageId; - }; + typedef MenuConfiguration::Attributes AddInfo; - typedef std::unordered_map< int, AddInfo > AddInfoForId; + typedef std::unordered_map< int, std::unique_ptr<AddInfo> > AddInfoForId; void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); void retrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 3abad04..216c7a1 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -85,7 +85,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages ) AddInfoForId::const_iterator pInfo = m_aAddInfoForItem.find( nItemId ); if ( pInfo != m_aAddInfoForItem.end() ) - aImageId = pInfo->second.aImageId; // Retrieve image id for menu item + aImageId = pInfo->second->aImageId; // Retrieve image id for menu item if ( !aImageId.isEmpty() ) { @@ -336,7 +336,6 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup *pVCLPopupMenu = *pSubMenu; Image aImage; - AddInfo aAddInfo; // retrieve additional parameters from bookmark menu and // store it in a unordered_map. @@ -349,10 +348,10 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup MenuConfiguration::Attributes* pBmkAttributes = reinterpret_cast<MenuConfiguration::Attributes *>(pSubMenu->GetUserValue( nItemId )); if ( pBmkAttributes != 0 ) { - aAddInfo.aTargetFrame = pBmkAttributes->aTargetFrame; - aAddInfo.aImageId = pBmkAttributes->aImageId; - - m_aAddInfoForItem.insert( AddInfoForId::value_type( nItemId, aAddInfo )); + auto result = m_aAddInfoForItem.insert( + std::make_pair(nItemId, std::unique_ptr<AddInfo>(new AddInfo(*pBmkAttributes)))); + MenuConfiguration::Attributes *pNewInfo = result.first->second.get(); + pVCLPopupMenu->SetUserValue(nItemId, reinterpret_cast<sal_uIntPtr>(pNewInfo)); } } } @@ -420,7 +419,7 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent OUString aTargetFrame( m_aTargetFrame ); AddInfoForId::const_iterator pItem = m_aAddInfoForItem.find( rEvent.MenuId ); if ( pItem != m_aAddInfoForItem.end() ) - aTargetFrame = pItem->second.aTargetFrame; + aTargetFrame = pItem->second->aTargetFrame; xDispatch = xDispatchProvider->queryDispatch( aTargetURL, aTargetFrame, 0 ); } diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index fbb2808..e0e0ad9 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -438,6 +438,7 @@ throw ( css::uno::RuntimeException, std::exception ) SolarMutexGuard aSolarMutexGuard; PopupMenu* pVCLPopupMenu = pTkPopupMenu ? dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() ) : NULL; + if ( pVCLPopupMenu ) pMenuAttributes = reinterpret_cast< MenuConfiguration::Attributes* >( pVCLPopupMenu->GetUserValue( pVCLPopupMenu->GetCurItemId() ) );
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
