diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-12-16 16:51:12 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-12-17 15:47:35 +0100 |
commit | c247023dfd10bef22b9ff5a85cc44febfc90e951 (patch) | |
tree | 109a105d7f94b2309e631f83f9401a776ab7d32d /framework/source/uielement | |
parent | 9237cce9ac9d339f179585f722a8ef0e88be64e3 (diff) |
tdf#146219: don't try to detect if a recent file is a directory
This avoids accessing (possibly unavailable) remote URLs,
when we already know that MRU items are files.
Change-Id: I97e07f007d4129b93b4939311c67cf95de6ff836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126943
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127004
Diffstat (limited to 'framework/source/uielement')
-rw-r--r-- | framework/source/uielement/recentfilesmenucontroller.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 6fe4a8f7286f..e3e8773cdd3c 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -194,8 +194,10 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > pVCLPopupMenu->InsertItem( sal_uInt16( i+1 ), aMenuShortCut.makeStringAndClear() ); if ( bIsIconsAllowed ) { - Image aThumbnail = SvFileInformationManager::GetImage(aURL, false, {}); - pVCLPopupMenu->SetItemImage(sal_uInt16 ( i+1 ), aThumbnail); + // tdf#146219: don't use SvFileInformationManager::GetImageId, + // which needs to access the URL to detect if it's a directory + BitmapEx aThumbnail(SvFileInformationManager::GetFileImageId(aURL)); + pVCLPopupMenu->SetItemImage(sal_uInt16 ( i+1 ), Image(aThumbnail)); } pVCLPopupMenu->SetTipHelpText( sal_uInt16( i+1 ), aTipHelpText ); |