diff options
author | Susobhan Ghosh <susobhang70@gmail.com> | 2016-01-15 11:59:19 +0530 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-01-15 08:12:00 +0000 |
commit | 51b71a7be13611acc02a702cf025425fc746f4a2 (patch) | |
tree | 78e5c94c22af8d3d193a012dcf2b76a64bbcc3c8 /framework | |
parent | 07054b050eb24442be92c1733aee27fe0a80ef69 (diff) |
Related tdf#96059 Fix icons in File->New menu
Change-Id: Iecfa69ab9db76ce0390a06d9d9574f30469c131a
Reviewed-on: https://gerrit.libreoffice.org/21483
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/newmenucontroller.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 352a531e52cd..5ef569b33122 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -41,6 +41,8 @@ #include <osl/file.hxx> #include <svtools/menuoptions.hxx> #include <svtools/acceleratorexecute.hxx> +#include <svtools/imagemgr.hxx> +#include <tools/urlobj.hxx> #include <unotools/moduleoptions.hxx> #include <osl/mutex.hxx> #include <memory> @@ -101,7 +103,10 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages ) { OUString aCmd( pPopupMenu->GetItemCommand( nItemId ) ); if ( !aCmd.isEmpty() ) - aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aCmd, false, xFrame ); + { + INetURLObject aURLObj( aCmd ); + aImage = SvFileInformationManager::GetImageNoDefault( aURLObj, false ); + } if ( !!aImage ) pPopupMenu->SetItemImage( nItemId, aImage ); |